]> git.sur5r.net Git - cc65/commitdiff
Add creation time in the header
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 17 Feb 2005 17:37:17 +0000 (17:37 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 17 Feb 2005 17:37:17 +0000 (17:37 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3390 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/da65/global.c
src/da65/global.h
src/da65/main.c
src/da65/output.c

index 723dc25169a17260988a8e10465fc17b22a49cb1..27875309bb99329b8c3c0b35778784cd0450b3af 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2003 Ullrich von Bassewitz                                       */
+/* (C) 2000-2005 Ullrich von Bassewitz                                       */
 /*               Römerstrasse 52                                             */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
@@ -62,6 +62,7 @@ long          InputSize       = -1L;    /* Number of bytes to read from input */
 
 /* Stuff needed by many routines */
 unsigned      Pass           = 0;      /* Disassembler pass */
+char          Now[128];                 /* Current time as string */
 
 /* Comments */
 unsigned      Comments        = 0;      /* Add which comments to the output? */
index 7d1098a36a994ca15bc0aba7190509913ef2f9ca..586cc18f030f8dbeff1029c2bd65d6060e3b8925 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2003 Ullrich von Bassewitz                                       */
+/* (C) 2000-2005 Ullrich von Bassewitz                                       */
 /*               Römerstrasse 52                                             */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
@@ -63,6 +63,7 @@ extern long             InputSize;      /* Number of bytes to read from input */
 
 /* Stuff needed by many routines */
 extern unsigned         Pass;          /* Disassembler pass */
+extern char             Now[128];       /* Current time as string */
 
 /* Comments */
 #define MIN_COMMENTS    0
index 454450b2e571c39d8643edfa6b19139f847b8ee7..81525f116014452c4d480f6bfd2bf7ba85fcb11c 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/* (C) 1998-2005 Ullrich von Bassewitz                                       */
 /*               Römerstrasse 52                                             */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
@@ -379,17 +379,18 @@ int main (int argc, char* argv [])
         { "--comments",         1,      OptComments             },
         { "--cpu",                     1,      OptCPU                  },
                { "--debug-info",       0,      OptDebugInfo            },
-       { "--formfeeds",        0,      OptFormFeeds            },
+       { "--formfeeds",        0,      OptFormFeeds            },
        { "--help",             0,      OptHelp                 },
                { "--hexoffs",          0,      OptHexOffs              },
                { "--info",             1,      OptInfo                 },
        { "--pagelength",       1,      OptPageLength           },
-       { "--start-addr",       1,      OptStartAddr            },
+       { "--start-addr",       1,      OptStartAddr            },
        { "--verbose",          0,      OptVerbose              },
        { "--version",          0,      OptVersion              },
     };
 
     unsigned I;
+    time_t T;
 
     /* Initialize the cmdline module */
     InitCmdLine (&argc, &argv, "da65");
@@ -470,6 +471,12 @@ int main (int argc, char* argv [])
         CPU = CPU_6502;
     }
 
+    /* Get the current time and convert it to string so it can be used in
+     * the output page headers.
+     */
+    T = time (0);
+    strftime (Now, sizeof (Now), "%Y-%m-%d %H:%M:%S", localtime (&T));
+
     /* Load the input file */
     LoadCode ();
 
index 2a21d329aad670d762125b83816663f07b8cf270..f05f86f7bdbfaa003187c18915df38d6ed0d69ba 100644 (file)
@@ -74,10 +74,12 @@ static void PageHeader (void)
 /* Print a page header */
 {
     fprintf (F,
-                    "; da65 V%u.%u.%u - (C) Copyright 2000-2005 Ullrich von Bassewitz\n"
+                    "; da65 V%u.%u.%u - (C) Copyright 2000-2005,  Ullrich von Bassewitz\n"
+             "; Created:    %s\n"
             "; Input file: %s\n"
             "; Page:       %u\n\n",
                     VER_MAJOR, VER_MINOR, VER_PATCH,
+             Now,
             InFile,
             Page);
 }
@@ -99,7 +101,7 @@ void OpenOutput (const char* Name)
 
     /* Output the header and initialize stuff */
     PageHeader ();
-    Line = 4;
+    Line = 5;
     Col  = 1;
 }
 
@@ -152,7 +154,7 @@ void LineFeed (void)
            }
            ++Page;
            PageHeader ();
-           Line = 4;
+           Line = 5;
        }
        Col = 1;
     }