Bash  5.0-beta2
Bash - Bourne Again shell
command.h File Reference
#include "stdc.h"

Go to the source code of this file.

Data Structures

struct  word_desc
 
struct  word_list
 
union  REDIRECTEE
 
struct  redirect
 
struct  element
 
struct  command
 
struct  connection
 
struct  pattern_list
 
struct  case_com
 
struct  for_com
 
struct  if_com
 
struct  while_com
 
struct  cond_com
 
struct  simple_com
 
struct  function_def
 
struct  group_com
 
struct  subshell_com
 
struct  coproc
 
struct  coproc_com
 
union  command.value
 

Macros

#define REDIR_VARASSIGN   0x01
 
#define AMBIGUOUS_REDIRECT   -1
 
#define NOCLOBBER_REDIRECT   -2
 
#define RESTRICTED_REDIRECT   -3 /* can only happen in restricted shells. */
 
#define HEREDOC_REDIRECT   -4 /* here-doc temp file can't be created */
 
#define BADVAR_REDIRECT   -5 /* something wrong with {varname}redir */
 
#define CLOBBERING_REDIRECT(ri)   (ri == r_output_direction || ri == r_err_and_out)
 
#define OUTPUT_REDIRECT(ri)   (ri == r_output_direction || ri == r_input_output || ri == r_err_and_out || ri == r_append_err_and_out)
 
#define INPUT_REDIRECT(ri)   (ri == r_input_direction || ri == r_inputa_direction || ri == r_input_output)
 
#define WRITE_REDIRECT(ri)
 
#define TRANSLATE_REDIRECT(ri)
 
#define W_HASDOLLAR   0x000001 /* Dollar sign present. */
 
#define W_QUOTED   0x000002 /* Some form of quote character is present. */
 
#define W_ASSIGNMENT   0x000004 /* This word is a variable assignment. */
 
#define W_SPLITSPACE   0x000008 /* Split this word on " " regardless of IFS */
 
#define W_NOSPLIT   0x000010 /* Do not perform word splitting on this word because ifs is empty string. */
 
#define W_NOGLOB   0x000020 /* Do not perform globbing on this word. */
 
#define W_NOSPLIT2   0x000040 /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */
 
#define W_TILDEEXP   0x000080 /* Tilde expand this assignment word */
 
#define W_DOLLARAT   0x000100 /* $@ and its special handling */
 
#define W_DOLLARSTAR   0x000200 /* $* and its special handling */
 
#define W_NOCOMSUB   0x000400 /* Don't perform command substitution on this word */
 
#define W_ASSIGNRHS   0x000800 /* Word is rhs of an assignment statement */
 
#define W_NOTILDE   0x001000 /* Don't perform tilde expansion on this word */
 
#define W_ITILDE   0x002000 /* Internal flag for word expansion */
 
#define W_NOEXPAND   0x004000 /* Don't expand at all -- do quote removal */
 
#define W_COMPASSIGN   0x008000 /* Compound assignment */
 
#define W_ASSNBLTIN   0x010000 /* word is a builtin command that takes assignments */
 
#define W_ASSIGNARG   0x020000 /* word is assignment argument to command */
 
#define W_HASQUOTEDNULL   0x040000 /* word contains a quoted null character */
 
#define W_DQUOTE   0x080000 /* word should be treated as if double-quoted */
 
#define W_NOPROCSUB   0x100000 /* don't perform process substitution */
 
#define W_SAWQUOTEDNULL   0x200000 /* word contained a quoted null that was removed */
 
#define W_ASSIGNASSOC   0x400000 /* word looks like associative array assignment */
 
#define W_ASSIGNARRAY   0x800000 /* word looks like a compound indexed array assignment */
 
#define W_ARRAYIND   0x1000000 /* word is an array index being expanded */
 
#define W_ASSNGLOBAL   0x2000000 /* word is a global assignment to declare (declare/typeset -g) */
 
#define W_NOBRACE   0x4000000 /* Don't perform brace expansion */
 
#define W_COMPLETE   0x8000000 /* word is being expanded for completion */
 
#define W_CHKLOCAL   0x10000000 /* check for local vars on assignment */
 
