date and time created 83/02/11 15:45:08 by rrh
[unix-history] / usr / src / usr.bin / ex / ex_vmain.c
index 96144f0..f999f0b 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (c) 1980 Regents of the University of California */
-static char *sccsid = "@(#)ex_vmain.c  6.1 %G%";
+/* Copyright (c) 1981 Regents of the University of California */
+static char *sccsid = "@(#)ex_vmain.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"
@@ -19,7 +19,7 @@ vmain()
        register int c, cnt, i;
        char esave[TUBECOLS];
        char *oglobp;
        register int c, cnt, i;
        char esave[TUBECOLS];
        char *oglobp;
-       char d;
+       short d;
        line *addr;
        int ind, nlput;
        int shouldpo = 0;
        line *addr;
        int ind, nlput;
        int shouldpo = 0;
@@ -309,6 +309,10 @@ reread:
                 * ^D           Scroll down.  Like scroll up.
                 */
                case CTRL(d):
                 * ^D           Scroll down.  Like scroll up.
                 */
                case CTRL(d):
+#ifdef TRACE
+               if (trace)
+                       fprintf(trace, "before vdown in ^D, dot=%d, wdot=%d, dol=%d\n", lineno(dot), lineno(wdot), lineno(dol));
+#endif
                        if (hadcnt)
                                vSCROLL = cnt;
                        cnt = vSCROLL;
                        if (hadcnt)
                                vSCROLL = cnt;
                        cnt = vSCROLL;
@@ -318,7 +322,15 @@ reread:
                                ind = 0;
                        vmoving = 0;
                        vdown(cnt, ind, 1);
                                ind = 0;
                        vmoving = 0;
                        vdown(cnt, ind, 1);
+#ifdef TRACE
+               if (trace)
+                       fprintf(trace, "before vnline in ^D, dot=%d, wdot=%d, dol=%d\n", lineno(dot), lineno(wdot), lineno(dol));
+#endif
                        vnline(NOSTR);
                        vnline(NOSTR);
+#ifdef TRACE
+               if (trace)
+                       fprintf(trace, "after vnline in ^D, dot=%d, wdot=%d, dol=%d\n", lineno(dot), lineno(wdot), lineno(dol));
+#endif
                        continue;
 
                /*
                        continue;
 
                /*