Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/nvi/dist/ex Use ISMULTIWIDTH() macro. No binary...
details: https://anonhg.NetBSD.org/src/rev/79bdff7bce7c
branches: trunk
changeset: 357683:79bdff7bce7c
user: rin <rin%NetBSD.org@localhost>
date: Tue Nov 21 07:48:07 2017 +0000
description:
Use ISMULTIWIDTH() macro. No binary changes.
diffstat:
external/bsd/nvi/dist/ex/ex_join.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 073cf3f03d0e -r 79bdff7bce7c external/bsd/nvi/dist/ex/ex_join.c
--- a/external/bsd/nvi/dist/ex/ex_join.c Tue Nov 21 07:43:47 2017 +0000
+++ b/external/bsd/nvi/dist/ex/ex_join.c Tue Nov 21 07:48:07 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_join.c,v 1.4 2017/11/10 14:53:00 rin Exp $ */
+/* $NetBSD: ex_join.c,v 1.5 2017/11/21 07:48:07 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_join.c,v 10.17 2004/03/16 14:14:04 skimo Exp (Berkeley) Date: 2004/03/16 14:14:04 ";
#endif /* not lint */
#else
-__RCSID("$NetBSD: ex_join.c,v 1.4 2017/11/10 14:53:00 rin Exp $");
+__RCSID("$NetBSD: ex_join.c,v 1.5 2017/11/21 07:48:07 rin Exp $");
#endif
#include <sys/types.h>
@@ -118,9 +118,8 @@
* single-width multi-width 1 spc ins'ed
* single-width single-width original
*/
- if (INTISWIDE(echar) && CHAR_WIDTH(sp, echar) > 1) {
- if (INTISWIDE(p[0])
- && CHAR_WIDTH(sp, p[0]) > 1) {
+ if (ISMULTIWIDTH(sp, echar)) {
+ if (ISMULTIWIDTH(sp, p[0])) {
; /* nothing */
} else {
*tbp++ = ' ';
@@ -128,8 +127,7 @@
for (; len && ISBLANK((UCHAR_T)*p);
--len, ++p);
}
- } else if (INTISWIDE(p[0])
- && CHAR_WIDTH(sp, p[0]) > 1) {
+ } else if (ISMULTIWIDTH(sp, p[0])) {
*tbp++ = ' ';
++clen;
} else if (ISBLANK(echar))
Home |
Main Index |
Thread Index |
Old Index