CURSES_{OK,ERR} -> OK,ERR
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 12 Jan 1993 03:54:04 +0000 (19:54 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 12 Jan 1993 03:54:04 +0000 (19:54 -0800)
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:
usr/src/lib/libcurses/addbytes.c
usr/src/lib/libcurses/box.c
usr/src/lib/libcurses/clear.c
usr/src/lib/libcurses/clrtobot.c
usr/src/lib/libcurses/cr_put.c
usr/src/lib/libcurses/curses.h
usr/src/lib/libcurses/delch.c
usr/src/lib/libcurses/deleteln.c
usr/src/lib/libcurses/delwin.c
usr/src/lib/libcurses/erase.c
usr/src/lib/libcurses/getch.c
usr/src/lib/libcurses/getstr.c
usr/src/lib/libcurses/initscr.c
usr/src/lib/libcurses/insch.c
usr/src/lib/libcurses/insertln.c
usr/src/lib/libcurses/move.c
usr/src/lib/libcurses/mvprintw.c
usr/src/lib/libcurses/mvwin.c
usr/src/lib/libcurses/overlay.c
usr/src/lib/libcurses/overwrite.c
usr/src/lib/libcurses/printw.c
usr/src/lib/libcurses/refresh.c
usr/src/lib/libcurses/scanw.c
usr/src/lib/libcurses/scroll.c
usr/src/lib/libcurses/setterm.c
usr/src/lib/libcurses/toucholap.c
usr/src/lib/libcurses/touchwin.c
usr/src/lib/libcurses/tty.c

index b574620..8b6824c 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -52,8 +52,8 @@ __waddbytes(win, bytes, count, so)
                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);
                        SYNCH_IN;
                        break;
 
                        SYNCH_IN;
                        break;
 
@@ -136,6 +136,6 @@ newline:                    if (y == win->maxy - 1) {
                }
        }
        SYNCH_OUT;
                }
        }
        SYNCH_OUT;
-       return (CURSES_OK);
+       return (OK);
 }
  
 }
  
index 0f0fd24..91dfcbe 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -48,5 +48,5 @@ box(win, vert, hor)
                lp[endx].attr &= ~__STANDOUT;
        }
        __touchwin(win);
                lp[endx].attr &= ~__STANDOUT;
        }
        __touchwin(win);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 909f2a9..d884d58 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -19,9 +19,9 @@ int
 wclear(win)
        register WINDOW *win;
 {
 wclear(win)
        register WINDOW *win;
 {
-       if (werase(win) == CURSES_OK) {
+       if (werase(win) == OK) {
                win->flags |= __CLEAROK;
                win->flags |= __CLEAROK;
-               return (CURSES_OK);
+               return (OK);
        }
        }
-       return (CURSES_ERR);
+       return (ERR);
 }
 }
index 68ad6e7..897ca01 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -39,5 +39,5 @@ wclrtobot(win)
                            0);
                startx = 0;
        }
                            0);
                startx = 0;
        }
-       return (CURSES_OK);
+       return (OK);
 }
 }
index e5de874..1639e92 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -49,7 +49,7 @@ mvcur(ly, lx, y, x)
        outcol = lx;
        outline = ly;
        fgoto();
        outcol = lx;
        outline = ly;
        fgoto();
-       return (CURSES_OK);
+       return (OK);
 }
 
 static void
 }
 
 static void
index 49cfb84..6bb1bd2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)curses.h    5.24 (Berkeley) %G%
+ *     @(#)curses.h    5.25 (Berkeley) %G%
  */
 
 #ifndef _CURSES_H_
  */
 
 #ifndef _CURSES_H_
index 576e92d..d685da5 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -31,5 +31,5 @@ wdelch(win)
        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);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 8f4f22b..36d6538 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -50,5 +50,5 @@ wdeleteln(win)
        __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);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 9edae95..20255e1 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -50,5 +50,5 @@ delwin(win)
                wp->nextp = win->nextp;
        }
        free(win);
                wp->nextp = win->nextp;
        }
        free(win);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index f299d9c..bbea099 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -42,5 +42,5 @@ werase(win)
                        __touchline(win, y, minx, maxx - win->lines[y]->line,
                           0);
        }
                        __touchline(win, y, minx, maxx - win->lines[y]->line,
                           0);
        }
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 1444ca0..daa4d80 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -23,7 +23,7 @@ wgetch(win)
 
        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)
