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/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'larn/main.c') diff --git a/larn/main.c b/larn/main.c index 14f1caef..241c9199 100644 --- a/larn/main.c +++ b/larn/main.c @@ -1,9 +1,9 @@ -/* $NetBSD: main.c,v 1.22 2008/02/03 19:20:42 dholland Exp $ */ +/* $NetBSD: main.c,v 1.23 2008/02/03 21:24:58 dholland Exp $ */ /* main.c */ #include #ifndef lint -__RCSID("$NetBSD: main.c,v 1.22 2008/02/03 19:20:42 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.23 2008/02/03 21:24:58 dholland Exp $"); #endif /* not lint */ #include @@ -1277,7 +1277,7 @@ whatitem(const char *str) lprintf("\nWhat do you want to %s [* for all] ? ", str); i = 0; while (i > 'z' || (i < 'a' && i != '*' && i != '\33' && i != '.')) - i = lgetchar(); + i = ttgetch(); if (i == '\33') lprcat(" aborted"); return (i); @@ -1294,7 +1294,7 @@ readnum(mx) int i; unsigned long amt = 0; sncbr(); - if ((i = lgetchar()) == '*') + if ((i = ttgetch()) == '*') amt = mx; /* allow him to say * for all gold */ else while (i != '\n') { @@ -1305,7 +1305,7 @@ readnum(mx) } if ((i <= '9') && (i >= '0') && (amt < 99999999)) amt = amt * 10 + i - '0'; - i = lgetchar(); + i = ttgetch(); } scbr(); return (amt); -- cgit v1.2.3-56-ge451