diff options
author | des <des@FreeBSD.org> | 2002-05-23 00:38:07 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-05-23 00:38:07 +0000 |
commit | bc5da2aaa33d76771cd47cf90371acbb01d74278 (patch) | |
tree | f1a45d72dce61b7b2a2e4fab1552ab7912563e61 /games | |
parent | b4f31d6da41b4104cde3503e1ddd2658e8443493 (diff) | |
download | FreeBSD-src-bc5da2aaa33d76771cd47cf90371acbb01d74278.zip FreeBSD-src-bc5da2aaa33d76771cd47cf90371acbb01d74278.tar.gz |
Comment out extra tokens after #else and #endif.
Diffstat (limited to 'games')
39 files changed, 161 insertions, 154 deletions
diff --git a/games/hack/alloc.c b/games/hack/alloc.c index 9451265..13379f6 100644 --- a/games/hack/alloc.c +++ b/games/hack/alloc.c @@ -45,4 +45,4 @@ unsigned lth; return((long *) nptr); } -#endif LINT +#endif /* LINT */ diff --git a/games/hack/config.h b/games/hack/config.h index c4b78a7..dd25cfa 100644 --- a/games/hack/config.h +++ b/games/hack/config.h @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* config.h - version 1.0.3 */ +/* $FreeBSD$ */ #include "pathnames.h" @@ -64,8 +65,8 @@ #ifdef BSD #define SUSPEND /* let ^Z suspend the game */ -#endif BSD -#endif UNIX +#endif /* BSD */ +#endif /* UNIX */ #ifdef CHDIR /* @@ -74,9 +75,9 @@ */ #ifdef QUEST #define HACKDIR _PATH_QUEST -#else QUEST +#else /* QUEST */ #define HACKDIR _PATH_HACK -#endif QUEST +#endif /* QUEST */ /* * Some system administrators are stupid enough to make Hack suid root @@ -92,7 +93,7 @@ * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. * #define MAX_NR_OF_PLAYERS 100 */ -#endif CHDIR +#endif /* CHDIR */ /* size of terminal screen is (at least) (ROWNO+2) by COLNO */ #define COLNO 80 @@ -136,4 +137,4 @@ typedef xchar boolean; /* 0 or 1 */ #define SIZE(x) (int)(sizeof(x) / sizeof(x[0])) -#endif CONFIG +#endif /* CONFIG */ diff --git a/games/hack/def.monst.h b/games/hack/def.monst.h index 88836af..7a2d6e3 100644 --- a/games/hack/def.monst.h +++ b/games/hack/def.monst.h @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* def.monst.h - version 1.0.2 */ +/* $FreeBSD$ */ struct monst { struct monst *nmon; @@ -34,7 +35,7 @@ struct monst { Bitfield(mnamelth,6); /* length of name (following mxlth) */ #ifndef NOWORM Bitfield(wormno,5); /* at most 31 worms on any level */ -#endif NOWORM +#endif /* NOWORM */ unsigned mtrapseen; /* bitmap of traps we've been trapped in */ long mlstmv; /* prevent two moves at once */ struct obj *minvent; diff --git a/games/hack/def.rm.h b/games/hack/def.rm.h index f84921c..162c10d 100644 --- a/games/hack/def.rm.h +++ b/games/hack/def.rm.h @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* def.rm.h - version 1.0.2 */ +/* $FreeBSD$ */ /* Level location types */ #define HWALL 1 @@ -32,7 +33,7 @@ #define CORR_SYM ':' #else #define CORR_SYM '#' -#endif QUEST +#endif /* QUEST */ #define POOL_SYM '}' #define ERRCHAR '{' diff --git a/games/hack/def.wseg.h b/games/hack/def.wseg.h index 0a2af77..8b52277 100644 --- a/games/hack/def.wseg.h +++ b/games/hack/def.wseg.h @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* def.wseg.h - version 1.0.2 */ +/* $FreeBSD$ */ #ifndef NOWORM /* worm structure */ @@ -10,4 +11,4 @@ struct wseg { }; #define newseg() (struct wseg *) alloc(sizeof(struct wseg)) -#endif NOWORM +#endif /* NOWORM */ diff --git a/games/hack/hack.Decl.c b/games/hack/hack.Decl.c index b2855ac..840f4e0 100644 --- a/games/hack/hack.Decl.c +++ b/games/hack/hack.Decl.c @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.Decl.c - version 1.0.3 */ +/* $FreeBSD$ */ #include "hack.h" char nul[40]; /* contains zeros */ @@ -13,7 +14,7 @@ struct rm levl[COLNO][ROWNO]; /* level map */ #include "def.mkroom.h" struct mkroom rooms[MAXNROFROOMS+1]; coord doors[DOORMAX]; -#endif QUEST +#endif /* QUEST */ struct monst *fmon = 0; struct trap *ftrap = 0; struct gold *fgold = 0; diff --git a/games/hack/hack.bones.c b/games/hack/hack.bones.c index 4f67997..97f8c26 100644 --- a/games/hack/hack.bones.c +++ b/games/hack/hack.bones.c @@ -87,7 +87,7 @@ int fd,x,y,ok; (void) close(fd); #ifdef WIZARD if(!wizard) /* duvel!frans: don't remove bones while debugging */ -#endif WiZARD +#endif /* WiZARD */ if(unlink(bones) < 0){ pline("Cannot unlink %s .", bones); return(0); diff --git a/games/hack/hack.c b/games/hack/hack.c index 1e023fc..f1e1c28 100644 --- a/games/hack/hack.c +++ b/games/hack/hack.c @@ -30,7 +30,7 @@ unsee() { if(seehx){ seehx = 0; } else -#endif QUEST +#endif /* QUEST */ for(x = u.ux-1; x < u.ux+2; x++) for(y = u.uy-1; y < u.uy+2; y++) { if(!isok(x, y)) continue; @@ -64,7 +64,7 @@ seeoff(mode) /* 1 to redo @, 0 to leave them */ if(seehx) { seehx = 0; } else -#endif QUEST +#endif /* QUEST */ if(!mode) { for(x = u.ux-1; x < u.ux+2; x++) for(y = u.uy-1; y < u.uy+2; y++) { @@ -297,7 +297,7 @@ domove() } nose1(oldx-u.dx,oldy-u.dy); } -#endif QUEST +#endif /* QUEST */ } else { pru(); } @@ -472,12 +472,12 @@ struct monst *mtmp; #ifdef lint /* suppress "used before set" message */ x0 = y0 = 0; -#endif lint +#endif /* lint */ if(Blind || flags.run == 0) return; if(flags.run == 1 && levl[u.ux][u.uy].typ == ROOM) return; #ifdef QUEST if(u.ux0 == u.ux+u.dx && u.uy0 == u.uy+u.dy) goto stop; -#endif QUEST +#endif /* QUEST */ for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++){ if(x == u.ux && y == u.uy) continue; if(!levl[x][y].typ) continue; @@ -527,7 +527,7 @@ struct monst *mtmp; } #ifdef QUEST if(corrct > 0 && (flags.run == 4 || flags.run == 5)) goto stop; -#endif QUEST +#endif /* QUEST */ if(corrct > 1 && flags.run == 2) goto stop; if((flags.run == 1 || flags.run == 3) && !noturn && !m0 && i0 && (corrct == 1 || (corrct == 2 && i0 == 1))) { @@ -623,7 +623,7 @@ cansee(x,y) xchar x,y; { y <= seehy) return(1); return(0); } -#endif QUEST +#endif /* QUEST */ sgn(a) int a; { return((a > 0) ? 1 : (a == 0) ? 0 : -1); @@ -678,7 +678,7 @@ setsee() if(seehx == u.ux) for(y = u.uy-1; y <= u.uy+1; y++) prl(seehx+1,y); } } -#endif QUEST +#endif /* QUEST */ nomul(nval) int nval; diff --git a/games/hack/hack.cmd.c b/games/hack/hack.cmd.c index 27beaae..fe32ced 100644 --- a/games/hack/hack.cmd.c +++ b/games/hack/hack.cmd.c @@ -13,10 +13,10 @@ doprring(),doprgold(),dodiscovered(),dotypeinv(),dolook(),doset(), doup(), dodown(), done1(), donull(), dothrow(), doextcmd(), dodip(), dopray(); #ifdef SHELL int dosh(); -#endif SHELL +#endif /* SHELL */ #ifdef SUSPEND int dosuspend(); -#endif SUSPEND +#endif /* SUSPEND */ struct func_tab cmdlist[]={ '\020', doredotopl, @@ -24,7 +24,7 @@ struct func_tab cmdlist[]={ '\024', dotele, #ifdef SUSPEND '\032', dosuspend, -#endif SUSPEND +#endif /* SUSPEND */ 'a', doapply, /* 'A' : UNUSED */ /* 'b', 'B' : go sw */ @@ -67,7 +67,7 @@ struct func_tab cmdlist[]={ '?', dohelp, #ifdef SHELL '!', dosh, -#endif SHELL +#endif /* SHELL */ '.', donull, ' ', donull, ',', dopickup, @@ -128,7 +128,7 @@ char *cmd; u.ux0 = u.ux + u.dx; u.uy0 = u.uy + u.dy; } -#endif QUEST +#endif /* QUEST */ domove(); return; } @@ -157,7 +157,7 @@ char *cmd; if(cmd[2] == '-') flags.run += 1; goto rush; } -#endif QUEST +#endif /* QUEST */ while(tlist->f_char) { if(*cmd == tlist->f_char){ res = (*(tlist->f_funct))(); @@ -295,7 +295,7 @@ isroom(x,y) x,y; { /* what about POOL? */ return(isok(x,y) && (levl[x][y].typ == ROOM || (levl[x][y].typ >= LDOOR && flags.run >= 6))); } -#endif QUEST +#endif /* QUEST */ isok(x,y) int x,y; { /* x corresponds to curx, so x==1 is the first column. Ach. %% */ diff --git a/games/hack/hack.do.c b/games/hack/hack.do.c index 547a455..a232782 100644 --- a/games/hack/hack.do.c +++ b/games/hack/hack.do.c @@ -347,7 +347,7 @@ dothrow() /* mon still alive */ #ifndef NOWORM cutworm(mon,bhitpos.x,bhitpos.y,obj->otyp); -#endif NOWORM +#endif /* NOWORM */ } else mon = 0; /* weapons thrown disappear sometimes */ if(obj->otyp < BOOMERANG && rn2(3)) { diff --git a/games/hack/hack.do_wear.c b/games/hack/hack.do_wear.c index 46e7013..1aa77fd 100644 --- a/games/hack/hack.do_wear.c +++ b/games/hack/hack.do_wear.c @@ -66,7 +66,7 @@ doremring() { /* NOTREACHED */ #ifdef lint return(0); -#endif lint +#endif /* lint */ } dorr(otmp) struct obj *otmp; { diff --git a/games/hack/hack.dog.c b/games/hack/hack.dog.c index 9e518e1..600ff6d 100644 --- a/games/hack/hack.dog.c +++ b/games/hack/hack.dog.c @@ -182,7 +182,7 @@ int info[9]; gtyp = UNDEF; /* no goal as yet */ #ifdef LINT gx = gy = 0; /* suppress 'used before set' message */ -#endif LINT +#endif /* LINT */ for(obj = fobj; obj; obj = obj->nobj) { otyp = dogfood(obj); if(otyp > gtyp || otyp == UNDEF) continue; @@ -228,7 +228,7 @@ int info[9]; gx = u.ux; gy = u.uy; } -#endif QUEST +#endif /* QUEST */ } appr = (udist >= 9) ? 1 : (mtmp->mflee) ? -1 : 0; if(after && udist <= 4 && gx == u.ux && gy == u.uy) @@ -374,7 +374,7 @@ inroom(x,y) xchar x,y; { return(croom - rooms); croom++; } -#endif QUEST +#endif /* QUEST */ return(-1); /* not in room or on door */ } @@ -393,7 +393,7 @@ struct obj *obj; if(mtmp->mtame || mtmp->mfroz || #ifndef NOWORM mtmp->wormno || -#endif NOWORM +#endif /* NOWORM */ mtmp->isshk || mtmp->isgd || index(" &@12", mtmp->data->mlet)) return(0); /* no tame long worms? */ if(obj) { diff --git a/games/hack/hack.eat.c b/games/hack/hack.eat.c index 8c023a6..c410ea1 100644 --- a/games/hack/hack.eat.c +++ b/games/hack/hack.eat.c @@ -226,7 +226,7 @@ gotit: setsee(); pline("Your vision improves."); } else -#endif QUEST +#endif /* QUEST */ if(otmp->otyp == FORTUNE_COOKIE) { if(Blind) { pline("This cookie has a scrap of paper inside!"); @@ -415,7 +415,7 @@ int tp = 0; case 'y': #ifdef QUEST u.uhorizon++; -#endif QUEST +#endif /* QUEST */ /* fall into next case */ case 'B': Confusion = 50; diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c index 98c8336..e839ae1 100644 --- a/games/hack/hack.end.c +++ b/games/hack/hack.end.c @@ -79,7 +79,7 @@ char *st1; flags.botl = 1; return; } -#endif WIZARD +#endif /* WIZARD */ (void) signal(SIGINT, done_intr); (void) signal(SIGQUIT, done_intr); (void) signal(SIGHUP, done_hangup); @@ -98,7 +98,7 @@ char *st1; if(index("bcds", *st1)){ #ifdef WIZARD if(!wizard) -#endif WIZARD +#endif /* WIZARD */ savebones(); if(!flags.notombstone) outrip(); @@ -190,7 +190,7 @@ char *st1; } #ifdef WIZARD if(!wizard) -#endif WIZARD +#endif /* WIZARD */ topten(); if(done_stopprint) printf("\n\n"); exit(0); @@ -293,7 +293,7 @@ topten(){ t1->uid == t0->uid && #else strncmp(t1->name, t0->name, NAMSZ) == 0 && -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ t1->plchar == t0->plchar && --occ_cnt <= 0){ if(rank0 < 0){ rank0 = 0; @@ -348,7 +348,7 @@ topten(){ t1->uid != t0->uid )) #else strncmp(t1->name, t0->name, NAMSZ))) -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ continue; if(rank == rank0-flags.end_around && rank0 > flags.end_top+flags.end_around+1 && @@ -481,7 +481,7 @@ hangup() clearlocks(); exit(1); } -#endif NOSAVEONHANGUP +#endif /* NOSAVEONHANGUP */ char * eos(s) @@ -517,13 +517,13 @@ prscore(argc,argv) int argc; char **argv; { long total_score = 0L; char totchars[10]; int totcharct = 0; -#endif nonsense +#endif /* nonsense */ int outflg = (argc >= -1); #ifdef PERS_IS_UID int uid = -1; #else char *player0; -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ if(!(rfile = fopen(recfile,"r"))){ puts("Cannot open record file!"); @@ -549,7 +549,7 @@ prscore(argc,argv) int argc; char **argv; { player0 = "hackplayer"; playerct = 1; players = &player0; -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ } else { playerct = --argc; players = ++argv; @@ -569,7 +569,7 @@ prscore(argc,argv) int argc; char **argv; { if(!playerct && t1->uid == uid) flg++; else -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ for(i = 0; i < playerct; i++){ if(strcmp(players[i], "all") == 0 || strncmp(t1->name, players[i], NAMSZ) == 0 || @@ -604,7 +604,7 @@ prscore(argc,argv) int argc; char **argv; { if(!playerct && t1->uid == uid) goto outwithit; else -#endif PERS_IS_UID +#endif /* PERS_IS_UID */ for(i = 0; i < playerct; i++){ if(strcmp(players[i], "all") == 0 || strncmp(t1->name, players[i], NAMSZ) == 0 || @@ -619,7 +619,7 @@ prscore(argc,argv) int argc; char **argv; { total_score += t1->points; if(totcharct < sizeof(totchars)-1) totchars[totcharct++] = t1->plchar; -#endif nonsense +#endif /* nonsense */ break; } } @@ -639,5 +639,5 @@ prscore(argc,argv) int argc; char **argv; { if(!pl_character[0]) pl_character[0] = "CFKSTWX"[i]; break; } -#endif nonsense +#endif /* nonsense */ } diff --git a/games/hack/hack.fight.c b/games/hack/hack.fight.c index 000c58f..532cb9e 100644 --- a/games/hack/hack.fight.c +++ b/games/hack/hack.fight.c @@ -334,7 +334,7 @@ struct monst *mtmp; if(mtmp->wormno) cutworm(mtmp, u.ux+u.dx, u.uy+u.dy, uwep ? uwep->otyp : 0); -#endif NOWORM +#endif /* NOWORM */ } if(mdat->mlet == 'a') { if(rn2(2)) { diff --git a/games/hack/hack.h b/games/hack/hack.h index 090ef2f..a9cc347 100644 --- a/games/hack/hack.h +++ b/games/hack/hack.h @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.h - version 1.0.3 */ +/* $FreeBSD$ */ #include "config.h" #include <string.h> @@ -7,7 +8,7 @@ #ifndef BSD #define index strchr #define rindex strrchr -#endif BSD +#endif /* BSD */ #define Null(type) ((struct type *) 0) @@ -66,7 +67,7 @@ struct you { #ifdef QUEST schar di; /* direction of FF */ xchar ux0, uy0; /* initial position FF */ -#endif QUEST +#endif /* QUEST */ xchar udisx, udisy; /* last display pos */ char usym; /* usually '@' */ schar uluck; @@ -78,7 +79,7 @@ struct you { unsigned ulevel:4; /* 1 - 14 */ #ifdef QUEST unsigned uhorizon:7; -#endif QUEST +#endif /* QUEST */ unsigned utrap:3; /* trap timeout */ unsigned utraptype:1; /* defined if utrap nonzero */ #define TT_BEARTRAP 0 diff --git a/games/hack/hack.invent.c b/games/hack/hack.invent.c index 7fc170c..f261034 100644 --- a/games/hack/hack.invent.c +++ b/games/hack/hack.invent.c @@ -13,7 +13,7 @@ static char *xprname(); #ifndef NOWORM #include "def.wseg.h" extern struct wseg *wsegs[32]; -#endif NOWORM +#endif /* NOWORM */ #define NOINVSYM '#' @@ -175,7 +175,7 @@ int x,y; struct monst *mtmp; #ifndef NOWORM struct wseg *wtmp; -#endif NOWORM +#endif /* NOWORM */ m_atseg = 0; for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){ @@ -189,7 +189,7 @@ int x,y; return(mtmp); } } -#endif NOWORM +#endif /* NOWORM */ } return(0); } diff --git a/games/hack/hack.ioctl.c b/games/hack/hack.ioctl.c index 2902d14..9989e62 100644 --- a/games/hack/hack.ioctl.c +++ b/games/hack/hack.ioctl.c @@ -16,7 +16,7 @@ struct ltchars ltchars, ltchars0; #else #include <termio.h> /* also includes part of <sgtty.h> */ struct termio termio; -#endif BSD +#endif /* BSD */ getioctls() { #ifdef BSD @@ -24,7 +24,7 @@ getioctls() { (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars0); #else (void) ioctl(fileno(stdin), (int) TCGETA, &termio); -#endif BSD +#endif /* BSD */ } setioctls() { @@ -32,7 +32,7 @@ setioctls() { (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars); #else (void) ioctl(fileno(stdin), (int) TCSETA, &termio); -#endif BSD +#endif /* BSD */ } #ifdef SUSPEND /* implies BSD */ @@ -49,9 +49,9 @@ dosuspend() { } else { pline("I don't think your shell has job control."); } -#else SIGTSTP +#else /* SIGTSTP */ pline("Sorry, it seems we have no SIGTSTP here. Try ! or S."); -#endif SIGTSTP +#endif /* SIGTSTP */ return(0); } -#endif SUSPEND +#endif /* SUSPEND */ diff --git a/games/hack/hack.lev.c b/games/hack/hack.lev.c index bdc542e..8cc709e 100644 --- a/games/hack/hack.lev.c +++ b/games/hack/hack.lev.c @@ -18,7 +18,7 @@ extern char nul[]; #include "def.wseg.h" extern struct wseg *wsegs[32], *wheads[32]; extern long wgrowtime[32]; -#endif NOWORM +#endif /* NOWORM */ boolean level_exists[MAXLEVEL+1]; @@ -29,7 +29,7 @@ xchar lev; #ifndef NOWORM struct wseg *wtmp, *wtmp2; int tmp; -#endif NOWORM +#endif /* NOWORM */ if(fd < 0) panic("Save on bad file!"); /* impossible */ if(lev >= 0 && lev <= MAXLEVEL) @@ -53,7 +53,7 @@ xchar lev; #ifndef QUEST bwrite(fd,(char *) rooms,sizeof(rooms)); bwrite(fd,(char *) doors,sizeof(doors)); -#endif QUEST +#endif /* QUEST */ fgold = 0; ftrap = 0; fmon = 0; @@ -68,7 +68,7 @@ xchar lev; wsegs[tmp] = 0; } bwrite(fd,(char *) wgrowtime,sizeof(wgrowtime)); -#endif NOWORM +#endif /* NOWORM */ } bwrite(fd,loc,num) @@ -159,7 +159,7 @@ xchar lev; struct trap *trap; #ifndef NOWORM struct wseg *wtmp; -#endif NOWORM +#endif /* NOWORM */ int tmp; long omoves; int hpid; @@ -239,7 +239,7 @@ xchar lev; #ifndef QUEST mread(fd, (char *)rooms, sizeof(rooms)); mread(fd, (char *)doors, sizeof(doors)); -#endif QUEST +#endif /* QUEST */ #ifndef NOWORM mread(fd, (char *)wsegs, sizeof(wsegs)); for(tmp = 1; tmp < 32; tmp++) if(wsegs[tmp]){ @@ -252,7 +252,7 @@ xchar lev; } } mread(fd, (char *)wgrowtime, sizeof(wgrowtime)); -#endif NOWORM +#endif /* NOWORM */ } mread(fd, buf, len) diff --git a/games/hack/hack.makemon.c b/games/hack/hack.makemon.c index 64e1ecf..54cf307 100644 --- a/games/hack/hack.makemon.c +++ b/games/hack/hack.makemon.c @@ -89,7 +89,7 @@ gotmon: #ifndef NOWORM if(ptr->mlet == 'w' && getwn(mtmp)) initworm(mtmp); -#endif NOWORM +#endif /* NOWORM */ if(anything) if(ptr->mlet == 'O' || ptr->mlet == 'k') { coord enexto(); @@ -165,7 +165,7 @@ struct monst *mtmp; #ifndef NOWORM if(ch == 'w' && mtmp->mx) return; /* do not relocate worms */ -#endif NOWORM +#endif /* NOWORM */ do { tx = rn1(COLNO-3,2); ty = rn2(ROWNO); diff --git a/games/hack/hack.mhitu.c b/games/hack/hack.mhitu.c index b3a316f..e8c3d75 100644 --- a/games/hack/hack.mhitu.c +++ b/games/hack/hack.mhitu.c @@ -286,7 +286,7 @@ struct monst *mtmp; #ifndef NOWORM case 'w': if(tmp) wormhit(mtmp); -#endif NOWORM +#endif /* NOWORM */ break; case 'X': (void) hitu(mtmp,rnd(5)); diff --git a/games/hack/hack.mklev.c b/games/hack/hack.mklev.c index b9b3f04..f6b9933 100644 --- a/games/hack/hack.mklev.c +++ b/games/hack/hack.mklev.c @@ -127,7 +127,7 @@ makelevel() #ifndef QUEST #ifdef WIZARD if(wizard && getenv("SHOPTYPE")) mkshop(); else -#endif WIZARD +#endif /* WIZARD */ if(dlevel > 1 && dlevel < 20 && rn2(dlevel) < 3) mkshop(); else if(dlevel > 6 && !rn2(7)) mkzoo(ZOO); @@ -137,7 +137,7 @@ makelevel() if(dlevel > 11 && !rn2(6)) mkzoo(MORGUE); else if(dlevel > 18 && !rn2(6)) mkswamp(); -#endif QUEST +#endif /* QUEST */ } makerooms() { @@ -265,7 +265,7 @@ boolean discarded; /* piece of a discarded area */ if(rsmax >= MAXRS) { #ifdef WIZARD if(wizard) pline("MAXRS may be too small."); -#endif WIZARD +#endif /* WIZARD */ return; } rsmax++; @@ -387,7 +387,7 @@ chk: #ifdef WIZARD if(wizard && !secret) pline("Strange area [%d,%d] in maker().",x,y); -#endif WIZARD +#endif /* WIZARD */ if(!rn2(3)) return(0); if(x < lowx) lowx = x+xlim+1; diff --git a/games/hack/hack.mkobj.c b/games/hack/hack.mkobj.c index a9098a6..cc8ce6d 100644 --- a/games/hack/hack.mkobj.c +++ b/games/hack/hack.mkobj.c @@ -75,7 +75,7 @@ int otyp; /* if tins are to be identified, need to adapt doname() etc */ if(otmp->otyp == TIN) otmp->spe = rnd(...); -#endif NOT_YET_IMPLEMENTED +#endif /* NOT_YET_IMPLEMENTED */ /* fall into next case */ case GEM_SYM: otmp->quan = rn2(6) ? 1 : 2; diff --git a/games/hack/hack.mkshop.c b/games/hack/hack.mkshop.c index 1a43f30..c503b7d 100644 --- a/games/hack/hack.mkshop.c +++ b/games/hack/hack.mkshop.c @@ -47,7 +47,7 @@ struct monst *shk; } } gottype: -#endif WIZARD +#endif /* WIZARD */ for(sroom = &rooms[0], roomno = 0; ; sroom++, roomno++){ if(sroom->hx < 0) return; if(sroom - rooms >= nroom) { @@ -60,7 +60,7 @@ gottype: if( #ifdef WIZARD (wizard && getenv("SHOPTYPE") && sroom->doorct != 0) || -#endif WIZARD +#endif /* WIZARD */ sroom->doorct <= 2 && sroom->doorct > 0) break; } @@ -98,7 +98,7 @@ gottype: } more(); } -#endif WIZARD +#endif /* WIZARD */ return; } if(!(shk = makemon(PM_SHK,sx,sy))) return; @@ -272,4 +272,4 @@ dist2(x0,y0,x1,y1){ sq(a) int a; { return(a*a); } -#endif QUEST +#endif /* QUEST */ diff --git a/games/hack/hack.mon.c b/games/hack/hack.mon.c index 218761f..8cf641b 100644 --- a/games/hack/hack.mon.c +++ b/games/hack/hack.mon.c @@ -261,7 +261,7 @@ struct monst *mtmp; #ifndef NOWORM if(mtmp->wormno) goto not_special; -#endif NOWORM +#endif /* NOWORM */ /* my dog gets a special treatment */ if(mtmp->mtame) { @@ -398,7 +398,7 @@ not_special: } #else nearer = (DIST(nx,ny,gx,gy) < DIST(nix,niy,gx,gy)); -#endif STUPID +#endif /* STUPID */ if((appr == 1 && nearer) || (appr == -1 && !nearer) || !mmoved || (!appr && !rn2(++chcnt))){ @@ -427,7 +427,7 @@ not_special: mtmp->mtrack[0].y = omy; #ifndef NOWORM if(mtmp->wormno) worm_move(mtmp); -#endif NOWORM +#endif /* NOWORM */ } else { if(msym == 'u' && rn2(2)){ rloc(mtmp); @@ -435,7 +435,7 @@ not_special: } #ifndef NOWORM if(mtmp->wormno) worm_nomove(mtmp); -#endif NOWORM +#endif /* NOWORM */ } postmov: if(mmoved == 1) { @@ -592,7 +592,7 @@ struct monst *mtmp; if(mtmp->isgd) gddead(); #ifndef NOWORM if(mtmp->wormno) wormdead(mtmp); -#endif NOWORM +#endif /* NOWORM */ monfree(mtmp); } @@ -658,7 +658,7 @@ struct monst *mtmp; { #ifdef lint #define NEW_SCORING -#endif lint +#endif /* lint */ int tmp,tmp2,nk,x,y; struct permonst *mdat; extern long newuexp(); @@ -720,7 +720,7 @@ struct monst *mtmp; } /* note: ul is not necessarily the future value of u.ulevel */ /* ------- end of recent valuation change ------- */ -#endif NEW_SCORING +#endif /* NEW_SCORING */ more_experienced(tmp,0); flags.botl = 1; @@ -748,7 +748,7 @@ struct monst *mtmp; mksobj_at(WORM_TOOTH, x, y); stackobj(fobj); } else -#endif NOWORM +#endif /* NOWORM */ if(!letter(tmp) || (!index("mw", tmp) && !rn2(3))) tmp = 0; if(ACCESSIBLE(levl[x][y].typ)) /* might be mimic in wall or dead eel*/ @@ -791,7 +791,7 @@ struct permonst *mdat; if(mdat == mtmp->data) return(0); /* still the same monster */ #ifndef NOWORM if(mtmp->wormno) wormdead(mtmp); /* throw tail away */ -#endif NOWORM +#endif /* NOWORM */ if (u.ustuck == mtmp) { if (u.uswallow) { u.uswallow = 0; @@ -815,7 +815,7 @@ struct permonst *mdat; #ifndef NOWORM if(mdat->mlet == 'w' && getwn(mtmp)) initworm(mtmp); /* perhaps we should clear mtmp->mtame here? */ -#endif NOWORM +#endif /* NOWORM */ unpmon(mtmp); /* necessary for 'I' and to force pmon */ pmon(mtmp); return(1); diff --git a/games/hack/hack.monst.c b/games/hack/hack.monst.c index b682b59..78c2a2e 100644 --- a/games/hack/hack.monst.c +++ b/games/hack/hack.monst.c @@ -1,5 +1,6 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.monst.c - version 1.0.2 */ +/* $FreeBSD$ */ #include "hack.h" #include "def.eshk.h" @@ -44,7 +45,7 @@ struct permonst mons[CMNUM+2] = { { "wumpus", 'w',8,3,2,3,6,0 }, #else { "long worm", 'w',8,3,5,1,4,0 }, -#endif NOWORM +#endif /* NOWORM */ { "large dog", 'd',6,15,4,2,4,0 }, { "leocrotta", 'l',6,18,4,3,6,0 }, { "mimic", 'M',7,3,7,3,4,0 }, @@ -75,5 +76,5 @@ struct permonst pm_wizard = { }; #ifdef MAIL struct permonst pm_mail_daemon = { "mail daemon", '2', 100, 1, 10, 0, 0, 0 }; -#endif MAIL +#endif /* MAIL */ struct permonst pm_eel = { "giant eel", ';', 15, 6, -3, 3, 6, 0 }; diff --git a/games/hack/hack.pager.c b/games/hack/hack.pager.c index 17df161..8cc7002 100644 --- a/games/hack/hack.pager.c +++ b/games/hack/hack.pager.c @@ -110,7 +110,7 @@ readnews() { set_whole_screen(); return(ret); /* report whether we did docrt() */ } -#endif NEWS +#endif /* NEWS */ set_pager(mode) int mode; /* 0: open 1: wait+close 2: close */ @@ -320,7 +320,7 @@ boolean silent; } (void) close(fd); } -#else DEF_PAGER +#else /* DEF_PAGER */ { FILE *f; /* free after Robert Viduya */ @@ -333,7 +333,7 @@ boolean silent; } page_more(f, 0); } -#endif DEF_PAGER +#endif /* DEF_PAGER */ return(1); } @@ -352,7 +352,7 @@ char *str; } return(0); } -#endif SHELL +#endif /* SHELL */ #ifdef NOWAITINCLUDE union wait { /* used only for the cast (union wait *) 0 */ @@ -370,8 +370,8 @@ union wait { /* used only for the cast (union wait *) 0 */ #include <sys/wait.h> #else #include <wait.h> -#endif BSD -#endif NOWAITINCLUDE +#endif /* BSD */ +#endif /* NOWAITINCLUDE */ child(wt) { int status; @@ -384,7 +384,7 @@ child(wt) { setgid(getgid()); #ifdef CHDIR (void) chdir(getenv("HOME")); -#endif CHDIR +#endif /* CHDIR */ return(1); } if(f == -1) { /* cannot fork */ @@ -400,9 +400,9 @@ child(wt) { (void) signal(SIGINT,done1); #ifdef WIZARD if(wizard) (void) signal(SIGQUIT,SIG_DFL); -#endif WIZARD +#endif /* WIZARD */ if(wt) getret(); docrt(); return(0); } -#endif UNIX +#endif /* UNIX */ diff --git a/games/hack/hack.pri.c b/games/hack/hack.pri.c index 9dfd8c8..53eabdc 100644 --- a/games/hack/hack.pri.c +++ b/games/hack/hack.pri.c @@ -45,8 +45,8 @@ char *str; #ifdef UNIX if(!fork()) abort(); /* generate core dump */ -#endif UNIX -#endif DEBUG +#endif /* UNIX */ +#endif /* DEBUG */ more(); /* contains a fflush() */ done("panicked"); } @@ -161,7 +161,7 @@ char ch; impossible("At gets 0%o at %d %d.", ch, x, y); return; } -#endif lint +#endif /* lint */ if(!ch) { impossible("At gets null at %d %d.", x, y); return; @@ -287,7 +287,7 @@ pru() #ifndef NOWORM #include "def.wseg.h" extern struct wseg *m_atseg; -#endif NOWORM +#endif /* NOWORM */ /* print a position that is visible for @ */ prl(x,y) @@ -311,7 +311,7 @@ prl(x,y) if(m_atseg) pwseg(m_atseg); else -#endif NOWORM +#endif /* NOWORM */ pmon(mtmp); } else if((otmp = o_at(x,y)) && room->typ != POOL) @@ -463,7 +463,7 @@ int x,y; nosee(x+1,y); } } -#endif QUEST +#endif /* QUEST */ vism_at(x,y) int x,y; @@ -495,7 +495,7 @@ int show = (!obj->oinvis || See_invisible) && obj->ody = obj->oy; } } -#endif NEWSCR +#endif /* NEWSCR */ unpobj(obj) struct obj *obj; { /* if(obj->odispl){ @@ -533,7 +533,7 @@ struct monst *mtmp; pmon(mtmp); #ifndef NOWORM if(mtmp->wormno) wormsee(mtmp->wormno); -#endif NOWORM +#endif /* NOWORM */ } } @@ -605,7 +605,7 @@ extern char *eos(); (void) sprintf(newbot, "Level %-2d Hp %3d(%d) Ac %-2d Str ", dlevel, u.uhp, u.uhpmax, u.uac); -#endif GOLD_ON_BOTL +#endif /* GOLD_ON_BOTL */ if(u.ustr>18) { if(u.ustr>117) (void) strcat(newbot,"18/**"); @@ -617,7 +617,7 @@ extern char *eos(); (void) sprintf(eos(newbot), " Exp %2d/%-5lu ", u.ulevel,u.uexp); #else (void) sprintf(eos(newbot), " Exp %2u ", u.ulevel); -#endif EXP_ON_BOTL +#endif /* EXP_ON_BOTL */ (void) strcat(newbot, hu_stat[u.uhs]); if(flags.time) (void) sprintf(eos(newbot), " %ld", moves); @@ -648,7 +648,7 @@ mstatusline(mtmp) struct monst *mtmp; { mtmp->data->mlevel, mtmp->mgold, mtmp->mhp, mtmp->mhpmax, mtmp->data->ac, (mtmp->data->damn + 1) * (mtmp->data->damd + 1)); } -#endif WAN_PROBING +#endif /* WAN_PROBING */ cls(){ if(flags.toplin == 1) diff --git a/games/hack/hack.read.c b/games/hack/hack.read.c index c0175d1..82b917a 100644 --- a/games/hack/hack.read.c +++ b/games/hack/hack.read.c @@ -32,7 +32,7 @@ doread() { case SCR_MAIL: readmail(/* scroll */); break; -#endif MAIL +#endif /* MAIL */ case SCR_ENCHANT_ARMOR: { struct obj *otmp = some_armor(); if(!otmp) { @@ -223,11 +223,11 @@ doread() { int oux = u.ux, ouy = u.uy; tele(); if(dist(oux, ouy) > 100) known = TRUE; -#else QUEST +#else /* QUEST */ int uroom = inroom(u.ux, u.uy); tele(); if(uroom != inroom(u.ux, u.uy)) known = TRUE; -#endif QUEST +#endif /* QUEST */ } break; case SCR_GOLD_DETECTION: @@ -349,7 +349,7 @@ doread() { } else if(lev->seen) continue; #ifndef QUEST if(num != ROOM) -#endif QUEST +#endif /* QUEST */ { lev->seen = lev->new = 1; if(lev->scrsym == ' ' || !lev->scrsym) @@ -471,7 +471,7 @@ boolean on; #ifdef QUEST pline("The cave lights up around you, then fades."); return; -#else QUEST +#else /* QUEST */ if(levl[u.ux][u.uy].typ == CORR) { pline("The corridor lights up around you, then fades."); return; @@ -480,13 +480,13 @@ boolean on; return; } else pline("The room is lit."); -#endif QUEST +#endif /* QUEST */ } do_it: #ifdef QUEST return; -#else QUEST +#else /* QUEST */ if(levl[u.ux][u.uy].lit == on) return; if(levl[u.ux][u.uy].typ == DOOR) { @@ -516,7 +516,7 @@ do_it: } } if(!on) seehx = 0; -#endif QUEST +#endif /* QUEST */ } /* Test whether we may genocide all monsters with symbol ch */ diff --git a/games/hack/hack.save.c b/games/hack/hack.save.c index 46d3ba1..a14e11e 100644 --- a/games/hack/hack.save.c +++ b/games/hack/hack.save.c @@ -20,7 +20,7 @@ dosave(){ } #ifdef lint return(0); -#endif lint +#endif /* lint */ } #ifndef NOSAVEONHANGUP @@ -28,7 +28,7 @@ hangup(){ (void) dosave0(1); exit(1); } -#endif NOSAVEONHANGUP +#endif /* NOSAVEONHANGUP */ /* returns 1 if save successful */ dosave0(hu) int hu; { @@ -164,7 +164,7 @@ int fd; } #ifndef QUEST setsee(); /* only to recompute seelx etc. - these weren't saved */ -#endif QUEST +#endif /* QUEST */ docrt(); restoring = FALSE; return(1); @@ -180,7 +180,7 @@ int fd; #ifdef lint /* suppress "used before set" warning from lint */ otmp2 = 0; -#endif lint +#endif /* lint */ while(1) { mread(fd, (char *) &xl, sizeof(xl)); if(xl == -1) break; @@ -215,7 +215,7 @@ int fd; #ifdef lint /* suppress "used before set" warning from lint */ mtmp2 = 0; -#endif lint +#endif /* lint */ while(1) { mread(fd, (char *) &xl, sizeof(xl)); if(xl == -1) break; diff --git a/games/hack/hack.shk.c b/games/hack/hack.shk.c index 4104ba8..a959209 100644 --- a/games/hack/hack.shk.c +++ b/games/hack/hack.shk.c @@ -24,7 +24,7 @@ shk_move(){ return(0); } replshk(mtmp,mtmp2) struct monst *mtmp, *mtmp2; {} char *shkname(){ return(""); } -#else QUEST +#else /* QUEST */ #include "hack.mfndpos.h" #include "def.mkroom.h" #include "def.eshk.h" @@ -715,7 +715,7 @@ int tmp, ac; #ifdef MAIL if(obj->otyp == SCR_MAIL) tmp = rnd(5); -#endif MAIL +#endif /* MAIL */ break; case POTION_SYM: tmp = 10*rnd(50); @@ -904,7 +904,7 @@ struct monst *shkp; #ifdef STUPID /* cater for stupid compilers */ int zz; -#endif STUPID +#endif /* STUPID */ if(uondoor && (ib = sobj_at(ICE_BOX, nx, ny))) { nix = nx; niy = ny; chi = i; break; } @@ -915,7 +915,7 @@ struct monst *shkp; (appr && (zz = GDIST(nix,niy)) && zz > GDIST(nx,ny)) #else (appr && GDIST(nx,ny) < GDIST(nix,niy)) -#endif STUPID +#endif /* STUPID */ ) { nix = nx; niy = ny; @@ -969,7 +969,7 @@ int fall; } } } -#endif QUEST +#endif /* QUEST */ online(x,y) { return(x==u.ux || y==u.uy || @@ -983,6 +983,6 @@ struct monst *mtmp; return( mtmp->mtame || index("1TVWZi&, ", mtmp->data->mlet) #ifndef QUEST || (mtmp->isshk && ESHK(mtmp)->following) -#endif QUEST +#endif /* QUEST */ ); } diff --git a/games/hack/hack.trap.c b/games/hack/hack.trap.c index ea99f2f..682e961 100644 --- a/games/hack/hack.trap.c +++ b/games/hack/hack.trap.c @@ -339,7 +339,7 @@ dotele() { if( #ifdef WIZARD !wizard && -#endif WIZARD +#endif /* WIZARD */ (!Teleportation || u.ulevel < 6 || (pl_character[0] != 'W' && u.ulevel < 10))) { pline("You are not able to teleport at will."); diff --git a/games/hack/hack.tty.c b/games/hack/hack.tty.c index f86c09f..7932633 100644 --- a/games/hack/hack.tty.c +++ b/games/hack/hack.tty.c @@ -55,7 +55,7 @@ static const char rcsid[] = #define V7 #else #define USG -#endif BSD +#endif /* BSD */ /* * Some systems may have getchar() return EOF for various reasons, and @@ -63,7 +63,7 @@ static const char rcsid[] = */ #ifndef BSD #define NR_OF_EOFS 20 -#endif BSD +#endif /* BSD */ #ifdef USG @@ -98,7 +98,7 @@ static const char rcsid[] = #define GTTY(x) (gtty(0, x)) #define STTY(x) (stty(0, x)) -#endif USG +#endif /* USG */ #if 0 extern short ospeed; @@ -169,7 +169,7 @@ int change = 0; /* be satisfied with one character; no timeout */ curttyb.c_cc[VMIN] = 1; /* was VEOF */ curttyb.c_cc[VTIME] = 0; /* was VEOL */ -#endif USG +#endif /* USG */ change++; } if(change){ @@ -299,7 +299,7 @@ parse() inputline[1] = getchar(); #ifdef QUEST if(inputline[1] == foo) inputline[2] = getchar(); else -#endif QUEST +#endif /* QUEST */ inputline[2] = 0; } if(foo == 'm' || foo == 'M'){ @@ -332,7 +332,7 @@ readchar() { } #else end_of_input(); -#endif NR_OF_EOFS +#endif /* NR_OF_EOFS */ if(flags.toplin == 1) flags.toplin = 2; return((char) sym); diff --git a/games/hack/hack.u_init.c b/games/hack/hack.u_init.c index e3900af..1cd3b2d 100644 --- a/games/hack/hack.u_init.c +++ b/games/hack/hack.u_init.c @@ -37,7 +37,7 @@ struct trobj Extra_objs[] = { { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 } }; -#endif WIZARD +#endif /* WIZARD */ struct trobj Cave_man[] = { { MACE, 1, WEAPON_SYM, 1, 1 }, @@ -181,7 +181,7 @@ got_suffix: init_uhunger(); #ifdef QUEST u.uhorizon = 6; -#endif QUEST +#endif /* QUEST */ uarm = uarm2 = uarmh = uarms = uarmg = uwep = uball = uchain = uleft = uright = 0; @@ -244,7 +244,7 @@ got_suffix: #ifdef WIZARD if(wizard) wiz_inv(); -#endif WIZARD +#endif /* WIZARD */ /* make sure he can carry all he has - especially for T's */ while(inv_weight() > 0 && u.ustr < 118) @@ -301,7 +301,7 @@ extern struct obj *mkobj(); if(trop->trquan) continue; /* make a similar object */ } -#endif PYRAMID_BUG +#endif /* PYRAMID_BUG */ trop++; } } @@ -331,7 +331,7 @@ int type; trop->trquan = 1; ini_inv(trop); } -#endif WIZARD +#endif /* WIZARD */ plnamesuffix() { char *p; diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c index 4638223..19a7cdd 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -253,7 +253,7 @@ getmailstatus() { mailbox = 0; #else omstat.st_mtime = 0; -#endif PERMANENT_MAILBOX +#endif /* PERMANENT_MAILBOX */ } } @@ -261,7 +261,7 @@ ckmailstatus() { if(!mailbox #ifdef MAILCKFREQ || moves < laststattime + MAILCKFREQ -#endif MAILCKFREQ +#endif /* MAILCKFREQ */ ) return; laststattime = moves; @@ -271,7 +271,7 @@ ckmailstatus() { mailbox = 0; #else nmstat.st_mtime = 0; -#endif PERMANENT_MAILBOX +#endif /* PERMANENT_MAILBOX */ } else if(nmstat.st_mtime > omstat.st_mtime) { if(nmstat.st_size) newmail(); @@ -371,14 +371,14 @@ readmail() { execl(mr, mr, (char *) 0); exit(1); } -#else DEF_MAILREADER +#else /* DEF_MAILREADER */ (void) page_file(mailbox, FALSE); -#endif DEF_MAILREADER +#endif /* DEF_MAILREADER */ /* get new stat; not entirely correct: there is a small time window where we do not see new mail */ getmailstatus(); } -#endif MAIL +#endif /* MAIL */ regularize(s) /* normalize file name - we don't like ..'s or /'s */ char *s; diff --git a/games/hack/hack.vault.c b/games/hack/hack.vault.c index 472de9a..b5cf932 100644 --- a/games/hack/hack.vault.c +++ b/games/hack/hack.vault.c @@ -257,4 +257,4 @@ struct monst *mtmp, *mtmp2; guard = mtmp2; } -#endif QUEST +#endif /* QUEST */ diff --git a/games/hack/hack.version.c b/games/hack/hack.version.c index 0fe7885..a6744d1 100644 --- a/games/hack/hack.version.c +++ b/games/hack/hack.version.c @@ -10,7 +10,7 @@ doversion(){ "Quest" #else "Hack" -#endif QUEST +#endif /* QUEST */ ), datestring); return(0); } diff --git a/games/hack/hack.worm.c b/games/hack/hack.worm.c index 3c3ba1b..81c0c06 100644 --- a/games/hack/hack.worm.c +++ b/games/hack/hack.worm.c @@ -181,4 +181,4 @@ remseg(wtmp) struct wseg *wtmp; { newsym(wtmp->wx, wtmp->wy); free((char *) wtmp); } -#endif NOWORM +#endif /* NOWORM */ diff --git a/games/hack/hack.zap.c b/games/hack/hack.zap.c index 957b46c44..fd16b3a 100644 --- a/games/hack/hack.zap.c +++ b/games/hack/hack.zap.c @@ -63,7 +63,7 @@ struct obj *otmp; case WAN_PROBING: mstatusline(mtmp); break; -#endif WAN_PROBING +#endif /* WAN_PROBING */ default: impossible("What an interesting wand (%u)", otmp->otyp); } @@ -110,7 +110,7 @@ struct obj *obj, *otmp; /* returns TRUE if sth was done */ case WAN_SPEED_MONSTER: #ifdef WAN_PROBING case WAN_PROBING: -#endif WAN_PROBING +#endif /* WAN_PROBING */ res = FALSE; break; default: |