projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from ../bash-2.01.tar.gz.
[platform/upstream/bash.git]
/
make_cmd.c
diff --git
a/make_cmd.c
b/make_cmd.c
index
d17b4d8
..
c0da8bf
100644
(file)
--- a/
make_cmd.c
+++ b/
make_cmd.c
@@
-100,6
+100,7
@@
make_word (string)
return (make_word_flags (temp, string));
}
return (make_word_flags (temp, string));
}
+#ifdef INCLUDE_UNUSED
WORD_DESC *
make_word_from_token (token)
int token;
WORD_DESC *
make_word_from_token (token)
int token;
@@
-111,6
+112,7
@@
make_word_from_token (token)
return (make_word (tokenizer));
}
return (make_word (tokenizer));
}
+#endif
WORD_LIST *
make_word_list (word, link)
WORD_LIST *
make_word_list (word, link)
@@
-466,24
+468,27
@@
make_redirection (source, instruction, dest_and_filename)
switch (instruction)
{
switch (instruction)
{
- case r_output_direction: /* >foo */
- case r_output_force: /* >| foo */
+ case r_output_direction: /* >foo */
+ case r_output_force: /* >| foo */
+ case r_err_and_out: /* command &>filename */
temp->flags = O_TRUNC | O_WRONLY | O_CREAT;
break;
temp->flags = O_TRUNC | O_WRONLY | O_CREAT;
break;
- case r_input_direction: /* <foo */
- case r_inputa_direction: /* foo & makes this. */
- temp->flags = O_RDONLY;
+ case r_appending_to: /* >>foo */
+ temp->flags = O_APPEND | O_WRONLY | O_CREAT;
break;
break;
- case r_appending_to: /* >>foo */
- temp->flags = O_APPEND | O_WRONLY | O_CREAT;
+ case r_input_direction: /* <foo */
+ case r_inputa_direction: /* foo & makes this. */
+ temp->flags = O_RDONLY;
break;
break;
- case r_
deblank_reading_until: /* <<-
foo */
- case r_reading_until: /* << foo */
+ case r_
input_output: /* <>
foo */
+ temp->flags = O_RDWR | O_CREAT;
break;
break;
+ case r_deblank_reading_until: /* <<-foo */
+ case r_reading_until: /* << foo */
case r_close_this: /* <&- */
case r_duplicating_input: /* 1<&2 */
case r_duplicating_output: /* 1>&2 */
case r_close_this: /* <&- */
case r_duplicating_input: /* 1<&2 */
case r_duplicating_output: /* 1>&2 */
@@
-491,14
+496,6
@@
make_redirection (source, instruction, dest_and_filename)
case r_duplicating_output_word: /* 1>&$foo */
break;
case r_duplicating_output_word: /* 1>&$foo */
break;
- case r_err_and_out: /* command &>filename */
- temp->flags = O_TRUNC | O_WRONLY | O_CREAT;
- break;
-
- case r_input_output:
- temp->flags = O_RDWR | O_CREAT;
- break;
-
default:
programming_error ("make_redirection: redirection instruction `%d' out of range", instruction);
abort ();
default:
programming_error ("make_redirection: redirection instruction `%d' out of range", instruction);
abort ();