X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=command.h;h=a0697abe6aba62ea0c617d61fcf6d1dcf0e6272e;hb=f73dda092b33638d2d5e9c35375f687a607b5403;hp=ad286c4d02e9411a81f1fdc2f7d9e087771827d0;hpb=28ef6c316f1aff914bb95ac09787a3c83c1815fd;p=platform%2Fupstream%2Fbash.git diff --git a/command.h b/command.h index ad286c4..a0697ab 100644 --- a/command.h +++ b/command.h @@ -95,14 +95,18 @@ typedef struct word_list { /* */ /* **************************************************************** */ -/* What a redirection descriptor looks like. If FLAGS is IS_DESCRIPTOR, - then we use REDIRECTEE.DEST, else we use the file specified. */ +/* What a redirection descriptor looks like. If the redirection instruction + is ri_duplicating_input or ri_duplicating_output, use DEST, otherwise + use the file in FILENAME. Out-of-range descriptors are identified by a + negative DEST. */ typedef union { - long dest; /* Place to redirect REDIRECTOR to, or ... */ + int dest; /* Place to redirect REDIRECTOR to, or ... */ WORD_DESC *filename; /* filename to redirect to. */ } REDIRECTEE; +/* Structure describing a redirection. If REDIRECTOR is negative, the parser + (or translator in redir.c) encountered an out-of-range file descriptor. */ typedef struct redirect { struct redirect *next; /* Next element, or NULL. */ int redirector; /* Descriptor to be redirected. */ @@ -131,6 +135,7 @@ typedef struct element { #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