[Scummvm-cvs-logs] CVS: tools md5table.c,1.10,1.11
Max Horn
fingolfin at users.sourceforge.net
Sat Feb 28 06:02:01 CET 2004
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9776
Modified Files:
md5table.c
Log Message:
insert generation date into generated data
Index: md5table.c
===================================================================
RCS file: /cvsroot/scummvm/tools/md5table.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- md5table.c 10 Feb 2004 13:22:59 -0000 1.10
+++ md5table.c 28 Feb 2004 13:44:05 -0000 1.11
@@ -80,12 +80,16 @@
};
static const char *php_header =
- "<!-- This file was generated by the md5table tool. DO NOT EDIT!\n"
+ "<!--\n"
+ " This file was generated by the md5table tool on %s"
+ " DO NOT EDIT MANUALLY!\n"
" -->\n"
"\n";
static const char *c_header =
- "/* This file was generated by the md5table tool. DO NOT EDIT!\n"
+ "/*\n"
+ " This file was generated by the md5table tool on %s"
+ " DO NOT EDIT MANUALLY!\n"
" */\n"
"\n"
"struct MD5Table {\n"
@@ -170,9 +174,13 @@
} else {
showhelp(argv[0]);
}
+
+ time_t theTime;
+ time(&theTime);
+ const char *generationDate = strdup(asctime(gmtime(&theTime)));
if (phpOutput)
- fprintf(outFile, php_header);
+ fprintf(outFile, php_header, generationDate);
while ((line = fgets(buffer, sizeof(buffer), inFile))) {
/* Parse line */
@@ -217,7 +225,7 @@
if (!phpOutput) {
/* Printf header */
- fprintf(outFile, c_header);
+ fprintf(outFile, c_header, generationDate);
/* Now sort the MD5 table (this allows for binary searches) */
qsort(entriesBuffer, numEntries, entrySize, strcmp);
/* Output the table */
More information about the Scummvm-git-logs
mailing list