date and time created 83/02/11 15:44:54 by rrh
[unix-history] / usr / src / usr.bin / ex / ex_vops.c
index 21e83ed..c0daf47 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 1979 Regents of the University of California */
+/* Copyright (c) 1981 Regents of the University of California */
+static char *sccsid = "@(#)ex_vops.c   7.2     %G%";
 #include "ex.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
 #include "ex.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
@@ -172,6 +173,7 @@ bool fromvis;
 {
        line *savedot, *savedol;
        char *savecursor;
 {
        line *savedot, *savedol;
        char *savecursor;
+       char savelb[LBSIZE];
        int nlines, more;
        register line *a1, *a2;
        char ch;        /* DEBUG */
        int nlines, more;
        register line *a1, *a2;
        char ch;        /* DEBUG */
@@ -201,6 +203,7 @@ bool fromvis;
                vudump("before vmacchng hairy case");
 #endif
                savedot = dot; savedol = dol; savecursor = cursor;
                vudump("before vmacchng hairy case");
 #endif
                savedot = dot; savedol = dol; savecursor = cursor;
+               CP(savelb, linebuf);
                nlines = dol - zero;
                while ((line *) endcore - truedol < nlines)
                        morelines();
                nlines = dol - zero;
                while ((line *) endcore - truedol < nlines)
                        morelines();
@@ -227,11 +230,12 @@ bool fromvis;
                more = savedol - dol; /* amount we shift everything by */
                if (more)
                        (*(more>0 ? copywR : copyw))(savedol+1, dol+1, truedol-dol);
                more = savedol - dol; /* amount we shift everything by */
                if (more)
                        (*(more>0 ? copywR : copyw))(savedol+1, dol+1, truedol-dol);
-               unddol += more; truedol += more;
+               unddol += more; truedol += more; undap2 += more;
 
                truedol -= nlines;
                copyw(zero+1, truedol+1, nlines);
                dot = savedot; dol = savedol ; cursor = savecursor;
 
                truedol -= nlines;
                copyw(zero+1, truedol+1, nlines);
                dot = savedot; dol = savedol ; cursor = savecursor;
+               CP(linebuf, savelb);
                vch_mac = VC_MANYCHANGE;
 
                /* Arrange that no further undo saving happens within macro */
                vch_mac = VC_MANYCHANGE;
 
                /* Arrange that no further undo saving happens within macro */
@@ -617,7 +621,7 @@ smallchange:
  * you are better off with slowopen.
  */
 voOpen(c, cnt)
  * you are better off with slowopen.
  */
 voOpen(c, cnt)
-       char c;
+       int c;  /* mjm: char --> int */
        register int cnt;
 {
        register int ind = 0, i;
        register int cnt;
 {
        register int ind = 0, i;
@@ -709,7 +713,8 @@ vfilter()
 {
        register line *addr;
        register int cnt;
 {
        register line *addr;
        register int cnt;
-       char *oglobp, d;
+       char *oglobp;
+       short d;
 
        if ((cnt = xdw()) < 0)
                return;
 
        if ((cnt = xdw()) < 0)
                return;