aboutsummaryrefslogtreecommitdiffhomepage
path: root/tokenizer.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-23 14:53:56 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-23 14:53:56 -0800
commitb6af3e51abd54963948d5523ce01459fadedebbf (patch)
tree6a4d364895f8b0ec96b5167423b01542dab33774 /tokenizer.h
parentebc8bd6ff51762e7037a1e72feebc9ecdd0b0380 (diff)
Very early work in adopting new parser for actual execution of commands.
Not turned on yet.
Diffstat (limited to 'tokenizer.h')
-rw-r--r--tokenizer.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/tokenizer.h b/tokenizer.h
index 8e130f0e..17b1bcb9 100644
--- a/tokenizer.h
+++ b/tokenizer.h
@@ -187,8 +187,11 @@ const wchar_t *tok_get_desc(int type);
*/
int tok_get_error(tokenizer_t *tok);
-/* Helper function to determine redirection type from a string, or TOK_NONE if the redirection is invalid */
-enum token_type redirection_type_for_string(const wcstring &str);
+/* Helper function to determine redirection type from a string, or TOK_NONE if the redirection is invalid. Also returns the fd by reference. */
+enum token_type redirection_type_for_string(const wcstring &str, int *out_fd = NULL);
+
+/* Helper function to return oflags (as in open(2)) for a redirection type */
+int oflags_for_redirection_type(enum token_type type);
enum move_word_style_t
{