From 304d60d96ce37fa0135c85ea5f94e8594cc93fdf Mon Sep 17 00:00:00 2001 From: Eirik Nygaard Date: Sat, 6 Nov 2004 12:29:17 +0000 Subject: [PATCH] #endif does not take an argument, comment it out. Submitted by: Andreas Hauser Add $DragonFly$ keyword to: src/games/hack/config.h src/games/hack/def.monst.h src/games/hack/def.rm.h src/games/hack/def.wseg.h src/games/hack/hack.Decl.c src/games/hack/hack.h src/games/hack/hack.monst.c --- games/hack/alloc.c | 4 ++-- games/hack/config.h | 13 +++++++------ games/hack/def.monst.h | 3 ++- games/hack/def.rm.h | 3 ++- games/hack/def.wseg.h | 3 ++- games/hack/hack.Decl.c | 3 ++- games/hack/hack.bones.c | 4 ++-- games/hack/hack.c | 18 +++++++++--------- games/hack/hack.cmd.c | 16 ++++++++-------- games/hack/hack.do.c | 4 ++-- games/hack/hack.do_wear.c | 4 ++-- games/hack/hack.dog.c | 10 +++++----- games/hack/hack.eat.c | 6 +++--- games/hack/hack.end.c | 28 ++++++++++++++-------------- games/hack/hack.fight.c | 4 ++-- games/hack/hack.h | 7 ++++--- games/hack/hack.invent.c | 8 ++++---- games/hack/hack.ioctl.c | 16 ++++++++-------- games/hack/hack.lev.c | 16 ++++++++-------- games/hack/hack.makemon.c | 6 +++--- games/hack/hack.mhitu.c | 4 ++-- games/hack/hack.mklev.c | 10 +++++----- games/hack/hack.mkobj.c | 4 ++-- games/hack/hack.mkshop.c | 10 +++++----- games/hack/hack.mon.c | 22 +++++++++++----------- games/hack/hack.monst.c | 5 +++-- games/hack/hack.pager.c | 20 ++++++++++---------- games/hack/hack.pri.c | 24 ++++++++++++------------ games/hack/hack.read.c | 18 +++++++++--------- games/hack/hack.save.c | 12 ++++++------ games/hack/hack.shk.c | 14 +++++++------- games/hack/hack.trap.c | 4 ++-- games/hack/hack.tty.c | 14 +++++++------- games/hack/hack.u_init.c | 12 ++++++------ games/hack/hack.unix.c | 12 ++++++------ games/hack/hack.vault.c | 4 ++-- games/hack/hack.version.c | 4 ++-- games/hack/hack.worm.c | 4 ++-- games/hack/hack.zap.c | 6 +++--- 39 files changed, 193 insertions(+), 186 deletions(-) diff --git a/games/hack/alloc.c b/games/hack/alloc.c index 758fbda9f0..4ec9166abb 100644 --- a/games/hack/alloc.c +++ b/games/hack/alloc.c @@ -1,6 +1,6 @@ /* alloc.c - version 1.0.2 */ /* $FreeBSD: src/games/hack/alloc.c,v 1.4 1999/11/16 02:57:01 billf Exp $ */ -/* $DragonFly: src/games/hack/alloc.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/alloc.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include @@ -46,4 +46,4 @@ unsigned lth; return((long *) nptr); } -#endif LINT +#endif /* LINT */ diff --git a/games/hack/config.h b/games/hack/config.h index c4b78a7934..eae98486bd 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 */ +/* $DragonFly: src/games/hack/config.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ #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 88836af7ae..8f48ac71b4 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 */ +/* $DragonFly: src/games/hack/def.monst.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ 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 f84921ca33..2a48df2abe 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 */ +/* $DragonFly: src/games/hack/def.rm.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ /* 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 0a2af7791d..e9c33c0246 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 */ +/* $DragonFly: src/games/hack/def.wseg.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ #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 b2855ac936..532a0c6a95 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 */ +/* $DragonFly: src/games/hack/hack.Decl.c,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ #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 7aa206b590..a55ecf9d9f 100644 --- a/games/hack/hack.bones.c +++ b/games/hack/hack.bones.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.bones.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.bones.c,v 1.4 1999/11/16 10:26:35 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.bones.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.bones.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" extern char plname[PL_NSIZ]; @@ -88,7 +88,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 13f9cac7b9..80b53e5a69 100644 --- a/games/hack/hack.c +++ b/games/hack/hack.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.c,v 1.4 1999/11/16 10:26:35 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -31,7 +31,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; @@ -65,7 +65,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++) { @@ -298,7 +298,7 @@ domove() } nose1(oldx-u.dx,oldy-u.dy); } -#endif QUEST +#endif /* QUEST */ } else { pru(); } @@ -473,12 +473,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; @@ -528,7 +528,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))) { @@ -624,7 +624,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); @@ -679,7 +679,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 27c61853a7..ef1fd7e3b8 100644 --- a/games/hack/hack.cmd.c +++ b/games/hack/hack.cmd.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.cmd.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.cmd.c,v 1.4 1999/11/16 10:26:35 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.cmd.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.cmd.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include "def.func_tab.h" @@ -14,10 +14,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, @@ -25,7 +25,7 @@ struct func_tab cmdlist[]={ '\024', dotele, #ifdef SUSPEND '\032', dosuspend, -#endif SUSPEND +#endif /* SUSPEND */ 'a', doapply, /* 'A' : UNUSED */ /* 'b', 'B' : go sw */ @@ -68,7 +68,7 @@ struct func_tab cmdlist[]={ '?', dohelp, #ifdef SHELL '!', dosh, -#endif SHELL +#endif /* SHELL */ '.', donull, ' ', donull, ',', dopickup, @@ -129,7 +129,7 @@ char *cmd; u.ux0 = u.ux + u.dx; u.uy0 = u.uy + u.dy; } -#endif QUEST +#endif /* QUEST */ domove(); return; } @@ -158,7 +158,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))(); @@ -296,7 +296,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 704db16346..2bd8dd4525 100644 --- a/games/hack/hack.do.c +++ b/games/hack/hack.do.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.do.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.do.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.do.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.do.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ /* Contains code for 'd', 'D' (drop), '>', '<' (up, down) and 't' (throw) */ @@ -348,7 +348,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 585197b1a9..4d6849e358 100644 --- a/games/hack/hack.do_wear.c +++ b/games/hack/hack.do_wear.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.do_wear.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.do_wear.c,v 1.3 1999/11/16 02:57:03 billf Exp $ */ -/* $DragonFly: src/games/hack/hack.do_wear.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.do_wear.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -67,7 +67,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 bf4bfa9afa..93e41e26e1 100644 --- a/games/hack/hack.dog.c +++ b/games/hack/hack.dog.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.dog.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.dog.c,v 1.3 1999/11/16 02:57:03 billf Exp $ */ -/* $DragonFly: src/games/hack/hack.dog.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.dog.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include "hack.mfndpos.h" @@ -183,7 +183,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; @@ -229,7 +229,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) @@ -375,7 +375,7 @@ inroom(x,y) xchar x,y; { return(croom - rooms); croom++; } -#endif QUEST +#endif /* QUEST */ return(-1); /* not in room or on door */ } @@ -394,7 +394,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 cb8905dbda..d7a9ac083e 100644 --- a/games/hack/hack.eat.c +++ b/games/hack/hack.eat.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.eat.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.eat.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.eat.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.eat.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" char POISONOUS[] = "ADKSVabhks"; @@ -227,7 +227,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!"); @@ -416,7 +416,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 a2216ff418..c283aac064 100644 --- a/games/hack/hack.end.c +++ b/games/hack/hack.end.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.end.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.end.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.end.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.end.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -80,7 +80,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); @@ -99,7 +99,7 @@ char *st1; if(index("bcds", *st1)){ #ifdef WIZARD if(!wizard) -#endif WIZARD +#endif /* WIZARD */ savebones(); if(!flags.notombstone) outrip(); @@ -191,7 +191,7 @@ char *st1; } #ifdef WIZARD if(!wizard) -#endif WIZARD +#endif /* WIZARD */ topten(); if(done_stopprint) printf("\n\n"); exit(0); @@ -294,7 +294,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; @@ -349,7 +349,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 && @@ -482,7 +482,7 @@ hangup() clearlocks(); exit(1); } -#endif NOSAVEONHANGUP +#endif /* NOSAVEONHANGUP */ char * eos(s) @@ -518,13 +518,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!"); @@ -550,7 +550,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; @@ -570,7 +570,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 || @@ -605,7 +605,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 || @@ -620,7 +620,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; } } @@ -640,5 +640,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 81a46c1e10..d51226170f 100644 --- a/games/hack/hack.fight.c +++ b/games/hack/hack.fight.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.fight.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.fight.c,v 1.5 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.fight.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.fight.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" extern struct permonst li_dog, dog, la_dog; @@ -335,7 +335,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 090ef2f041..f1eb65f54b 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 */ +/* $DragonFly: src/games/hack/hack.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ #include "config.h" #include @@ -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 8ca8ca64ee..eac4100c2c 100644 --- a/games/hack/hack.invent.c +++ b/games/hack/hack.invent.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.invent.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.invent.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.invent.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.invent.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -14,7 +14,7 @@ static char *xprname(); #ifndef NOWORM #include "def.wseg.h" extern struct wseg *wsegs[32]; -#endif NOWORM +#endif /* NOWORM */ #define NOINVSYM '#' @@ -176,7 +176,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){ @@ -190,7 +190,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 a05ffba921..e28fb0960c 100644 --- a/games/hack/hack.ioctl.c +++ b/games/hack/hack.ioctl.c @@ -1,9 +1,9 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.ioctl.c - version 1.0.2 */ /* $FreeBSD: src/games/hack/hack.ioctl.c,v 1.2 1999/09/12 07:01:23 marcel Exp $ -/* $DragonFly: src/games/hack/hack.ioctl.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ + $DragonFly: src/games/hack/hack.ioctl.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ -/* This cannot be part of hack.tty.c (as it was earlier) since on some + This cannot be part of hack.tty.c (as it was earlier) since on some systems (e.g. MUNIX) the include files and define the same constants, and the C preprocessor complains. */ #include @@ -14,7 +14,7 @@ struct ltchars ltchars, ltchars0; #else #include /* also includes part of */ struct termio termio; -#endif BSD +#endif /* BSD */ getioctls() { #ifdef BSD @@ -22,7 +22,7 @@ getioctls() { (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars0); #else (void) ioctl(fileno(stdin), (int) TCGETA, &termio); -#endif BSD +#endif /* BSD */ } setioctls() { @@ -30,7 +30,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 */ @@ -47,9 +47,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 1c16985a33..dfa82344c1 100644 --- a/games/hack/hack.lev.c +++ b/games/hack/hack.lev.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.lev.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.lev.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.lev.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.lev.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include "def.mkroom.h" @@ -19,7 +19,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]; @@ -30,7 +30,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) @@ -54,7 +54,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; @@ -69,7 +69,7 @@ xchar lev; wsegs[tmp] = 0; } bwrite(fd,(char *) wgrowtime,sizeof(wgrowtime)); -#endif NOWORM +#endif /* NOWORM */ } bwrite(fd,loc,num) @@ -160,7 +160,7 @@ xchar lev; struct trap *trap; #ifndef NOWORM struct wseg *wtmp; -#endif NOWORM +#endif /* NOWORM */ int tmp; long omoves; int hpid; @@ -240,7 +240,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]){ @@ -253,7 +253,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 007cb24a34..02f689ebc5 100644 --- a/games/hack/hack.makemon.c +++ b/games/hack/hack.makemon.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.makemon.c - version 1.0.2 */ /* $FreeBSD: src/games/hack/hack.makemon.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.makemon.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.makemon.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" extern char fut_geno[]; @@ -90,7 +90,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(); @@ -166,7 +166,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 a6fa4840b4..c50fd4eab8 100644 --- a/games/hack/hack.mhitu.c +++ b/games/hack/hack.mhitu.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.mhitu.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.mhitu.c,v 1.4 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.mhitu.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.mhitu.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" extern struct monst *makemon(); @@ -287,7 +287,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 e578d07ec1..2c2efe414f 100644 --- a/games/hack/hack.mklev.c +++ b/games/hack/hack.mklev.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.mklev.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.mklev.c,v 1.6 1999/11/16 10:26:36 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.mklev.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.mklev.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include #include @@ -128,7 +128,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); @@ -138,7 +138,7 @@ makelevel() if(dlevel > 11 && !rn2(6)) mkzoo(MORGUE); else if(dlevel > 18 && !rn2(6)) mkswamp(); -#endif QUEST +#endif /* QUEST */ } makerooms() { @@ -266,7 +266,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++; @@ -388,7 +388,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 8fed39b883..2c5a1a133a 100644 --- a/games/hack/hack.mkobj.c +++ b/games/hack/hack.mkobj.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.mkobj.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.mkobj.c,v 1.5 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.mkobj.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.mkobj.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" @@ -76,7 +76,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 e067adfbed..7f70dfea71 100644 --- a/games/hack/hack.mkshop.c +++ b/games/hack/hack.mkshop.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.mkshop.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.mkshop.c,v 1.4 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.mkshop.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.mkshop.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #ifndef QUEST #include "hack.h" @@ -48,7 +48,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) { @@ -61,7 +61,7 @@ gottype: if( #ifdef WIZARD (wizard && getenv("SHOPTYPE") && sroom->doorct != 0) || -#endif WIZARD +#endif /* WIZARD */ sroom->doorct <= 2 && sroom->doorct > 0) break; } @@ -99,7 +99,7 @@ gottype: } more(); } -#endif WIZARD +#endif /* WIZARD */ return; } if(!(shk = makemon(PM_SHK,sx,sy))) return; @@ -273,4 +273,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 c9fd31e919..503f24e3e7 100644 --- a/games/hack/hack.mon.c +++ b/games/hack/hack.mon.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.mon.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.mon.c,v 1.5 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.mon.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.mon.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include "hack.mfndpos.h" @@ -262,7 +262,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) { @@ -399,7 +399,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))){ @@ -428,7 +428,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); @@ -436,7 +436,7 @@ not_special: } #ifndef NOWORM if(mtmp->wormno) worm_nomove(mtmp); -#endif NOWORM +#endif /* NOWORM */ } postmov: if(mmoved == 1) { @@ -593,7 +593,7 @@ struct monst *mtmp; if(mtmp->isgd) gddead(); #ifndef NOWORM if(mtmp->wormno) wormdead(mtmp); -#endif NOWORM +#endif /* NOWORM */ monfree(mtmp); } @@ -659,7 +659,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(); @@ -721,7 +721,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; @@ -749,7 +749,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*/ @@ -792,7 +792,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; @@ -816,7 +816,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 b682b59de2..bcfa3ede7f 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 */ +/* $DragonFly: src/games/hack/hack.monst.c,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ #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 7a619fa01e..42d1d4036e 100644 --- a/games/hack/hack.pager.c +++ b/games/hack/hack.pager.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.pager.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.pager.c,v 1.7 1999/11/16 02:57:09 billf Exp $ */ -/* $DragonFly: src/games/hack/hack.pager.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.pager.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ /* This file contains the command routine dowhatis() and a pager. */ /* Also readmail() and doshell(), and generally the things that @@ -111,7 +111,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 */ @@ -321,7 +321,7 @@ boolean silent; } (void) close(fd); } -#else DEF_PAGER +#else /* DEF_PAGER */ { FILE *f; /* free after Robert Viduya */ @@ -334,7 +334,7 @@ boolean silent; } page_more(f, 0); } -#endif DEF_PAGER +#endif /* DEF_PAGER */ return(1); } @@ -353,7 +353,7 @@ char *str; } return(0); } -#endif SHELL +#endif /* SHELL */ #ifdef NOWAITINCLUDE union wait { /* used only for the cast (union wait *) 0 */ @@ -371,8 +371,8 @@ union wait { /* used only for the cast (union wait *) 0 */ #include #else #include -#endif BSD -#endif NOWAITINCLUDE +#endif /* BSD */ +#endif /* NOWAITINCLUDE */ child(wt) { int status; @@ -385,7 +385,7 @@ child(wt) { setgid(getgid()); #ifdef CHDIR (void) chdir(getenv("HOME")); -#endif CHDIR +#endif /* CHDIR */ return(1); } if(f == -1) { /* cannot fork */ @@ -401,9 +401,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 641b270924..35cd9c1a3f 100644 --- a/games/hack/hack.pri.c +++ b/games/hack/hack.pri.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.pri.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.pri.c,v 1.5 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.pri.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.pri.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -46,8 +46,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"); } @@ -162,7 +162,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; @@ -288,7 +288,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) @@ -312,7 +312,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) @@ -464,7 +464,7 @@ int x,y; nosee(x+1,y); } } -#endif QUEST +#endif /* QUEST */ vism_at(x,y) int x,y; @@ -496,7 +496,7 @@ int show = (!obj->oinvis || See_invisible) && obj->ody = obj->oy; } } -#endif NEWSCR +#endif /* NEWSCR */ unpobj(obj) struct obj *obj; { /* if(obj->odispl){ @@ -534,7 +534,7 @@ struct monst *mtmp; pmon(mtmp); #ifndef NOWORM if(mtmp->wormno) wormsee(mtmp->wormno); -#endif NOWORM +#endif /* NOWORM */ } } @@ -606,7 +606,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/**"); @@ -618,7 +618,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); @@ -649,7 +649,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 118d12cdf4..cd23f0aecd 100644 --- a/games/hack/hack.read.c +++ b/games/hack/hack.read.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.read.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.read.c,v 1.6 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.read.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.read.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" @@ -33,7 +33,7 @@ doread() { case SCR_MAIL: readmail(/* scroll */); break; -#endif MAIL +#endif /* MAIL */ case SCR_ENCHANT_ARMOR: { struct obj *otmp = some_armor(); if(!otmp) { @@ -224,11 +224,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: @@ -350,7 +350,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) @@ -472,7 +472,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; @@ -481,13 +481,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) { @@ -517,7 +517,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 a199598a46..145b7ad53a 100644 --- a/games/hack/hack.save.c +++ b/games/hack/hack.save.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.save.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.save.c,v 1.4 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.save.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.save.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" extern char genocided[60]; /* defined in Decl.c */ @@ -21,7 +21,7 @@ dosave(){ } #ifdef lint return(0); -#endif lint +#endif /* lint */ } #ifndef NOSAVEONHANGUP @@ -29,7 +29,7 @@ hangup(){ (void) dosave0(1); exit(1); } -#endif NOSAVEONHANGUP +#endif /* NOSAVEONHANGUP */ /* returns 1 if save successful */ dosave0(hu) int hu; { @@ -165,7 +165,7 @@ int fd; } #ifndef QUEST setsee(); /* only to recompute seelx etc. - these weren't saved */ -#endif QUEST +#endif /* QUEST */ docrt(); restoring = FALSE; return(1); @@ -181,7 +181,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; @@ -216,7 +216,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 467ad222a0..a4d44786fb 100644 --- a/games/hack/hack.shk.c +++ b/games/hack/hack.shk.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.shk.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.shk.c,v 1.5 1999/11/16 10:26:37 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.shk.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.shk.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #ifdef QUEST @@ -25,7 +25,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" @@ -716,7 +716,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); @@ -905,7 +905,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; } @@ -916,7 +916,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; @@ -970,7 +970,7 @@ int fall; } } } -#endif QUEST +#endif /* QUEST */ online(x,y) { return(x==u.ux || y==u.uy || @@ -984,6 +984,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 a33c689001..f7e5dcca41 100644 --- a/games/hack/hack.trap.c +++ b/games/hack/hack.trap.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.trap.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.trap.c,v 1.5 1999/11/16 10:26:38 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.trap.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.trap.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" @@ -340,7 +340,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 b52e9acef4..7df19ff2e1 100644 --- a/games/hack/hack.tty.c +++ b/games/hack/hack.tty.c @@ -32,7 +32,7 @@ * * @(#)hack.tty.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/games/hack/hack.tty.c,v 1.6.2.1 2000/07/20 10:35:07 kris Exp $ - * $DragonFly: src/games/hack/hack.tty.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ + * $DragonFly: src/games/hack/hack.tty.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ @@ -51,7 +51,7 @@ #define V7 #else #define USG -#endif BSD +#endif /* BSD */ /* * Some systems may have getchar() return EOF for various reasons, and @@ -59,7 +59,7 @@ */ #ifndef BSD #define NR_OF_EOFS 20 -#endif BSD +#endif /* BSD */ #ifdef USG @@ -94,7 +94,7 @@ #define GTTY(x) (gtty(0, x)) #define STTY(x) (stty(0, x)) -#endif USG +#endif /* USG */ #if 0 extern short ospeed; @@ -165,7 +165,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){ @@ -295,7 +295,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'){ @@ -328,7 +328,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 9448d438c9..3bc49b7ffc 100644 --- a/games/hack/hack.u_init.c +++ b/games/hack/hack.u_init.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.u_init.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.u_init.c,v 1.4 1999/11/16 02:57:13 billf Exp $ */ -/* $DragonFly: src/games/hack/hack.u_init.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.u_init.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #include @@ -38,7 +38,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 }, @@ -182,7 +182,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; @@ -245,7 +245,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) @@ -302,7 +302,7 @@ extern struct obj *mkobj(); if(trop->trquan) continue; /* make a similar object */ } -#endif PYRAMID_BUG +#endif /* PYRAMID_BUG */ trop++; } } @@ -332,7 +332,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 c87f2cd387..159edcb5e9 100644 --- a/games/hack/hack.unix.c +++ b/games/hack/hack.unix.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.unix.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.unix.c,v 1.8 1999/11/16 02:57:13 billf Exp $ */ -/* $DragonFly: src/games/hack/hack.unix.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.unix.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ /* This file collects some Unix dependencies; hack.pager.c contains some more */ @@ -289,7 +289,7 @@ getmailstatus() { mailbox = 0; #else omstat.st_mtime = 0; -#endif PERMANENT_MAILBOX +#endif /* PERMANENT_MAILBOX */ } } @@ -297,7 +297,7 @@ ckmailstatus() { if(!mailbox #ifdef MAILCKFREQ || moves < laststattime + MAILCKFREQ -#endif MAILCKFREQ +#endif /* MAILCKFREQ */ ) return; laststattime = moves; @@ -307,7 +307,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(); @@ -409,12 +409,12 @@ readmail() { } #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 ed9c98e16a..866efeca5d 100644 --- a/games/hack/hack.vault.c +++ b/games/hack/hack.vault.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.vault.c - version 1.0.2 */ /* $FreeBSD: src/games/hack/hack.vault.c,v 1.4 1999/11/16 10:26:38 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.vault.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.vault.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #ifdef QUEST @@ -258,4 +258,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 32e9fa2231..15b7f03952 100644 --- a/games/hack/hack.version.c +++ b/games/hack/hack.version.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.version.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.version.c,v 1.3 1999/08/27 23:29:05 peter Exp $ */ -/* $DragonFly: src/games/hack/hack.version.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.version.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "date.h" @@ -11,7 +11,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 eff1bd1097..7c1eb919ed 100644 --- a/games/hack/hack.worm.c +++ b/games/hack/hack.worm.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.worm.c - version 1.0.2 */ /* $FreeBSD: src/games/hack/hack.worm.c,v 1.4 1999/11/16 10:26:38 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.worm.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.worm.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" #ifndef NOWORM @@ -182,4 +182,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 26cf9ad20e..0a8fe830f4 100644 --- a/games/hack/hack.zap.c +++ b/games/hack/hack.zap.c @@ -1,7 +1,7 @@ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.zap.c - version 1.0.3 */ /* $FreeBSD: src/games/hack/hack.zap.c,v 1.4 1999/11/16 10:26:38 marcel Exp $ */ -/* $DragonFly: src/games/hack/hack.zap.c,v 1.2 2003/06/17 04:25:24 dillon Exp $ */ +/* $DragonFly: src/games/hack/hack.zap.c,v 1.3 2004/11/06 12:29:17 eirikn Exp $ */ #include "hack.h" @@ -64,7 +64,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); } @@ -111,7 +111,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: -- 2.41.0