summaryrefslogtreecommitdiff
path: root/heredoc.c
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2014-09-02 08:01:39 +0100
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:10 +0100
commita8699a58d8632f21e897ea5c4900a15483a9a8ca (patch)
treefd8e7910807eb91bcd79d498582959f1d750f9c6 /heredoc.c
parentd884971193ef4934424b77ae862e8b0ecf70bab3 (diff)
release: rc-1.7.2
Diffstat (limited to 'heredoc.c')
-rw-r--r--heredoc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/heredoc.c b/heredoc.c
index 922fc12..348dc84 100644
--- a/heredoc.c
+++ b/heredoc.c
@@ -2,6 +2,8 @@
#include "rc.h"
+#include "input.h"
+
struct Hq {
Node *doc;
char *name;
@@ -40,7 +42,7 @@ static char *readheredoc(char *eof) {
bufend = &buf[bufsize]; \
}
for (;;) {
- print_prompt2();
+ nextline();
for (s = (unsigned char *) eof; (c = gchar()) == *s; s++)
;
if (*s == '\0' && (c == '\n' || c == EOF)) {
@@ -142,7 +144,7 @@ extern int qdoc(Node *name, Node *n) {
Hq *new, **prev;
if (name->type != nWord) {
yyerror("eof-marker not a single literal word");
- flushu();
+ skiptonl();
return FALSE;
}
for (prev = &hq; (new = *prev) != NULL; prev = &new->n)