home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------*/
- /* timestmp.c */
- /* */
- /* Compiler timestamps for display at program start-up */
- /* */
- /* History: */
- /* */
- /* 12/13/89 Add Copyright statements - ahd */
- /*--------------------------------------------------------------------*/
-
- #include <dos.h>
- #include <direct.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <io.h>
- #include <string.h>
-
- #include "lib.h"
- #include "timestmp.h"
-
- #ifndef UUPCV
- #define UUPCV "1.11(experimental)"
- #endif
-
- char compiled[] = { __DATE__ } ;
- char compilet[] = { __TIME__ } ;
- char compilev[] = { UUPCV } ;
-
- char compilep[] = { "UUPC/extended" } ;
-
- void banner (char **argv)
- {
- char dummy[FILENAME_MAX];
- char program[FILENAME_MAX];
-
- /*--------------------------------------------------------------------*/
- /* Return if input is not the console */
- /*--------------------------------------------------------------------*/
-
- if (!isatty(fileno(stdin))) /* Is the console I/O redirected? */
- return; /* Yes --> Run quietly */
-
- /*--------------------------------------------------------------------*/
- /* Print the program name */
- /*--------------------------------------------------------------------*/
-
- #ifdef __TURBOC__
- if ( fnsplit(argv[0],dummy,dummy, program,dummy) && FILENAME )
- {
- #else
- if (!equal(argv[0],"C")) /* Microsoft C for no prog name? */
- {
- _splitpath( argv[0], dummy , dummy , program , dummy );
- #endif /* __TURBOC__ */
- strcpy(argv[0], program); /* Reset original program name */
- fprintf(stderr,"%s: ",program);
- } /* if */
-
- /*--------------------------------------------------------------------*/
- /* Now print out the version, operating system (MS C only) and */
- /* timestamp */
- /*--------------------------------------------------------------------*/
-
- #ifdef __TURBOC__
- fprintf(stderr,"%s %s (%2.2s%3.3s%2.2s %5.5s)\n",
- #else
- fprintf(stderr,"%s for %s %s (%2.2s%3.3s%2.2s %5.5s)\n",
- #endif
- compilep,
- #ifndef __TURBOC__
- (_osmode == DOS_MODE) ? "MS-DOS" : "OS/2",
- #endif
- compilev,
- &compiled[4],
- &compiled[0],
- &compiled[9],
- compilet);
- } /* banner */
-