#ident "$Header: mkdate.c 1.2 88/06/28 $"

/*
 * $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

# ifndef lint
static char rcsid[] = "$Header: mkdate.c 1.2 88/06/28 $";
#endif

#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>
#include <time.h>

struct	passwd *getpwuid();

main(argc, argv)
	char **argv;
{
	register struct passwd *pp;
	struct passwd dummy;
	struct tm *t;
	time_t clock;

	clock = time(0);
	t = localtime(&clock);
	pp = getpwuid(getuid());
	if (pp == NULL)
		pp = &dummy, pp->pw_name = "unknown";
	printf("char Version[] = \"%s\";\n", argv[1]);
	printf("char Date[] = \"%d/%d/%d %d:%02d (%s)\";\n",
		t->tm_mon + 1, t->tm_mday, t->tm_year % 100,
		t->tm_hour, t->tm_min, pp->pw_name);
	exit(0);
}
