home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume11 / jove.pch / part04 / jove.pch.4
Text File  |  1987-09-15  |  32KB  |  1,414 lines

  1. diff -c ojove/rec.c jove/rec.c
  2. *** ojove/rec.c    Thu Jul 16 09:15:04 1987
  3. --- jove/rec.c    Mon Jul 13 09:46:08 1987
  4. ***************
  5. *** 51,57 ****
  6.       (void) unlink(recfname);
  7.   }
  8.   
  9. ! static
  10.   putaddr(addr, p)
  11.   disk_line    addr;
  12.   register File    *p;
  13. --- 51,57 ----
  14.       (void) unlink(recfname);
  15.   }
  16.   
  17. ! private
  18.   putaddr(addr, p)
  19.   disk_line    addr;
  20.   register File    *p;
  21. ***************
  22. *** 63,69 ****
  23.           putc(*cp++ & 0377, p);
  24.   }
  25.   
  26. ! static
  27.   putn(cp, nbytes)
  28.   register char    *cp;
  29.   register int    nbytes;
  30. --- 63,69 ----
  31.           putc(*cp++ & 0377, p);
  32.   }
  33.   
  34. ! private
  35.   putn(cp, nbytes)
  36.   register char    *cp;
  37.   register int    nbytes;
  38. ***************
  39. *** 74,80 ****
  40.   
  41.   /* Write out the line pointers for buffer B. */
  42.   
  43. ! static
  44.   dmppntrs(b)
  45.   register Buffer    *b;
  46.   {
  47. --- 74,80 ----
  48.   
  49.   /* Write out the line pointers for buffer B. */
  50.   
  51. ! private
  52.   dmppntrs(b)
  53.   register Buffer    *b;
  54.   {
  55. ***************
  56. *** 86,106 ****
  57.   
  58.   /* dump the buffer info and then the actual line pointers. */
  59.   
  60. ! static
  61. ! dmp_buf(b)
  62.   register Buffer    *b;
  63.   {
  64. !     static struct rec_entry    record;
  65.       register Line    *lp;
  66.       register int    nlines = 0;
  67.   
  68.       for (lp = b->b_first; lp != 0; lp = lp->l_next, nlines++)
  69. !         ;
  70.       strcpy(record.r_fname, b->b_fname ? b->b_fname : NullStr);
  71.       strcpy(record.r_bname, b->b_name);
  72.       record.r_nlines = nlines;
  73.       putn((char *) &record, sizeof record);
  74. -     dmppntrs(b);
  75.   }
  76.   
  77.   /* Goes through all the buffers and syncs them to the disk. */
  78. --- 86,107 ----
  79.   
  80.   /* dump the buffer info and then the actual line pointers. */
  81.   
  82. ! private
  83. ! dmp_buf_header(b)
  84.   register Buffer    *b;
  85.   {
  86. !     struct rec_entry    record;
  87.       register Line    *lp;
  88.       register int    nlines = 0;
  89.   
  90.       for (lp = b->b_first; lp != 0; lp = lp->l_next, nlines++)
  91. !         if (lp == b->b_dot)
  92. !             record.r_dotline = nlines;
  93.       strcpy(record.r_fname, b->b_fname ? b->b_fname : NullStr);
  94.       strcpy(record.r_bname, b->b_name);
  95.       record.r_nlines = nlines;
  96. +     record.r_dotchar = b->b_char;
  97.       putn((char *) &record, sizeof record);
  98.   }
  99.   
  100.   /* Goes through all the buffers and syncs them to the disk. */
  101. ***************
  102. *** 110,115 ****
  103. --- 111,117 ----
  104.   SyncRec()
  105.   {
  106.       register Buffer    *b;
  107. +     extern disk_line    DFree;
  108.   
  109.       if (rec_fd == 0)
  110.           recinit();    /* Init recover file. */
  111. ***************
  112. *** 123,128 ****
  113. --- 125,131 ----
  114.               continue;
  115.           else
  116.               Header.Nbuffers++;
  117. +     Header.FreePtr = DFree;
  118.       putn((char *) &Header, sizeof Header);
  119.       if (Header.Nbuffers != 0) {
  120.           SyncTmp();
  121. ***************
  122. *** 130,136 ****
  123.               if (b->b_type == B_SCRATCH || !IsModified(b))
  124.                   continue;
  125.               else
  126. !                 dmp_buf(b);
  127.       }
  128.       flush(rec_out);
  129.   }
  130. --- 133,148 ----
  131.               if (b->b_type == B_SCRATCH || !IsModified(b))
  132.                   continue;
  133.               else
  134. !                 dmp_buf_header(b);
  135. !         for (b = world; b != 0; b = b->b_next)
  136. !             if (b->b_type == B_SCRATCH || !IsModified(b))
  137. !                 continue;
  138. !             else
  139. !                 dmppntrs(b);
  140.       }
  141.       flush(rec_out);
  142. + }
  143. + FullRecover()
  144. + {
  145.   }
  146. diff -c ojove/rec.h jove/rec.h
  147. *** ojove/rec.h    Thu Jul 16 09:15:06 1987
  148. --- jove/rec.h    Thu Mar 19 17:13:30 1987
  149. ***************
  150. *** 6,20 ****
  151.    ************************************************************************/
  152.   
  153.   struct rec_head {
  154. !     int    Uid,        /* Uid of owner. */
  155. !         Pid;        /* Pid of jove process. */
  156. !     time_t    UpdTime;    /* Last time this was updated. */
  157. !     int    Nbuffers;    /* Number of buffers. */
  158.   };
  159.   
  160.   struct rec_entry {
  161.       char    r_bname[128],
  162.           r_fname[128];
  163. !     int    r_nlines;
  164.   };
  165. --- 6,22 ----
  166.    ************************************************************************/
  167.   
  168.   struct rec_head {
  169. !     int        Uid,        /* uid of owner */
  170. !             Pid;        /* pid of jove process */
  171. !     time_t        UpdTime;    /* last time this was updated */
  172. !     int        Nbuffers;    /* number of buffers */
  173. !     disk_line    FreePtr;    /* position of DFree */
  174.   };
  175.   
  176.   struct rec_entry {
  177.       char    r_bname[128],
  178.           r_fname[128];
  179. !     int    r_nlines,
  180. !         r_dotline,    /* so we can really save the context */
  181. !         r_dotchar;
  182.   };
  183. diff -c ojove/recover.c jove/recover.c
  184. *** ojove/recover.c    Thu Jul 16 09:15:12 1987
  185. --- jove/recover.c    Mon Jul 13 12:00:15 1987
  186. ***************
  187. *** 405,414 ****
  188.               printf("recover: cannot create %s.\n", dest);
  189.               return;
  190.           }
  191. -         seekto(src - buflist);
  192.           if (dest != tty)
  193.               printf("\"%s\"", dest);
  194. !         dump_file(outfile);
  195.       } else
  196.           printf("\nAborted!\n");
  197.       fclose(outfile);
  198. --- 405,413 ----
  199.               printf("recover: cannot create %s.\n", dest);
  200.               return;
  201.           }
  202.           if (dest != tty)
  203.               printf("\"%s\"", dest);
  204. !         dump_file(src - buflist, outfile);
  205.       } else
  206.           printf("\nAborted!\n");
  207.       fclose(outfile);
  208. ***************
  209. *** 440,454 ****
  210.   seekto(which)
  211.   {
  212.       struct rec_entry    rec;
  213.   
  214. !     fseek(ptrs_fp, (long) (sizeof Header), L_SET);
  215. !     
  216. !     while (which-- > 1) {
  217. !         read_rec(&rec);
  218. !         if (fseek(ptrs_fp, (long) rec.r_nlines * sizeof (disk_line),
  219. !             L_INCR) == -1)
  220. !             printf("recover: improper fseek!\n");
  221. !     }
  222.   }
  223.   
  224.   makblist()
  225. --- 439,451 ----
  226.   seekto(which)
  227.   {
  228.       struct rec_entry    rec;
  229. +     long    offset;
  230. +     int    i;
  231.   
  232. !     offset = sizeof (Header) + (Header.Nbuffers * sizeof (rec));
  233. !     for (i = 1; i < which; i++)
  234. !         offset += buflist[i]->r_nlines * sizeof (disk_line);
  235. !     fseek(ptrs_fp, offset, L_SET);
  236.   }
  237.   
  238.   makblist()
  239. ***************
  240. *** 455,469 ****
  241.   {
  242.       int    i;
  243.   
  244.       for (i = 1; i <= Header.Nbuffers; i++) {
  245. -         seekto(i);
  246.           if (buflist[i] == 0)
  247.               buflist[i] = (struct rec_entry *) malloc (sizeof (struct rec_entry));
  248.           read_rec(buflist[i]);
  249.       }
  250. !     if (buflist[i]) {
  251.           free((char *) buflist[i]);
  252.           buflist[i] = 0;
  253.       }
  254.   }
  255.   
  256. --- 452,467 ----
  257.   {
  258.       int    i;
  259.   
  260. +     fseek(ptrs_fp, (long) sizeof (Header), L_SET);
  261.       for (i = 1; i <= Header.Nbuffers; i++) {
  262.           if (buflist[i] == 0)
  263.               buflist[i] = (struct rec_entry *) malloc (sizeof (struct rec_entry));
  264.           read_rec(buflist[i]);
  265.       }
  266. !     while (buflist[i]) {
  267.           free((char *) buflist[i]);
  268.           buflist[i] = 0;
  269. +         i++;
  270.       }
  271.   }
  272.   
  273. ***************
  274. *** 481,496 ****
  275.       return addr;
  276.   }
  277.   
  278. ! dump_file(out)
  279.   FILE    *out;
  280.   {
  281. -     struct rec_entry    record;
  282.       register int    nlines;
  283.       register disk_line    daddr;
  284.       char    buf[BUFSIZ];
  285.   
  286. !     read_rec(&record);
  287. !     nlines = record.r_nlines;
  288.       Nchars = Nlines = 0L;
  289.       while (--nlines >= 0) {
  290.           daddr = getaddr(ptrs_fp);
  291. --- 479,493 ----
  292.       return addr;
  293.   }
  294.   
  295. ! dump_file(which, out)
  296.   FILE    *out;
  297.   {
  298.       register int    nlines;
  299.       register disk_line    daddr;
  300.       char    buf[BUFSIZ];
  301.   
  302. !     seekto(which);
  303. !     nlines = buflist[which]->r_nlines;
  304.       Nchars = Nlines = 0L;
  305.       while (--nlines >= 0) {
  306.           daddr = getaddr(ptrs_fp);
  307. ***************
  308. *** 539,549 ****
  309.   #ifdef KILL0
  310.       if (kill(Header.Pid, 0) == 0)
  311.           return 0;
  312. - #else
  313. - #ifdef LSRHS
  314. -     if (pexist(Header.Pid))
  315. -         return 0;
  316. - #endif LSRHS
  317.   #endif KILL0
  318.   
  319.       if (Header.Nbuffers == 0) {
  320. --- 536,541 ----
  321. ***************
  322. *** 568,573 ****
  323. --- 560,566 ----
  324.           return 1;
  325.       }
  326.       makblist();
  327. +     list();
  328.   
  329.       for (;;) {
  330.           tellme("(Type '?' for options): ", answer);
  331. ***************
  332. *** 699,707 ****
  333.           printf("recover: usage: recover [-d directory]\n");
  334.           printf("Use \"recover\" after JOVE has died for some\n");
  335.           printf("unknown reason.\n\n");
  336. !         printf("Use \"recover -syscrash\" when the system is in the process\n");
  337.           printf("of rebooting.  This is done automatically at reboot time\n");
  338.           printf("and so most of you don't have to worry about that.\n\n");
  339.           printf("Use \"recover -d directory\" when the tmp files are store\n");
  340.           printf("in DIRECTORY instead of the default one (/tmp).\n");
  341.           exit(0);
  342. --- 692,701 ----
  343.           printf("recover: usage: recover [-d directory]\n");
  344.           printf("Use \"recover\" after JOVE has died for some\n");
  345.           printf("unknown reason.\n\n");
  346. ! /*        printf("Use \"recover -syscrash\" when the system is in the process\n");
  347.           printf("of rebooting.  This is done automatically at reboot time\n");
  348.           printf("and so most of you don't have to worry about that.\n\n");
  349. +  */
  350.           printf("Use \"recover -d directory\" when the tmp files are store\n");
  351.           printf("in DIRECTORY instead of the default one (/tmp).\n");
  352.           exit(0);
  353. diff -c ojove/screen.c jove/screen.c
  354. *** ojove/screen.c    Thu Jul 16 09:15:18 1987
  355. --- jove/screen.c    Mon Jul 13 08:34:13 1987
  356. ***************
  357. *** 222,231 ****
  358.   
  359.   BufSwrite(linenum)
  360.   {
  361. -     char    *bp;
  362.       register int    n = cursend - cursor,
  363.               col = 0,
  364.               c;
  365.       int    StartCol = DesiredScreen[linenum].s_offset,
  366.           visspace = DesiredScreen[linenum].s_window->w_flags & W_VISSPACE,
  367.           aborted = 0;
  368. --- 222,231 ----
  369.   
  370.   BufSwrite(linenum)
  371.   {
  372.       register int    n = cursend - cursor,
  373.               col = 0,
  374.               c;
  375. +     register char    *bp;
  376.       int    StartCol = DesiredScreen[linenum].s_offset,
  377.           visspace = DesiredScreen[linenum].s_window->w_flags & W_VISSPACE,
  378.           aborted = 0;
  379. ***************
  380. *** 369,376 ****
  381.      What ever turns you on ...   */
  382.   
  383.   private struct cursaddr {
  384. !     int    c_numchars,
  385. !         (*c_proc)();
  386.   };
  387.   
  388.   private char    *Cmstr;
  389. --- 369,376 ----
  390.      What ever turns you on ...   */
  391.   
  392.   private struct cursaddr {
  393. !     int    cm_numchars,
  394. !         (*cm_proc)();
  395.   };
  396.   
  397.   private char    *Cmstr;
  398. ***************
  399. *** 532,538 ****
  400.       register int    nlines = destline - CapLine;
  401.   
  402.       while (--nlines >= 0)
  403. !         putchar('\n');
  404.       CapLine = destline;
  405.   }
  406.   
  407. --- 532,538 ----
  408.       register int    nlines = destline - CapLine;
  409.   
  410.       while (--nlines >= 0)
  411. !         putpad(NL, 1);
  412.       CapLine = destline;
  413.   }
  414.   
  415. ***************
  416. *** 574,580 ****
  417.   
  418.   #define CursMin(which,addrs,max) \
  419.       for (best = 0, cp = &addrs[1], i = 1; i < max; i++, cp++) \
  420. !         if (cp->c_numchars < addrs[best].c_numchars) \
  421.               best = i; \
  422.       which = &addrs[best];
  423.   
  424. --- 574,580 ----
  425.   
  426.   #define CursMin(which,addrs,max) \
  427.       for (best = 0, cp = &addrs[1], i = 1; i < max; i++, cp++) \
  428. !         if (cp->cm_numchars < addrs[best].cm_numchars) \
  429.               best = i; \
  430.       which = &addrs[best];
  431.   
  432. ***************
  433. *** 598,610 ****
  434.   
  435.       if (dcol == 1 || dcol == 0) {        /* Most common case. */
  436.           HorMin = &WarpHor[FORWARD];
  437. !         HorMin->c_numchars = dcol + xtracost;
  438.       } else {
  439. !         WarpHor[FORWARD].c_numchars = dcol >= 0 ? dcol + xtracost : 1000;
  440. !         WarpHor[BACKWARD].c_numchars = dcol < 0 ? -(dcol + xtracost) : 1000;
  441. !         WarpHor[FORTAB].c_numchars = dcol >= 0 && TABS ?
  442.                   ForNum(CapCol, col) + xtracost : 1000;
  443. !         WarpHor[RETFORWARD].c_numchars = (xtracost + 1 + (TABS ? ForNum(0, col) : col));
  444.   
  445.           /* Which is the shortest of the bunch */
  446.   
  447. --- 598,610 ----
  448.   
  449.       if (dcol == 1 || dcol == 0) {        /* Most common case. */
  450.           HorMin = &WarpHor[FORWARD];
  451. !         HorMin->cm_numchars = dcol + xtracost;
  452.       } else {
  453. !         WarpHor[FORWARD].cm_numchars = dcol >= 0 ? dcol + xtracost : 1000;
  454. !         WarpHor[BACKWARD].cm_numchars = dcol < 0 ? -(dcol + xtracost) : 1000;
  455. !         WarpHor[FORTAB].cm_numchars = dcol >= 0 && TABS ?
  456.                   ForNum(CapCol, col) + xtracost : 1000;
  457. !         WarpHor[RETFORWARD].cm_numchars = (xtracost + 1 + (TABS ? ForNum(0, col) : col));
  458.   
  459.           /* Which is the shortest of the bunch */
  460.   
  461. ***************
  462. *** 613,620 ****
  463.   
  464.       /* Moving vertically is more simple. */
  465.   
  466. !     WarpVert[DOWN].c_numchars = dline >= 0 ? dline : 1000;
  467. !     WarpVert[UPMOVE].c_numchars = dline < 0 ? ((-dline) * UPlen) : 1000;
  468.   
  469.       /* Which of these is simpler */
  470.       CursMin(VertMin, WarpVert, NUMVERT);
  471. --- 613,620 ----
  472.   
  473.       /* Moving vertically is more simple. */
  474.   
  475. !     WarpVert[DOWN].cm_numchars = dline >= 0 ? dline : 1000;
  476. !     WarpVert[UPMOVE].cm_numchars = dline < 0 ? ((-dline) * UPlen) : 1000;
  477.   
  478.       /* Which of these is simpler */
  479.       CursMin(VertMin, WarpVert, NUMVERT);
  480. ***************
  481. *** 624,651 ****
  482.          Homing first's total is the sum of the cost of homing
  483.          and the sum of tabbing (if possible) to the right. */
  484.       
  485. !     if (VertMin->c_numchars + HorMin->c_numchars <= 3) {
  486.           DirectMin = &WarpDirect[DIRECT];    /* A dummy ... */
  487. !         DirectMin->c_numchars = 100;
  488.       } else {
  489. !         WarpDirect[DIRECT].c_numchars = CM ?
  490.                   strlen(Cmstr = tgoto(CM, col, line)) : 1000;
  491. !         WarpDirect[HOME].c_numchars = HOlen + line +
  492. !                 WarpHor[RETFORWARD].c_numchars;
  493. !         WarpDirect[LOWER].c_numchars = LLlen + ((ILI - line) * UPlen) +
  494. !                 WarpHor[RETFORWARD].c_numchars;
  495.           CursMin(DirectMin, WarpDirect, NUMDIRECT);
  496.       }
  497.   
  498. !     if (HorMin->c_numchars + VertMin->c_numchars < DirectMin->c_numchars) {
  499.           if (line != CapLine)
  500. !             (*VertMin->c_proc)(line);
  501.           if (col != CapCol) {
  502.   #ifdef ID_CHAR
  503.               if (IN_INSmode)    /* We may use real characters ... */
  504.                   INSmode(0);
  505.   #endif
  506. !             (*HorMin->c_proc)(col);
  507.           }
  508.       } else {
  509.   #ifdef ID_CHAR
  510. --- 624,651 ----
  511.          Homing first's total is the sum of the cost of homing
  512.          and the sum of tabbing (if possible) to the right. */
  513.       
  514. !     if (VertMin->cm_numchars + HorMin->cm_numchars <= 3) {
  515.           DirectMin = &WarpDirect[DIRECT];    /* A dummy ... */
  516. !         DirectMin->cm_numchars = 100;
  517.       } else {
  518. !         WarpDirect[DIRECT].cm_numchars = CM ?
  519.                   strlen(Cmstr = tgoto(CM, col, line)) : 1000;
  520. !         WarpDirect[HOME].cm_numchars = HOlen + line +
  521. !                 WarpHor[RETFORWARD].cm_numchars;
  522. !         WarpDirect[LOWER].cm_numchars = LLlen + ((ILI - line) * UPlen) +
  523. !                 WarpHor[RETFORWARD].cm_numchars;
  524.           CursMin(DirectMin, WarpDirect, NUMDIRECT);
  525.       }
  526.   
  527. !     if (HorMin->cm_numchars + VertMin->cm_numchars < DirectMin->cm_numchars) {
  528.           if (line != CapLine)
  529. !             (*VertMin->cm_proc)(line);
  530.           if (col != CapCol) {
  531.   #ifdef ID_CHAR
  532.               if (IN_INSmode)    /* We may use real characters ... */
  533.                   INSmode(0);
  534.   #endif
  535. !             (*HorMin->cm_proc)(col);
  536.           }
  537.       } else {
  538.   #ifdef ID_CHAR
  539. ***************
  540. *** 652,658 ****
  541.           if (IN_INSmode && !MI)
  542.               INSmode(0);
  543.   #endif
  544. !         (*DirectMin->c_proc)(line, col);
  545.       }
  546.   }
  547.   
  548. --- 652,658 ----
  549.           if (IN_INSmode && !MI)
  550.               INSmode(0);
  551.   #endif
  552. !         (*DirectMin->cm_proc)(line, col);
  553.       }
  554.   }
  555.   
  556. ***************
  557. *** 716,727 ****
  558.       register int    i;
  559.   
  560.       if (CS) {
  561. !         putpad(tgoto(CS, bottom, top));
  562.           CapCol = CapLine = 0;
  563.           Placur(top, 0);
  564.           for (i = 0; i < num; i++)
  565.               putpad(SR, bottom - top);
  566. !         putpad(tgoto(CS, ILI, 0));
  567.           CapCol = CapLine = 0;
  568.       } else {
  569.           Placur(bottom - num + 1, 0);
  570. --- 716,727 ----
  571.       register int    i;
  572.   
  573.       if (CS) {
  574. !         putpad(tgoto(CS, bottom, top), 1);
  575.           CapCol = CapLine = 0;
  576.           Placur(top, 0);
  577.           for (i = 0; i < num; i++)
  578.               putpad(SR, bottom - top);
  579. !         putpad(tgoto(CS, ILI, 0), 1);
  580.           CapCol = CapLine = 0;
  581.       } else {
  582.           Placur(bottom - num + 1, 0);
  583. ***************
  584. *** 785,796 ****
  585.       register int    i;
  586.   
  587.       if (CS) {
  588. !         putpad(tgoto(CS, bottom, top));
  589.           CapCol = CapLine = 0;
  590.           Placur(bottom, 0);
  591.           for (i = 0; i < num; i++)
  592.               putpad(SF, bottom - top);
  593. !         putpad(tgoto(CS, ILI, 0));
  594.           CapCol = CapLine = 0;
  595.       } else {
  596.           Placur(top, 0);
  597. --- 785,796 ----
  598.       register int    i;
  599.   
  600.       if (CS) {
  601. !         putpad(tgoto(CS, bottom, top), 1);
  602.           CapCol = CapLine = 0;
  603.           Placur(bottom, 0);
  604.           for (i = 0; i < num; i++)
  605.               putpad(SF, bottom - top);
  606. !         putpad(tgoto(CS, ILI, 0), 1);
  607.           CapCol = CapLine = 0;
  608.       } else {
  609.           Placur(top, 0);
  610. diff -c ojove/term.c jove/term.c
  611. *** ojove/term.c    Thu Jul 16 09:15:21 1987
  612. --- jove/term.c    Wed Jun  3 16:31:57 1987
  613. ***************
  614. *** 6,11 ****
  615. --- 6,12 ----
  616.    ************************************************************************/
  617.   
  618.   #include "jove.h"
  619. + #include <ctype.h>
  620.   #include <errno.h>
  621.   #ifdef SYSV
  622.   #   include <termio.h>
  623. ***************
  624. *** 48,60 ****
  625.       *SF,    /* Scroll forward */
  626.       *SR,
  627.       *SP,    /* Send Cursor Position */
  628. - #ifdef LSRHS
  629. -     *RS,    /* Reverse video start */
  630. -     *RE,    /* Reverse end */
  631. - #endif
  632.       *VB,
  633.       *IP,    /* insert pad after character inserted */
  634. !     *lPC;
  635.   
  636.   int    LI,
  637.       ILI,    /* Internal lines, i.e., 23 of LI is 24. */
  638. --- 49,59 ----
  639.       *SF,    /* Scroll forward */
  640.       *SR,
  641.       *SP,    /* Send Cursor Position */
  642.       *VB,
  643. +     *BL,
  644.       *IP,    /* insert pad after character inserted */
  645. !     *lPC,
  646. !     *NL;
  647.   
  648.   int    LI,
  649.       ILI,    /* Internal lines, i.e., 23 of LI is 24. */
  650. ***************
  651. *** 70,103 ****
  652.       HOlen,
  653.       LLlen;
  654.   
  655. ! #ifdef SYSV /* release 2, at least */
  656. ! char PC ;
  657.   #else
  658.   extern char    PC;
  659. ! #endif SYSV
  660.   
  661.   static char    tspace[256];
  662.   
  663.   /* The ordering of ts and meas must agree !! */
  664. ! #ifdef LSRHS
  665. ! static char    *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCrsrepcip";
  666.   static char    **meas[] = {
  667.       &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE,
  668.       &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM,
  669.       &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE,
  670.       &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC,
  671. !     &RS, &RE, &lPC, &IP, 0
  672.   };
  673. - #else
  674. - static char    *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCpcip";
  675. - static char    **meas[] = {
  676. -     &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE,
  677. -     &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM,
  678. -     &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE,
  679. -     &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC,
  680. -     &lPC, &IP, 0
  681. - };
  682. - #endif
  683.   
  684.   static
  685.   gets(buf)
  686. --- 69,91 ----
  687.       HOlen,
  688.       LLlen;
  689.   
  690. ! #ifdef SYSVR2 /* release 2, at least */
  691. ! char    PC;
  692.   #else
  693.   extern char    PC;
  694. ! #endif SYSVR2
  695.   
  696.   static char    tspace[256];
  697.   
  698.   /* The ordering of ts and meas must agree !! */
  699. ! static char    *ts="vsvealdlspcssosecmclcehoupbcicimdceillsfsrvbksketiteALDLICDCpcipblnl";
  700.   static char    **meas[] = {
  701.       &VS, &VE, &AL, &DL, &SP, &CS, &SO, &SE,
  702.       &CM, &CL, &CE, &HO, &UP, &BC, &IC, &IM,
  703.       &DC, &EI, &LL, &SF, &SR, &VB, &KS, &KE,
  704.       &TI, &TE, &M_AL, &M_DL, &M_IC, &M_DC,
  705. !     &lPC, &IP, &BL, &NL, 0
  706.   };
  707.   
  708.   static
  709.   gets(buf)
  710. ***************
  711. *** 172,189 ****
  712.   
  713.       UL = tgetflag("ul");
  714.   
  715. ! #ifdef LSRHS        /* We, at the high school, are the only ones who
  716. !                do SO right in termcap, but unfortunately the
  717. !                right SO doesn't look as good with modelines. */
  718. !     if (RS)
  719. !         SO = RS;
  720. !     if (RE)
  721. !         SE = RE;
  722. !             /* I only ever use SO for the modeline anyway. */
  723.   
  724. ! /* SO is really BOLDFACE!  Why is LS always right and the rest of the
  725. !    world wrong? */
  726. ! #endif
  727.   #ifdef ID_CHAR
  728.       disp_opt_init();
  729.   #endif
  730. --- 160,177 ----
  731.   
  732.       UL = tgetflag("ul");
  733.   
  734. !     if (NL == 0)
  735. !         NL = "\n";
  736. !     else {            /* strip stupid padding information */
  737. !         while (isdigit(*NL))
  738. !             NL++;
  739. !         if (*NL == '*')
  740. !             NL++;
  741. !     }
  742.   
  743. !     if (BL == 0)
  744. !         BL = "\007";
  745.   #ifdef ID_CHAR
  746.       disp_opt_init();
  747.   #endif
  748. diff -c ojove/termcap.h jove/termcap.h
  749. *** ojove/termcap.h    Thu Jul 16 09:15:22 1987
  750. --- jove/termcap.h    Fri May 29 16:28:21 1987
  751. ***************
  752. *** 36,48 ****
  753.       *SF,    /* Scroll forward */
  754.       *SR,    /* Scroll reverse */
  755.       *SP,    /* Send cursor position */
  756. - #ifdef LSRHS
  757. -     *RS,    /* reverse video start */
  758. -     *RE,    /* reverse video end */
  759. - #endif
  760.       *VB,    /* visible bell */
  761.       *IP,    /* insert pad after character inserted */
  762. !     *lPC;
  763.   
  764.   extern int
  765.       LI,        /* number of lines */
  766. --- 36,46 ----
  767.       *SF,    /* Scroll forward */
  768.       *SR,    /* Scroll reverse */
  769.       *SP,    /* Send cursor position */
  770.       *VB,    /* visible bell */
  771. +     *BL,    /* audible bell */
  772.       *IP,    /* insert pad after character inserted */
  773. !     *lPC,
  774. !     *NL;    /* newline character (usually \n) */
  775.   
  776.   extern int
  777.       LI,        /* number of lines */
  778. diff -c ojove/tune.h jove/tune.h
  779. *** ojove/tune.h    Thu Jul 16 09:15:22 1987
  780. --- jove/tune.h    Fri May 29 11:14:40 1987
  781. ***************
  782. *** 7,17 ****
  783.   
  784.   #define TUNED        /* don't touch this */
  785.   
  786. - /*#define LSRHS        /* if this is Lincoln-Sudbury Regional High School */
  787.   /*#define MSDOS        /* if this is MSDOS */
  788.   #define BSD4_2        /* Berkeley 4.2 BSD */
  789.   /*#define BSD4_3    /* Berkeley 4.3 BSD */
  790.   /*#define SYSV        /* for (System III/System V) UNIX systems */
  791.   #ifdef BSD4_3
  792.   #   ifndef BSD4_2
  793.   #    define BSD4_2    /* 4.3 is 4.2 only different. */
  794. --- 7,23 ----
  795.   
  796.   #define TUNED        /* don't touch this */
  797.   
  798.   /*#define MSDOS        /* if this is MSDOS */
  799.   #define BSD4_2        /* Berkeley 4.2 BSD */
  800.   /*#define BSD4_3    /* Berkeley 4.3 BSD */
  801.   /*#define SYSV        /* for (System III/System V) UNIX systems */
  802. + /*#define SYSVR2    /* system 5, rel. 2 */
  803. + #ifdef SYSVR2
  804. + #   ifndef SYSV
  805. + #    define SYSV    /* SYSV is a subset of SYSVR2 */
  806. + #   endif
  807. + #endif
  808.   #ifdef BSD4_3
  809.   #   ifndef BSD4_2
  810.   #    define BSD4_2    /* 4.3 is 4.2 only different. */
  811. ***************
  812. *** 36,42 ****
  813.   #    define NBUF    3
  814.   #   endif
  815.   #
  816. ! /* #   define LOAD_AV    /* Use the load average for various commands.
  817.   #               Do not define this if you lack a load average
  818.   #               system call and kmem is read protected. */
  819.   #
  820. --- 42,48 ----
  821.   #    define NBUF    3
  822.   #   endif
  823.   #
  824. ! #   define LOAD_AV    /* Use the load average for various commands.
  825.   #               Do not define this if you lack a load average
  826.   #               system call and kmem is read protected. */
  827.   #
  828. ***************
  829. *** 67,73 ****
  830.   #       define BIFF        /* if you have biff (or the equivalent) */
  831.   #       define F_COMPLETION    /* filename completion */
  832.   #       define CHDIR        /* cd command and absolute pathnames */
  833. ! #       define    KILL0    /* kill(pid, 0) returns 0 if proc exists */
  834.   #       define SPELL        /* spell words and buffer commands */
  835.   #       define ID_CHAR        /* include code to IDchar */
  836.   #       define WIRED_TERMS    /* include code for wired terminals */
  837. --- 73,79 ----
  838.   #       define BIFF        /* if you have biff (or the equivalent) */
  839.   #       define F_COMPLETION    /* filename completion */
  840.   #       define CHDIR        /* cd command and absolute pathnames */
  841. ! /*#       define    KILL0    /* kill(pid, 0) returns 0 if proc exists */
  842.   #       define SPELL        /* spell words and buffer commands */
  843.   #       define ID_CHAR        /* include code to IDchar */
  844.   #       define WIRED_TERMS    /* include code for wired terminals */
  845. diff -c ojove/util.c jove/util.c
  846. *** ojove/util.c    Thu Jul 16 09:15:24 1987
  847. --- jove/util.c    Fri Jun 19 16:01:01 1987
  848. ***************
  849. *** 7,17 ****
  850.   
  851.   #include "jove.h"
  852.   #include "ctype.h"
  853.   #include <signal.h>
  854.   #include <varargs.h>
  855.   
  856. ! #ifdef SYSV /* release 2, at least */
  857. ! short ospeed ;
  858.   #endif
  859.   
  860.   struct cmd *
  861. --- 7,18 ----
  862.   
  863.   #include "jove.h"
  864.   #include "ctype.h"
  865. + #include "termcap.h"
  866.   #include <signal.h>
  867.   #include <varargs.h>
  868.   
  869. ! #ifdef SYSVR2 /* release 2, at least */
  870. ! short    ospeed;
  871.   #endif
  872.   
  873.   struct cmd *
  874. ***************
  875. *** 27,32 ****
  876. --- 28,34 ----
  877.   }
  878.   
  879.   int    Interactive;    /* True when we invoke with the command handler? */
  880. + data_obj    *LastCmd;
  881.   char    *ProcFmt = ": %f ";
  882.   
  883.   ExecCmd(cp)
  884. ***************
  885. *** 56,76 ****
  886.   lastline(lp)
  887.   register Line    *lp;
  888.   {
  889. !     while (lp->l_next)
  890. !         lp = lp->l_next;
  891.       return lp;
  892.   }
  893.   
  894. ! Upper(c)
  895. ! register int    c;
  896. ! {
  897. !     return (islower(c) ? toupper(c) : c);
  898. ! }
  899.   
  900. - int    alarmed = 0;
  901.   char    key_strokes[100];
  902. ! static char    *key_p = key_strokes;
  903.   
  904.   init_strokes()
  905.   {
  906. --- 58,74 ----
  907.   lastline(lp)
  908.   register Line    *lp;
  909.   {
  910. !     register Line    *next;
  911. !     while (next = lp->l_next)
  912. !         lp = next;
  913.       return lp;
  914.   }
  915.   
  916. ! private int    *slowp = 0;
  917.   
  918.   char    key_strokes[100];
  919. ! private char    *key_p = key_strokes;
  920.   
  921.   init_strokes()
  922.   {
  923. ***************
  924. *** 88,94 ****
  925.   
  926.   slowpoke()
  927.   {
  928. !     alarmed++;
  929.       f_mess(key_strokes);
  930.   }
  931.   
  932. --- 86,93 ----
  933.   
  934.   slowpoke()
  935.   {
  936. !     if (slowp)
  937. !         *slowp = YES;
  938.       f_mess(key_strokes);
  939.   }
  940.   
  941. ***************
  942. *** 95,104 ****
  943.   #ifdef BSD4_2
  944.   #    define N_SEC    1    /* will be precisely 1 second on 4.2 */
  945.   #else
  946. ! #    define N_SEC    2    /* but from 0 to 2 seconds otherwise */
  947.   #endif
  948.   
  949. ! waitchar()
  950.   {
  951.   #ifdef EUNICE
  952.       return getch();
  953. --- 94,104 ----
  954.   #ifdef BSD4_2
  955.   #    define N_SEC    1    /* will be precisely 1 second on 4.2 */
  956.   #else
  957. ! #    define N_SEC    2    /* but from 1 to 2 seconds otherwise */
  958.   #endif
  959.   
  960. ! waitchar(slow)
  961. ! int    *slow;
  962.   {
  963.   #ifdef EUNICE
  964.       return getch();
  965. ***************
  966. *** 107,113 ****
  967.       int    c;
  968.       int    (*oldproc)();
  969.   
  970. !     alarmed = 0;
  971.       oldproc = signal(SIGALRM, slowpoke);
  972.   
  973.       if ((old_time = alarm((unsigned) N_SEC)) == 0)
  974. --- 107,115 ----
  975.       int    c;
  976.       int    (*oldproc)();
  977.   
  978. !     slowp = slow;
  979. !     if (slow)
  980. !         *slow = NO;
  981.       oldproc = signal(SIGALRM, slowpoke);
  982.   
  983.       if ((old_time = alarm((unsigned) N_SEC)) == 0)
  984. ***************
  985. *** 214,220 ****
  986.       Eol();
  987.   }
  988.   
  989. ! int    MarkThresh = 22;    /* Average screen size ... */
  990.   static int    line_diff;
  991.   
  992.   LineDist(nextp, endp)
  993. --- 216,222 ----
  994.       Eol();
  995.   }
  996.   
  997. ! int    MarkThresh = 22;    /* average screen size ... */
  998.   static int    line_diff;
  999.   
  1000.   LineDist(nextp, endp)
  1001. ***************
  1002. *** 255,263 ****
  1003.   PushPntp(line)
  1004.   register Line    *line;
  1005.   {
  1006. -     exp_p = NO;
  1007.       if (LineDist(curline, line) >= MarkThresh)
  1008. !         SetMark();
  1009.   }
  1010.   
  1011.   ToFirst()
  1012. --- 257,264 ----
  1013.   PushPntp(line)
  1014.   register Line    *line;
  1015.   {
  1016.       if (LineDist(curline, line) >= MarkThresh)
  1017. !         set_mark();
  1018.   }
  1019.   
  1020.   ToFirst()
  1021. ***************
  1022. *** 276,282 ****
  1023.   {
  1024.       register char    c;
  1025.   
  1026. !     if (dir > 0) {
  1027.           while ((c = linebuf[curchar]) != 0 && !isword(c))
  1028.               curchar++;
  1029.           if (eolp()) {
  1030. --- 277,283 ----
  1031.   {
  1032.       register char    c;
  1033.   
  1034. !     if (dir == FORWARD) {
  1035.           while ((c = linebuf[curchar]) != 0 && !isword(c))
  1036.               curchar++;
  1037.           if (eolp()) {
  1038. ***************
  1039. *** 319,325 ****
  1040.   filename(b)
  1041.   register Buffer    *b;
  1042.   {
  1043. !     return b->b_fname ? pr_name(b->b_fname) : "[No file]";
  1044.   }
  1045.   
  1046.   char *
  1047. --- 320,326 ----
  1048.   filename(b)
  1049.   register Buffer    *b;
  1050.   {
  1051. !     return b->b_fname ? pr_name(b->b_fname, YES) : "[No file]";
  1052.   }
  1053.   
  1054.   char *
  1055. ***************
  1056. *** 430,436 ****
  1057.       return 0;
  1058.   }
  1059.   
  1060. ! /* Make `buf' modified and tell the redisplay code to update the modeline
  1061.      if it will need to be changed. */
  1062.   
  1063.   int    ModCount = 0;
  1064. --- 431,437 ----
  1065.       return 0;
  1066.   }
  1067.   
  1068. ! /* Make `buf' (un)modified and tell the redisplay code to update the modeline
  1069.      if it will need to be changed. */
  1070.   
  1071.   int    ModCount = 0;
  1072. ***************
  1073. *** 439,447 ****
  1074.   {
  1075.       extern int    DOLsave;
  1076.   
  1077. !     if (!curbuf->b_modified)
  1078.           UpdModLine++;
  1079. !     curbuf->b_modified++;
  1080.       DOLsave++;
  1081.       if (!Asking)
  1082.           ModCount++;
  1083. --- 440,449 ----
  1084.   {
  1085.       extern int    DOLsave;
  1086.   
  1087. !     if (!curbuf->b_modified) {
  1088.           UpdModLine++;
  1089. !         curbuf->b_modified = YES;
  1090. !     }
  1091.       DOLsave++;
  1092.       if (!Asking)
  1093.           ModCount++;
  1094. ***************
  1095. *** 449,457 ****
  1096.   
  1097.   unmodify()
  1098.   {
  1099. !     if (curbuf->b_modified)
  1100.           UpdModLine++;
  1101. !     curbuf->b_modified = 0;
  1102.   }
  1103.   
  1104.   numcomp(s1, s2)
  1105. --- 451,460 ----
  1106.   
  1107.   unmodify()
  1108.   {
  1109. !     if (curbuf->b_modified) {
  1110.           UpdModLine++;
  1111. !         curbuf->b_modified = NO;
  1112. !     }
  1113.   }
  1114.   
  1115.   numcomp(s1, s2)
  1116. ***************
  1117. *** 500,506 ****
  1118.   {
  1119.       register char    *pp, *pp1;
  1120.       register int    len;
  1121. !     int    numchars;    /* Number of characters to copy forward */
  1122.   
  1123.       if (num <= 0)
  1124.           return;
  1125. --- 503,509 ----
  1126.   {
  1127.       register char    *pp, *pp1;
  1128.       register int    len;
  1129. !     int    numchars;    /* number of characters to copy forward */
  1130.   
  1131.       if (num <= 0)
  1132.           return;
  1133. ***************
  1134. *** 566,572 ****
  1135.   char *
  1136.   emalloc(size)
  1137.   {
  1138. !     char    *ptr;
  1139.   
  1140.       if (ptr = malloc((unsigned) size))
  1141.           return ptr;
  1142. --- 569,575 ----
  1143.   char *
  1144.   emalloc(size)
  1145.   {
  1146. !     register char    *ptr;
  1147.   
  1148.       if (ptr = malloc((unsigned) size))
  1149.           return ptr;
  1150. ***************
  1151. *** 606,613 ****
  1152.   }
  1153.   
  1154.   #ifdef LOAD_AV
  1155. ! #  ifdef BSD4_2
  1156. ! #    ifdef PURDUE_EE
  1157.   
  1158.   get_la(dp)
  1159.   double *dp;
  1160. --- 609,616 ----
  1161.   }
  1162.   
  1163.   #ifdef LOAD_AV
  1164. ! # ifdef BSD4_2
  1165. ! #   ifdef PURDUE_EE && (vax || gould)
  1166.   
  1167.   get_la(dp)
  1168.   double *dp;
  1169. ***************
  1170. *** 615,622 ****
  1171.       *dp = (double) loadav(0) / 100.0;
  1172.   }
  1173.   
  1174. ! #    else PURDUE_EE
  1175.   
  1176.   #include <nlist.h>
  1177.   
  1178.   static struct    nlist nl[] = {
  1179. --- 618,628 ----
  1180.       *dp = (double) loadav(0) / 100.0;
  1181.   }
  1182.   
  1183. ! #   else PURDUE_EE
  1184.   
  1185. + #ifdef sun
  1186. + #   include <sys/param.h>
  1187. + #endif
  1188.   #include <nlist.h>
  1189.   
  1190.   static struct    nlist nl[] = {
  1191. ***************
  1192. *** 628,634 ****
  1193. --- 634,644 ----
  1194.   get_la(dp)
  1195.   double    *dp;
  1196.   {
  1197. + #ifdef sun
  1198. +     long    avenrun[3];
  1199. + #else
  1200.       double    avenrun[3];
  1201. + #endif
  1202.       static int    kmem = 0;
  1203.   
  1204.       if (kmem == -1) {
  1205. ***************
  1206. *** 644,650 ****
  1207. --- 654,664 ----
  1208.       }
  1209.       lseek(kmem, (long) nl[X_AVENRUN].n_value, 0);
  1210.       read(kmem, (char *) avenrun, sizeof(avenrun));
  1211. + #ifdef sun
  1212. +     *dp = (double) avenrun[0] / FSCALE;
  1213. + #else
  1214.       *dp = avenrun[0];
  1215. + #endif
  1216.   }
  1217.   
  1218.   #    endif PURDUE_EE
  1219. ***************
  1220. *** 693,703 ****
  1221.   strlen(s)
  1222.   register char    *s;
  1223.   {
  1224. !     register char    *base = s + 1;    /* Can you say kludge? */
  1225.   
  1226.       while (*s++)
  1227.           ;
  1228. !     return (s - base);
  1229.   }
  1230.   
  1231.   char *
  1232. --- 707,717 ----
  1233.   strlen(s)
  1234.   register char    *s;
  1235.   {
  1236. !     register char    *base = s;
  1237.   
  1238.       while (*s++)
  1239.           ;
  1240. !     return (s - base) - 1;
  1241.   }
  1242.   
  1243.   char *
  1244. ***************
  1245. *** 719,725 ****
  1246.           *s2;
  1247.   {
  1248.       if (!s1 || !s2)
  1249. !         return 1;    /* Which is not zero ... */
  1250.       while (*s1 == *s2++)
  1251.           if (*s1++ == '\0')
  1252.               return 0;
  1253. --- 733,739 ----
  1254.           *s2;
  1255.   {
  1256.       if (!s1 || !s2)
  1257. !         return 1;    /* which is not zero ... */
  1258.       while (*s1 == *s2++)
  1259.           if (*s1++ == '\0')
  1260.               return 0;
  1261. ***************
  1262. *** 731,738 ****
  1263.           *s2;
  1264.   {
  1265.       if (!s1 || !s2)
  1266. !         return 1;    /* Which is not zero ... */
  1267. !     while (*s1 == *s2++ || Upper(*s1) == Upper(s2[-1]))
  1268.           if (*s1++ == '\0')
  1269.               return 0;
  1270.       return (*s1 - *--s2);
  1271. --- 745,752 ----
  1272.           *s2;
  1273.   {
  1274.       if (!s1 || !s2)
  1275. !         return 1;    /* which is not zero ... */
  1276. !     while (CharUpcase(*s1) == CharUpcase(*s2++))
  1277.           if (*s1++ == '\0')
  1278.               return 0;
  1279.       return (*s1 - *--s2);
  1280. ***************
  1281. *** 744,751 ****
  1282.   register int    n;
  1283.   {
  1284.       if (!s1 || !s2)
  1285. !         return 1;    /* Which is not zero ... */
  1286. !     while (--n >= 0  && (*s1 == *s2++ || Upper(*s1) == Upper(s2[-1])))
  1287.           if (*s1++ == '\0')
  1288.               return 0;
  1289.       return ((n < 0) ? 0 : *s1 - *--s2);
  1290. --- 758,765 ----
  1291.   register int    n;
  1292.   {
  1293.       if (!s1 || !s2)
  1294. !         return 1;    /* which is not zero ... */
  1295. !     while (--n >= 0  && (CharUpcase(*s1) == CharUpcase(*s2++)))
  1296.           if (*s1++ == '\0')
  1297.               return 0;
  1298.       return ((n < 0) ? 0 : *s1 - *--s2);
  1299. diff -c ojove/vars.c jove/vars.c
  1300. *** ojove/vars.c    Thu Jul 16 09:15:25 1987
  1301. --- jove/vars.c    Thu May 28 12:48:29 1987
  1302. ***************
  1303. *** 25,30 ****
  1304. --- 25,31 ----
  1305.       VARIABLE, "disable-biff", &BiffChk, V_BOOL,
  1306.   #endif
  1307.       VARIABLE, "error-window-size", &EWSize, V_BASE10,
  1308. +     VARIABLE, "expand-environment-variables", &DoEVexpand, V_BOOL,
  1309.       VARIABLE, "file-creation-mode", &CreatMode, V_BASE8,
  1310.       VARIABLE, "files-should-end-with-newline", &EndWNewline, V_BOOL,
  1311.       VARIABLE, "internal-tabstop", &tabstop, V_BASE10|V_CLRSCREEN,
  1312. diff -c ojove/version.c jove/version.c
  1313. *** ojove/version.c    Thu Jul 16 09:15:26 1987
  1314. --- jove/version.c    Mon Jun 15 16:26:12 1987
  1315. ***************
  1316. *** 5,8 ****
  1317.    * included in all the files.                                           *
  1318.    ************************************************************************/
  1319.   
  1320. ! char    *version = "4.6.1.4";
  1321. --- 5,8 ----
  1322.    * included in all the files.                                           *
  1323.    ************************************************************************/
  1324.   
  1325. ! char    *version = "4.7";
  1326. diff -c ojove/wind.c jove/wind.c
  1327. *** ojove/wind.c    Thu Jul 16 09:15:28 1987
  1328. --- jove/wind.c    Fri Jun 12 11:39:26 1987
  1329. ***************
  1330. *** 219,225 ****
  1331.   
  1332.       DOTsave(&savedot);
  1333.   
  1334. !     switch (waitchar()) {
  1335.       case 't':
  1336.       case 'T':
  1337.           ExecCmd((data_obj *) FindCmd(FindTag));
  1338. --- 219,225 ----
  1339.   
  1340.       DOTsave(&savedot);
  1341.   
  1342. !     switch (waitchar((int *) 0)) {
  1343.       case 't':
  1344.       case 'T':
  1345.           ExecCmd((data_obj *) FindCmd(FindTag));
  1346. ***************
  1347. *** 354,365 ****
  1348.   
  1349.   GrowWindow()
  1350.   {
  1351. !     WindSize(curwind, abs(exp));
  1352.   }
  1353.   
  1354.   ShrWindow()
  1355.   {
  1356. !     WindSize(curwind, -abs(exp));
  1357.   }
  1358.   
  1359.   /* Change the size of the window by inc.  First arg is the window,
  1360. --- 354,365 ----
  1361.   
  1362.   GrowWindow()
  1363.   {
  1364. !     WindSize(curwind, abs(arg_value()));
  1365.   }
  1366.   
  1367.   ShrWindow()
  1368.   {
  1369. !     WindSize(curwind, -abs(arg_value()));
  1370.   }
  1371.   
  1372.   /* Change the size of the window by inc.  First arg is the window,
  1373. ***************
  1374. *** 434,438 ****
  1375.   
  1376.   SplitWind()
  1377.   {
  1378. !     SetWind(div_wind(curwind, exp_p ? (exp - 1) : 1));
  1379.   }
  1380. --- 434,460 ----
  1381.   
  1382.   SplitWind()
  1383.   {
  1384. !     SetWind(div_wind(curwind, is_an_arg() ? (arg_value() - 1) : 1));
  1385. ! }
  1386. ! /* Goto the window with the named buffer.  If no such window
  1387. !    exists, pop one and attach the buffer to it. */
  1388. ! GotoWind()
  1389. ! {
  1390. !     extern Buffer    *lastbuf;
  1391. !     char    *bname;
  1392. !     Window    *w;
  1393. !     bname = ask_buf(lastbuf);
  1394. !     w = curwind->w_next;
  1395. !     do {
  1396. !         if (w->w_bufp->b_name == bname) {
  1397. !             SetABuf(curbuf);
  1398. !             SetWind(w);
  1399. !             return;
  1400. !         }
  1401. !         w = w->w_next;
  1402. !     } while (w != curwind);
  1403. !     SetABuf(curbuf);
  1404. !     pop_wind(bname, NO, -1);
  1405.   }
  1406.