rs@uunet.UUCP (09/17/87)
Submitted-by: Jonathan Payne <jpayne@cs.rochester.edu> Posting-number: Volume 11, Issue 48 Archive-name: jove.pch/Part04 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 4 (of 4)." # Contents: jove.pch.4 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'jove.pch.4' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'jove.pch.4'\" else echo shar: Extracting \"'jove.pch.4'\" \(31574 characters\) sed "s/^X//" >'jove.pch.4' <<'END_OF_FILE' Xdiff -c ojove/rec.c jove/rec.c X*** ojove/rec.c Thu Jul 16 09:15:04 1987 X--- jove/rec.c Mon Jul 13 09:46:08 1987 X*************** X*** 51,57 **** X (void) unlink(recfname); X } X X! static X putaddr(addr, p) X disk_line addr; X register File *p; X--- 51,57 ---- X (void) unlink(recfname); X } X X! private X putaddr(addr, p) X disk_line addr; X register File *p; X*************** X*** 63,69 **** X putc(*cp++ & 0377, p); X } X X! static X putn(cp, nbytes) X register char *cp; X register int nbytes; X--- 63,69 ---- X putc(*cp++ & 0377, p); X } X X! private X putn(cp, nbytes) X register char *cp; X register int nbytes; X*************** X*** 74,80 **** X X /* Write out the line pointers for buffer B. */ X X! static X dmppntrs(b) X register Buffer *b; X { X--- 74,80 ---- X X /* Write out the line pointers for buffer B. */ X X! private X dmppntrs(b) X register Buffer *b; X { X*************** X*** 86,106 **** X X /* dump the buffer info and then the actual line pointers. */ X X! static X! dmp_buf(b) X register Buffer *b; X { X! static struct rec_entry record; X register Line *lp; X register int nlines = 0; X X for (lp = b->b_first; lp != 0; lp = lp->l_next, nlines++) X! ; X strcpy(record.r_fname, b->b_fname ? b->b_fname : NullStr); X strcpy(record.r_bname, b->b_name); X record.r_nlines = nlines; X putn((char *) &record, sizeof record); X- dmppntrs(b); X } X X /* Goes through all the buffers and syncs them to the disk. */ X--- 86,107 ---- X X /* dump the buffer info and then the actual line pointers. */ X X! private X! dmp_buf_header(b) X register Buffer *b; X { X! struct rec_entry record; X register Line *lp; X register int nlines = 0; X X for (lp = b->b_first; lp != 0; lp = lp->l_next, nlines++) X! if (lp == b->b_dot) X! record.r_dotline = nlines; X strcpy(record.r_fname, b->b_fname ? b->b_fname : NullStr); X strcpy(record.r_bname, b->b_name); X record.r_nlines = nlines; X+ record.r_dotchar = b->b_char; X putn((char *) &record, sizeof record); X } X X /* Goes through all the buffers and syncs them to the disk. */ X*************** X*** 110,115 **** X--- 111,117 ---- X SyncRec() X { X register Buffer *b; X+ extern disk_line DFree; X X if (rec_fd == 0) X recinit(); /* Init recover file. */ X*************** X*** 123,128 **** X--- 125,131 ---- X continue; X else X Header.Nbuffers++; X+ Header.FreePtr = DFree; X putn((char *) &Header, sizeof Header); X if (Header.Nbuffers != 0) { X SyncTmp(); X*************** X*** 130,136 **** X if (b->b_type == B_SCRATCH || !IsModified(b)) X continue; X else X! dmp_buf(b); X } X flush(rec_out); X } X--- 133,148 ---- X if (b->b_type == B_SCRATCH || !IsModified(b)) X continue; X else X! dmp_buf_header(b); X! for (b = world; b != 0; b = b->b_next) X! if (b->b_type == B_SCRATCH || !IsModified(b)) X! continue; X! else X! dmppntrs(b); X } X flush(rec_out); X+ } X+ X+ FullRecover() X+ { X } Xdiff -c ojove/rec.h jove/rec.h X*** ojove/rec.h Thu Jul 16 09:15:06 1987 X--- jove/rec.h Thu Mar 19 17:13:30 1987 X*************** X*** 6,20 **** X ************************************************************************/ X X struct rec_head { X! int Uid, /* Uid of owner. */ X! Pid; /* Pid of jove process. */ X! time_t UpdTime; /* Last time this was updated. */ X! int Nbuffers; /* Number of buffers. */ X }; X X struct rec_entry { X char r_bname[128], X r_fname[128]; X! int r_nlines; X }; X- X--- 6,22 ---- X ************************************************************************/ X X struct rec_head { X! int Uid, /* uid of owner */ X! Pid; /* pid of jove process */ X! time_t UpdTime; /* last time this was updated */ X! int Nbuffers; /* number of buffers */ X! disk_line FreePtr; /* position of DFree */ X }; X X struct rec_entry { X char r_bname[128], X r_fname[128]; X! int r_nlines, X! r_dotline, /* so we can really save the context */ X! r_dotchar; X }; Xdiff -c ojove/recover.c jove/recover.c X*** ojove/recover.c Thu Jul 16 09:15:12 1987 X--- jove/recover.c Mon Jul 13 12:00:15 1987 X*************** X*** 405,414 **** X printf("recover: cannot create %s.\n", dest); X return; X } X- seekto(src - buflist); X if (dest != tty) X printf("\"%s\"", dest); X! dump_file(outfile); X } else X printf("\nAborted!\n"); X fclose(outfile); X--- 405,413 ---- X printf("recover: cannot create %s.\n", dest); X return; X } X if (dest != tty) X printf("\"%s\"", dest); X! dump_file(src - buflist, outfile); X } else X printf("\nAborted!\n"); X fclose(outfile); X*************** X*** 440,454 **** X seekto(which) X { X struct rec_entry rec; X X! fseek(ptrs_fp, (long) (sizeof Header), L_SET); X! X! while (which-- > 1) { X! read_rec(&rec); X! if (fseek(ptrs_fp, (long) rec.r_nlines * sizeof (disk_line), X! L_INCR) == -1) X! printf("recover: improper fseek!\n"); X! } X } X X makblist() X--- 439,451 ---- X seekto(which) X { X struct rec_entry rec; X+ long offset; X+ int i; X X! offset = sizeof (Header) + (Header.Nbuffers * sizeof (rec)); X! for (i = 1; i < which; i++) X! offset += buflist[i]->r_nlines * sizeof (disk_line); X! fseek(ptrs_fp, offset, L_SET); X } X X makblist() X*************** X*** 455,469 **** X { X int i; X X for (i = 1; i <= Header.Nbuffers; i++) { X- seekto(i); X if (buflist[i] == 0) X buflist[i] = (struct rec_entry *) malloc (sizeof (struct rec_entry)); X read_rec(buflist[i]); X } X! if (buflist[i]) { X free((char *) buflist[i]); X buflist[i] = 0; X } X } X X--- 452,467 ---- X { X int i; X X+ fseek(ptrs_fp, (long) sizeof (Header), L_SET); X for (i = 1; i <= Header.Nbuffers; i++) { X if (buflist[i] == 0) X buflist[i] = (struct rec_entry *) malloc (sizeof (struct rec_entry)); X read_rec(buflist[i]); X } X! while (buflist[i]) { X free((char *) buflist[i]); X buflist[i] = 0; X+ i++; X } X } X X*************** X*** 481,496 **** X return addr; X } X X! dump_file(out) X FILE *out; X { X- struct rec_entry record; X register int nlines; X register disk_line daddr; X char buf[BUFSIZ]; X X! read_rec(&record); X! nlines = record.r_nlines; X Nchars = Nlines = 0L; X while (--nlines >= 0) { X daddr = getaddr(ptrs_fp); X--- 479,493 ---- X return addr; X } X X! dump_file(which, out) X FILE *out; X { X register int nlines; X register disk_line daddr; X char buf[BUFSIZ]; X X! seekto(which); X! nlines = buflist[which]->r_nlines; X Nchars = Nlines = 0L; X while (--nlines >= 0) { X daddr = getaddr(ptrs_fp); X*************** X*** 539,549 **** X #ifdef KILL0 X if (kill(Header.Pid, 0) == 0) X return 0; X- #else X- #ifdef LSRHS X- if (pexist(Header.Pid)) X- return 0; X- #endif LSRHS X #endif KILL0 X X if (Header.Nbuffers == 0) { X--- 536,541 ---- X*************** X*** 568,573 **** X--- 560,566 ---- X return 1; X } X makblist(); X+ list(); X X for (;;) { X tellme("(Type '?' for options): ", answer); X*************** X*** 699,707 **** X printf("recover: usage: recover [-d directory]\n"); X printf("Use \"recover\" after JOVE has died for some\n"); X printf("unknown reason.\n\n"); X! printf("Use \"recover -syscrash\" when the system is in the process\n"); X printf("of rebooting. This is done automatically at reboot time\n"); X printf("and so most of you don't have to worry about that.\n\n"); X printf("Use \"recover -d directory\" when the tmp files are store\n"); X printf("in DIRECTORY instead of the default one (/tmp).\n"); X exit(0); X--- 692,701 ---- X printf("recover: usage: recover [-d directory]\n"); X printf("Use \"recover\" after JOVE has died for some\n"); X printf("unknown reason.\n\n"); X! /* printf("Use \"recover -syscrash\" when the system is in the process\n"); X printf("of rebooting. This is done automatically at reboot time\n"); X printf("and so most of you don't have to worry about that.\n\n"); X+ */ X printf("Use \"recover -d directory\" when the tmp files are store\n"); X printf("in DIRECTORY instead of the default one (/tmp).\n"); X exit(0); Xdiff -c ojove/screen.c jove/screen.c X*** ojove/screen.c Thu Jul 16 09:15:18 1987 X--- jove/screen.c Mon Jul 13 08:34:13 1987 X*************** X*** 222,231 **** X X BufSwrite(linenum) X { X- char *bp; X register int n = cursend - cursor, X col = 0, X c; X int StartCol = DesiredScreen[linenum].s_offset, X visspace = DesiredScreen[linenum].s_window->w_flags & W_VISSPACE, X aborted = 0; X--- 222,231 ---- X X BufSwrite(linenum) X { X register int n = cursend - cursor, X col = 0, X c; X+ register char *bp; X int StartCol = DesiredScreen[linenum].s_offset, X visspace = DesiredScreen[linenum].s_window->w_flags & W_VISSPACE, X aborted = 0; X*************** X*** 369,376 **** X What ever turns you on ... */ X X private struct cursaddr { X! int c_numchars, X! (*c_proc)(); X }; X X private char *Cmstr; X--- 369,376 ---- X What ever turns you on ... */ X X private struct cursaddr { X! int cm_numchars, X! (*cm_proc)(); X }; X X private char *Cmstr; X*************** X*** 532,538 **** X register int nlines = destline - CapLine; X X while (--nlines >= 0) X! putchar('\n'); X CapLine = destline; X } X X--- 532,538 ---- X register int nlines = destline - CapLine; X X while (--nlines >= 0) X! putpad(NL, 1); X CapLine = destline; X } X X*************** X*** 574,580 **** X X #define CursMin(which,addrs,max) \ X for (best = 0, cp = &addrs[1], i = 1; i < max; i++, cp++) \ X! if (cp->c_numchars < addrs[best].c_numchars) \ X best = i; \ X which = &addrs[best]; X X--- 574,580 ---- X X #define CursMin(which,addrs,max) \ X for (best = 0, cp = &addrs[1], i = 1; i < max; i++, cp++) \ X! if (cp->cm_numchars < addrs[best].cm_numchars) \ X best = i; \ X which = &addrs[best]; X X*************** X*** 598,610 **** X X if (dcol == 1 || dcol == 0) { /* Most common case. */ X HorMin = &WarpHor[FORWARD]; X! HorMin->c_numchars = dcol + xtracost; X } else { X! WarpHor[FORWARD].c_numchars = dcol >= 0 ? dcol + xtracost : 1000; X! WarpHor[BACKWARD].c_numchars = dcol < 0 ? -(dcol + xtracost) : 1000; X! WarpHor[FORTAB].c_numchars = dcol >= 0 && TABS ? X ForNum(CapCol, col) + xtracost : 1000; X! WarpHor[RETFORWARD].c_numchars = (xtracost + 1 + (TABS ? ForNum(0, col) : col)); X X /* Which is the shortest of the bunch */ X X--- 598,610 ---- X X if (dcol == 1 || dcol == 0) { /* Most common case. */ X HorMin = &WarpHor[FORWARD]; X! HorMin->cm_numchars = dcol + xtracost; X } else { X! WarpHor[FORWARD].cm_numchars = dcol >= 0 ? dcol + xtracost : 1000; X! WarpHor[BACKWARD].cm_numchars = dcol < 0 ? -(dcol + xtracost) : 1000; X! WarpHor[FORTAB].cm_numchars = dcol >= 0 && TABS ? X ForNum(CapCol, col) + xtracost : 1000; X! WarpHor[RETFORWARD].cm_numchars = (xtracost + 1 + (TABS ? ForNum(0, col) : col)); X X /* Which is the shortest of the bunch */ X X*************** X*** 613,620 **** X X /* Moving vertically is more simple. */ X X! WarpVert[DOWN].c_numchars = dline >= 0 ? dline : 1000; X! WarpVert[UPMOVE].c_numchars = dline < 0 ? ((-dline) * UPlen) : 1000; X X /* Which of these is simpler */ X CursMin(VertMin, WarpVert, NUMVERT); X--- 613,620 ---- X X /* Moving vertically is more simple. */ X X! WarpVert[DOWN].cm_numchars = dline >= 0 ? dline : 1000; X! WarpVert[UPMOVE].cm_numchars = dline < 0 ? ((-dline) * UPlen) : 1000; X X /* Which of these is simpler */ X CursMin(VertMin, WarpVert, NUMVERT); X*************** X*** 624,651 **** X Homing first's total is the sum of the cost of homing X and the sum of tabbing (if possible) to the right. */ X X! if (VertMin->c_numchars + HorMin->c_numchars <= 3) { X DirectMin = &WarpDirect[DIRECT]; /* A dummy ... */ X! DirectMin->c_numchars = 100; X } else { X! WarpDirect[DIRECT].c_numchars = CM ? X strlen(Cmstr = tgoto(CM, col, line)) : 1000; X! WarpDirect[HOME].c_numchars = HOlen + line + X! WarpHor[RETFORWARD].c_numchars; X! WarpDirect[LOWER].c_numchars = LLlen + ((ILI - line) * UPlen) + X! WarpHor[RETFORWARD].c_numchars; X CursMin(DirectMin, WarpDirect, NUMDIRECT); X } X X! if (HorMin->c_numchars + VertMin->c_numchars < DirectMin->c_numchars) { X if (line != CapLine) X! (*VertMin->c_proc)(line); X if (col != CapCol) { X #ifdef ID_CHAR X if (IN_INSmode) /* We may use real characters ... */ X INSmode(0); X #endif X! (*HorMin->c_proc)(col); X } X } else { X #ifdef ID_CHAR X--- 624,651 ---- X Homing first's total is the sum of the cost of homing X and the sum of tabbing (if possible) to the right. */ X X! if (VertMin->cm_numchars + HorMin->cm_numchars <= 3) { X DirectMin = &WarpDirect[DIRECT]; /* A dummy ... */ X! DirectMin->cm_numchars = 100; X } else { X! WarpDirect[DIRECT].cm_numchars = CM ? X strlen(Cmstr = tgoto(CM, col, line)) : 1000; X! WarpDirect[HOME].cm_numchars = HOlen + line + X! WarpHor[RETFORWARD].cm_numchars; X! WarpDirect[LOWER].cm_numchars = LLlen + ((ILI - line) * UPlen) + X! WarpHor[RETFORWARD].cm_numchars; X CursMin(DirectMin, WarpDirect, NUMDIRECT); X } X X! if (HorMin->cm_numchars + VertMin->cm_numchars < DirectMin->cm_numchars) { X if (line != CapLine) X! (*VertMin->cm_proc)(line); X if (col != CapCol) { X #ifdef ID_CHAR X if (IN_INSmode) /* We may use real characters ... */ X INSmode(0); X #endif X! (*HorMin->cm_proc)(col); X } X } else { X #ifdef ID_CHAR X*************** X*** 652,658 **** X if (IN_INSmode && !MI) X INSmode(0); X #endif X! (*DirectMin->c_proc)(line, col); X } X } X X--- 652,658 ---- X if (IN_INSmode && !MI) X INSmode(0); X #endif X! (*DirectMin->cm_proc)(line, col); X } X } X X*************** X*** 716,727 **** X register int i; X X if (CS) { X! putpad(tgoto(CS, bottom, top)); X CapCol = CapLine = 0; X Placur(top, 0); X for (i = 0; i < num; i++) X putpad(SR, bottom - top); X! putpad(tgoto(CS, ILI, 0)); X CapCol = CapLine = 0; X } else { X Placur(bottom - num + 1, 0); X--- 716,727 ---- X register int i; X X if (CS) { X! putpad(tgoto(CS, bottom, top), 1); X CapCol = CapLine = 0; X Placur(top, 0); X for (i = 0; i < num; i++) X putpad(SR, bottom - top); X! putpad(tgoto(CS, ILI, 0), 1); X CapCol = CapLine = 0; X } else { X Placur(bottom - num + 1, 0); X*************** X*** 785,796 **** X register int i; X X if (CS) { X! putpad(tgoto(CS, bottom, top)); X CapCol = CapLine = 0; X Placur(bottom, 0); X for (i = 0; i < num; i++) X putpad(SF, bottom - top); X! putpad(tgoto(CS, ILI, 0)); X CapCol = CapLine = 0; X } else { X Placur(top, 0); X--- 785,796 ---- X register int i; X X if (CS) { X! putpad(tgoto(CS, bottom, top), 1); X CapCol = CapLine = 0; X Placur(bottom, 0); X for (i = 0; i < num; i++) X putpad(SF, bottom - top); X! putpad(tgoto(CS, ILI, 0), 1); X CapCol = CapLine = 0; X } else { X Placur(top, 0); Xdiff -c ojove/term.c jove/term.c X*** ojove/term.c Thu Jul 16 09:15:21 1987 X--- jove/term.c Wed Jun 3 16:31:57 1987 X*************** X*** 6,11 **** X--- 6,12 ---- X ************************************************************************/ X X #include "jove.h" X+ #include <ctype.h> X #include <errno.h> X #ifdef SYSV X # include <termio.h> X*************** X*** 48,60 **** X *SF, /* Scroll forward */ X *SR, X *SP, /* Send Cursor Position */ X- #ifdef LSRHS X- *RS, /* Reverse video start */ X- *RE, /* Reverse end */ X- #endif X *VB, X *IP, /* insert pad after character inserted */ X! *lPC; X X int LI, X ILI, /* Internal lines, i.e., 23 of LI is 24. */ X--- 49,59 ---- X *SF, /* Scroll forward */ X *SR, X *SP, /* Send Cursor Position */ X *VB, X+ *BL, X *IP, /* insert pad after character inserted */ X! *lPC, X! *NL; X X int LI, X ILI, /* Internal lines, i.e., 23 of LI is 24. */ X*************** X*** 70,103 **** X HOlen, X LLlen; X X! #ifdef SYSV /* release 2, at least */ X! char PC ; X #else X extern char PC; X! #endif SYSV X X static char tspace[256]; X X /* The ordering of ts and meas must agree !! */ X! #ifdef LSRHS X! static char *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCrsrepcip"; X static char **meas[] = { X &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE, X &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM, X &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE, X &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC, X! &RS, &RE, &lPC, &IP, 0 X }; X- #else X- static char *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCpcip"; X- static char **meas[] = { X- &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE, X- &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM, X- &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE, X- &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC, X- &lPC, &IP, 0 X- }; X- #endif X X static X gets(buf) X--- 69,91 ---- X HOlen, X LLlen; X X! #ifdef SYSVR2 /* release 2, at least */ X! char PC; X #else X extern char PC; X! #endif SYSVR2 X X static char tspace[256]; X X /* The ordering of ts and meas must agree !! */ X! static char *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCpcipblnl"; X static char **meas[] = { X &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE, X &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM, X &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE, X &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC, X! &lPC, &IP, &BL, &NL, 0 X }; X X static X gets(buf) X*************** X*** 172,189 **** X X UL = tgetflag("ul"); X X! #ifdef LSRHS /* We, at the high school, are the only ones who X! do SO right in termcap, but unfortunately the X! right SO doesn't look as good with modelines. */ X! if (RS) X! SO = RS; X! if (RE) X! SE = RE; X! /* I only ever use SO for the modeline anyway. */ X X! /* SO is really BOLDFACE! Why is LS always right and the rest of the X! world wrong? */ X! #endif X #ifdef ID_CHAR X disp_opt_init(); X #endif X--- 160,177 ---- X X UL = tgetflag("ul"); X X! if (NL == 0) X! NL = "\n"; X! else { /* strip stupid padding information */ X! while (isdigit(*NL)) X! NL++; X! if (*NL == '*') X! NL++; X! } X X! if (BL == 0) X! BL = "\007"; X! X #ifdef ID_CHAR X disp_opt_init(); X #endif Xdiff -c ojove/termcap.h jove/termcap.h X*** ojove/termcap.h Thu Jul 16 09:15:22 1987 X--- jove/termcap.h Fri May 29 16:28:21 1987 X*************** X*** 36,48 **** X *SF, /* Scroll forward */ X *SR, /* Scroll reverse */ X *SP, /* Send cursor position */ X- #ifdef LSRHS X- *RS, /* reverse video start */ X- *RE, /* reverse video end */ X- #endif X *VB, /* visible bell */ X *IP, /* insert pad after character inserted */ X! *lPC; X X extern int X LI, /* number of lines */ X--- 36,46 ---- X *SF, /* Scroll forward */ X *SR, /* Scroll reverse */ X *SP, /* Send cursor position */ X *VB, /* visible bell */ X+ *BL, /* audible bell */ X *IP, /* insert pad after character inserted */ X! *lPC, X! *NL; /* newline character (usually \n) */ X X extern int X LI, /* number of lines */ Xdiff -c ojove/tune.h jove/tune.h X*** ojove/tune.h Thu Jul 16 09:15:22 1987 X--- jove/tune.h Fri May 29 11:14:40 1987 X*************** X*** 7,17 **** X X #define TUNED /* don't touch this */ X X- /*#define LSRHS /* if this is Lincoln-Sudbury Regional High School */ X /*#define MSDOS /* if this is MSDOS */ X #define BSD4_2 /* Berkeley 4.2 BSD */ X /*#define BSD4_3 /* Berkeley 4.3 BSD */ X /*#define SYSV /* for (System III/System V) UNIX systems */ X #ifdef BSD4_3 X # ifndef BSD4_2 X # define BSD4_2 /* 4.3 is 4.2 only different. */ X--- 7,23 ---- X X #define TUNED /* don't touch this */ X X /*#define MSDOS /* if this is MSDOS */ X #define BSD4_2 /* Berkeley 4.2 BSD */ X /*#define BSD4_3 /* Berkeley 4.3 BSD */ X /*#define SYSV /* for (System III/System V) UNIX systems */ X+ /*#define SYSVR2 /* system 5, rel. 2 */ X+ #ifdef SYSVR2 X+ # ifndef SYSV X+ # define SYSV /* SYSV is a subset of SYSVR2 */ X+ # endif X+ #endif X+ X #ifdef BSD4_3 X # ifndef BSD4_2 X # define BSD4_2 /* 4.3 is 4.2 only different. */ X*************** X*** 36,42 **** X # define NBUF 3 X # endif X # X! /* # define LOAD_AV /* Use the load average for various commands. X # Do not define this if you lack a load average X # system call and kmem is read protected. */ X # X--- 42,48 ---- X # define NBUF 3 X # endif X # X! # define LOAD_AV /* Use the load average for various commands. X # Do not define this if you lack a load average X # system call and kmem is read protected. */ X # X*************** X*** 67,73 **** X # define BIFF /* if you have biff (or the equivalent) */ X # define F_COMPLETION /* filename completion */ X # define CHDIR /* cd command and absolute pathnames */ X! # define KILL0 /* kill(pid, 0) returns 0 if proc exists */ X # define SPELL /* spell words and buffer commands */ X # define ID_CHAR /* include code to IDchar */ X # define WIRED_TERMS /* include code for wired terminals */ X--- 73,79 ---- X # define BIFF /* if you have biff (or the equivalent) */ X # define F_COMPLETION /* filename completion */ X # define CHDIR /* cd command and absolute pathnames */ X! /*# define KILL0 /* kill(pid, 0) returns 0 if proc exists */ X # define SPELL /* spell words and buffer commands */ X # define ID_CHAR /* include code to IDchar */ X # define WIRED_TERMS /* include code for wired terminals */ Xdiff -c ojove/util.c jove/util.c X*** ojove/util.c Thu Jul 16 09:15:24 1987 X--- jove/util.c Fri Jun 19 16:01:01 1987 X*************** X*** 7,17 **** X X #include "jove.h" X #include "ctype.h" X #include <signal.h> X #include <varargs.h> X X! #ifdef SYSV /* release 2, at least */ X! short ospeed ; X #endif X X struct cmd * X--- 7,18 ---- X X #include "jove.h" X #include "ctype.h" X+ #include "termcap.h" X #include <signal.h> X #include <varargs.h> X X! #ifdef SYSVR2 /* release 2, at least */ X! short ospeed; X #endif X X struct cmd * X*************** X*** 27,32 **** X--- 28,34 ---- X } X X int Interactive; /* True when we invoke with the command handler? */ X+ data_obj *LastCmd; X char *ProcFmt = ": %f "; X X ExecCmd(cp) X*************** X*** 56,76 **** X lastline(lp) X register Line *lp; X { X! while (lp->l_next) X! lp = lp->l_next; X return lp; X } X X! Upper(c) X! register int c; X! { X! return (islower(c) ? toupper(c) : c); X! } X X- int alarmed = 0; X- X char key_strokes[100]; X! static char *key_p = key_strokes; X X init_strokes() X { X--- 58,74 ---- X lastline(lp) X register Line *lp; X { X! register Line *next; X! X! while (next = lp->l_next) X! lp = next; X return lp; X } X X! private int *slowp = 0; X X char key_strokes[100]; X! private char *key_p = key_strokes; X X init_strokes() X { X*************** X*** 88,94 **** X X slowpoke() X { X! alarmed++; X f_mess(key_strokes); X } X X--- 86,93 ---- X X slowpoke() X { X! if (slowp) X! *slowp = YES; X f_mess(key_strokes); X } X X*************** X*** 95,104 **** X #ifdef BSD4_2 X # define N_SEC 1 /* will be precisely 1 second on 4.2 */ X #else X! # define N_SEC 2 /* but from 0 to 2 seconds otherwise */ X #endif X X! waitchar() X { X #ifdef EUNICE X return getch(); X--- 94,104 ---- X #ifdef BSD4_2 X # define N_SEC 1 /* will be precisely 1 second on 4.2 */ X #else X! # define N_SEC 2 /* but from 1 to 2 seconds otherwise */ X #endif X X! waitchar(slow) X! int *slow; X { X #ifdef EUNICE X return getch(); X*************** X*** 107,113 **** X int c; X int (*oldproc)(); X X! alarmed = 0; X oldproc = signal(SIGALRM, slowpoke); X X if ((old_time = alarm((unsigned) N_SEC)) == 0) X--- 107,115 ---- X int c; X int (*oldproc)(); X X! slowp = slow; X! if (slow) X! *slow = NO; X oldproc = signal(SIGALRM, slowpoke); X X if ((old_time = alarm((unsigned) N_SEC)) == 0) X*************** X*** 214,220 **** X Eol(); X } X X! int MarkThresh = 22; /* Average screen size ... */ X static int line_diff; X X LineDist(nextp, endp) X--- 216,222 ---- X Eol(); X } X X! int MarkThresh = 22; /* average screen size ... */ X static int line_diff; X X LineDist(nextp, endp) X*************** X*** 255,263 **** X PushPntp(line) X register Line *line; X { X- exp_p = NO; X if (LineDist(curline, line) >= MarkThresh) X! SetMark(); X } X X ToFirst() X--- 257,264 ---- X PushPntp(line) X register Line *line; X { X if (LineDist(curline, line) >= MarkThresh) X! set_mark(); X } X X ToFirst() X*************** X*** 276,282 **** X { X register char c; X X! if (dir > 0) { X while ((c = linebuf[curchar]) != 0 && !isword(c)) X curchar++; X if (eolp()) { X--- 277,283 ---- X { X register char c; X X! if (dir == FORWARD) { X while ((c = linebuf[curchar]) != 0 && !isword(c)) X curchar++; X if (eolp()) { X*************** X*** 319,325 **** X filename(b) X register Buffer *b; X { X! return b->b_fname ? pr_name(b->b_fname) : "[No file]"; X } X X char * X--- 320,326 ---- X filename(b) X register Buffer *b; X { X! return b->b_fname ? pr_name(b->b_fname, YES) : "[No file]"; X } X X char * X*************** X*** 430,436 **** X return 0; X } X X! /* Make `buf' modified and tell the redisplay code to update the modeline X if it will need to be changed. */ X X int ModCount = 0; X--- 431,437 ---- X return 0; X } X X! /* Make `buf' (un)modified and tell the redisplay code to update the modeline X if it will need to be changed. */ X X int ModCount = 0; X*************** X*** 439,447 **** X { X extern int DOLsave; X X! if (!curbuf->b_modified) X UpdModLine++; X! curbuf->b_modified++; X DOLsave++; X if (!Asking) X ModCount++; X--- 440,449 ---- X { X extern int DOLsave; X X! if (!curbuf->b_modified) { X UpdModLine++; X! curbuf->b_modified = YES; X! } X DOLsave++; X if (!Asking) X ModCount++; X*************** X*** 449,457 **** X X unmodify() X { X! if (curbuf->b_modified) X UpdModLine++; X! curbuf->b_modified = 0; X } X X numcomp(s1, s2) X--- 451,460 ---- X X unmodify() X { X! if (curbuf->b_modified) { X UpdModLine++; X! curbuf->b_modified = NO; X! } X } X X numcomp(s1, s2) X*************** X*** 500,506 **** X { X register char *pp, *pp1; X register int len; X! int numchars; /* Number of characters to copy forward */ X X if (num <= 0) X return; X--- 503,509 ---- X { X register char *pp, *pp1; X register int len; X! int numchars; /* number of characters to copy forward */ X X if (num <= 0) X return; X*************** X*** 566,572 **** X char * X emalloc(size) X { X! char *ptr; X X if (ptr = malloc((unsigned) size)) X return ptr; X--- 569,575 ---- X char * X emalloc(size) X { X! register char *ptr; X X if (ptr = malloc((unsigned) size)) X return ptr; X*************** X*** 606,613 **** X } X X #ifdef LOAD_AV X! # ifdef BSD4_2 X! # ifdef PURDUE_EE X X get_la(dp) X double *dp; X--- 609,616 ---- X } X X #ifdef LOAD_AV X! # ifdef BSD4_2 X! # ifdef PURDUE_EE && (vax || gould) X X get_la(dp) X double *dp; X*************** X*** 615,622 **** X *dp = (double) loadav(0) / 100.0; X } X X! # else PURDUE_EE X X #include <nlist.h> X X static struct nlist nl[] = { X--- 618,628 ---- X *dp = (double) loadav(0) / 100.0; X } X X! # else PURDUE_EE X X+ #ifdef sun X+ # include <sys/param.h> X+ #endif X #include <nlist.h> X X static struct nlist nl[] = { X*************** X*** 628,634 **** X--- 634,644 ---- X get_la(dp) X double *dp; X { X+ #ifdef sun X+ long avenrun[3]; X+ #else X double avenrun[3]; X+ #endif X static int kmem = 0; X X if (kmem == -1) { X*************** X*** 644,650 **** X--- 654,664 ---- X } X lseek(kmem, (long) nl[X_AVENRUN].n_value, 0); X read(kmem, (char *) avenrun, sizeof(avenrun)); X+ #ifdef sun X+ *dp = (double) avenrun[0] / FSCALE; X+ #else X *dp = avenrun[0]; X+ #endif X } X X # endif PURDUE_EE X*************** X*** 693,703 **** X strlen(s) X register char *s; X { X! register char *base = s + 1; /* Can you say kludge? */ X X while (*s++) X ; X! return (s - base); X } X X char * X--- 707,717 ---- X strlen(s) X register char *s; X { X! register char *base = s; X X while (*s++) X ; X! return (s - base) - 1; X } X X char * X*************** X*** 719,725 **** X *s2; X { X if (!s1 || !s2) X! return 1; /* Which is not zero ... */ X while (*s1 == *s2++) X if (*s1++ == '\0') X return 0; X--- 733,739 ---- X *s2; X { X if (!s1 || !s2) X! return 1; /* which is not zero ... */ X while (*s1 == *s2++) X if (*s1++ == '\0') X return 0; X*************** X*** 731,738 **** X *s2; X { X if (!s1 || !s2) X! return 1; /* Which is not zero ... */ X! while (*s1 == *s2++ || Upper(*s1) == Upper(s2[-1])) X if (*s1++ == '\0') X return 0; X return (*s1 - *--s2); X--- 745,752 ---- X *s2; X { X if (!s1 || !s2) X! return 1; /* which is not zero ... */ X! while (CharUpcase(*s1) == CharUpcase(*s2++)) X if (*s1++ == '\0') X return 0; X return (*s1 - *--s2); X*************** X*** 744,751 **** X register int n; X { X if (!s1 || !s2) X! return 1; /* Which is not zero ... */ X! while (--n >= 0 && (*s1 == *s2++ || Upper(*s1) == Upper(s2[-1]))) X if (*s1++ == '\0') X return 0; X return ((n < 0) ? 0 : *s1 - *--s2); X--- 758,765 ---- X register int n; X { X if (!s1 || !s2) X! return 1; /* which is not zero ... */ X! while (--n >= 0 && (CharUpcase(*s1) == CharUpcase(*s2++))) X if (*s1++ == '\0') X return 0; X return ((n < 0) ? 0 : *s1 - *--s2); Xdiff -c ojove/vars.c jove/vars.c X*** ojove/vars.c Thu Jul 16 09:15:25 1987 X--- jove/vars.c Thu May 28 12:48:29 1987 X*************** X*** 25,30 **** X--- 25,31 ---- X VARIABLE, "disable-biff", &BiffChk, V_BOOL, X #endif X VARIABLE, "error-window-size", &EWSize, V_BASE10, X+ VARIABLE, "expand-environment-variables", &DoEVexpand, V_BOOL, X VARIABLE, "file-creation-mode", &CreatMode, V_BASE8, X VARIABLE, "files-should-end-with-newline", &EndWNewline, V_BOOL, X VARIABLE, "internal-tabstop", &tabstop, V_BASE10|V_CLRSCREEN, Xdiff -c ojove/version.c jove/version.c X*** ojove/version.c Thu Jul 16 09:15:26 1987 X--- jove/version.c Mon Jun 15 16:26:12 1987 X*************** X*** 5,8 **** X * included in all the files. * X ************************************************************************/ X X! char *version = "4.6.1.4"; X--- 5,8 ---- X * included in all the files. * X ************************************************************************/ X X! char *version = "4.7"; Xdiff -c ojove/wind.c jove/wind.c X*** ojove/wind.c Thu Jul 16 09:15:28 1987 X--- jove/wind.c Fri Jun 12 11:39:26 1987 X*************** X*** 219,225 **** X X DOTsave(&savedot); X X! switch (waitchar()) { X case 't': X case 'T': X ExecCmd((data_obj *) FindCmd(FindTag)); X--- 219,225 ---- X X DOTsave(&savedot); X X! switch (waitchar((int *) 0)) { X case 't': X case 'T': X ExecCmd((data_obj *) FindCmd(FindTag)); X*************** X*** 354,365 **** X X GrowWindow() X { X! WindSize(curwind, abs(exp)); X } X X ShrWindow() X { X! WindSize(curwind, -abs(exp)); X } X X /* Change the size of the window by inc. First arg is the window, X--- 354,365 ---- X X GrowWindow() X { X! WindSize(curwind, abs(arg_value())); X } X X ShrWindow() X { X! WindSize(curwind, -abs(arg_value())); X } X X /* Change the size of the window by inc. First arg is the window, X*************** X*** 434,438 **** X X SplitWind() X { X! SetWind(div_wind(curwind, exp_p ? (exp - 1) : 1)); X } X--- 434,460 ---- X X SplitWind() X { X! SetWind(div_wind(curwind, is_an_arg() ? (arg_value() - 1) : 1)); X! } X! X! /* Goto the window with the named buffer. If no such window X! exists, pop one and attach the buffer to it. */ X! GotoWind() X! { X! extern Buffer *lastbuf; X! char *bname; X! Window *w; X! X! bname = ask_buf(lastbuf); X! w = curwind->w_next; X! do { X! if (w->w_bufp->b_name == bname) { X! SetABuf(curbuf); X! SetWind(w); X! return; X! } X! w = w->w_next; X! } while (w != curwind); X! SetABuf(curbuf); X! pop_wind(bname, NO, -1); X } END_OF_FILE if test 31574 -ne `wc -c <'jove.pch.4'`; then echo shar: \"'jove.pch.4'\" unpacked with wrong size! fi # end of 'jove.pch.4' fi echo shar: End of archive 4 \(of 4\). cp /dev/null ark4isdone MISSING="" for I in 1 2 3 4 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 4 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0