X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/350aac765d3e94494f9b3db3a16f3b09d454bd5b..7aac7a7e5d525d103439a884f659f2b5070ee394:/larn/store.c diff --git a/larn/store.c b/larn/store.c index 4eb5ec52..2d335380 100644 --- a/larn/store.c +++ b/larn/store.c @@ -1,4 +1,4 @@ -/* $NetBSD: store.c,v 1.14 2008/02/03 21:24:59 dholland Exp $ */ +/* $NetBSD: store.c,v 1.16 2012/06/19 05:30:44 dholland Exp $ */ /*- * Copyright (c) 1988 The Regents of the University of California. @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)store.c 5.4 (Berkeley) 5/13/91"; #else -__RCSID("$NetBSD: store.c,v 1.14 2008/02/03 21:24:59 dholland Exp $"); +__RCSID("$NetBSD: store.c,v 1.16 2012/06/19 05:30:44 dholland Exp $"); #endif #endif /* not lint */ @@ -47,7 +47,9 @@ static void outofstock(void); static void nogold(void); static void dnditem(int); static void banktitle(const char *); +static void obanksub(void); static void otradhead(void); +static void cnsitm(void); static int dndcount = 0, dnditm = 0; @@ -189,16 +191,16 @@ struct _itm itm[90] = { /* function for the dnd store */ -void -dnd_2hed() +static void +dnd_2hed(void) { lprcat("Welcome to the Larn Thrift Shoppe. We stock many items explorers find useful\n"); lprcat(" in their adventures. Feel free to browse to your hearts content.\n"); lprcat("Also be advised, if you break 'em, you pay for 'em."); } -void -dnd_hed() +static void +dnd_hed(void) { int i; for (i = dnditm; i < 26 + dnditm; i++) @@ -208,7 +210,7 @@ dnd_hed() } static void -handsfull() +handsfull(void) { lprcat("\nYou can't carry anything more!"); lflush(); @@ -216,7 +218,7 @@ handsfull() } static void -outofstock() +outofstock(void) { lprcat("\nSorry, but we are out of that item."); lflush(); @@ -224,7 +226,7 @@ outofstock() } static void -nogold() +nogold(void) { lprcat("\nYou don't have enough gold to pay for that!"); lflush(); @@ -232,7 +234,7 @@ nogold() } void -dndstore() +dndstore(void) { int i; dnditm = 0; @@ -318,8 +320,7 @@ dndstore() to print the item list; used in dndstore() enter with the index into itm */ static void -dnditem(i) - int i; +dnditem(int i) { int j, k; if (i >= MAXITM) @@ -346,12 +347,12 @@ dnditem(i) for the college of larn */ u_char course[26] = {0}; /* the list of courses taken */ -char coursetime[] = {10, 15, 10, 20, 10, 10, 10, 5}; +static char coursetime[] = {10, 15, 10, 20, 10, 10, 10, 5}; /* function to display the header info for the school */ -void -sch_hed() +static void +sch_hed(void) { clear(); lprcat("The College of Larn offers the exciting opportunity of higher education to\n"); @@ -388,7 +389,7 @@ sch_hed() } void -oschool() +oschool(void) { int i; long time_used; @@ -513,12 +514,12 @@ oschool() int lasttime = 0; /* last time he was in bank */ void -obank() +obank(void) { banktitle(" Welcome to the First National Bank of Larn."); } void -obank2() +obank2(void) { banktitle("Welcome to the 5th level branch office of the First National Bank of Larn."); } @@ -558,7 +559,7 @@ banktitle(const char *str) * function to put interest on your bank account */ void -ointerest() +ointerest(void) { int i; if (c[BANKACCOUNT] < 0) @@ -577,7 +578,7 @@ static short gemorder[26] = {0}; /* the reference to screen location * for each */ static long gemvalue[26] = {0}; /* the appraisal of the gems */ void -obanksub() +obanksub(void) { long amt; int i, k; @@ -699,12 +700,12 @@ obanksub() } } +#if 0 /* XXX: apparently unused */ /* subroutine to appraise any stone for the bank */ -void -appraise(gemstone) - int gemstone; +static void +appraise(int gemstone) { int j, amt; for (j = 0; j < 26; j++) @@ -738,11 +739,13 @@ appraise(gemstone) lprcat("no\nO. K.\n"); } } +#endif /* 0 - unused */ + /* function for the trading post */ static void -otradhead() +otradhead(void) { clear(); lprcat("Welcome to the Larn Trading Post. We buy items that explorers no longer find\n"); @@ -753,7 +756,7 @@ otradhead() } void -otradepost() +otradepost(void) { int i, j, value, isub, izarg; dnditm = dndcount = 0; @@ -839,8 +842,8 @@ otradepost() } } -void -cnsitm() +static void +cnsitm(void) { lprcat("\nSorry, we can't accept unidentified objects."); } @@ -849,7 +852,7 @@ cnsitm() * for the Larn Revenue Service */ void -olrs() +olrs(void) { int i, first; long amt;