diff options
author | ache <ache@FreeBSD.org> | 1997-09-24 20:17:43 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-09-24 20:17:43 +0000 |
commit | 705dab002eab94c23d00d5594774f05e26e9cf14 (patch) | |
tree | a628143dfe8011c33dfbe92554e020b7dfbb44fa /games/larn/main.c | |
parent | 5771b3d5f6004b8173c2a09ff90b23a26c09c16c (diff) | |
download | FreeBSD-src-705dab002eab94c23d00d5594774f05e26e9cf14.zip FreeBSD-src-705dab002eab94c23d00d5594774f05e26e9cf14.tar.gz |
Headers cleanup.
Add revoke before shell exit.
Fix mail sending procedure.
Convert to random()
Implement nap.
Diffstat (limited to 'games/larn/main.c')
-rw-r--r-- | games/larn/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/games/larn/main.c b/games/larn/main.c index 2889625..49d3a2d 100644 --- a/games/larn/main.c +++ b/games/larn/main.c @@ -58,7 +58,7 @@ main(argc,argv) if ((ptr = getenv("LOGNAME")) == 0) { noone: write(2, "Can't find your logname. Who Are You?\n",39); - exit(); + exit(1); } if (ptr==0) goto noone; if (strlen(ptr)==0) goto noone; @@ -93,7 +93,7 @@ main(argc,argv) if (j) { lprcat("Sorry, Larn needs a VT100 family terminal for all it's features.\n"); lflush(); - exit(); + exit(1); } #endif VT100 @@ -111,12 +111,12 @@ main(argc,argv) if (argv[i][0] == '-') switch(argv[i][1]) { - case 's': showscores(); exit(); /* show scoreboard */ + case 's': showscores(); exit(0); /* show scoreboard */ case 'l': /* show log file */ - diedlog(); exit(); + diedlog(); exit(0); - case 'i': showallscores(); exit(); /* show all scoreboard */ + case 'i': showallscores(); exit(0); /* show all scoreboard */ case 'c': /* anyone with password can create scoreboard */ lprcat("Preparing to initialize the scoreboard.\n"); @@ -124,7 +124,7 @@ main(argc,argv) { makeboard(); lprc('\n'); showscores(); } - exit(); + exit(0); case 'n': /* no welcome msg */ nowelcome=1; argv[i][0]=0; break; @@ -134,12 +134,12 @@ main(argc,argv) break; case 'h': /* print out command line arguments */ - write(1,cmdhelp,sizeof(cmdhelp)); exit(); + write(1,cmdhelp,sizeof(cmdhelp)); exit(0); case 'o': /* specify a .larnopts filename */ strncpy(optsfile,argv[i]+2,127); break; - default: printf("Unknown option <%s>\n",argv[i]); exit(); + default: printf("Unknown option <%s>\n",argv[i]); exit(1); }; if (argv[i][0] == '+') @@ -161,7 +161,7 @@ main(argc,argv) #else UIDSCORE userid = getplid(logname); /* obtain the players id number */ #endif UIDSCORE - if (userid < 0) { write(2,"Can't obtain playerid\n",22); exit(); } + if (userid < 0) { write(2,"Can't obtain playerid\n",22); exit(1); } #ifdef HIDEBYLINK /* |