--- cl/cl_funcs.c.orig Mon Jun 25 08:19:05 2001 +++ cl/cl_funcs.c Mon Aug 28 02:21:55 2006 @@ -381,7 +381,7 @@ if (CLSP(discardp)) { delwin(CLSP(discardp)); - CLSP(discardp) = NULL; + discardp->cl_private = NULL; } } @@ -395,7 +395,7 @@ if (CLSP(tsp)) delwin(CLSP(tsp)); - CLSP(tsp) = subwin(stdscr, tsp->rows, tsp->cols, + tsp->cl_private = subwin(stdscr, tsp->rows, tsp->cols, tsp->roff, tsp->coff); } @@ -716,9 +716,9 @@ if (CLSP(origp)) delwin(CLSP(origp)); - CLSP(origp) = subwin(stdscr, origp->rows, origp->cols, + origp->cl_private = subwin(stdscr, origp->rows, origp->cols, origp->roff, origp->coff); - CLSP(newp) = subwin(stdscr, newp->rows, newp->cols, + newp->cl_private = subwin(stdscr, newp->rows, newp->cols, newp->roff, newp->coff); /* origp is the original screen, giving up space to newp. */ --- cl/cl_screen.c.orig Mon Aug 28 02:21:55 2006 +++ cl/cl_screen.c Mon Aug 28 02:22:46 2006 @@ -369,6 +369,8 @@ fast: /* Set the terminal modes. */ if (tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->vi_enter)) { + if (EINTR == errno) + goto fast; msgq(sp, M_SYSERR, "tcsetattr"); err: (void)cl_vi_end(sp->gp); return (1); @@ -485,6 +487,8 @@ #endif fast: if (tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->ex_enter)) { + if (EINTR == errno) + goto fast; msgq(sp, M_SYSERR, "tcsetattr"); return (1); } --- common/exf.c.orig Mon Jun 25 08:19:09 2001 +++ common/exf.c Mon Aug 28 02:21:32 2006 @@ -282,7 +282,7 @@ #define NOMMAPIFFCNTL 0 #endif - if ((sp->db_error = ep->db->open(ep->db, ep->rcv_path, NULL, DB_RECNO, + if ((sp->db_error = ep->db->open(ep->db, NULL, ep->rcv_path, NULL, DB_RECNO, ((rcv_name == 0) ? DB_TRUNCATE : 0) | VI_DB_THREAD | NOMMAPIFFCNTL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) != 0) { msgq_str(sp, --- common/log.c.orig Mon Jun 25 08:19:10 2001 +++ common/log.c Mon Aug 28 02:21:32 2006 @@ -108,7 +108,7 @@ ep->l_high = ep->l_cur = 1; if (db_create(&ep->log, sp->gp->env, 0) != 0 || - ep->log->open(ep->log, NULL, NULL, DB_RECNO, + ep->log->open(ep->log, NULL, NULL, NULL, DB_RECNO, DB_CREATE | VI_DB_THREAD, S_IRUSR | S_IWUSR) != 0) { msgq(sp, M_SYSERR, "009|Log file"); F_SET(ep, F_NOLOG); --- common/msg.c.orig Sun Jul 29 12:07:28 2001 +++ common/msg.c Mon Aug 28 02:21:32 2006 @@ -721,7 +721,7 @@ p = file; if ((sp->db_error = db_create(&db, sp->gp->env, 0)) != 0 || (sp->db_error = db->set_re_source(db, p)) != 0 || - (sp->db_error = db->open(db, NULL, NULL, DB_RECNO, 0, 0)) != 0) { + (sp->db_error = db->open(db, NULL, NULL, NULL, DB_RECNO, 0, 0)) != 0) { if (first) { first = 0; return (1); --- common/db.c.orig Sat Aug 18 14:52:00 2001 +++ common/db.c Mon Aug 28 02:21:55 2006 @@ -94,6 +94,7 @@ CHAR_T *wp; size_t wlen; size_t nlen; + char *c_lp; /* * The underlying recno stuff handles zero by returning NULL, but @@ -164,7 +165,9 @@ nlen = 1024; retry: /* data.size contains length in bytes */ - BINC_GOTO(sp, (char *)ep->c_lp, ep->c_blen, nlen); + c_lp = (char *) ep->c_lp; + BINC_GOTO(sp, c_lp, ep->c_blen, nlen); + ep->c_lp = (CHAR_T *) c_lp; /* Get the line from the underlying database. */ memset(&key, 0, sizeof(key)); --- common/key.c.orig Mon Jun 25 08:19:10 2001 +++ common/key.c Mon Aug 28 02:21:55 2006 @@ -829,11 +829,14 @@ { WIN *wp; size_t new_nelem, olen; + char *i_event; wp = sp->wp; new_nelem = wp->i_nelem + add; olen = wp->i_nelem * sizeof(wp->i_event[0]); - BINC_RET(sp, (char *)wp->i_event, olen, new_nelem * sizeof(wp->i_event[0])); + i_event = (char *) wp->i_event; + BINC_RET(sp, i_event, olen, new_nelem * sizeof(wp->i_event[0])); + wp->i_event = (EVENT *) i_event; wp->i_nelem = olen / sizeof(wp->i_event[0]); return (0); } --- common/mem.h.orig Sun Aug 20 02:12:59 2000 +++ common/mem.h Mon Aug 28 02:21:55 2006 @@ -25,9 +25,10 @@ lp = L__bincp; \ } \ } -#define BINC_GOTOW(sp, lp, llen, nlen) { \ - CHAR_T *L__bp = lp; \ - BINC_GOTO(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \ +#define BINC_GOTOW(sp, lp, llen, nlen) { \ + char *L__bp = (char *) lp; \ + BINC_GOTO(sp, L__bp, llen, (nlen) * sizeof(CHAR_T)) \ + lp = (CHAR_T *) L__bp; \ } #define BINC_RET(sp, lp, llen, nlen) { \ char *L__p = lp; \ @@ -43,8 +44,9 @@ } \ } #define BINC_RETW(sp, lp, llen, nlen) { \ - CHAR_T *L__bp = lp; \ - BINC_RET(sp, (char *)lp, llen, (nlen) * sizeof(CHAR_T)) \ + char *L__bp = (char *) lp; \ + BINC_RET(sp, L__bp, llen, (nlen) * sizeof(CHAR_T)) \ + lp = (CHAR_T *) L__bp; \ } /* @@ -66,8 +68,9 @@ } \ } #define GET_SPACE_GOTOW(sp, bp, blen, nlen) { \ - CHAR_T *L__bp = bp; \ - GET_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \ + char *L__bp = (char *) bp; \ + GET_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \ + bp = (CHAR_T *) L__bp; \ } #define GET_SPACE_RET(sp, bp, blen, nlen) { \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ @@ -83,8 +86,9 @@ } \ } #define GET_SPACE_RETW(sp, bp, blen, nlen) { \ - CHAR_T *L__bp = bp; \ - GET_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \ + char *L__bp = (char *) bp; \ + GET_SPACE_RET(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \ + bp = (CHAR_T *) L__bp; \ } /* @@ -103,8 +107,9 @@ BINC_GOTO(sp, bp, blen, nlen); \ } #define ADD_SPACE_GOTOW(sp, bp, blen, nlen) { \ - CHAR_T *L__bp = bp; \ - ADD_SPACE_GOTO(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \ + char *L__bp = (char *) bp; \ + ADD_SPACE_GOTO(sp, L__bp, blen, (nlen) * sizeof(CHAR_T)) \ + bp = (CHAR_T *) L__bp; \ } #define ADD_SPACE_RET(sp, bp, blen, nlen) { \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ @@ -118,8 +123,9 @@ BINC_RET(sp, bp, blen, nlen); \ } #define ADD_SPACE_RETW(sp, bp, blen, nlen) { \ - CHAR_T *L__bp = bp; \ - ADD_SPACE_RET(sp, (char *)bp, blen, (nlen) * sizeof(CHAR_T)) \ + char *L__bp = (char *) bp; \ + ADD_SPACE_RET(sp, bp, blen, (nlen) * sizeof(CHAR_T)) \ + bp = (CHAR_T *) L__bp; \ } /* Free a GET_SPACE returned buffer. */ --- vi/v_txt.c.orig Thu Jul 26 10:15:53 2001 +++ vi/v_txt.c Mon Aug 28 02:21:55 2006 @@ -589,8 +589,10 @@ /* Check to see if the character fits into the replay buffers. */ if (LF_ISSET(TXT_RECORD)) { - BINC_GOTO(sp, (char *)vip->rep, + char *rep = (char *) vip->rep; + BINC_GOTO(sp, rep, vip->rep_len, (rcol + 1) * sizeof(EVENT)); + vip->rep = (EVENT *) rep; vip->rep[rcol++] = *evp; }