#define W_NOASSNTILDE   0x20000000 /* don't do tilde expansion like an assignment statement */
 
#define PF_NOCOMSUB   0x01 /* Do not perform command substitution */
 
#define PF_IGNUNBOUND   0x02 /* ignore unbound vars even if -u set */
 
#define PF_NOSPLIT2   0x04 /* same as W_NOSPLIT2 */
 
#define PF_ASSIGNRHS   0x08 /* same as W_ASSIGNRHS */
 
#define PF_COMPLETE   0x10 /* same as W_COMPLETE, sets SX_COMPLETE */
 
#define SUBSHELL_ASYNC   0x01 /* subshell caused by `command &' */
 
#define SUBSHELL_PAREN   0x02 /* subshell caused by ( ... ) */
 
#define SUBSHELL_COMSUB   0x04 /* subshell caused by `command` or $(command) */
 
#define SUBSHELL_FORK   0x08 /* subshell caused by executing a disk command */
 
#define SUBSHELL_PIPE   0x10 /* subshell from a pipeline element */
 
#define SUBSHELL_PROCSUB   0x20 /* subshell caused by <(command) or >(command) */
 
#define SUBSHELL_COPROC   0x40 /* subshell from a coproc pipeline */
 
#define SUBSHELL_RESETTRAP   0x80 /* subshell needs to reset trap strings on first call to trap */
 
#define CMD_WANT_SUBSHELL   0x01 /* User wants a subshell: ( command ) */
 
#define CMD_FORCE_SUBSHELL   0x02 /* Shell needs to force a subshell. */
 
#define CMD_INVERT_RETURN   0x04 /* Invert the exit value. */
 
#define CMD_IGNORE_RETURN   0x08 /* Ignore the exit value. For set -e. */
 
#define CMD_NO_FUNCTIONS   0x10 /* Ignore functions during command lookup. */
 
#define CMD_INHIBIT_EXPANSION   0x20 /* Do not expand the command words. */
 
#define CMD_NO_FORK   0x40 /* Don't fork; just call execve */
 
#define CMD_TIME_PIPELINE   0x80 /* Time a pipeline */
 
#define CMD_TIME_POSIX   0x100 /* time -p; use POSIX.2 time output spec. */
 
#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_LASTPIPE   0x2000
 
#define CMD_STDPATH   0x4000 /* use standard path for command lookup */
 
#define CASEPAT_FALLTHROUGH   0x01
 
#define CASEPAT_TESTNEXT   0x02
 
#define COND_AND   1
 
#define COND_OR   2
 
#define COND_UNARY   3
 
#define COND_BINARY   4
 
#define COND_TERM   5
 
#define COND_EXPR   6
 
#define COPROC_RUNNING   0x01
 
#define COPROC_DEAD   0x02
 
#define CMDERR_DEFAULT   0
 
#define CMDERR_BADTYPE   1
 
#define CMDERR_BADCONN   2
 
#define CMDERR_BADJUMP   3
 
#define CMDERR_LAST   3
 

Typedefs

typedef struct word_desc WORD_DESC
 
typedef struct word_list WORD_LIST
 
typedef struct redirect REDIRECT
 
typedef struct element ELEMENT
 
typedef struct command COMMAND
 
typedef struct connection CONNECTION
 
typedef struct pattern_list PATTERN_LIST
 
typedef struct case_com CASE_COM
 
typedef struct for_com FOR_COM
 
typedef struct if_com IF_COM
 
typedef struct while_com WHILE_COM
 
typedef struct cond_com COND_COM
 
typedef struct simple_com SIMPLE_COM
 
typedef struct function_def FUNCTION_DEF
 
typedef struct group_com GROUP_COM
 
typedef struct subshell_com SUBSHELL_COM
 
typedef struct coproc Coproc
 
typedef struct coproc_com COPROC_COM
 

Enumerations

enum  r_instruction {
  r_output_direction, r_input_direction, r_inputa_direction, r_appending_to,
  r_reading_until, r_reading_string, r_duplicating_input, r_duplicating_output,
  r_deblank_reading_until, r_close_this, r_err_and_out, r_input_output,
  r_output_force, r_duplicating_input_word, r_duplicating_output_word, r_move_input,
  r_move_output, r_move_input_word, r_move_output_word, r_append_err_and_out
}
 
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_coproc
}
 