-               return (CURSES_ERR);
+               return (ERR);
 #ifdef DEBUG
        __TRACE("wgetch: __echoit = %d, __rawmode = %d\n",
            __echoit, __rawmode);
 #ifdef DEBUG
        __TRACE("wgetch: __echoit = %d, __rawmode = %d\n",
            __echoit, __rawmode);
index 5ebbecf..8b6d09b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -20,12 +20,12 @@ wgetstr(win, str)
        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')
                str++;
                str++;
-       if (*str == CURSES_ERR) {
+       if (*str == ERR) {
                *str = '\0';
                *str = '\0';
-               return (CURSES_ERR);
+               return (ERR);
        }
        *str = '\0';
        }
        *str = '\0';
-       return (CURSES_OK);
+       return (OK);
 }
 }
index a1932d5..7bf73ff 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -28,7 +28,7 @@ initscr()
        __echoit = 1;
         __pfast = __rawmode = __noqch = 0;
 
        __echoit = 1;
         __pfast = __rawmode = __noqch = 0;
 
-       if (gettmode() == CURSES_ERR)
+       if (gettmode() == ERR)
                return (NULL);
 
        /*
                return (NULL);
 
        /*
@@ -37,7 +37,7 @@ initscr()
         */
        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 */
@@ -49,13 +49,13 @@ initscr()
 
        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);
        }
index 6627742..dec40ca 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -41,6 +41,6 @@ winsch(win, ch)
                        scroll(win);
                        win->cury--;
                } else
                        scroll(win);
                        win->cury--;
                } else
-                       return (CURSES_ERR);
-       return (CURSES_OK);
+                       return (ERR);
+       return (OK);
 }
 }
index 4bbbe23..1aa7f22 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -51,5 +51,5 @@ winsertln(win)
        __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);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 1aca128..1d7fda4 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -25,11 +25,11 @@ wmove(win, y, x)
        __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)
-               return (CURSES_ERR);
+               return (ERR);
        if (x >= win->maxx || y >= win->maxy)
        if (x >= win->maxx || y >= win->maxy)
-               return (CURSES_ERR);
+               return (ERR);
        win->curx = x;
        win->cury = y;
        win->lines[y]->flags &= ~__ISPASTEOL;
        win->curx = x;
        win->cury = y;
        win->lines[y]->flags &= ~__ISPASTEOL;
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 366441f..5a36407 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -35,8 +35,8 @@ mvprintw(y, x, fmt, va_alist)
        va_list ap;
        int ret;
 
        va_list ap;
        int ret;
 
-       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
@@ -61,8 +61,8 @@ mvwprintw(win, y, x, fmt, va_alist)
        va_list ap;
        int ret;
 
        va_list ap;
        int ret;
 
-       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
index c800053..b9ae0db 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -24,7 +24,7 @@ mvwin(win, by, bx)
        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)
-               return (CURSES_ERR);
+               return (ERR);
        dy = by - win->begy;
        dx = bx - win->begx;
        orig = win->orig;
        dy = by - win->begy;
        dx = bx - win->begx;
        orig = win->orig;
@@ -38,14 +38,14 @@ mvwin(win, by, bx)
                } 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)
-                       return (CURSES_ERR);
+                       return (ERR);
                if (bx < orig->begx || win->maxx + dx > orig->maxx)
                if (bx < orig->begx || win->maxx + dx > orig->maxx)
-                       return (CURSES_ERR);
+                       return (ERR);
                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);
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 713daa9..a63aa57 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -36,7 +36,7 @@ overlay(win1, win2)
            starty, startx, endy, endx);
 #endif
        if (starty >= endy || startx >= endx)
            starty, startx, endy, endx);
 #endif
        if (starty >= endy || startx >= endx)
