modified traceback to deal with "inline" functions, i.e. blocks
[unix-history] / usr / src / old / dbx / mkdate.c
CommitLineData
6863f426
ML
1/* Copyright (c) 1982 Regents of the University of California */
2
f00149ba 3static char sccsid[] = "@(#)mkdate.c 1.2 %G%";
6863f426
ML
4
5#include <stdio.h>
f00149ba 6#include <sys/time.h>
6863f426
ML
7
8main()
9{
10 struct tm *t;
11 long clock;
12 char name[100];
13 int namelen;
14
15 printf("char *date = \"");
16 clock = time(0);
17 t = localtime(&clock);
18 printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100);
19 printf("%d:%02d", t->tm_hour, t->tm_min);
20 gethostname(name, &namelen);
21 printf(" (%s)", name);
22 printf("\";\n");
23}