Bill added more buffers, and I put in sccs.
[unix-history] / usr / src / usr.bin / ex / ex_get.c
index 4d19535..bfb0e82 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 1979 Regents of the University of California */
+/* Copyright (c) 1980 Regents of the University of California */
+static char *sccsid = "@(#)ex_get.c    4.2 %G%";
 #include "ex.h"
 #include "ex_tty.h"
 
 #include "ex.h"
 #include "ex_tty.h"
 
@@ -12,11 +13,7 @@ short        lastc = '\n';
 
 ignchar()
 {
 
 ignchar()
 {
-       register int c;
-
-       do
-               c = getcd();
-       while (c == CTRL(d));
+       ignore(getchar());
 }
 
 getchar()
 }
 
 getchar()
@@ -25,7 +22,7 @@ getchar()
 
        do
                c = getcd();
 
        do
                c = getcd();
-       while (c == CTRL(d));
+       while (!globp && c == CTRL(d));
        return (c);
 }
 
        return (c);
 }
 
@@ -39,7 +36,7 @@ again:
                return (c);
        c &= TRIM;
        if (!inopen)
                return (c);
        c &= TRIM;
        if (!inopen)
-               if (c == CTRL(d))
+               if (!globp && c == CTRL(d))
                        setlastchar('\n');
                else if (junk(c)) {
                        checkjunk(c);
                        setlastchar('\n');
                else if (junk(c)) {
                        checkjunk(c);