Functions

FUNCTION_DEF *copy_function_def_contents __P ((FUNCTION_DEF *, FUNCTION_DEF *))
 
FUNCTION_DEF *copy_function_def __P ((FUNCTION_DEF *))
 
WORD_DESC *copy_word __P ((WORD_DESC *))
 
WORD_LIST *copy_word_list __P ((WORD_LIST *))
 
REDIRECT *copy_redirect __P ((REDIRECT *))
 
COMMAND *copy_command __P ((COMMAND *))
 

Variables

COMMANDglobal_command
 
Coproc sh_coproc
 

Data Structure Documentation

◆ word_desc

struct word_desc

Definition at line 126 of file command.h.

Data Fields
char * word
int flags

◆ word_list

struct word_list

Definition at line 132 of file command.h.

Data Fields
struct word_list * next
WORD_DESC * word

◆ REDIRECTEE

union REDIRECTEE

Definition at line 149 of file command.h.

Data Fields
int dest
WORD_DESC * filename

◆ redirect

struct redirect

Definition at line 156 of file command.h.

Data Fields
struct redirect * next
REDIRECTEE redirector
int rflags
int flags
enum r_instruction instruction
REDIRECTEE redirectee
char * here_doc_eof

◆ element

struct element

Definition at line 168 of file command.h.

Data Fields
WORD_DESC * word
REDIRECT * redirect

◆ command

struct command

Definition at line 191 of file command.h.

Data Fields
enum command_type type
int flags
int line
REDIRECT * redirects
union command value

◆ connection

struct connection

Definition at line 223 of file command.h.

Data Fields
int ignore
COMMAND * first
COMMAND * second
int connector

◆ pattern_list

struct pattern_list

Definition at line 237 of file command.h.

Data Fields
struct pattern_list * next
WORD_LIST * patterns
COMMAND * action
int flags

◆ case_com

struct case_com

Definition at line 245 of file command.h.

Data Fields
int flags
int line
WORD_DESC * word
PATTERN_LIST * clauses

◆ for_com

struct for_com

Definition at line 253 of file command.h.

Data Fields
int flags
int line
WORD_DESC * name
WORD_LIST * map_list
COMMAND * action

◆ if_com

struct if_com

Definition at line 288 of file command.h.

Data Fields
int flags
COMMAND * test
COMMAND * true_case
COMMAND * false_case

◆ while_com

struct while_com

Definition at line 296 of file command.h.

Data Fields
int flags
COMMAND * test
COMMAND * action

◆ cond_com

struct cond_com

Definition at line 322 of file command.h.

Data Fields
int flags
int line
int type
WORD_DESC * op
struct cond_com * left
struct cond_com * right

◆ simple_com

struct simple_com

Definition at line 331 of file command.h.

Data Fields
int flags
int line
WORD_LIST * words
REDIRECT * redirects

◆ function_def

struct function_def

Definition at line 340 of file command.h.

Data Fields
int flags
int line
WORD_DESC * name
COMMAND * command
char * source_file

◆ group_com

struct group_com

Definition at line 350 of file command.h.

Data Fields
int ignore
COMMAND * command

◆ subshell_com

struct subshell_com

Definition at line 355 of file command.h.

Data Fields
int flags
int line
COMMAND * command

◆ coproc

struct coproc

Definition at line 364 of file command.h.

Data Fields
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
int c_lock

◆ coproc_com

struct coproc_com

Definition at line 376 of file command.h.

Data Fields
int flags
char * name
COMMAND * command

◆ command.value

union command.value

Definition at line 196 of file command.h.

Data Fields
struct for_com * For
struct case_com * Case
struct while_com * While
struct if_com * If
struct connection * Connection
struct simple_com * Simple
struct function_def * Function_def
struct group_com * Group
struct subshell_com * Subshell
struct coproc_com * Coproc

Macro Definition Documentation

◆ REDIR_VARASSIGN

◆ AMBIGUOUS_REDIRECT

#define AMBIGUOUS_REDIRECT   -1

Definition at line 42 of file command.h.

Referenced by cat_file(), do_redirection_internal(), redir_special_open(), and redirection_error().

