From d9e06af0170971fa7c14eddc67a9b07fafea7dde Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 28 Jan 2008 06:16:13 +0000 Subject: Make this build with WARNS=4. --- monop/getinp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'monop/getinp.c') diff --git a/monop/getinp.c b/monop/getinp.c index cd0253c9..2166b9fa 100644 --- a/monop/getinp.c +++ b/monop/getinp.c @@ -1,4 +1,4 @@ -/* $NetBSD: getinp.c,v 1.14 2006/01/20 21:40:08 elad Exp $ */ +/* $NetBSD: getinp.c,v 1.15 2008/01/28 06:16:13 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: getinp.c,v 1.14 2006/01/20 21:40:08 elad Exp $"); +__RCSID("$NetBSD: getinp.c,v 1.15 2008/01/28 06:16:13 dholland Exp $"); #endif #endif /* not lint */ @@ -50,8 +50,8 @@ static char buf[257]; static int comp(const char *); int -getinp(prompt, list) - const char *prompt, *const list[]; +getinp(prompt, lst) + const char *prompt, *const lst[]; { int i, n_match, match = 0; char *sp; @@ -69,18 +69,18 @@ getinp(prompt, list) *sp = c; if (buf[0] == '?' && buf[1] == '\n') { printf("Valid inputs are: "); - for (i = 0, match = 18; list[i]; i++) { - if ((match+=(n_match=strlen(list[i]))) > LINE) { + for (i = 0, match = 18; lst[i]; i++) { + if ((match+=(n_match=strlen(lst[i]))) > LINE) { printf("\n\t"); match = n_match + 8; } - if (*list[i] == '\0') { + if (*lst[i] == '\0') { match += 8; printf(""); } else - printf("%s", list[i]); - if (list[i+1]) + printf("%s", lst[i]); + if (lst[i+1]) printf(", "); else putchar('\n'); @@ -91,8 +91,8 @@ getinp(prompt, list) *sp = '\0'; for (sp = buf; *sp; sp++) *sp = tolower((unsigned char)*sp); - for (i = n_match = 0; list[i]; i++) - if (comp(list[i])) { + for (i = n_match = 0; lst[i]; i++) + if (comp(lst[i])) { n_match++; match = i; } -- cgit v1.2.3-56-ge451