Flush out the last dregs in the terminal before quitting when
[unix-history] / usr / src / usr.bin / ex / ex_addr.c
index 4331330..1fb6703 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)ex_addr.c  7.2 (Berkeley) %G%";
+static char *sccsid = "@(#)ex_addr.c   7.5 (Berkeley) %G%";
 #endif not lint
 
 #include "ex.h"
 #endif not lint
 
 #include "ex.h"
@@ -88,7 +88,7 @@ getnum()
        register int cnt;
 
        for (cnt = 0; isdigit(peekcd());)
        register int cnt;
 
        for (cnt = 0; isdigit(peekcd());)
-               cnt = cnt * 10 + getchar() - '0';
+               cnt = cnt * 10 + ex_getchar() - '0';
        return (cnt);
 }
 
        return (cnt);
 }
 
@@ -132,8 +132,8 @@ setnoaddr()
  * than the number of lines in the file.
  */
 line *
  * than the number of lines in the file.
  */
 line *
-address(inline)
-       char *inline;
+address(inputline)
+       char *inputline;
 {
        register line *addr;
        register int offset, c;
 {
        register line *addr;
        register int offset, c;
@@ -199,16 +199,16 @@ address(inline)
                        notempty();
                        savere(scanre);
                        addr = dot;
                        notempty();
                        savere(scanre);
                        addr = dot;
-                       if (inline && execute(0, dot)) {
+                       if (inputline && execute(0, dot)) {
                                if (c == '/') {
                                if (c == '/') {
-                                       while (loc1 <= inline) {
+                                       while (loc1 <= inputline) {
                                                if (loc1 == loc2)
                                                        loc2++;
                                                if (!execute(1))
                                                        goto nope;
                                        }
                                        break;
                                                if (loc1 == loc2)
                                                        loc2++;
                                                if (!execute(1))
                                                        goto nope;
                                        }
                                        break;
-                               } else if (loc1 < inline) {
+                               } else if (loc1 < inputline) {
                                        char *last;
 doques:
 
                                        char *last;
 doques:
 
@@ -218,7 +218,7 @@ doques:
                                                        loc2++;
                                                if (!execute(1))
                                                        break;
                                                        loc2++;
                                                if (!execute(1))
                                                        break;
-                                       } while (loc1 < inline);
+                                       } while (loc1 < inputline);
                                        loc1 = last;
                                        break;
                                }
                                        loc1 = last;
                                        break;
                                }
@@ -241,8 +241,8 @@ error("No match to TOP|Address search hit TOP without matching pattern");
                                        }
                                }
                                if (execute(0, addr)) {
                                        }
                                }
                                if (execute(0, addr)) {
-                                       if (inline && c == '?') {
-                                               inline = &linebuf[LBSIZE];
+                                       if (inputline && c == '?') {
+                                               inputline = &linebuf[LBSIZE];
                                                goto doques;
                                        }
                                        break;
                                                goto doques;
                                        }
                                        break;
@@ -261,7 +261,7 @@ error("No match to TOP|Address search hit TOP without matching pattern");
                        continue;
 
                case '\'':
                        continue;
 
                case '\'':
-                       c = markreg(getchar());
+                       c = markreg(ex_getchar());
                        if (c == 0)
                                error("Marks are ' and a-z");
                        addr = getmark(c);
                        if (c == 0)
                                error("Marks are ' and a-z");
                        addr = getmark(c);