◆ NOCLOBBER_REDIRECT

#define NOCLOBBER_REDIRECT   -2

Definition at line 43 of file command.h.

Referenced by do_redirection_internal(), noclobber_open(), redir_open(), and redirection_error().

◆ RESTRICTED_REDIRECT

#define RESTRICTED_REDIRECT   -3 /* can only happen in restricted shells. */

Definition at line 44 of file command.h.

Referenced by do_redirection_internal(), redir_special_open(), and redirection_error().

◆ HEREDOC_REDIRECT

#define HEREDOC_REDIRECT   -4 /* here-doc temp file can't be created */

Definition at line 45 of file command.h.

Referenced by do_redirection_internal(), and redirection_error().

◆ BADVAR_REDIRECT

#define BADVAR_REDIRECT   -5 /* something wrong with {varname}redir */

Definition at line 46 of file command.h.

Referenced by redir_varassign(), and redirection_error().

◆ CLOBBERING_REDIRECT

#define CLOBBERING_REDIRECT (   ri)    (ri == r_output_direction || ri == r_err_and_out)

Definition at line 48 of file command.h.

Referenced by redir_open().

◆ OUTPUT_REDIRECT

#define OUTPUT_REDIRECT (   ri)    (ri == r_output_direction || ri == r_input_output || ri == r_err_and_out || ri == r_append_err_and_out)

Definition at line 51 of file command.h.

◆ INPUT_REDIRECT

#define INPUT_REDIRECT (   ri)    (ri == r_input_direction || ri == r_inputa_direction || ri == r_input_output)

Definition at line 54 of file command.h.

Referenced by do_redirection_internal(), and execute_null_command().

◆ WRITE_REDIRECT

#define WRITE_REDIRECT (   ri)
Value:

Definition at line 57 of file command.h.

Referenced by do_redirection_internal().

◆ TRANSLATE_REDIRECT

#define TRANSLATE_REDIRECT (   ri)

◆ W_HASDOLLAR

#define W_HASDOLLAR   0x000001 /* Dollar sign present. */

Definition at line 76 of file command.h.

Referenced by check_identifier(), make_word_flags(), and yyparse().

◆ W_QUOTED

#define W_QUOTED   0x000002 /* Some form of quote character is present. */

◆ W_ASSIGNMENT

#define W_ASSIGNMENT   0x000004 /* This word is a variable assignment. */

Definition at line 78 of file command.h.

Referenced by do_assignment(), do_assignment_no_expand(), fix_assignment_words(), if(), and yyparse().

◆ W_SPLITSPACE

#define W_SPLITSPACE   0x000008 /* Split this word on " " regardless of IFS */

◆ W_NOSPLIT

#define W_NOSPLIT   0x000010 /* Do not perform word splitting on this word because ifs is empty string. */

◆ W_NOGLOB

#define W_NOGLOB   0x000020 /* Do not perform globbing on this word. */

◆ W_NOSPLIT2

#define W_NOSPLIT2   0x000040 /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */

◆ W_TILDEEXP

#define W_TILDEEXP   0x000080 /* Tilde expand this assignment word */

Definition at line 83 of file command.h.

Referenced by fix_assignment_words().

◆ W_DOLLARAT

#define W_DOLLARAT   0x000100 /* $@ and its special handling */

Definition at line 84 of file command.h.

Referenced by param_expand(), and parameter_brace_expand().

◆ W_DOLLARSTAR

#define W_DOLLARSTAR   0x000200 /* $* and its special handling */

Definition at line 85 of file command.h.

◆ W_NOCOMSUB

#define W_NOCOMSUB   0x000400 /* Don't perform command substitution on this word */

Definition at line 86 of file command.h.

Referenced by disable_priv_mode(), expand_word_internal(), if(), and redirection_error().

◆ W_ASSIGNRHS

#define W_ASSIGNRHS   0x000800 /* Word is rhs of an assignment statement */

◆ W_NOTILDE

#define W_NOTILDE   0x001000 /* Don't perform tilde expansion on this word */

Definition at line 88 of file command.h.

◆ W_ITILDE

#define W_ITILDE   0x002000 /* Internal flag for word expansion */

