-/* $NetBSD: main.c,v 1.5 1997/10/12 21:25:01 christos Exp $ */
+/* $NetBSD: main.c,v 1.10 2001/07/22 13:34:01 wiz Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.5 1997/10/12 21:25:01 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.10 2001/07/22 13:34:01 wiz Exp $");
#endif
#endif /* not lint */
#include <stdlib.h>
#include <unistd.h>
#include <err.h>
+#include <time.h>
+#include <sys/types.h>
#include "trek.h"
#include "getpar.h"
# define PRIO 00 /* default priority */
-int Mother = 51 + (51 << 8);
+uid_t Mother = 51 + (51 << 8);
/*
** #### ##### # #### ##### #### ##### # #
**
** Many things in trek are not as clear as they might be, but are
** done to reduce space. I compile with the -f and -O flags. I
-** am constrained to running with non-seperated I/D space, since
+** am constrained to running with non-separated I/D space, since
** we don't have doubleing point hardware here; even if we did, I
** would like trek to be available to the large number of people
** who either have an 11/40 or do not have FP hardware. I also
int argc;
char **argv;
{
+ time_t curtime;
long vect;
char opencode;
int prio;
char **av;
struct termios argp;
+ /* Revoke setgid privileges */
+ setgid(getgid());
+
av = argv;
ac = argc;
av++;
- time(&vect);
+ time(&curtime);
+ vect = (long) curtime;
srand(vect);
opencode = 'w';
prio = PRIO;