diff --git a/distrib/utils/more/Makefile b/distrib/utils/more/Makefile index 8bd4997e7bc1..4b4ee546e940 100644 --- a/distrib/utils/more/Makefile +++ b/distrib/utils/more/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.13 2002/02/09 13:49:28 lukem Exp $ +# $NetBSD: Makefile,v 1.14 2009/01/24 13:58:21 tsutsui Exp $ # # @(#)Makefile 8.1 (Berkeley) 6/6/93 +WARNS?= 1 PROG= more NOMAN= # defined diff --git a/distrib/utils/more/command.c b/distrib/utils/more/command.c index 1b33b9185f0c..c820c6cd12a6 100644 --- a/distrib/utils/more/command.c +++ b/distrib/utils/more/command.c @@ -1,4 +1,4 @@ -/* $NetBSD: command.c,v 1.11 2004/09/01 01:46:56 chs Exp $ */ +/* $NetBSD: command.c,v 1.12 2009/01/24 13:58:21 tsutsui Exp $ */ /* * Copyright (c) 1988 Mark Nudelman @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = "@(#)command.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: command.c,v 1.11 2004/09/01 01:46:56 chs Exp $"); +__RCSID("$NetBSD: command.c,v 1.12 2009/01/24 13:58:21 tsutsui Exp $"); #endif #endif /* not lint */ @@ -120,9 +120,9 @@ cmd_char(c) /* in this order, in case werase == erase_char */ if (c == werase_char) { if (cp > cmdbuf) { - while (isspace(cp[-1]) && !cmd_erase()); - while (!isspace(cp[-1]) && !cmd_erase()); - while (isspace(cp[-1]) && !cmd_erase()); + while (isspace((unsigned char)cp[-1]) && !cmd_erase()); + while (!isspace((unsigned char)cp[-1]) && !cmd_erase()); + while (isspace((unsigned char)cp[-1]) && !cmd_erase()); } return(cp == cmdbuf); } @@ -273,7 +273,7 @@ exec_mca() (void)search(0, cmdbuf, number, wsearch); break; case A_EXAMINE: - for (p = cmdbuf; isspace(*p); ++p); + for (p = cmdbuf; isspace((unsigned char)*p); ++p); (void)edit(glob(p)); break; } diff --git a/distrib/utils/more/less.h b/distrib/utils/more/less.h index d06887470986..13e7190edb37 100644 --- a/distrib/utils/more/less.h +++ b/distrib/utils/more/less.h @@ -1,4 +1,4 @@ -/* $NetBSD: less.h,v 1.5 2003/10/13 14:34:25 agc Exp $ */ +/* $NetBSD: less.h,v 1.6 2009/01/24 13:58:21 tsutsui Exp $ */ /* * Copyright (c) 1988 Mark Nudelman @@ -43,7 +43,7 @@ #define BO_CHAR '\203' /* Enter boldface mode */ #define BE_CHAR '\204' /* Exit boldface mode */ -#define CONTROL_CHAR(c) (iscntrl(c)) +#define CONTROL_CHAR(c) (iscntrl((unsigned char)c)) #define CARAT_CHAR(c) ((c == '\177') ? '?' : (c | 0100)) #define TOP (0) diff --git a/distrib/utils/more/os.c b/distrib/utils/more/os.c index 4764ef94712f..883166c01a37 100644 --- a/distrib/utils/more/os.c +++ b/distrib/utils/more/os.c @@ -1,4 +1,4 @@ -/* $NetBSD: os.c,v 1.7 2003/10/13 14:34:25 agc Exp $ */ +/* $NetBSD: os.c,v 1.8 2009/01/24 13:58:21 tsutsui Exp $ */ /* * Copyright (c) 1988 Mark Nudelman @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = "@(#)os.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: os.c,v 1.7 2003/10/13 14:34:25 agc Exp $"); +__RCSID("$NetBSD: os.c,v 1.8 2009/01/24 13:58:21 tsutsui Exp $"); #endif #endif /* not lint */ @@ -209,7 +209,6 @@ glob(filename) int ch; char *cmd; static char buffer[MAXPATHLEN]; - size_t l; if (filename[0] == '#') return (filename); diff --git a/distrib/utils/more/output.c b/distrib/utils/more/output.c index 30069ef0a9f7..163219c9c38f 100644 --- a/distrib/utils/more/output.c +++ b/distrib/utils/more/output.c @@ -1,4 +1,4 @@ -/* $NetBSD: output.c,v 1.7 2003/10/13 14:34:25 agc Exp $ */ +/* $NetBSD: output.c,v 1.8 2009/01/24 13:58:21 tsutsui Exp $ */ /* * Copyright (c) 1988 Mark Nudelman @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = "@(#)output.c 8.2 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: output.c,v 1.7 2003/10/13 14:34:25 agc Exp $"); +__RCSID("$NetBSD: output.c,v 1.8 2009/01/24 13:58:21 tsutsui Exp $"); #endif #endif /* not lint */ @@ -166,6 +166,7 @@ putchr(c) if (ob >= &obuf[sizeof(obuf)]) flush(); *ob++ = c; + return c; } /* diff --git a/distrib/utils/more/prim.c b/distrib/utils/more/prim.c index 5250080cb978..ccc06b67e8fa 100644 --- a/distrib/utils/more/prim.c +++ b/distrib/utils/more/prim.c @@ -1,4 +1,4 @@ -/* $NetBSD: prim.c,v 1.9 2003/10/13 14:34:25 agc Exp $ */ +/* $NetBSD: prim.c,v 1.10 2009/01/24 13:58:21 tsutsui Exp $ */ /* * Copyright (c) 1988 Mark Nudelman @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = "@(#)prim.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: prim.c,v 1.9 2003/10/13 14:34:25 agc Exp $"); +__RCSID("$NetBSD: prim.c,v 1.10 2009/01/24 13:58:21 tsutsui Exp $"); #endif #endif /* not lint */ @@ -638,8 +638,8 @@ search(search_forward, pattern, n, wantmatch) */ if (caseless && pattern != NULL) for (p = pattern; *p; p++) - if (isupper(*p)) - *p = tolower(*p); + if (isupper((unsigned char)*p)) + *p = tolower((unsigned char)*p); #ifdef RECOMP /* @@ -791,7 +791,8 @@ search(search_forward, pattern, n, wantmatch) */ if (caseless) for (p = q = line; *p; p++, q++) - *q = isupper(*p) ? tolower(*p) : *p; + *q = isupper((unsigned char)*p) ? + tolower((unsigned char)*p) : *p; /* * Remove any backspaces along with the preceding char.