Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/curses-v3]: src/lib/libcurses Now uses insdelln().
details: https://anonhg.NetBSD.org/src/rev/cc6717ebe762
branches: curses-v3
changeset: 479971:cc6717ebe762
user: jdc <jdc%NetBSD.org@localhost>
date: Sun Mar 05 23:27:41 2000 +0000
description:
Now uses insdelln().
diffstat:
lib/libcurses/deleteln.c | 39 +++------------------------------------
lib/libcurses/insertln.c | 42 +++---------------------------------------
2 files changed, 6 insertions(+), 75 deletions(-)
diffs (125 lines):
diff -r f232397a9b73 -r cc6717ebe762 lib/libcurses/deleteln.c
--- a/lib/libcurses/deleteln.c Sun Mar 05 23:27:11 2000 +0000
+++ b/lib/libcurses/deleteln.c Sun Mar 05 23:27:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: deleteln.c,v 1.11.6.1 2000/01/09 20:43:18 jdc Exp $ */
+/* $NetBSD: deleteln.c,v 1.11.6.2 2000/03/05 23:27:41 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,12 +38,10 @@
#if 0
static char sccsid[] = "@(#)deleteln.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: deleteln.c,v 1.11.6.1 2000/01/09 20:43:18 jdc Exp $");
+__RCSID("$NetBSD: deleteln.c,v 1.11.6.2 2000/03/05 23:27:41 jdc Exp $");
#endif
#endif /* not lint */
-#include <string.h>
-
#include "curses.h"
/*
@@ -54,36 +52,5 @@
wdeleteln(win)
WINDOW *win;
{
- int y, i;
- __LINE *temp;
-
-#ifdef DEBUG
- __CTRACE("deleteln: (%0.2o) cury=%d\n", win, win->cury);
-#endif
- temp = win->lines[win->cury];
- for (y = win->cury; y < win->maxy - 1; y++) {
- win->lines[y]->flags &= ~__ISPASTEOL;
- win->lines[y + 1]->flags &= ~__ISPASTEOL;
- if (win->orig == NULL)
- win->lines[y] = win->lines[y + 1];
- else
- (void) memcpy(win->lines[y]->line,
- win->lines[y + 1]->line,
- (size_t) win->maxx * __LDATASIZE);
- __touchline(win, y, 0, (int) win->maxx - 1, 0);
- }
-
- if (win->orig == NULL)
- win->lines[y] = temp;
- else
- temp = win->lines[y];
-
- for (i = 0; i < win->maxx; i++) {
- temp->line[i].ch = ' ';
- temp->line[i].attr = 0;
- }
- __touchline(win, y, 0, (int) win->maxx - 1, 0);
- if (win->orig == NULL)
- __id_subwins(win);
- return (OK);
+ return(winsdelln(win, -1));
}
diff -r f232397a9b73 -r cc6717ebe762 lib/libcurses/insertln.c
--- a/lib/libcurses/insertln.c Sun Mar 05 23:27:11 2000 +0000
+++ b/lib/libcurses/insertln.c Sun Mar 05 23:27:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: insertln.c,v 1.10.6.1 2000/01/09 20:43:19 jdc Exp $ */
+/* $NetBSD: insertln.c,v 1.10.6.2 2000/03/05 23:27:41 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,12 +38,10 @@
#if 0
static char sccsid[] = "@(#)insertln.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: insertln.c,v 1.10.6.1 2000/01/09 20:43:19 jdc Exp $");
+__RCSID("$NetBSD: insertln.c,v 1.10.6.2 2000/03/05 23:27:41 jdc Exp $");
#endif
#endif /* not lint */
-#include <string.h>
-
#include "curses.h"
/*
@@ -54,39 +52,5 @@
winsertln(win)
WINDOW *win;
{
-
- int y, i;
- __LINE *temp;
-
-#ifdef DEBUG
- __CTRACE("insertln: (%0.2o)\n", win);
-#endif
-#ifdef __GNUC__
- temp = NULL; /* XXX gcc -Wuninitialized */
-#endif
- if (win->orig == NULL)
- temp = win->lines[win->maxy - 1];
- for (y = win->maxy - 1; y > win->cury; --y) {
- win->lines[y]->flags &= ~__ISPASTEOL;
- win->lines[y - 1]->flags &= ~__ISPASTEOL;
- if (win->orig == NULL)
- win->lines[y] = win->lines[y - 1];
- else
- (void) memcpy(win->lines[y]->line,
- win->lines[y - 1]->line,
- (size_t) win->maxx * __LDATASIZE);
- __touchline(win, y, 0, (int) win->maxx - 1, 0);
- }
- if (win->orig == NULL)
- win->lines[y] = temp;
- else
- temp = win->lines[y];
- for (i = 0; i < win->maxx; i++) {
- temp->line[i].ch = ' ';
- temp->line[i].attr = 0;
- }
- __touchline(win, y, 0, (int) win->maxx - 1, 0);
- if (win->orig == NULL)
- __id_subwins(win);
- return (OK);
+ return(winsdelln(win, 1));
}
Home |
Main Index |
Thread Index |
Old Index