wmc: Don't put timestamps in generated files.
This commit is contained in:
parent
9fbf473a0b
commit
f775f3e105
|
@ -174,8 +174,6 @@ int main(int argc,char *argv[])
|
|||
signal( SIGHUP, exit_on_signal );
|
||||
#endif
|
||||
|
||||
now = time(NULL);
|
||||
|
||||
/* First rebuild the commandline to put in destination */
|
||||
/* Could be done through env[], but not all OS-es support it */
|
||||
cmdlen = 5; /* for "wmc " and \0 */
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#ifndef __WMC_WMC_H
|
||||
#define __WMC_WMC_H
|
||||
|
||||
#include <time.h> /* For time_t */
|
||||
|
||||
#include "wmctypes.h"
|
||||
|
||||
/*
|
||||
|
@ -51,7 +49,6 @@ extern char *output_name;
|
|||
extern char *input_name;
|
||||
extern char *header_name;
|
||||
extern char *cmdline;
|
||||
extern time_t now;
|
||||
|
||||
extern int line_number;
|
||||
extern int char_number;
|
||||
|
|
|
@ -91,7 +91,6 @@ static const char str_header[] =
|
|||
"/* This file is generated with wmc version " PACKAGE_VERSION ". Do not edit! */\n"
|
||||
"/* Source : %s */\n"
|
||||
"/* Cmdline: %s */\n"
|
||||
"/* Date : %s */\n"
|
||||
"\n"
|
||||
;
|
||||
|
||||
|
@ -178,11 +177,9 @@ void write_h_file(const char *fname)
|
|||
perror(fname);
|
||||
exit(1);
|
||||
}
|
||||
cptr = ctime(&now);
|
||||
killnl(cptr, 0);
|
||||
fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);
|
||||
fprintf(fp, "#ifndef __WMCGENERATED_%08lx_H\n", (long)now);
|
||||
fprintf(fp, "#define __WMCGENERATED_%08lx_H\n", (long)now);
|
||||
fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline);
|
||||
fprintf(fp, "#ifndef __WMCGENERATED_H\n");
|
||||
fprintf(fp, "#define __WMCGENERATED_H\n");
|
||||
fprintf(fp, "\n");
|
||||
|
||||
/* Write severity and facility aliases */
|
||||
|
@ -501,18 +498,14 @@ static void write_rcinline(FILE *fp)
|
|||
|
||||
void write_rc_file(const char *fname)
|
||||
{
|
||||
FILE *fp;
|
||||
char *cptr;
|
||||
FILE *fp = fopen(fname, "w");
|
||||
|
||||
fp = fopen(fname, "w");
|
||||
if(!fp)
|
||||
{
|
||||
perror(fname);
|
||||
exit(1);
|
||||
}
|
||||
cptr = ctime(&now);
|
||||
killnl(cptr, 0);
|
||||
fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);
|
||||
fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline);
|
||||
|
||||
if(rcinline)
|
||||
write_rcinline(fp);
|
||||
|
|
Loading…
Reference in New Issue