Definition at line 89 of file command.h.

Referenced by expand_word_internal().

◆ W_NOEXPAND

#define W_NOEXPAND   0x004000 /* Don't expand at all -- do quote removal */

Definition at line 90 of file command.h.

Referenced by if().

◆ W_COMPASSIGN

#define W_COMPASSIGN   0x008000 /* Compound assignment */

Definition at line 91 of file command.h.

Referenced by if(), and yyparse().

◆ W_ASSNBLTIN

#define W_ASSNBLTIN   0x010000 /* word is a builtin command that takes assignments */

Definition at line 92 of file command.h.

Referenced by fix_assignment_words().

◆ W_ASSIGNARG

#define W_ASSIGNARG   0x020000 /* word is assignment argument to command */

Definition at line 93 of file command.h.

Referenced by fix_assignment_words(), and shell_expand_word_list().

◆ W_HASQUOTEDNULL

#define W_HASQUOTEDNULL   0x040000 /* word contains a quoted null character */

◆ W_DQUOTE

#define W_DQUOTE   0x080000 /* word should be treated as if double-quoted */

Definition at line 95 of file command.h.

Referenced by make_select_command(), and yyparse().

◆ W_NOPROCSUB

#define W_NOPROCSUB   0x100000 /* don't perform process substitution */

◆ W_SAWQUOTEDNULL

#define W_SAWQUOTEDNULL   0x200000 /* word contained a quoted null that was removed */

Definition at line 97 of file command.h.

Referenced by parameter_brace_expand_rhs().

◆ W_ASSIGNASSOC

#define W_ASSIGNASSOC   0x400000 /* word looks like associative array assignment */

Definition at line 98 of file command.h.

Referenced by fix_assignment_words().

◆ W_ASSIGNARRAY

#define W_ASSIGNARRAY   0x800000 /* word looks like a compound indexed array assignment */

Definition at line 99 of file command.h.

Referenced by fix_assignment_words(), and shell_expand_word_list().

◆ W_ARRAYIND

#define W_ARRAYIND   0x1000000 /* word is an array index being expanded */

Definition at line 100 of file command.h.

Referenced by parameter_brace_expand_word().

◆ W_ASSNGLOBAL

#define W_ASSNGLOBAL   0x2000000 /* word is a global assignment to declare (declare/typeset -g) */

Definition at line 101 of file command.h.

Referenced by fix_assignment_words().

◆ W_NOBRACE

#define W_NOBRACE   0x4000000 /* Don't perform brace expansion */

Definition at line 102 of file command.h.

Referenced by if().

◆ W_COMPLETE

#define W_COMPLETE   0x8000000 /* word is being expanded for completion */

Definition at line 103 of file command.h.

Referenced by if().

◆ W_CHKLOCAL

#define W_CHKLOCAL   0x10000000 /* check for local vars on assignment */

Definition at line 104 of file command.h.

Referenced by do_assignment_internal(), fix_assignment_words(), and shell_expand_word_list().

◆ W_NOASSNTILDE

#define W_NOASSNTILDE   0x20000000 /* don't do tilde expansion like an assignment statement */

Definition at line 105 of file command.h.

Referenced by expand_string_for_rhs().

◆ PF_NOCOMSUB

#define PF_NOCOMSUB   0x01 /* Do not perform command substitution */

Definition at line 109 of file command.h.

Referenced by expand_word_internal(), and param_expand().

◆ PF_IGNUNBOUND

#define PF_IGNUNBOUND   0x02 /* ignore unbound vars even if -u set */

Definition at line 110 of file command.h.

Referenced by param_expand(), parameter_brace_expand(), and parameter_brace_find_indir().

◆ PF_NOSPLIT2

#define PF_NOSPLIT2   0x04 /* same as W_NOSPLIT2 */

◆ PF_ASSIGNRHS

◆ PF_COMPLETE

#define PF_COMPLETE   0x10 /* same as W_COMPLETE, sets SX_COMPLETE */

Definition at line 113 of file command.h.

Referenced by expand_word_internal(), and param_expand().

◆ SUBSHELL_ASYNC

◆ SUBSHELL_PAREN

#define SUBSHELL_PAREN   0x02 /* subshell caused by ( ... ) */

