home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / src / common / identify.c < prev    next >
C/C++ Source or Header  |  2000-07-29  |  661b  |  31 lines

  1. #include "../h/gsupport.h"
  2.  
  3. #undef COMPILER
  4. #define COMPILER 1        /* insure compiler Version number */
  5. #include "../h/version.h"
  6.  
  7. extern char *progname;
  8.  
  9. /*
  10.  * id_comment - output a comment C identifying the date and time and what
  11.  *  program is producing the output.
  12.  */
  13. void id_comment(f)
  14. FILE *f;
  15.    {
  16.    static char sbuf[26];
  17.    static int first_time = 1;
  18.    time_t ct;
  19.  
  20.    if (first_time) {
  21.       time(&ct);
  22.       strcpy(sbuf, ctime(&ct));
  23.       first_time = 0;
  24.       }
  25.    fprintf(f, "/*\n");
  26.    fprintf(f, " * %s", sbuf);
  27.    fprintf(f, " * This file was produced by\n");
  28.    fprintf(f, " *   %s: %s\n", progname, Version);
  29.    fprintf(f, " */\n");
  30.    }
  31.