stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/game savegame.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/game savegame.c
Date: Fri, 26 Sep 2003 22:13:07 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/09/26 22:13:06

Modified files:
        src/game       : savegame.c 

Log message:
        Cleanup

Patches:
Index: stratagus/src/game/savegame.c
diff -u stratagus/src/game/savegame.c:1.32 stratagus/src/game/savegame.c:1.33
--- stratagus/src/game/savegame.c:1.32  Mon Sep 22 06:40:52 2003
+++ stratagus/src/game/savegame.c       Fri Sep 26 22:13:06 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: savegame.c,v 1.32 2003/09/22 10:40:52 n0body Exp $
+//     $Id: savegame.c,v 1.33 2003/09/27 02:13:06 jsalmon3 Exp $
 
 //@{
 
@@ -85,48 +85,50 @@
     char* s;
     char* s1;
 
-    file=CLopen(filename,CL_WRITE_GZ | CL_OPEN_WRITE);
-    if( !file ) {
-       fprintf(stderr,"Can't save to `%s'\n",filename);
+    file = CLopen(filename, CL_WRITE_GZ | CL_OPEN_WRITE);
+    if (!file) {
+       fprintf(stderr, "Can't save to `%s'\n", filename);
        return;
     }
 
     time(&now);
-    s=ctime(&now);
-    if( (s1=strchr(s,'\n')) ) {
-       *s1='\0';
+    s = ctime(&now);
+    if ((s1 = strchr(s, '\n'))) {
+       *s1 = '\0';
     }
 
     //
     // Parseable header
     //
-    CLprintf(file,";;;(save-game\n");
-    CLprintf(file,";;;  'comment\t\"Generated by Stratagus Version " VERSION 
"\"\n");
-    CLprintf(file,";;;  'comment\t\"Visit http://Stratagus.Org for more 
informations\"\n");
-    CLprintf(file,";;;  'comment\t\"$Id: savegame.c,v 1.32 2003/09/22 10:40:52 
n0body Exp $\"\n");
-    CLprintf(file,";;;  'type\t\"%s\"\n","single-player");
-    CLprintf(file,";;;  'date\t\"%s\"\n",s);
-    CLprintf(file,";;;  'map\t\"%s\"\n",TheMap.Description);
-    CLprintf(file,";;;  'engine\t'(%d %d %d)\n",
-       StratagusMajorVersion,StratagusMinorVersion,StratagusPatchLevel);
-    CLprintf(file,";;;  'savefile\t'(%d %d %d)\n",
-       StratagusMajorVersion,StratagusMinorVersion,StratagusPatchLevel);
+    CLprintf(file, ";;;(save-game\n");
+    CLprintf(file, ";;;  'comment\t\"Generated by Stratagus Version " VERSION 
"\"\n");
+    CLprintf(file, ";;;  'comment\t\"Visit http://Stratagus.Org for more 
informations\"\n");
+    CLprintf(file, ";;;  'comment\t\"$Id: savegame.c,v 1.33 2003/09/27 
02:13:06 jsalmon3 Exp $\"\n");
+    CLprintf(file, ";;;  'type\t\"%s\"\n", "single-player");
+    CLprintf(file, ";;;  'date\t\"%s\"\n", s);
+    CLprintf(file, ";;;  'map\t\"%s\"\n", TheMap.Description);
+    CLprintf(file, ";;;  'engine\t'(%d %d %d)\n",
+       StratagusMajorVersion, StratagusMinorVersion, StratagusPatchLevel);
+    CLprintf(file, ";;;  'savefile\t'(%d %d %d)\n",
+       StratagusMajorVersion, StratagusMinorVersion, StratagusPatchLevel);
     // Save media type
-    { SCM var;
-       CLprintf(file,";;;  'media\t'");
-       var=gh_symbol2scm("media-version");
+    {
+       SCM var;
+
+       CLprintf(file, ";;;  'media\t'");
+       var = gh_symbol2scm("media-version");
        if (symbol_boundp(var, NIL)) {
-           var=symbol_value(var,NIL);
-           lprin1CL(var,file);
+           var = symbol_value(var, NIL);
+           lprin1CL(var, file);
        } else {
-           CLprintf(file,"nil");
+           CLprintf(file, "nil");
        }
     }
-    CLprintf(file,"\n;;;  'preview\t\"%s.pam\"\n",filename);
-    CLprintf(file,";;;  )\n");
+    CLprintf(file, "\n;;;  'preview\t\"%s.pam\"\n", filename);
+    CLprintf(file, ";;;  )\n");
 
     // FIXME: probably not the right place for this
-    CLprintf(file,"(set-game-cycle! %lu)\n",GameCycle);
+    CLprintf(file, "(set-game-cycle! %lu)\n", GameCycle);
 
     SaveCcl(file);
     SaveIcons(file);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]