Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi Use mvwchgat(3), which is not a macro in ge...



details:   https://anonhg.NetBSD.org/src/rev/10e384c635a6
branches:  trunk
changeset: 827791:10e384c635a6
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Nov 13 01:51:47 2017 +0000

description:
Use mvwchgat(3), which is not a macro in general (and in our case).

diffstat:

 external/bsd/nvi/dist/cl/cl_funcs.c   |  13 ++++++++-----
 external/bsd/nvi/usr.bin/nvi/Makefile |   3 ++-
 2 files changed, 10 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 111b8eb24064 -r 10e384c635a6 external/bsd/nvi/dist/cl/cl_funcs.c
--- a/external/bsd/nvi/dist/cl/cl_funcs.c       Mon Nov 13 01:40:37 2017 +0000
+++ b/external/bsd/nvi/dist/cl/cl_funcs.c       Mon Nov 13 01:51:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cl_funcs.c,v 1.6 2017/11/13 01:37:48 rin Exp $ */
+/*     $NetBSD: cl_funcs.c,v 1.7 2017/11/13 01:51:47 rin Exp $ */
 /*-
  * Copyright (c) 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo Exp  (Berkeley) Date: 2002/03/02 23:18:33 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: cl_funcs.c,v 1.6 2017/11/13 01:37:48 rin Exp $");
+__RCSID("$NetBSD: cl_funcs.c,v 1.7 2017/11/13 01:51:47 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -314,9 +314,12 @@
 int
 cl_deleteln(SCR *sp)
 {
+       WINDOW *win;
+       size_t y, x;
+#ifndef HAVE_MVWCHGAT
        CHAR_T ch;
-       WINDOW *win;
-       size_t col, lno, spcnt, y, x;
+       size_t col, lno, spcnt;
+#endif
 
        win = CLSP(sp) ? CLSP(sp) : stdscr;
 
@@ -340,7 +343,7 @@
         */
        if (!F_ISSET(sp, SC_SCR_EXWROTE) && IS_SPLIT(sp)) {
                getyx(win, y, x);
-#ifdef mvchgat
+#ifdef HAVE_MVWCHGAT
                mvwchgat(win, RLNO(sp, LASTLINE(sp)), 0, -1, A_NORMAL, 0, NULL);
 #else
                for (lno = RLNO(sp, LASTLINE(sp)), col = spcnt = 0;;) {
diff -r 111b8eb24064 -r 10e384c635a6 external/bsd/nvi/usr.bin/nvi/Makefile
--- a/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 13 01:40:37 2017 +0000
+++ b/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 13 01:51:47 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.9 2017/11/06 03:37:52 rin Exp $
+#      $NetBSD: Makefile,v 1.10 2017/11/13 01:51:47 rin Exp $
 
 .include <bsd.own.mk>
 
@@ -9,6 +9,7 @@
 CPPFLAGS+=-I${DIST}/include -I${.CURDIR} -I. -DGTAGS
 CPPFLAGS+=-DHAVE_OPENPTY -DHAVE_UTIL_H
 CPPFLAGS+=-DHAVE_SIGTIMEDWAIT 
+CPPFLAGS+=-DHAVE_MVWCHGAT
 
 #DBG=-g
 #CPPFLAGS+=-DLOGDEBUG -DTRACE



Home | Main Index | Thread Index | Old Index