mirror of
https://github.com/cc65/cc65.git
synced 2024-07-01 08:29:37 +00:00
Add creation time in the header
git-svn-id: svn://svn.cc65.org/cc65/trunk@3390 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
0eec7d8a87
commit
531320e242
|
@ -6,7 +6,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
/* (C) 2000-2005 Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
|
@ -62,6 +62,7 @@ long InputSize = -1L; /* Number of bytes to read from input */
|
||||||
|
|
||||||
/* Stuff needed by many routines */
|
/* Stuff needed by many routines */
|
||||||
unsigned Pass = 0; /* Disassembler pass */
|
unsigned Pass = 0; /* Disassembler pass */
|
||||||
|
char Now[128]; /* Current time as string */
|
||||||
|
|
||||||
/* Comments */
|
/* Comments */
|
||||||
unsigned Comments = 0; /* Add which comments to the output? */
|
unsigned Comments = 0; /* Add which comments to the output? */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
/* (C) 2000-2005 Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
|
@ -63,6 +63,7 @@ extern long InputSize; /* Number of bytes to read from input */
|
||||||
|
|
||||||
/* Stuff needed by many routines */
|
/* Stuff needed by many routines */
|
||||||
extern unsigned Pass; /* Disassembler pass */
|
extern unsigned Pass; /* Disassembler pass */
|
||||||
|
extern char Now[128]; /* Current time as string */
|
||||||
|
|
||||||
/* Comments */
|
/* Comments */
|
||||||
#define MIN_COMMENTS 0
|
#define MIN_COMMENTS 0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2003 Ullrich von Bassewitz */
|
/* (C) 1998-2005 Ullrich von Bassewitz */
|
||||||
/* Römerstrasse 52 */
|
/* Römerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
|
@ -379,17 +379,18 @@ int main (int argc, char* argv [])
|
||||||
{ "--comments", 1, OptComments },
|
{ "--comments", 1, OptComments },
|
||||||
{ "--cpu", 1, OptCPU },
|
{ "--cpu", 1, OptCPU },
|
||||||
{ "--debug-info", 0, OptDebugInfo },
|
{ "--debug-info", 0, OptDebugInfo },
|
||||||
{ "--formfeeds", 0, OptFormFeeds },
|
{ "--formfeeds", 0, OptFormFeeds },
|
||||||
{ "--help", 0, OptHelp },
|
{ "--help", 0, OptHelp },
|
||||||
{ "--hexoffs", 0, OptHexOffs },
|
{ "--hexoffs", 0, OptHexOffs },
|
||||||
{ "--info", 1, OptInfo },
|
{ "--info", 1, OptInfo },
|
||||||
{ "--pagelength", 1, OptPageLength },
|
{ "--pagelength", 1, OptPageLength },
|
||||||
{ "--start-addr", 1, OptStartAddr },
|
{ "--start-addr", 1, OptStartAddr },
|
||||||
{ "--verbose", 0, OptVerbose },
|
{ "--verbose", 0, OptVerbose },
|
||||||
{ "--version", 0, OptVersion },
|
{ "--version", 0, OptVersion },
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned I;
|
unsigned I;
|
||||||
|
time_t T;
|
||||||
|
|
||||||
/* Initialize the cmdline module */
|
/* Initialize the cmdline module */
|
||||||
InitCmdLine (&argc, &argv, "da65");
|
InitCmdLine (&argc, &argv, "da65");
|
||||||
|
@ -470,6 +471,12 @@ int main (int argc, char* argv [])
|
||||||
CPU = CPU_6502;
|
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 */
|
/* Load the input file */
|
||||||
LoadCode ();
|
LoadCode ();
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,12 @@ static void PageHeader (void)
|
||||||
/* Print a page header */
|
/* Print a page header */
|
||||||
{
|
{
|
||||||
fprintf (F,
|
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"
|
"; Input file: %s\n"
|
||||||
"; Page: %u\n\n",
|
"; Page: %u\n\n",
|
||||||
VER_MAJOR, VER_MINOR, VER_PATCH,
|
VER_MAJOR, VER_MINOR, VER_PATCH,
|
||||||
|
Now,
|
||||||
InFile,
|
InFile,
|
||||||
Page);
|
Page);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +101,7 @@ void OpenOutput (const char* Name)
|
||||||
|
|
||||||
/* Output the header and initialize stuff */
|
/* Output the header and initialize stuff */
|
||||||
PageHeader ();
|
PageHeader ();
|
||||||
Line = 4;
|
Line = 5;
|
||||||
Col = 1;
|
Col = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +154,7 @@ void LineFeed (void)
|
||||||
}
|
}
|
||||||
++Page;
|
++Page;
|
||||||
PageHeader ();
|
PageHeader ();
|
||||||
Line = 4;
|
Line = 5;
|
||||||
}
|
}
|
||||||
Col = 1;
|
Col = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user