+/*
+ * Copyright (c) 1982 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1982 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)mille.c 5.3 (Berkeley) 6/18/88";
+#endif /* not lint */
+
# include "mille.h"
# include <signal.h>
# ifdef attron
int rub();
-char _sobuf[BUFSIZ];
-
main(ac, av)
reg int ac;
reg char *av[]; {
reg bool restore;
- double avs[3];
+
+ /* run as the user */
+ setuid(getuid());
if (strcmp(av[0], "a.out") == 0) {
outf = fopen("q", "w");
- setbuf(outf, NULL);
+ setbuf(outf, (char *)NULL);
Debug = TRUE;
}
restore = FALSE;
-# ifdef LOADAV
- if (geteuid() != ARNOLD) {
- loadav(avs);
- if (avs[2] > 9.0) {
- printf("Sorry. The load average is too high.\n");
- printf("Please try again later\n");
- exit(1);
- }
- }
-# endif
switch (ac) {
case 2:
rest_f(av[1]);
exit(-1);
/* NOTREACHED */
}
- setbuf(stdout, _sobuf);
Play = PLAYER;
initscr();
# ifdef attron
*/
rub() {
- signal(SIGINT, SIG_IGN);
+ (void)signal(SIGINT, SIG_IGN);
if (getyn(REALLYPROMPT))
die();
- signal(SIGINT, rub);
+ (void)signal(SIGINT, rub);
}
/*
*/
die() {
- signal(SIGINT, SIG_IGN);
+ (void)signal(SIGINT, SIG_IGN);
if (outf)
fflush(outf);
mvcur(0, COLS - 1, LINES - 1, 0);