SCCS-vsn: lib/libcurses/addbytes.c 5.15
SCCS-vsn: lib/libcurses/box.c 5.11
SCCS-vsn: lib/libcurses/clear.c 5.8
SCCS-vsn: lib/libcurses/clrtobot.c 5.12
SCCS-vsn: lib/libcurses/cr_put.c 5.15
SCCS-vsn: lib/libcurses/curses.h 5.25
SCCS-vsn: lib/libcurses/delch.c 5.12
SCCS-vsn: lib/libcurses/deleteln.c 5.15
SCCS-vsn: lib/libcurses/delwin.c 5.10
SCCS-vsn: lib/libcurses/erase.c 5.11
SCCS-vsn: lib/libcurses/getch.c 5.10
SCCS-vsn: lib/libcurses/getstr.c 5.8
SCCS-vsn: lib/libcurses/initscr.c 5.12
SCCS-vsn: lib/libcurses/insch.c 5.11
SCCS-vsn: lib/libcurses/insertln.c 5.14
SCCS-vsn: lib/libcurses/move.c 5.11
SCCS-vsn: lib/libcurses/mvprintw.c 5.12
SCCS-vsn: lib/libcurses/mvwin.c 5.9
SCCS-vsn: lib/libcurses/overlay.c 5.12
SCCS-vsn: lib/libcurses/overwrite.c 5.12
SCCS-vsn: lib/libcurses/printw.c 5.14
SCCS-vsn: lib/libcurses/refresh.c 5.27
SCCS-vsn: lib/libcurses/scanw.c 5.13
SCCS-vsn: lib/libcurses/scroll.c 5.10
SCCS-vsn: lib/libcurses/setterm.c 5.14
SCCS-vsn: lib/libcurses/toucholap.c 5.10
SCCS-vsn: lib/libcurses/touchwin.c 5.10
SCCS-vsn: lib/libcurses/tty.c 5.8
28 files changed:
-static char sccsid[] = "@(#)addbytes.c 5.14 (Berkeley) %G%";
+static char sccsid[] = "@(#)addbytes.c 5.15 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
switch (c) {
case '\t':
SYNCH_OUT;
switch (c) {
case '\t':
SYNCH_OUT;
- if (waddbytes(win, blanks, 8 - (x % 8)) == CURSES_ERR)
- return (CURSES_ERR);
+ if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
+ return (ERR);
-static char sccsid[] = "@(#)box.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)box.c 5.11 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
lp[endx].attr &= ~__STANDOUT;
}
__touchwin(win);
lp[endx].attr &= ~__STANDOUT;
}
__touchwin(win);
-static char sccsid[] = "@(#)clear.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)clear.c 5.8 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
wclear(win)
register WINDOW *win;
{
wclear(win)
register WINDOW *win;
{
- if (werase(win) == CURSES_OK) {
+ if (werase(win) == OK) {
-static char sccsid[] = "@(#)clrtobot.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)clrtobot.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
-static char sccsid[] = "@(#)cr_put.c 5.14 (Berkeley) %G%";
+static char sccsid[] = "@(#)cr_put.c 5.15 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
outcol = lx;
outline = ly;
fgoto();
outcol = lx;
outline = ly;
fgoto();
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)curses.h 5.24 (Berkeley) %G%
+ * @(#)curses.h 5.25 (Berkeley) %G%
-static char sccsid[] = "@(#)delch.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)delch.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
temp1->ch = ' ';
temp1->attr = 0;
__touchline(win, win->cury, win->curx, win->maxx - 1, 0);
temp1->ch = ' ';
temp1->attr = 0;
__touchline(win, win->cury, win->curx, win->maxx - 1, 0);
-static char sccsid[] = "@(#)deleteln.c 5.14 (Berkeley) %G%";
+static char sccsid[] = "@(#)deleteln.c 5.15 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
__touchline(win, y, 0, win->maxx - 1, 0);
if (win->orig == NULL)
__id_subwins(win);
__touchline(win, y, 0, win->maxx - 1, 0);
if (win->orig == NULL)
__id_subwins(win);
-static char sccsid[] = "@(#)delwin.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)delwin.c 5.10 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
wp->nextp = win->nextp;
}
free(win);
wp->nextp = win->nextp;
}
free(win);
-static char sccsid[] = "@(#)erase.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)erase.c 5.11 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
__touchline(win, y, minx, maxx - win->lines[y]->line,
0);
}
__touchline(win, y, minx, maxx - win->lines[y]->line,
0);
}
-static char sccsid[] = "@(#)getch.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)getch.c 5.10 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
&& win->curx == win->maxx - 1 && win->cury == win->maxy - 1)
if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
&& win->curx == win->maxx - 1 && win->cury == win->maxy - 1)
#ifdef DEBUG
__TRACE("wgetch: __echoit = %d, __rawmode = %d\n",
__echoit, __rawmode);
#ifdef DEBUG
__TRACE("wgetch: __echoit = %d, __rawmode = %d\n",
__echoit, __rawmode);
-static char sccsid[] = "@(#)getstr.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)getstr.c 5.8 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
register WINDOW *win;
register char *str;
{
register WINDOW *win;
register char *str;
{
- while ((*str = wgetch(win)) != CURSES_ERR && *str != '\n')
+ while ((*str = wgetch(win)) != ERR && *str != '\n')
- if (*str == CURSES_ERR) {
-static char sccsid[] = "@(#)initscr.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)initscr.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
__echoit = 1;
__pfast = __rawmode = __noqch = 0;
__echoit = 1;
__pfast = __rawmode = __noqch = 0;
- if (gettmode() == CURSES_ERR)
*/
if (My_term || (sp = getenv("TERM")) == NULL)
sp = Def_term;
*/
if (My_term || (sp = getenv("TERM")) == NULL)
sp = Def_term;
- if (setterm(sp) == CURSES_ERR)
+ if (setterm(sp) == ERR)
return (NULL);
/* Need either homing or cursor motion for refreshes */
return (NULL);
/* Need either homing or cursor motion for refreshes */
if (curscr != NULL)
delwin(curscr);
if (curscr != NULL)
delwin(curscr);
- if ((curscr = newwin(LINES, COLS, 0, 0)) == CURSES_ERR)
+ if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
return (NULL);
clearok(curscr, 1);
if (stdscr != NULL)
delwin(stdscr);
return (NULL);
clearok(curscr, 1);
if (stdscr != NULL)
delwin(stdscr);
- if ((stdscr = newwin(LINES, COLS, 0, 0)) == CURSES_ERR) {
+ if ((stdscr = newwin(LINES, COLS, 0, 0)) == ERR) {
delwin(curscr);
return (NULL);
}
delwin(curscr);
return (NULL);
}
-static char sccsid[] = "@(#)insch.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)insch.c 5.11 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
scroll(win);
win->cury--;
} else
scroll(win);
win->cury--;
} else
- return (CURSES_ERR);
- return (CURSES_OK);
+ return (ERR);
+ return (OK);
-static char sccsid[] = "@(#)insertln.c 5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)insertln.c 5.14 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
__touchline(win, y, 0, win->maxx - 1, 0);
if (win->orig == NULL)
__id_subwins(win);
__touchline(win, y, 0, win->maxx - 1, 0);
if (win->orig == NULL)
__id_subwins(win);
-static char sccsid[] = "@(#)move.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)move.c 5.11 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
__TRACE("wmove: (%d, %d)\n", y, x);
#endif
if (x < 0 || y < 0)
__TRACE("wmove: (%d, %d)\n", y, x);
#endif
if (x < 0 || y < 0)
if (x >= win->maxx || y >= win->maxy)
if (x >= win->maxx || y >= win->maxy)
win->curx = x;
win->cury = y;
win->lines[y]->flags &= ~__ISPASTEOL;
win->curx = x;
win->cury = y;
win->lines[y]->flags &= ~__ISPASTEOL;
-static char sccsid[] = "@(#)mvprintw.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)mvprintw.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
- if (move(y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (move(y, x) != OK)
+ return (ERR);
#if __STDC__
va_start(ap, fmt);
#else
#if __STDC__
va_start(ap, fmt);
#else
- if (wmove(win, y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (wmove(win, y, x) != OK)
+ return (ERR);
#if __STDC__
va_start(ap, fmt);
#else
#if __STDC__
va_start(ap, fmt);
#else
-static char sccsid[] = "@(#)mvwin.c 5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)mvwin.c 5.9 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
register int dy, dx;
if (by + win->maxy > LINES || bx + win->maxx > COLS)
register int dy, dx;
if (by + win->maxy > LINES || bx + win->maxx > COLS)
dy = by - win->begy;
dx = bx - win->begx;
orig = win->orig;
dy = by - win->begy;
dx = bx - win->begx;
orig = win->orig;
} while (win != orig);
} else {
if (by < orig->begy || win->maxy + dy > orig->maxy)
} while (win != orig);
} else {
if (by < orig->begy || win->maxy + dy > orig->maxy)
if (bx < orig->begx || win->maxx + dx > orig->maxx)
if (bx < orig->begx || win->maxx + dx > orig->maxx)
win->begy = by;
win->begx = bx;
__swflags(win);
__set_subwin(orig, win);
}
__touchwin(win);
win->begy = by;
win->begx = bx;
__swflags(win);
__set_subwin(orig, win);
}
__touchwin(win);
-static char sccsid[] = "@(#)overlay.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)overlay.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <ctype.h>
#endif /* not lint */
#include <ctype.h>
starty, startx, endy, endx);
#endif
if (starty >= endy || startx >= endx)
starty, startx, endy, endx);
#endif
if (starty >= endy || startx >= endx)
y1 = starty - win1->begy;
y2 = starty - win2->begy;
for (y = starty; y < endy; y++, y1++, y2++) {
y1 = starty - win1->begy;
y2 = starty - win2->begy;
for (y = starty; y < endy; y++, y1++, y2++) {
-static char sccsid[] = "@(#)overwrite.c 5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)overwrite.c 5.12 (Berkeley) %G%";
#endif /* not lint */
#include <ctype.h>
#endif /* not lint */
#include <ctype.h>
endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
if (starty >= endy || startx >= endx)
endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
if (starty >= endy || startx >= endx)
#ifdef DEBUG
__TRACE("overwrite: from (%d, %d) to (%d, %d)\n",
starty, startx, endy, endx);
#ifdef DEBUG
__TRACE("overwrite: from (%d, %d) to (%d, %d)\n",
starty, startx, endy, endx);
__touchline(win2, y, startx - win2->begx, endx - win2->begx,
0);
}
__touchline(win2, y, startx - win2->begx, endx - win2->begx,
0);
}
-static char sccsid[] = "@(#)printw.c 5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)printw.c 5.14 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
#else
va_start(ap);
#endif
#else
va_start(ap);
#endif
- if (move(y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (move(y, x) != OK)
+ return (ERR);
ret = vwprintw(stdscr, fmt, ap);
va_end(ap);
return (ret);
ret = vwprintw(stdscr, fmt, ap);
va_end(ap);
return (ret);
#else
va_start(ap);
#endif
#else
va_start(ap);
#endif
- if (wmove(win, y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (wmove(win, y, x) != OK)
+ return (ERR);
ret = vwprintw(win, fmt, ap);
va_end(ap);
ret = vwprintw(win, fmt, ap);
va_end(ap);
register int c;
for (c = n, win = cookie; --c >= 0;)
register int c;
for (c = n, win = cookie; --c >= 0;)
- if (waddch(win, *buf++) == CURSES_ERR)
+ if (waddch(win, *buf++) == ERR)
return (-1);
return (n);
}
return (-1);
return (n);
}
FILE *f;
if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
FILE *f;
if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
(void)vfprintf(f, fmt, ap);
(void)vfprintf(f, fmt, ap);
- return (fclose(f) ? CURSES_ERR : CURSES_OK);
+ return (fclose(f) ? ERR : OK);
-static char sccsid[] = "@(#)refresh.c 5.26 (Berkeley) %G%";
+static char sccsid[] = "@(#)refresh.c 5.27 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
curscr->lines[wy]->hash = win->lines[wy]->hash;
if (win->lines[wy]->flags & __ISDIRTY ||
win->lines[wy]->flags & __FORCEPAINT)
curscr->lines[wy]->hash = win->lines[wy]->hash;
if (win->lines[wy]->flags & __ISDIRTY ||
win->lines[wy]->flags & __FORCEPAINT)
- if (makech(win, wy) == CURSES_ERR)
- return (CURSES_ERR);
+ if (makech(win, wy) == ERR)
+ return (ERR);
else {
if (*win->lines[wy]->firstchp >= win->ch_off)
*win->lines[wy]->firstchp = win->maxx +
else {
if (*win->lines[wy]->firstchp >= win->ch_off)
*win->lines[wy]->firstchp = win->maxx +
curscr->curx = win->curx + win->begx;
}
}
curscr->curx = win->curx + win->begx;
}
}
_win = NULL;
(void)fflush(stdout);
_win = NULL;
(void)fflush(stdout);
lx = 0;
}
if (!(win->lines[wy]->flags & __ISDIRTY))
lx = 0;
}
if (!(win->lines[wy]->flags & __ISDIRTY))
wx = *win->lines[wy]->firstchp - win->ch_off;
if (wx >= win->maxx)
wx = *win->lines[wy]->firstchp - win->ch_off;
if (wx >= win->maxx)
else if (wx < 0)
wx = 0;
lch = *win->lines[wy]->lastchp - win->ch_off;
if (lch < 0)
else if (wx < 0)
wx = 0;
lch = *win->lines[wy]->lastchp - win->ch_off;
if (lch < 0)
else if (lch >= win->maxx)
lch = win->maxx - 1;
y = wy + win->begy;
else if (lch >= win->maxx)
lch = win->maxx - 1;
y = wy + win->begy;
}
ly = win->begy + win->maxy - 1;
lx = win->begx + win->maxx - 1;
}
ly = win->begy + win->maxy - 1;
lx = win->begx + win->maxx - 1;
} else
if (win->flags & __SCROLLWIN) {
lx = --wx;
} else
if (win->flags & __SCROLLWIN) {
lx = --wx;
}
if (!curwin) {
csp->attr = nsp->attr;
}
if (!curwin) {
csp->attr = nsp->attr;
__TRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
#endif
}
__TRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
#endif
}
-static char sccsid[] = "@(#)scanw.c 5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)scanw.c 5.13 (Berkeley) %G%";
- if (move(y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (move(y, x) != OK)
+ return (ERR);
#if __STDC__
va_start(ap, fmt);
#else
#if __STDC__
va_start(ap, fmt);
#else
- if (move(y, x) != CURSES_OK)
- return (CURSES_ERR);
+ if (move(y, x) != OK)
+ return (ERR);
#if __STDC__
va_start(ap, fmt);
#else
#if __STDC__
va_start(ap, fmt);
#else
- return (wgetstr(win, buf) == CURSES_OK ? vsscanf(buf, fmt, ap) :
- CURSES_ERR);
+ return (wgetstr(win, buf) == OK ?
+ vsscanf(buf, fmt, ap) : ERR);
-static char sccsid[] = "@(#)scroll.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)scroll.c 5.10 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
#endif
if (!(win->flags & __SCROLLOK))
#endif
if (!(win->flags & __SCROLLOK))
getyx(win, oy, ox);
wmove(win, 0, 0);
getyx(win, oy, ox);
wmove(win, 0, 0);
__TRACE("scroll: win == curscr\n");
#endif
}
__TRACE("scroll: win == curscr\n");
#endif
}
-static char sccsid[] = "@(#)setterm.c 5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)setterm.c 5.14 (Berkeley) %G%";
#endif /* not lint */
#include <sys/ioctl.h>
#endif /* not lint */
#include <sys/ioctl.h>
* Historically, curses fails if rows <= 5, cols <= 4.
*/
if (LINES <= 5 || COLS <= 4)
* Historically, curses fails if rows <= 5, cols <= 4.
*/
if (LINES <= 5 || COLS <= 4)
#ifdef DEBUG
__TRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
#ifdef DEBUG
__TRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
if ((!AL && !al) || (!DL && !dl))
__noqch = 1;
if ((!AL && !al) || (!DL && !dl))
__noqch = 1;
- return (unknown ? CURSES_ERR : CURSES_OK);
+ return (unknown ? ERR : OK);
-static char sccsid[] = "@(#)toucholap.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)toucholap.c 5.10 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
win2->begx + win2->maxx);
#endif
if (starty >= endy || startx >= endx)
win2->begx + win2->maxx);
#endif
if (starty >= endy || startx >= endx)
starty -= win2->begy;
startx -= win2->begx;
endy -= win2->begy;
endx -= win2->begx;
for (--endx, y = starty; y < endy; y++)
__touchline(win2, y, startx, endx, 0);
starty -= win2->begy;
startx -= win2->begx;
endy -= win2->begy;
endx -= win2->begx;
for (--endx, y = starty; y < endy; y++)
__touchline(win2, y, startx, endx, 0);
-static char sccsid[] = "@(#)touchwin.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)touchwin.c 5.10 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
maxy = win->maxy;
for (y = 0; y < maxy; y++)
__touchline(win, y, 0, win->maxx - 1, 1);
maxy = win->maxy;
for (y = 0; y < maxy; y++)
__touchline(win, y, 0, win->maxx - 1, 1);
maxy = win->maxy;
for (y = 0; y < maxy; y++)
__touchline(win, y, 0, win->maxx - 1, 0);
maxy = win->maxy;
for (y = 0; y < maxy; y++)
__touchline(win, y, 0, win->maxx - 1, 0);
__TRACE("touchline: first = %d, last = %d\n",
*win->lines[y]->firstchp, *win->lines[y]->lastchp);
#endif
__TRACE("touchline: first = %d, last = %d\n",
*win->lines[y]->firstchp, *win->lines[y]->lastchp);
#endif
-static char sccsid[] = "@(#)tty.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)tty.c 5.8 (Berkeley) %G%";
useraw = 0;
if (tcgetattr(STDIN_FILENO, &origtermio))
useraw = 0;
if (tcgetattr(STDIN_FILENO, &origtermio))
GT = (origtermio.c_oflag & OXTABS) == 0;
NONL = (origtermio.c_oflag & ONLCR) == 0;
GT = (origtermio.c_oflag & OXTABS) == 0;
NONL = (origtermio.c_oflag & ONLCR) == 0;
rawt = norawt;
cfmakeraw(&rawt);
rawt = norawt;
cfmakeraw(&rawt);
- return (tcsetattr(STDIN_FILENO, TCSADRAIN, &norawt) ? CURSES_ERR :
- CURSES_OK);
+ return (tcsetattr(STDIN_FILENO, TCSADRAIN, &norawt) ? ERR : OK);