X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/f73f1009084e75624e3bc00fef9cf4749de80dcc..b67924875ae1497bb26d5968768fdbf9947bd1fe:/larn/store.c diff --git a/larn/store.c b/larn/store.c index 01a3b483..eaa92e52 100644 --- a/larn/store.c +++ b/larn/store.c @@ -1,4 +1,4 @@ -/* $NetBSD: store.c,v 1.6 1997/10/18 20:03:52 christos Exp $ */ +/* $NetBSD: store.c,v 1.10 2004/01/27 20:30:30 jsm Exp $ */ /*- * Copyright (c) 1988 The Regents of the University of California. @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)store.c 5.4 (Berkeley) 5/13/91"; #else -__RCSID("$NetBSD: store.c,v 1.6 1997/10/18 20:03:52 christos Exp $"); +__RCSID("$NetBSD: store.c,v 1.10 2004/01/27 20:30:30 jsm Exp $"); #endif #endif /* not lint */ @@ -46,12 +42,12 @@ __RCSID("$NetBSD: store.c,v 1.6 1997/10/18 20:03:52 christos Exp $"); #include "header.h" #include "extern.h" -static void handsfull __P((void)); -static void outofstock __P((void)); -static void nogold __P((void)); -static void dnditem __P((int)); -static void banktitle __P((char *)); -static void otradhead __P((void)); +static void handsfull(void); +static void outofstock(void); +static void nogold(void); +static void dnditem(int); +static void banktitle(char *); +static void otradhead(void); static int dndcount = 0, dnditm = 0; @@ -253,7 +249,7 @@ dndstore() lflush(); i = 0; while (i != '\33') - i = getchar(); + i = lgetchar(); drawscreen(); nosignal = 0; /* enable signals */ return; @@ -271,7 +267,7 @@ dndstore() lprcat(" to leave]? "); i = 0; while ((i < 'a' || i > 'z') && (i != ' ') && (i != '\33') && (i != 12)) - i = getchar(); + i = lgetchar(); if (i == 12) { clear(); dnd_2hed(); @@ -406,7 +402,7 @@ oschool() yrepcount = 0; i = 0; while ((i < 'a' || i > 'h') && (i != '\33') && (i != 12)) - i = getchar(); + i = lgetchar(); if (i == 12) { sch_hed(); continue; @@ -545,7 +541,7 @@ banktitle(str) lflush(); i = 0; while (i != '\33') - i = getchar(); + i = lgetchar(); drawscreen(); nosignal = 0; /* enable signals */ return; @@ -626,7 +622,7 @@ obanksub() yrepcount = 0; i = 0; while (i != 'd' && i != 'w' && i != 's' && i != '\33') - i = getchar(); + i = lgetchar(); switch (i) { case 'd': lprcat("deposit\nHow much? "); @@ -664,7 +660,7 @@ obanksub() lprcat("\nWhich stone would you like to sell? "); i = 0; while ((i < 'a' || i > 'z') && i != '*') - i = getchar(); + i = lgetchar(); if (i == '*') for (i = 0; i < 26; i++) { if (gemvalue[i]) { @@ -770,7 +766,7 @@ otradepost() lprcat("] ? "); i = 0; while (i > 'z' || (i < 'a' && i != '*' && i != '\33' && i != '.')) - i = getchar(); + i = lgetchar(); if (i == '\33') { setscroll(); recalc(); @@ -790,7 +786,7 @@ otradepost() j = 1; cnsitm(); } /* can't sell unidentified item */ - if (!j) + if (!j) { if (i == '*') { clear(); qshowstr(); @@ -837,6 +833,7 @@ otradepost() if (j <= maxitm + 2) lprcat("\nSo sorry, but we are not authorized to accept that item."); } + } } } @@ -873,7 +870,7 @@ olrs() yrepcount = 0; i = 0; while (i != 'p' && i != '\33') - i = getchar(); + i = lgetchar(); switch (i) { case 'p': lprcat("pay taxes\nHow much? ");