Definition at line 117 of file command.h.

Referenced by execute_in_subshell().

◆ SUBSHELL_COMSUB

#define SUBSHELL_COMSUB   0x04 /* subshell caused by `command` or $(command) */

◆ SUBSHELL_FORK

#define SUBSHELL_FORK   0x08 /* subshell caused by executing a disk command */

◆ SUBSHELL_PIPE

#define SUBSHELL_PIPE   0x10 /* subshell from a pipeline element */

◆ SUBSHELL_PROCSUB

#define SUBSHELL_PROCSUB   0x20 /* subshell caused by <(command) or >(command) */

Definition at line 121 of file command.h.

Referenced by parameter_brace_remove_pattern(), sh_exit(), and termsig_handler().

◆ SUBSHELL_COPROC

#define SUBSHELL_COPROC   0x40 /* subshell from a coproc pipeline */

Definition at line 122 of file command.h.

Referenced by execute_in_subshell().

◆ SUBSHELL_RESETTRAP

#define SUBSHELL_RESETTRAP   0x80 /* subshell needs to reset trap strings on first call to trap */

Definition at line 123 of file command.h.

Referenced by command_substitute(), execute_in_subshell(), and execute_simple_command().

◆ CMD_WANT_SUBSHELL

#define CMD_WANT_SUBSHELL   0x01 /* User wants a subshell: ( command ) */

◆ CMD_FORCE_SUBSHELL

#define CMD_FORCE_SUBSHELL   0x02 /* Shell needs to force a subshell. */

Definition at line 175 of file command.h.

Referenced by execute_command_internal(), execute_connection(), and execute_in_subshell().

◆ CMD_INVERT_RETURN

◆ CMD_IGNORE_RETURN

◆ CMD_NO_FUNCTIONS

#define CMD_NO_FUNCTIONS   0x10 /* Ignore functions during command lookup. */

Definition at line 178 of file command.h.

Referenced by execute_simple_command().

◆ CMD_INHIBIT_EXPANSION

#define CMD_INHIBIT_EXPANSION   0x20 /* Do not expand the command words. */

Definition at line 179 of file command.h.

Referenced by execute_simple_command().

◆ CMD_NO_FORK

◆ CMD_TIME_PIPELINE

#define CMD_TIME_PIPELINE   0x80 /* Time a pipeline */

◆ CMD_TIME_POSIX

#define CMD_TIME_POSIX   0x100 /* time -p; use POSIX.2 time output spec. */

◆ CMD_AMPERSAND

#define CMD_AMPERSAND   0x200 /* command & */

Definition at line 183 of file command.h.

Referenced by execute_connection().

◆ CMD_STDIN_REDIR

#define CMD_STDIN_REDIR   0x400 /* async command needs implicit </dev/null */

◆ CMD_COMMAND_BUILTIN

#define CMD_COMMAND_BUILTIN   0x0800 /* command executed by `command' builtin */

Definition at line 185 of file command.h.

Referenced by execute_builtin(), and execute_command_internal().

◆ CMD_COPROC_SUBSHELL

#define CMD_COPROC_SUBSHELL   0x1000

Definition at line 186 of file command.h.

Referenced by make_coproc_command(), and yyparse().

◆ CMD_LASTPIPE

#define CMD_LASTPIPE   0x2000

Definition at line 187 of file command.h.

Referenced by execute_pipeline().

◆ CMD_STDPATH

#define CMD_STDPATH   0x4000 /* use standard path for command lookup */

Definition at line 188 of file command.h.

Referenced by execute_disk_command().

◆ CASEPAT_FALLTHROUGH

#define CASEPAT_FALLTHROUGH   0x01

Definition at line 233 of file command.h.

Referenced by execute_case_command(), print_case_clauses(), and yyparse().

◆ CASEPAT_TESTNEXT

#define CASEPAT_TESTNEXT   0x02

Definition at line 234 of file command.h.

Referenced by execute_case_command(), print_case_clauses(), and yyparse().

◆ COND_AND

#define COND_AND   1

Definition at line 315 of file command.h.

Referenced by execute_if_command(), print_if_command(), and yyparse().

◆ COND_OR

