Module Name: src
Committed By: rin
Date: Mon Nov 13 01:40:37 UTC 2017
Modified Files:
src/external/bsd/nvi/dist/common: cut.h
src/external/bsd/nvi/dist/ex: ex.c
Log Message:
Make sure to cast arguments of ISFOO and TOFOO macros into UCHAR_T.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/cut.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/nvi/dist/ex/ex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/nvi/dist/common/cut.h
diff -u src/external/bsd/nvi/dist/common/cut.h:1.3 src/external/bsd/nvi/dist/common/cut.h:1.4
--- src/external/bsd/nvi/dist/common/cut.h:1.3 Mon Nov 25 22:43:46 2013
+++ src/external/bsd/nvi/dist/common/cut.h Mon Nov 13 01:40:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: cut.h,v 1.3 2013/11/25 22:43:46 christos Exp $ */
+/* $NetBSD: cut.h,v 1.4 2017/11/13 01:40:37 rin Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -66,7 +66,7 @@ struct _text { /* Text: a linked list
*/
#define CBNAME(sp, cbp, nch) { \
ARG_CHAR_T L__name; \
- L__name = ISUPPER(nch) ? TOLOWER(nch) : (nch); \
+ L__name = ISUPPER((UCHAR_T)nch) ? TOLOWER((UCHAR_T)nch) : (nch);\
for (cbp = sp->wp->cutq.lh_first; \
cbp != NULL; cbp = cbp->q.le_next) \
if (cbp->name == L__name) \
Index: src/external/bsd/nvi/dist/ex/ex.c
diff -u src/external/bsd/nvi/dist/ex/ex.c:1.5 src/external/bsd/nvi/dist/ex/ex.c:1.6
--- src/external/bsd/nvi/dist/ex/ex.c:1.5 Fri Nov 10 14:35:25 2017
+++ src/external/bsd/nvi/dist/ex/ex.c Mon Nov 13 01:40:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ex.c,v 1.5 2017/11/10 14:35:25 rin Exp $ */
+/* $NetBSD: ex.c,v 1.6 2017/11/13 01:40:37 rin Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -16,7 +16,7 @@
static const char sccsid[] = "Id: ex.c,v 10.75 2004/03/16 14:13:35 skimo Exp (Berkeley) Date: 2004/03/16 14:13:35 ";
#endif /* not lint */
#else
-__RCSID("$NetBSD: ex.c,v 1.5 2017/11/10 14:35:25 rin Exp $");
+__RCSID("$NetBSD: ex.c,v 1.6 2017/11/13 01:40:37 rin Exp $");
#endif
#include <sys/types.h>
@@ -441,7 +441,7 @@ loop: ecp = LIST_FIRST(&wp->ecq);
break;
case 'E': case 'F': case 'N': case 'P': case 'T': case 'V':
newscreen = 1;
- p[0] = TOLOWER(p[0]);
+ p[0] = TOLOWER((UCHAR_T)p[0]);
break;
}