X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/95f51977ddc18faa2e212f30c00a39540b39f325..ca67e7b465996afb3821d6a075c4dc6a7f0f5d52:/usr/src/ucb/dbx/mkdate.c diff --git a/usr/src/ucb/dbx/mkdate.c b/usr/src/ucb/dbx/mkdate.c index 29d86a4ab8..59a603c44a 100644 --- a/usr/src/ucb/dbx/mkdate.c +++ b/usr/src/ucb/dbx/mkdate.c @@ -5,13 +5,17 @@ */ #ifndef lint -static char sccsid[] = "@(#)mkdate.c 5.1 (Berkeley) 5/31/85"; +static char sccsid[] = "@(#)mkdate.c 5.3 (Berkeley) 1/12/88"; #endif not lint -static char rcsid[] = "$Header: mkdate.c,v 1.5 84/12/26 10:40:30 linton Exp $"; +static char rcsid[] = "$Header: mkdate.c,v 1.2 87/03/26 19:56:22 donn Exp $"; #include -#include +#ifdef IRIS +# include +#else +# include +#endif main() { @@ -25,29 +29,10 @@ main() t = localtime(&clock); printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100); printf("%d:%02d", t->tm_hour, t->tm_min); - gethostname(name, &namelen); - printf(" (%s)", name); +# ifndef IRIS + gethostname(name, &namelen); + printf(" (%s)", name); +# endif printf("\";\n"); - DoVersionNumber(); -} - -DoVersionNumber() -{ - FILE *f; - int n; - - f = fopen("version", "r"); - if (f == NULL) { - n = 1; - } else { - fscanf(f, "%d", &n); - n = n + 1; - fclose(f); - } - f = fopen("version", "w"); - if (f != NULL) { - fprintf(f, "%d\n", n); - fclose(f); - } - printf("int versionNumber = %d;\n", n); + exit(0); }