#define COND_OR   2

Definition at line 316 of file command.h.

Referenced by execute_if_command(), print_if_command(), and yyparse().

◆ COND_UNARY

#define COND_UNARY   3

Definition at line 317 of file command.h.

Referenced by execute_if_command(), print_if_command(), and yyparse().

◆ COND_BINARY

#define COND_BINARY   4

Definition at line 318 of file command.h.

Referenced by execute_if_command(), print_if_command(), and yyparse().

◆ COND_TERM

#define COND_TERM   5

Definition at line 319 of file command.h.

Referenced by print_if_command(), and yyparse().

◆ COND_EXPR

#define COND_EXPR   6

Definition at line 320 of file command.h.

Referenced by execute_if_command(), print_if_command(), and yyparse().

◆ COPROC_RUNNING

#define COPROC_RUNNING   0x01

Definition at line 361 of file command.h.

Referenced by execute_in_subshell().

◆ COPROC_DEAD

#define COPROC_DEAD   0x02

Definition at line 362 of file command.h.

Referenced by execute_in_subshell().

◆ CMDERR_DEFAULT

#define CMDERR_DEFAULT   0

Definition at line 386 of file command.h.

Referenced by command_error(), and command_errstr().

◆ CMDERR_BADTYPE

#define CMDERR_BADTYPE   1

◆ CMDERR_BADCONN

#define CMDERR_BADCONN   2

Definition at line 388 of file command.h.

Referenced by execute_connection().

◆ CMDERR_BADJUMP

#define CMDERR_BADJUMP   3

Definition at line 389 of file command.h.

Referenced by disable_priv_mode(), parse_and_execute(), parse_string(), and reader_loop().

◆ CMDERR_LAST

#define CMDERR_LAST   3

Definition at line 391 of file command.h.

Referenced by command_error(), and command_errstr().

Typedef Documentation

◆ WORD_DESC

typedef struct word_desc WORD_DESC

◆ WORD_LIST

typedef struct word_list WORD_LIST

◆ REDIRECT

typedef struct redirect REDIRECT

◆ ELEMENT

typedef struct element ELEMENT

◆ COMMAND

typedef struct command COMMAND

◆ CONNECTION

typedef struct connection CONNECTION

◆ PATTERN_LIST

typedef struct pattern_list PATTERN_LIST

◆ CASE_COM

typedef struct case_com CASE_COM

◆ FOR_COM

typedef struct for_com FOR_COM

◆ IF_COM

typedef struct if_com IF_COM

◆ WHILE_COM

typedef struct while_com WHILE_COM

◆ COND_COM

typedef struct cond_com COND_COM

◆ SIMPLE_COM

typedef struct simple_com SIMPLE_COM

◆ FUNCTION_DEF

typedef struct function_def FUNCTION_DEF

◆ GROUP_COM

typedef struct group_com GROUP_COM

◆ SUBSHELL_COM

typedef struct subshell_com SUBSHELL_COM

◆ Coproc

typedef struct coproc Coproc

◆ COPROC_COM

typedef struct coproc_com COPROC_COM

Enumeration Type Documentation

◆ r_instruction

Enumerator
r_output_direction 
r_input_direction 
r_inputa_direction 
r_appending_to 
r_reading_until 
r_reading_string 
r_duplicating_input 
r_duplicating_output 
r_deblank_reading_until 
r_close_this 
r_err_and_out 
r_input_output 
r_output_force 
r_duplicating_input_word 
r_duplicating_output_word 
r_move_input 
r_move_output 
r_move_input_word 
r_move_output_word 
r_append_err_and_out 

Definition at line 28 of file command.h.

◆ command_type

Enumerator
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_coproc 

Definition at line 71 of file command.h.

Function Documentation

◆ __P() [1/6]

◆ __P() [2/6]

◆ __P() [3/6]

WORD_DESC* copy_word __P ( (WORD_DESC *)  )

◆ __P() [4/6]

◆ __P() [5/6]

◆ __P() [6/6]

COMMAND* copy_command __P ( (COMMAND *)  )

Variable Documentation

◆ global_command

COMMAND* global_command

◆ sh_coproc

Coproc sh_coproc

Referenced by execute_in_subshell().