-/* $NetBSD: teach.c,v 1.24 2013/09/13 20:46:50 joerg Exp $ */
+/* $NetBSD: teach.c,v 1.25 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)teach.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: teach.c,v 1.24 2013/09/13 20:46:50 joerg Exp $");
+__RCSID("$NetBSD: teach.c,v 1.25 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
if ((i = wrtext(intro2)) != 0)
break;
+ /* FALLTHROUGH */
case 3:
if ((i = wrtext(moves)) != 0)
break;
+ /* FALLTHROUGH */
case 4:
if ((i = wrtext(removepiece)) != 0)
break;
+ /* FALLTHROUGH */
case 5:
if ((i = wrtext(hits)) != 0)
break;
+ /* FALLTHROUGH */
case 6:
if ((i = wrtext(endgame)) != 0)
break;
+ /* FALLTHROUGH */
case 7:
if ((i = wrtext(doubl)) != 0)
break;
+ /* FALLTHROUGH */
case 8:
if ((i = wrtext(stragy)) != 0)
break;
+ /* FALLTHROUGH */
case 9:
if ((i = wrtext(prog)) != 0)
break;
+ /* FALLTHROUGH */
case 10:
if ((i = wrtext(lastch)) != 0)
break;
-/* $NetBSD: command2.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */
+/* $NetBSD: command2.c,v 1.4 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)com2.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: command2.c,v 1.3 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: command2.c,v 1.4 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
puts("Your fantasy is over.");
die();
}
+ /* FALLTHROUGH */
case -1:
puts("Kill what?");
break;
-/* $NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */
+/* $NetBSD: command3.c,v 1.5 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $");
+__RCSID("$NetBSD: command3.c,v 1.5 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
case NORMGOD:
printf("She screams as you wrestle her into ");
puts("the hole.");
+ /* FALLTHROUGH */
case TIMER:
power += 7;
ego -= 10;
+ /* FALLTHROUGH */
case AMULET:
case MEDALION:
case TALISMAN:
-/* $NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $ */
+/* $NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $ */
/* main.c */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include <sys/types.h>
savegame(savefilename);
wizard = 1;
died(-257); /* save the game - doesn't return */
+ __unreachable();
case 'Z':
yrepcount = 0;
case 'g':
cursors();
lprintf("\nThe stuff you are carrying presently weighs %ld pounds", (long) packweight());
+ /* FALLTHROUGH */
case ' ':
yrepcount = 0;
nomove = 1;
-/* $NetBSD: monster.c,v 1.18 2012/06/19 05:30:43 dholland Exp $ */
+/* $NetBSD: monster.c,v 1.19 2019/02/03 03:19:25 mrg Exp $ */
/*
* monster.c Larn is copyrighted 1986 by Noah Morgan.
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: monster.c,v 1.18 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: monster.c,v 1.19 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include <string.h>
switch (ttgetch()) {
case 'b':
i++;
+ /* FALLTHROUGH */
case 'n':
i++;
+ /* FALLTHROUGH */
case 'y':
i++;
+ /* FALLTHROUGH */
case 'u':
i++;
+ /* FALLTHROUGH */
case 'h':
i++;
+ /* FALLTHROUGH */
case 'k':
i++;
+ /* FALLTHROUGH */
case 'l':
i++;
+ /* FALLTHROUGH */
case 'j':
i++;
+ /* FALLTHROUGH */
goto out;
};
out:
-/* $NetBSD: movem.c,v 1.9 2012/06/19 05:30:43 dholland Exp $ */
+/* $NetBSD: movem.c,v 1.10 2019/02/03 03:19:25 mrg Exp $ */
/*
* movem.c (move monster) Larn is copyrighted 1986 by Noah Morgan.
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: movem.c,v 1.9 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: movem.c,v 1.10 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include "header.h"
case OMIRROR:
if (mitem[m][k] == VAMPIRE)
goto smm;
+ /* FALLTHROUGH */
default:
screen[m][k] = 0;
break;
case 1:
case 2: /* change direction to a random one */
sp->dir = rnd(8);
+ /* FALLTHROUGH */
default: /* move in normal direction */
dir = sp->dir;
len = sp->lifetime;
-/* $NetBSD: object.c,v 1.16 2012/06/19 05:30:43 dholland Exp $ */
+/* $NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $ */
/* object.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: object.c,v 1.16 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include "header.h"
#include "extern.h"
item[playerx][playery] = OTELEPORTER;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTELEPORTER:
lprcat("\nZaaaappp! You've been teleported!\n");
beep();
item[playerx][playery] = OTRAPARROW;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case OTRAPARROW:
lprcat("\nYou are hit by an arrow");
beep(); /* for an arrow trap */
item[playerx][playery] = ODARTRAP;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case ODARTRAP:
lprcat("\nYou are hit by a dart");
beep(); /* for a dart trap */
item[playerx][playery] = OTRAPDOOR;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTRAPDOOR:
lastnum = 272; /* a trap door */
if ((level == MAXLEVEL - 1) || (level == MAXLEVEL + MAXVLEVEL - 1)) {
-/* $NetBSD: move.c,v 1.18 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: move.c,v 1.19 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: move.c,v 1.18 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: move.c,v 1.19 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
case C_200:
if (pp->nummiles[C_200] == 2)
return error("only two 200's per hand");
+ /* FALLTHROUGH */
case C_100: case C_75:
if (pp->speed == C_LIMIT)
return error("limit of 50");
+ /* FALLTHROUGH */
case C_50:
if (pp->mileage + Value[card] > End)
return error("puts you over %d", End);
+ /* FALLTHROUGH */
case C_25:
if (!pp->can_go)
return error("cannot move now");
-/* $NetBSD: fight.c,v 1.13 2009/08/31 08:27:16 dholland Exp $ */
+/* $NetBSD: fight.c,v 1.14 2019/02/03 03:19:25 mrg Exp $ */
/*
* fight.c Phantasia monster fighting routines
/* fall through to treasure type 9 if
* no treasure from above */
+ /* FALLTHROUGH */
case 9: /* treasure type 9 */
switch (whichtreasure) {
case 1:
++Player.p_crowns;
break;
}
- /* fall through otherwise */
+ /* FALLTHROUGH */
case 2:
addstr("You've been blessed!\n");
Player.p_blessing = TRUE;
-/* $NetBSD: main.c,v 1.23 2009/08/31 08:27:16 dholland Exp $ */
+/* $NetBSD: main.c,v 1.24 2019/02/03 03:19:25 mrg Exp $ */
/*
* Phantasia 3.3.2 -- Interterminal fantasy game
case 'a': /* all users */
activelist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'p': /* purge old players */
purgeoldplayers();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'S': /* set 'Wizard' */
case 'm': /* monsters */
monstlist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
case 'b': /* scoreboard */
scorelist();
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
}
if (examine) {
changestats(FALSE);
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
}
if (!noheader) {
titlelist();
purgeoldplayers(); /* clean up old characters */
}
- if (headeronly)
+ if (headeronly) {
cleanup(TRUE);
- /* NOTREACHED */
+ __unreachable();
+ /* NOTREACHED */
+ }
do
/* get the player structure filled */
case 'Q':
cleanup(TRUE);
+ __unreachable();
/* NOTREACHED */
default:
case '5': /* good-bye */
leavegame();
+ __unreachable();
/* NOTREACHED */
case '6': /* cloak */
-/* $NetBSD: misc.c,v 1.21 2011/09/01 07:18:50 plunky Exp $ */
+/* $NetBSD: misc.c,v 1.22 2019/02/03 03:19:25 mrg Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
ynew = Player.p_y - ROLL(1.0, 5.0);
/* fall through for check */
+ /* FALLTHROUGH */
case A_SPECIFIC: /* just move player */
if (Beyond && fabs(xnew) < D_BEYOND && fabs(ynew) < D_BEYOND)
/*
-/* $NetBSD: quiz.c,v 1.27 2014/03/23 00:07:15 dholland Exp $ */
+/* $NetBSD: quiz.c,v 1.28 2019/02/03 03:19:25 mrg Exp $ */
/*-
* Copyright (c) 1991, 1993
#if 0
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: quiz.c,v 1.27 2014/03/23 00:07:15 dholland Exp $");
+__RCSID("$NetBSD: quiz.c,v 1.28 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
case ':':
if (!esc)
return (s);
+ /* FALLTHROUGH */
default:
esc = 0;
break;
-/* $NetBSD: play.c,v 1.9 2008/01/14 03:50:02 dholland Exp $ */
+/* $NetBSD: play.c,v 1.10 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1988, 1993
#if 0
static char sccsid[] = "@(#)play.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: play.c,v 1.9 2008/01/14 03:50:02 dholland Exp $");
+__RCSID("$NetBSD: play.c,v 1.10 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
break;
case 'Q':
quit(0);
+ __unreachable();
case '0':
case '1':
case '2':
-/* $NetBSD: room.c,v 1.13 2009/08/12 08:44:45 dholland Exp $ */
+/* $NetBSD: room.c,v 1.14 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1988, 1993
#if 0
static char sccsid[] = "@(#)room.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: room.c,v 1.13 2009/08/12 08:44:45 dholland Exp $");
+__RCSID("$NetBSD: room.c,v 1.14 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
opt_go(++i);
break;
}
+ /* FALLTHROUGH */
default:
if (options[i].is_bool) {
sound_bell();
-/* $NetBSD: pl_5.c,v 1.25 2009/03/15 03:33:56 dholland Exp $ */
+/* $NetBSD: pl_5.c,v 1.26 2019/02/03 03:19:25 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_5.c,v 1.25 2009/03/15 03:33:56 dholland Exp $");
+__RCSID("$NetBSD: pl_5.c,v 1.26 2019/02/03 03:19:25 mrg Exp $");
#endif
#endif /* not lint */
switch (*p) {
case 'l':
dir -= 2;
+ /* FALLTHROUGH */
case 'r':
if (++dir == 0)
dir = 8;