-               return (CURSES_OK);
+               return (OK);
        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++) {
@@ -51,5 +51,5 @@ overlay(win1, win2)
                        x++;
                }
        }
                        x++;
                }
        }
-       return (CURSES_OK);
+       return (OK);
 }
 }
index 4ccb486..d5bd9e9 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -31,7 +31,7 @@ overwrite(win1, win2)
        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)
-               return (CURSES_OK);
+               return (OK);
 #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);
@@ -44,5 +44,5 @@ overwrite(win1, win2)
                __touchline(win2, y, startx - win2->begx, endx - win2->begx,
                    0);
        }
                __touchline(win2, y, startx - win2->begx, endx - win2->begx,
                    0);
        }
-       return (CURSES_OK);
+       return (OK);
 }
 }
index a44d68d..94684ef 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -102,8 +102,8 @@ mvprintw(y, x, fmt, va_alist)
 #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);
@@ -129,8 +129,8 @@ mvwprintw(win, y, x, fmt, va_alist)
 #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);
@@ -150,7 +150,7 @@ __winwrite(cookie, buf, n)
        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);
 }
@@ -168,7 +168,7 @@ vwprintw(win, fmt, ap)
        FILE *f;
 
        if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
        FILE *f;
 
        if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
-               return (CURSES_ERR);
+               return (ERR);
        (void)vfprintf(f, fmt, ap);
        (void)vfprintf(f, fmt, ap);
-       return (fclose(f) ? CURSES_ERR : CURSES_OK);
+       return (fclose(f) ? ERR : OK);
 }
 }
index 1f959d6..b30f244 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -89,8 +89,8 @@ wrefresh(win)
                        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 +
@@ -133,7 +133,7 @@ wrefresh(win)
                        curscr->curx = win->curx + win->begx;
                }
        }
                        curscr->curx = win->curx + win->begx;
                }
        }
-       retval = CURSES_OK;
+       retval = OK;
 
        _win = NULL;
        (void)fflush(stdout);
 
        _win = NULL;
        (void)fflush(stdout);
@@ -164,15 +164,15 @@ makech(win, wy)
                lx = 0;
        }
        if (!(win->lines[wy]->flags & __ISDIRTY))
                lx = 0;
        }
        if (!(win->lines[wy]->flags & __ISDIRTY))
-               return (CURSES_OK);
+               return (OK);
        wx = *win->lines[wy]->firstchp - win->ch_off;
        if (wx >= win->maxx)
        wx = *win->lines[wy]->firstchp - win->ch_off;
        if (wx >= win->maxx)
-               return (CURSES_OK);
+               return (OK);
        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)
-               return (CURSES_OK);
+               return (OK);
        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;
@@ -262,7 +262,7 @@ makech(win, wy)
                                                csp->attr = 0;
                                                csp++;
                                        }
                                                csp->attr = 0;
                                                csp++;
                                        }
-                                       return (CURSES_OK);
+                                       return (OK);
                                }
                                ce = NULL;
                        }
                                }
                                ce = NULL;
                        }
@@ -307,11 +307,11 @@ makech(win, wy)
                                        }
                                        ly = win->begy + win->maxy - 1;
                                        lx = win->begx + win->maxx - 1;
                                        }
                                        ly = win->begy + win->maxy - 1;
                                        lx = win->begx + win->maxx - 1;
-                                       return (CURSES_OK);
+                                       return (OK);
                                } else
                                        if (win->flags & __SCROLLWIN) {
                                                lx = --wx;
                                } else
                                        if (win->flags & __SCROLLWIN) {
                                                lx = --wx;
-                                               return (CURSES_ERR);
+                                               return (ERR);
                                        }
                        if (!curwin) {
                                csp->attr = nsp->attr;
                                        }
                        if (!curwin) {
                                csp->attr = nsp->attr;
@@ -361,7 +361,7 @@ makech(win, wy)
                __TRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
 #endif
        }
                __TRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
 #endif
        }
