Write -date stamp always with 10 characters
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 27 Dec 2013 21:00:43 +0000 (22:00 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sat, 4 Jan 2014 11:49:09 +0000 (12:49 +0100)
To make it easier to replace date stamps on uninstall, we give them
fixed length.

args.h

diff --git a/args.h b/args.h
index 3a1347a..0c403de 100644 (file)
--- a/args.h
+++ b/args.h
@@ -102,8 +102,8 @@ typedef struct {
 IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE];
 
 int junk;
-int saveDate;
-int dateStamp;
+unsigned int saveDate;
+unsigned int dateStamp;
 Boolean singleList;
 Boolean autoClose;
 char *homeDir;
@@ -850,7 +850,7 @@ AppendToSettingsFile (char *line)
     if(f = fopen(SETTINGS_FILE, "a")) {
       TimeMark now;
       GetTimeMark(&now);
-      fprintf(f, "-date %ld\n%s\n", now.sec, line);
+      fprintf(f, "-date %10lu\n%s\n", now.sec, line);
       fclose(f);
     }
   }