From 350aac765d3e94494f9b3db3a16f3b09d454bd5b Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 3 Feb 2008 21:24:58 +0000 Subject: Once upon a time, larn 12.0 had functions named getchar() and putchar() that conflicted with libc. We changed them to lgetchar() and xputchar() respectively; larn 12.2 changed them to ttgetch() and ttputch(). After reflecting on this for a while I've decided to adopt the larn 12.2 names; not so much for compatibility but for consistency going forward. So, massrename them. Also make ttputch() static. --- larn/monster.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'larn/monster.c') diff --git a/larn/monster.c b/larn/monster.c index 00f01163..a4f6bbce 100644 --- a/larn/monster.c +++ b/larn/monster.c @@ -1,4 +1,4 @@ -/* $NetBSD: monster.c,v 1.15 2008/02/03 20:11:05 dholland Exp $ */ +/* $NetBSD: monster.c,v 1.16 2008/02/03 21:24:58 dholland Exp $ */ /* * monster.c Larn is copyrighted 1986 by Noah Morgan. @@ -100,7 +100,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: monster.c,v 1.15 2008/02/03 20:11:05 dholland Exp $"); +__RCSID("$NetBSD: monster.c,v 1.16 2008/02/03 21:24:58 dholland Exp $"); #endif /* not lint */ #include @@ -237,16 +237,16 @@ cast() } lprcat(eys); --c[SPELLS]; - while ((a = lgetchar()) == 'D') { + while ((a = ttgetch()) == 'D') { seemagic(-1); cursors(); lprcat(eys); } if (a == '\33') goto over; /* to escape casting a spell */ - if ((b = lgetchar()) == '\33') + if ((b = ttgetch()) == '\33') goto over; /* to escape casting a spell */ - if ((d = lgetchar()) == '\33') { + if ((d = ttgetch()) == '\33') { over: lprcat(aborted); c[SPELLS]++; return; @@ -1000,7 +1000,7 @@ dirsub(x, y) int i; lprcat("\nIn What Direction? "); for (i = 0;;) - switch (lgetchar()) { + switch (ttgetch()) { case 'b': i++; case 'n': @@ -1901,7 +1901,7 @@ genmonst() int i, j; cursors(); lprcat("\nGenocide what monster? "); - for (i = 0; (!isalpha(i)) && (i != ' '); i = lgetchar()); + for (i = 0; (!isalpha(i)) && (i != ' '); i = ttgetch()); lprc(i); for (j = 0; j < MAXMONST; j++) /* search for the monster type */ if (monstnamelist[j] == i) { /* have we found it? */ -- cgit v1.2.3