-       return (CURSES_OK);
+       return (OK);
 }
 
 /*
 }
 
 /*
index 1cd1652..822a5e8 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)scanw.c    5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)scanw.c    5.13 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -92,8 +92,8 @@ mvscanw(y, x, fmt, va_alist)
        va_list ap;
        int ret;
 
        va_list ap;
        int ret;
 
-       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
@@ -119,8 +119,8 @@ mvwscanw(win, y, x, fmt, va_alist)
        va_list ap;
        int ret;
 
        va_list ap;
        int ret;
 
-       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
@@ -144,6 +144,6 @@ vwscanw(win, fmt, ap)
 
        char buf[1024];
 
 
        char buf[1024];
 
-       return (wgetstr(win, buf) == CURSES_OK ? vsscanf(buf, fmt, ap) : 
-                                                CURSES_ERR);
+       return (wgetstr(win, buf) == OK ?
+           vsscanf(buf, fmt, ap) : ERR);
 }
 }
index 143aaf1..951df3a 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -27,7 +27,7 @@ scroll(win)
 #endif
 
        if (!(win->flags & __SCROLLOK))
 #endif
 
        if (!(win->flags & __SCROLLOK))
-               return (CURSES_ERR);
+               return (ERR);
 
        getyx(win, oy, ox);
        wmove(win, 0, 0);
 
        getyx(win, oy, ox);
        wmove(win, 0, 0);
@@ -42,5 +42,5 @@ scroll(win)
                __TRACE("scroll: win == curscr\n");
 #endif
        }
                __TRACE("scroll: win == curscr\n");
 #endif
        }
-       return (CURSES_OK);
+       return (OK);
 }
 }
index c394258..6e91fa1 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -88,7 +88,7 @@ setterm(type)
         * 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)
-               return (CURSES_ERR);
+               return (ERR);
 
 #ifdef DEBUG
        __TRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
 
 #ifdef DEBUG
        __TRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
@@ -125,7 +125,7 @@ setterm(type)
        if ((!AL && !al) || (!DL && !dl))
                __noqch = 1;
 
        if ((!AL && !al) || (!DL && !dl))
                __noqch = 1;
 
-       return (unknown ? CURSES_ERR : CURSES_OK);
+       return (unknown ? ERR : OK);
 }
 
 /*
 }
 
 /*
index cc0580f..be95d83 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -39,13 +39,13 @@ touchoverlap(win1, win2)
            win2->begx + win2->maxx);
 #endif
        if (starty >= endy || startx >= endx)
            win2->begx + win2->maxx);
 #endif
        if (starty >= endy || startx >= endx)
-               return (CURSES_OK);
+               return (OK);
        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);
-       return (CURSES_OK);
+       return (OK);
 }
 
 }
 
index f86e34a..181573d 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-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>
@@ -41,7 +41,7 @@ touchwin(win)
        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);
-       return (CURSES_OK);
+       return (OK);
 }
 
 
 }
 
 
@@ -57,7 +57,7 @@ __touchwin(win)
        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);
-       return (CURSES_OK);
+       return (OK);
 }
 
 int
 }
 
 int
@@ -89,5 +89,5 @@ __touchline(win, y, sx, ex, force)
        __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
-       return (CURSES_OK);
+       return (OK);
 }
 }
index bd0797b..65ae62a 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)tty.c      5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)tty.c      5.8 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -32,7 +32,7 @@ gettmode()
        useraw = 0;
        
        if (tcgetattr(STDIN_FILENO, &origtermio))
        useraw = 0;
        
        if (tcgetattr(STDIN_FILENO, &origtermio))
-               return (CURSES_ERR);
+               return (ERR);
 
        GT = (origtermio.c_oflag & OXTABS) == 0;
        NONL = (origtermio.c_oflag & ONLCR) == 0;
 
        GT = (origtermio.c_oflag & OXTABS) == 0;
        NONL = (origtermio.c_oflag & ONLCR) == 0;
@@ -42,8 +42,7 @@ gettmode()
        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);
 }
 
 int
 }
 
 int