diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /lib/libcurses/clrtobot.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Release FreeBSD 1.1upstream/1.1.0_cvsrelease/1.1.0_cvs
This commit was manufactured to restore the state of the 1.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'lib/libcurses/clrtobot.c')
| -rw-r--r-- | lib/libcurses/clrtobot.c | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/lib/libcurses/clrtobot.c b/lib/libcurses/clrtobot.c index 86324389956f..0e73ef88eb85 100644 --- a/lib/libcurses/clrtobot.c +++ b/lib/libcurses/clrtobot.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 1981 Regents of the University of California. - * All rights reserved. + * Copyright (c) 1981, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,35 +32,44 @@ */ #ifndef lint -static char sccsid[] = "@(#)clrtobot.c 5.5 (Berkeley) 6/1/90"; -#endif /* not lint */ +static char sccsid[] = "@(#)clrtobot.c 8.1 (Berkeley) 6/4/93"; +#endif /* not lint */ -# include "curses.ext" +#include <curses.h> /* - * This routine erases everything on the window. - * + * wclrtobot -- + * Erase everything on the window. */ +int wclrtobot(win) -reg WINDOW *win; { - - reg int y; - reg chtype *sp, *end, *maxx; - reg int startx, minx; + register WINDOW *win; +{ + register int minx, startx, starty, y; + register __LDATA *sp, *end, *maxx; - startx = win->_curx; - for (y = win->_cury; y < win->_maxy; y++) { - minx = _NOCHANGE; - end = &win->_y[y][win->_maxx]; - for (sp = &win->_y[y][startx]; sp < end; sp++) - if (*sp != ' ') { + if (win->lines[win->cury]->flags & __ISPASTEOL) { + starty = win->cury + 1; + startx = 0; + } else { + starty = win->cury; + startx = win->curx; + } + for (y = starty; y < win->maxy; y++) { + minx = -1; + end = &win->lines[y]->line[win->maxx]; + for (sp = &win->lines[y]->line[startx]; sp < end; sp++) + if (sp->ch != ' ' || sp->attr != 0) { maxx = sp; - if (minx == _NOCHANGE) - minx = sp - win->_y[y]; - *sp = ' '; + if (minx == -1) + minx = sp - win->lines[y]->line; + sp->ch = ' '; + sp->attr = 0; } - if (minx != _NOCHANGE) - touchline(win, y, minx, maxx - &win->_y[y][0]); + if (minx != -1) + __touchline(win, y, minx, maxx - win->lines[y]->line, + 0); startx = 0; } + return (OK); } |
