summaryrefslogtreecommitdiff
path: root/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lex.c b/lex.c
index b53ae09..09add71 100644
--- a/lex.c
+++ b/lex.c
@@ -99,8 +99,8 @@ extern int yylex() {
meta = (dollar ? dnw : nw);
dollar = FALSE;
if (newline) {
- --lineno; /* slight space optimization; print_prompt2() always increments lineno */
- print_prompt2();
+ --lineno; /* slight space optimization; nextline() always increments lineno */
+ nextline();
newline = FALSE;
}
top: while ((c = gchar()) == ' ' || c == '\t')
@@ -120,7 +120,7 @@ top: while ((c = gchar()) == ' ' || c == '\t')
} while ((c = gchar()) != EOF && !meta[(unsigned char) c]);
while (c == '\\') {
if ((c = gchar()) == '\n') {
- print_prompt2();
+ nextline();
c = ' '; /* Pretend a space was read */
break;
} else {
@@ -198,7 +198,7 @@ top: while ((c = gchar()) == ' ' || c == '\t')
while ((c = gchar()) != '\'' || (c = gchar()) == '\'') {
buf[i++] = c;
if (c == '\n')
- print_prompt2();
+ nextline();
if (c == EOF) {
w = NW;
scanerror("eof in quoted string");
@@ -215,7 +215,7 @@ top: while ((c = gchar()) == ' ' || c == '\t')
return WORD;
case '\\':
if ((c = gchar()) == '\n') {
- print_prompt2();
+ nextline();
goto top; /* Pretend it was just another space. */
}
ugchar(c);