summaryrefslogtreecommitdiff
path: root/make_cmd.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
committerChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
commitd233b485e83c3a784b803fb894280773f16f2deb (patch)
tree16d51f3ccca2d4ad2d8f2da564d68ca848de595b /make_cmd.c
parent64447609994bfddeef1061948022c074093e9a9f (diff)
downloadbash-d233b485e83c3a784b803fb894280773f16f2deb.tar.gz
bash-5.0 distribution sources and documentationbash-5.0
Diffstat (limited to 'make_cmd.c')
-rw-r--r--make_cmd.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/make_cmd.c b/make_cmd.c
index b42e9ff1..ecbbfd6e 100644
--- a/make_cmd.c
+++ b/make_cmd.c
@@ -1,7 +1,7 @@
/* make_cmd.c -- Functions for making instances of the various
parser constructs. */
-/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2018 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -34,19 +34,11 @@
#include "bashintl.h"
+#include "shell.h"
+#include "execute_cmd.h"
#include "parser.h"
-#include "syntax.h"
-#include "command.h"
-#include "general.h"
-#include "error.h"
#include "flags.h"
-#include "make_cmd.h"
-#include "dispose_cmd.h"
-#include "variables.h"
-#include "subst.h"
#include "input.h"
-#include "ocache.h"
-#include "externs.h"
#if defined (JOB_CONTROL)
#include "jobs.h"
@@ -54,10 +46,6 @@
#include "shmbutil.h"
-extern int line_number, current_command_line_count, parser_state;
-extern int last_command_exit_value;
-extern int shell_initialized;
-
int here_doc_first_line = 0;
/* Object caching */
@@ -805,7 +793,7 @@ make_function_def (name, command, lineno, lstart)
temp->source_file = shell_initialized ? "main" : "environment";
#if defined (DEBUGGER)
- bind_function_def (name->word, temp);
+ bind_function_def (name->word, temp, 0);
#endif
temp->source_file = temp->source_file ? savestring (temp->source_file) : 0;
@@ -822,6 +810,7 @@ make_subshell_command (command)
temp = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM));
temp->command = command;
temp->flags = CMD_WANT_SUBSHELL;
+ temp->line = line_number;
return (make_command (cm_subshell, (SIMPLE_COM *)temp));
}