This commit is contained in:
tsutsui 2009-01-24 13:58:21 +00:00
parent e724c6a64d
commit 52275243c5
6 changed files with 21 additions and 19 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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)

View File

@ -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);

View File

@ -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;
}
/*

View File

@ -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.