summaryrefslogtreecommitdiff
path: root/command.h~
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-07 09:29:49 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-07 09:29:49 -0500
commite77a3058b64e2135ee0b1f244a7ce412a912f23c (patch)
treedfeb5095e7b382f771b9649a949c6a4e8df3674d /command.h~
parent10a4e4150a80cea016284e7fd9e7f6ee493cbb8a (diff)
downloadbash-e77a3058b64e2135ee0b1f244a7ce412a912f23c.tar.gz
commit bash-20081002 snapshot
Diffstat (limited to 'command.h~')
-rw-r--r--command.h~51
1 files changed, 36 insertions, 15 deletions
diff --git a/command.h~ b/command.h~
index 46e5bda9..5d77c7a1 100644
--- a/command.h~
+++ b/command.h~
@@ -1,23 +1,23 @@
/* command.h -- The structures used internally to represent commands, and
the extern declarations of the functions used to create them. */
-/* Copyright (C) 1993-2005 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
- Bash is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2, or (at your option) any later
- version.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- Bash is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with Bash; see the file COPYING. If not, write to the Free Software
- Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
#if !defined (_COMMAND_H_)
#define _COMMAND_H_
@@ -66,7 +66,7 @@ enum r_instruction {
/* Command Types: */
enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
cm_connection, cm_function_def, cm_until, cm_group,
- cm_arith, cm_cond, cm_arith_for, cm_subshell };
+ cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc };
/* Possible values for the `flags' field of a WORD_DESC. */
#define W_HASDOLLAR 0x000001 /* Dollar sign present. */
@@ -162,6 +162,8 @@ typedef struct element {
#define CMD_AMPERSAND 0x200 /* command & */
#define CMD_STDIN_REDIR 0x400 /* async command needs implicit </dev/null */
#define CMD_COMMAND_BUILTIN 0x0800 /* command executed by `command' builtin */
+#define CMD_COPROC_SUBSHELL 0x1000
+#define CMD_NOERREXIT 0x2000 /* Don't exit even if errexit set */
/* What a command looks like. */
typedef struct command {
@@ -191,6 +193,7 @@ typedef struct command {
struct arith_for_com *ArithFor;
#endif
struct subshell_com *Subshell;
+ struct coproc_com *Coproc;
} value;
} COMMAND;
@@ -205,8 +208,8 @@ typedef struct connection {
/* Structures used to represent the CASE command. */
/* Values for FLAGS word in a PATTERN_LIST */
-#define CASEPAT_FALLTHROUGH 0x01
-#define CASEPAT_TESTNEXT 0x02
+#define CASEPAT_FALLTHROUGH 0x01
+#define CASEPAT_TESTNEXT 0x02
/* Pattern/action structure for CASE_COM. */
typedef struct pattern_list {
@@ -332,7 +335,25 @@ typedef struct subshell_com {
COMMAND *command;
} SUBSHELL_COM;
+typedef struct coproc {
+ char *c_name;
+ pid_t c_pid;
+ int c_rfd;
+ int c_wfd;
+ int c_rsave;
+ int c_wsave;
+ int c_flags;
+ int c_status;
+} Coproc;
+
+typedef struct coproc_com {
+ int flags;
+ char *name;
+ COMMAND *command;
+} COPROC_COM;
+
extern COMMAND *global_command;
+extern Coproc sh_coproc;
/* Possible command errors */
#define CMDERR_DEFAULT 0