new version from arnold
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Thu, 2 May 1985 08:18:19 +0000 (00:18 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Thu, 2 May 1985 08:18:19 +0000 (00:18 -0800)
SCCS-vsn: lib/libcurses/initscr.c 1.4
SCCS-vsn: lib/libcurses/insch.c 1.3
SCCS-vsn: lib/libcurses/longname.c 1.2

usr/src/lib/libcurses/initscr.c
usr/src/lib/libcurses/insch.c
usr/src/lib/libcurses/longname.c

index 25e8c0c..bce8836 100644 (file)
@@ -7,7 +7,7 @@ extern char     *getenv();
 /*
  *     This routine initializes the current and standard screen.
  *
 /*
  *     This routine initializes the current and standard screen.
  *
- * %G% (Berkeley) @(#)initscr.c        1.4
+ * @(#)initscr.c       1.4 (Berkeley) %G%
  */
 WINDOW *
 initscr() {
  */
 WINDOW *
 initscr() {
@@ -52,7 +52,8 @@ initscr() {
 # endif
        if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
                return ERR;
 # endif
        if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
                return ERR;
-       curscr->_clear = TRUE;
+       clearok(curscr, TRUE);
+       curscr->_flags &= ~_FULLLINE;
        if (stdscr != NULL) {
 # ifdef DEBUG
                fprintf(outf, "INITSCR: stdscr = 0%o\n", stdscr);
        if (stdscr != NULL) {
 # ifdef DEBUG
                fprintf(outf, "INITSCR: stdscr = 0%o\n", stdscr);
index 89c9484..3a0c886 100644 (file)
@@ -4,7 +4,7 @@
  *     This routine performs an insert-char on the line, leaving
  * (_cury,_curx) unchanged.
  *
  *     This routine performs an insert-char on the line, leaving
  * (_cury,_curx) unchanged.
  *
- * @(#)insch.c 1.2 (Berkeley) %G%
+ * @(#)insch.c 1.3 (Berkeley) %G%
  */
 winsch(win, c)
 reg WINDOW     *win;
  */
 winsch(win, c)
 reg WINDOW     *win;
@@ -19,10 +19,7 @@ char         c; {
        while (temp1 > end)
                *temp1-- = *temp2--;
        *temp1 = c;
        while (temp1 > end)
                *temp1-- = *temp2--;
        *temp1 = c;
-       win->_lastch[win->_cury] = win->_maxx - 1;
-       if (win->_firstch[win->_cury] == _NOCHANGE ||
-           win->_firstch[win->_cury] > win->_curx)
-               win->_firstch[win->_cury] = win->_curx;
+       touchline(win, win->_cury, win->_curx, win->_maxx - 1);
        if (win->_cury == LINES - 1 && win->_y[LINES-1][COLS-1] != ' ')
                if (win->_scroll) {
                        wrefresh(win);
        if (win->_cury == LINES - 1 && win->_y[LINES-1][COLS-1] != ' ')
                if (win->_scroll) {
                        wrefresh(win);
index 6fa33bf..4f2feec 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     This routine fills in "def" with the long name of the terminal.
  *
 /*
  *     This routine fills in "def" with the long name of the terminal.
  *
- * %G% (Berkeley) @(#)longname.c       1.1
+ * @(#)longname.c      1.2 (Berkeley) %G%
  */
 char *
 longname(bp, def)
  */
 char *
 longname(bp, def)
@@ -15,11 +15,10 @@ reg char    *bp, *def; {
                bp++;
        if (*bp == '|') {
                bp++;
                bp++;
        if (*bp == '|') {
                bp++;
-               cp = bp;
-               while (*cp && *cp != ':' && *cp != '|')
-                       cp++;
+               cp = def;
+               while (*bp && *bp != ':' && *bp != '|')
+                       *cp++ = *bp++;
                *cp = 0;
                *cp = 0;
-               return bp;
        }
        return def;
 }
        }
        return def;
 }