backout fix from sun and terminate input buffer
[unix-history] / usr / src / usr.bin / ex / ex_addr.c
index 5621e5e..d6cd3f6 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_addr.c   7.1     %G%";
 #include "ex.h"
 #include "ex_re.h"
 
 #include "ex.h"
 #include "ex_re.h"
 
@@ -192,9 +193,12 @@ address(inline)
                        addr = dot;
                        if (inline && execute(0, dot)) {
                                if (c == '/') {
                        addr = dot;
                        if (inline && execute(0, dot)) {
                                if (c == '/') {
-                                       while (loc1 <= inline)
+                                       while (loc1 <= inline) {
+                                               if (loc1 == loc2)
+                                                       loc2++;
                                                if (!execute(1))
                                                        goto nope;
                                                if (!execute(1))
                                                        goto nope;
+                                       }
                                        break;
                                } else if (loc1 < inline) {
                                        char *last;
                                        break;
                                } else if (loc1 < inline) {
                                        char *last;
@@ -202,6 +206,8 @@ doques:
 
                                        do {
                                                last = loc1;
 
                                        do {
                                                last = loc1;
+                                               if (loc1 == loc2)
+                                                       loc2++;
                                                if (!execute(1))
                                                        break;
                                        } while (loc1 < inline);
                                                if (!execute(1))
                                                        break;
                                        } while (loc1 < inline);