projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 86/07/02 16:23:39 by sam
[unix-history]
/
usr
/
src
/
lib
/
libcurses
/
insertln.c
diff --git
a/usr/src/lib/libcurses/insertln.c
b/usr/src/lib/libcurses/insertln.c
index
f05aed1
..
92b6444
100644
(file)
--- a/
usr/src/lib/libcurses/insertln.c
+++ b/
usr/src/lib/libcurses/insertln.c
@@
-1,10
+1,19
@@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)insertln.c 5.1 (Berkeley) %G%";
+#endif not lint
+
# include "curses.ext"
/*
* This routine performs an insert-line on the window, leaving
* (_cury,_curx) unchanged.
*
# include "curses.ext"
/*
* This routine performs an insert-line on the window, leaving
* (_cury,_curx) unchanged.
*
- * %G% (Berkeley) @(#)insertln.c 1.1
*/
winsertln(win)
reg WINDOW *win; {
*/
winsertln(win)
reg WINDOW *win; {
@@
-12,16
+21,27
@@
reg WINDOW *win; {
reg char *temp;
reg int y;
reg char *end;
reg char *temp;
reg int y;
reg char *end;
+ reg int x;
- temp = win->_y[win->_cury];
- win->_firstch[win->_cury] = 0;
- win->_lastch[win->_cury] = win->_maxx - 1;
+#ifdef DEBUG
+ fprintf(outf, "INSERTLN(%0.2o)\n", win);
+#endif
+ if (win->_orig == NULL)
+ temp = win->_y[win->_maxy - 1];
for (y = win->_maxy - 1; y > win->_cury; --y) {
for (y = win->_maxy - 1; y > win->_cury; --y) {
- win->_y[y] = win->_y[y-1];
- win->_firstch[y] = 0;
- win->_lastch[y] = win->_maxx - 1;
+ if (win->_orig == NULL)
+ win->_y[y] = win->_y[y - 1];
+ else
+ bcopy(win->_y[y - 1], win->_y[y], win->_maxx);
+ touchline(win, y, 0, win->_maxx - 1);
}
}
+ if (win->_orig == NULL)
+ win->_y[y] = temp;
+ else
+ temp = win->_y[y];
for (end = &temp[win->_maxx]; temp < end; )
*temp++ = ' ';
for (end = &temp[win->_maxx]; temp < end; )
*temp++ = ' ';
- return OK;
+ touchline(win, y, 0, win->_maxx - 1);
+ if (win->_orig == NULL)
+ _id_subwins(win);
}
}