Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Stop blank line being added when newline is pr...
details: https://anonhg.NetBSD.org/src/rev/0969d077c167
branches: trunk
changeset: 548379:0969d077c167
user: dsl <dsl%NetBSD.org@localhost>
date: Thu Jun 26 10:22:33 2003 +0000
description:
Stop blank line being added when newline is processed with __ISPASTEOL set.
diffstat:
lib/libcurses/addbytes.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 86017cd581a0 -r 0969d077c167 lib/libcurses/addbytes.c
--- a/lib/libcurses/addbytes.c Thu Jun 26 10:20:39 2003 +0000
+++ b/lib/libcurses/addbytes.c Thu Jun 26 10:22:33 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: addbytes.c,v 1.25 2003/02/17 11:07:19 dsl Exp $ */
+/* $NetBSD: addbytes.c,v 1.26 2003/06/26 10:22:33 dsl Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: addbytes.c,v 1.25 2003/02/17 11:07:19 dsl Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.26 2003/06/26 10:22:33 dsl Exp $");
#endif
#endif /* not lint */
@@ -140,8 +140,9 @@
lp = win->lines[y];
if (lp->flags & __ISPASTEOL) {
+ newline:
lp->flags &= ~__ISPASTEOL;
- newline: if (y == win->scr_b) {
+ if (y == win->scr_b) {
#ifdef DEBUG
__CTRACE("ADDBYTES - on bottom of scrolling region\n");
#endif
@@ -209,9 +210,11 @@
#endif
break;
case '\n':
- SYNCH_OUT;
- wclrtoeol(win);
- SYNCH_IN;
+ if (!(lp->flags & __ISPASTEOL)) {
+ SYNCH_OUT;
+ wclrtoeol(win);
+ SYNCH_IN;
+ }
if (!__NONL)
x = 0;
goto newline;
Home |
Main Index |
Thread Index |
Old Index