summaryrefslogtreecommitdiff
path: root/make_cmd.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:25:28 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:25:28 -0500
commit09767ff09d0d1c3202881d3a09325f5ddbfceb1b (patch)
treeb16d7697c61c9689a7b63ba2e2239844d3e4c230 /make_cmd.c
parentfdf670eaa19e905943e34b770824faa76e94032c (diff)
downloadbash-09767ff09d0d1c3202881d3a09325f5ddbfceb1b.tar.gz
commit bash-20080703 snapshot
Diffstat (limited to 'make_cmd.c')
-rw-r--r--make_cmd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/make_cmd.c b/make_cmd.c
index 98808e9d..ec649411 100644
--- a/make_cmd.c
+++ b/make_cmd.c
@@ -647,6 +647,9 @@ make_here_document (temp, lineno)
document_index += len;
}
+ if (full_line == 0)
+ internal_warning (_("here-document at line %d delimited by end-of-file (wanted `%s')"), lineno, redir_word);
+
document_done:
if (document)
document[document_index] = '\0';
@@ -793,6 +796,20 @@ make_subshell_command (command)
return (make_command (cm_subshell, (SIMPLE_COM *)temp));
}
+COMMAND *
+make_coproc_command (name, command)
+ char *name;
+ COMMAND *command;
+{
+ COPROC_COM *temp;
+
+ temp = (COPROC_COM *)xmalloc (sizeof (COPROC_COM));
+ temp->name = savestring (name);
+ temp->command = command;
+ temp->flags = CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ return (make_command (cm_coproc, (SIMPLE_COM *)temp));
+}
+
/* Reverse the word list and redirection list in the simple command
has just been parsed. It seems simpler to do this here the one
time then by any other method that I can think of. */