From 7e027cb7af8339d869c5abaf2cab2bd54487de54 Mon Sep 17 00:00:00 2001 From: mestre Date: Sun, 10 Jan 2016 13:35:09 +0000 Subject: As per style(9), remove remaining lint-style comments from games/ OK tb@ --- games/phantasia/fight.c | 10 +--------- games/phantasia/io.c | 4 +--- games/phantasia/main.c | 17 +---------------- games/phantasia/misc.c | 6 +----- games/phantasia/setup.c | 5 +---- 5 files changed, 5 insertions(+), 37 deletions(-) (limited to 'games/phantasia') diff --git a/games/phantasia/fight.c b/games/phantasia/fight.c index 0e094817ede..04f3e08ad12 100644 --- a/games/phantasia/fight.c +++ b/games/phantasia/fight.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fight.c,v 1.13 2016/01/06 14:28:09 mestre Exp $ */ +/* $OpenBSD: fight.c,v 1.14 2016/01/10 13:35:09 mestre Exp $ */ /* $NetBSD: fight.c,v 1.2 1995/03/24 03:58:39 cgd Exp $ */ /* @@ -164,7 +164,6 @@ encounter(int particular) more(Lines); ++flockcnt; longjmp(Fightenv, 1); - /* NOTREACHED */ } else if (Circle > 1.0 && Curmonster.m_treasuretype > 0 @@ -463,7 +462,6 @@ monsthits(void) more(Lines); Whichmonster = (int) ROLL(70.0, 30.0); longjmp(Fightenv, 1); - /* NOTREACHED */ case SM_BALROG: /* take experience away */ @@ -655,7 +653,6 @@ monsthits(void) Enemyname); Whichmonster = 55 + ((drandom() > 0.5) ? 22 : 0); longjmp(Fightenv, 1); - /* NOTREACHED */ case SM_TROLL: /* partially regenerate monster */ @@ -917,7 +914,6 @@ throwspell(void) Player.p_mana -= MM_XFORM; Whichmonster = (int) ROLL(0.0, 100.0); longjmp(Fightenv, 1); - /* NOTREACHED */ } break; @@ -1000,7 +996,6 @@ throwspell(void) Whichmonster = (int) infloat(); Whichmonster = MAX(0, MIN(99, Whichmonster)); longjmp(Fightenv, 1); - /* NOTREACHED */ } break; } @@ -1300,7 +1295,6 @@ awardtreasure(void) (Player.p_maxenergy + Player.p_energy) * 5.5 + Circle * 50.0; Whichmonster = pickmonster(); longjmp(Fightenv, 1); - /* NOTREACHED */ case 2: addstr("It makes you invisible for you next monster.\n"); @@ -1309,7 +1303,6 @@ awardtreasure(void) Player.p_speed = 1e6; Whichmonster = pickmonster(); longjmp(Fightenv, 1); - /* NOTREACHED */ case 3: addstr("It increases your strength ten fold to fight your next monster.\n"); @@ -1318,7 +1311,6 @@ awardtreasure(void) Player.p_might *= 10.0; Whichmonster = pickmonster(); longjmp(Fightenv, 1); - /* NOTREACHED */ case 4: addstr("It is a general knowledge scroll.\n"); diff --git a/games/phantasia/io.c b/games/phantasia/io.c index bfffac0c4ba..aeaa5c05216 100644 --- a/games/phantasia/io.c +++ b/games/phantasia/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.8 2016/01/06 14:28:09 mestre Exp $ */ +/* $OpenBSD: io.c,v 1.9 2016/01/10 13:35:09 mestre Exp $ */ /* $NetBSD: io.c,v 1.2 1995/03/24 03:58:50 cgd Exp $ */ /* @@ -267,13 +267,11 @@ interrupt(void) ch = getanswer("NY", FALSE); if (ch == 'Y') death("Bailing out"); - /* NOTREACHED */ } else { mvaddstr(4, 0, "Do you really want to quit ? "); ch = getanswer("NY", FALSE); if (ch == 'Y') leavegame(); - /* NOTREACHED */ } mvaddstr(4, 0, line); /* restore data on screen */ diff --git a/games/phantasia/main.c b/games/phantasia/main.c index 6a2d5b197d5..a535d5ab2d2 100644 --- a/games/phantasia/main.c +++ b/games/phantasia/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.20 2016/01/08 13:40:05 tb Exp $ */ +/* $OpenBSD: main.c,v 1.21 2016/01/10 13:35:09 mestre Exp $ */ /* $NetBSD: main.c,v 1.3 1995/04/24 12:24:37 cgd Exp $ */ /* @@ -126,12 +126,10 @@ main(int argc, char **argv) case 'a': /* all users */ activelist(); cleanup(TRUE); - /* NOTREACHED */ case 'p': /* purge old players */ purgeoldplayers(); cleanup(TRUE); - /* NOTREACHED */ case 'S': /* set 'Wizard' */ Wizard = !getuid(); @@ -144,24 +142,20 @@ main(int argc, char **argv) case 'm': /* monsters */ monstlist(); cleanup(TRUE); - /* NOTREACHED */ case 'b': /* scoreboard */ scorelist(); cleanup(TRUE); - /* NOTREACHED */ } if (!isatty(0)) /* don't let non-tty's play */ cleanup(TRUE); - /* NOTREACHED */ playinit(); /* set up to catch signals, init curses */ if (examine) { changestats(FALSE); cleanup(TRUE); - /* NOTREACHED */ } if (!noheader) { titlelist(); @@ -169,7 +163,6 @@ main(int argc, char **argv) } if (headeronly) cleanup(TRUE); - /* NOTREACHED */ do /* get the player structure filled */ @@ -185,7 +178,6 @@ main(int argc, char **argv) case 'Q': cleanup(TRUE); - /* NOTREACHED */ default: Fileloc = rollnewplayer(); @@ -362,19 +354,15 @@ initialstate(void) /* open some files */ if ((Playersfp = fopen(_PATH_PEOPLE, "r+")) == NULL) error(_PATH_PEOPLE); - /* NOTREACHED */ if ((Monstfp = fopen(_PATH_MONST, "r+")) == NULL) error(_PATH_MONST); - /* NOTREACHED */ if ((Messagefp = fopen(_PATH_MESS, "r")) == NULL) error(_PATH_MESS); - /* NOTREACHED */ if ((Energyvoidfp = fopen(_PATH_VOID, "r+")) == NULL) error(_PATH_VOID); - /* NOTREACHED */ } /* */ /************************************************************************ @@ -628,7 +616,6 @@ procmain(void) case '5': /* good-bye */ leavegame(); - /* NOTREACHED */ case '6': /* cloak */ if (Player.p_level < MEL_CLOAK || Player.p_magiclvl < ML_CLOAK) @@ -928,10 +915,8 @@ recallplayer(void) Player.p_status = S_HUNGUP; writerecord(&Player, loc); cleanup(TRUE); - /* NOTREACHED */ } death("Stupidity"); - /* NOTREACHED */ } return (loc); } else diff --git a/games/phantasia/misc.c b/games/phantasia/misc.c index c34a28dbe8a..9e03e211672 100644 --- a/games/phantasia/misc.c +++ b/games/phantasia/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.20 2016/01/06 14:28:09 mestre Exp $ */ +/* $OpenBSD: misc.c,v 1.21 2016/01/10 13:35:10 mestre Exp $ */ /* $NetBSD: misc.c,v 1.2 1995/03/24 03:59:03 cgd Exp $ */ /* @@ -812,7 +812,6 @@ leavegame(void) } cleanup(TRUE); - /* NOTREACHED */ } /* */ /************************************************************************ @@ -937,10 +936,8 @@ death(char *how) execl(_PATH_GAMEPROG, "phantasia", "-s", (Wizard ? "-S" : (char *)NULL), (char *)NULL); exit(0); - /* NOTREACHED */ } cleanup(TRUE); - /* NOTREACHED */ } /* */ /************************************************************************ @@ -1416,7 +1413,6 @@ error(char *whichfile) warn("%s", whichfile); fprintf(stderr, "Please run 'setup' to determine the problem.\n"); exit(1); - /* NOTREACHED */ } /* */ /************************************************************************ diff --git a/games/phantasia/setup.c b/games/phantasia/setup.c index 540be398d1f..899d728066e 100644 --- a/games/phantasia/setup.c +++ b/games/phantasia/setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setup.c,v 1.17 2016/01/06 14:28:09 mestre Exp $ */ +/* $OpenBSD: setup.c,v 1.18 2016/01/10 13:35:10 mestre Exp $ */ /* $NetBSD: setup.c,v 1.4 1995/04/24 12:24:41 cgd Exp $ */ /* @@ -118,12 +118,10 @@ main(int argc, char *argv[]) if (unlink(path) < 0) Error("Cannot unlink %s.\n", path); - /*NOTREACHED*/ } if ((fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0660)) < 0) Error("Cannot create %s.\n", path); - /*NOTREACHED*/ close(fd); /* close newly created file */ @@ -215,7 +213,6 @@ Error(char *str, char *file) fprintf(stderr, str, file); perror(file); exit(1); - /* NOTREACHED */ } /* */ /************************************************************************ -- cgit v1.2.3-59-g8ed1b