Lines Matching refs:input

2870 static int i_getch_and_eat_bkslash_nl(struct in_str *input)  in i_getch_and_eat_bkslash_nl()  argument
2875 ch = i_getch(input); in i_getch_and_eat_bkslash_nl()
2878 ch2 = i_peek(input); in i_getch_and_eat_bkslash_nl()
2882 i_getch(input); in i_getch_and_eat_bkslash_nl()
2889 static int i_peek_and_eat_bkslash_nl(struct in_str *input) in i_peek_and_eat_bkslash_nl() argument
2894 ch = i_peek(input); in i_peek_and_eat_bkslash_nl()
2897 ch2 = i_peek2(input); in i_peek_and_eat_bkslash_nl()
2901 i_getch(input); in i_peek_and_eat_bkslash_nl()
2902 i_getch(input); in i_peek_and_eat_bkslash_nl()
4298 #define parse_redir_right_fd(as_string, input) \ argument
4299 parse_redir_right_fd(input)
4301 static int parse_redir_right_fd(o_string *as_string, struct in_str *input) in parse_redir_right_fd() argument
4305 ch = i_peek(input); in parse_redir_right_fd()
4309 ch = i_getch(input); /* get the & */ in parse_redir_right_fd()
4311 ch = i_peek(input); in parse_redir_right_fd()
4313 ch = i_getch(input); in parse_redir_right_fd()
4322 ch = i_getch(input); in parse_redir_right_fd()
4324 ch = i_peek(input); in parse_redir_right_fd()
4339 struct in_str *input) in parse_redirect() argument
4349 dup_num = parse_redir_right_fd(&ctx->as_string, input); in parse_redirect()
4353 int ch = i_peek_and_eat_bkslash_nl(input); in parse_redirect()
4356 ch = i_getch(input); in parse_redirect()
4358 ch = i_peek(input); in parse_redirect()
4363 int ch = i_peek_and_eat_bkslash_nl(input); in parse_redirect()
4369 ch = i_getch(input); in parse_redirect()
4443 #define fetch_till_str(as_string, input, word, skip_tabs) \ argument
4444 fetch_till_str(input, word, skip_tabs)
4447 struct in_str *input, in fetch_till_str() argument
4467 ch = i_getch(input); in fetch_till_str()
4489 ch = i_getch(input); in fetch_till_str()
4534 #define fetch_heredocs(as_string, pi, heredoc_cnt, input) \ argument
4535 fetch_heredocs(pi, heredoc_cnt, input)
4537 …tic int fetch_heredocs(o_string *as_string, struct pipe *pi, int heredoc_cnt, struct in_str *input) in fetch_heredocs() argument
4558 p = fetch_till_str(as_string, input, in fetch_heredocs()
4572 heredoc_cnt = fetch_heredocs(as_string, cmd->group, heredoc_cnt, input); in fetch_heredocs()
4587 #define parse_stream(pstring, heredoc_cnt_ptr, input, end_trigger) \ argument
4588 parse_stream(heredoc_cnt_ptr, input, end_trigger)
4592 struct in_str *input,
4599 struct in_str *input, int ch) in parse_group() argument
4628 ch = i_getch(input); in parse_group()
4636 ch = i_getch(input); in parse_group()
4669 ch = i_peek(input); in parse_group()
4677 ch = i_getch(input); in parse_group()
4683 pipe_list = parse_stream(&as_string, &heredoc_cnt, input, endch); in parse_group()
4737 static int add_till_single_quote(o_string *dest, struct in_str *input) in add_till_single_quote() argument
4740 int ch = i_getch(input); in add_till_single_quote()
4750 static int add_till_single_quote_dquoted(o_string *dest, struct in_str *input) in add_till_single_quote_dquoted() argument
4753 int ch = i_getch(input); in add_till_single_quote_dquoted()
4764 static int add_till_backquote(o_string *dest, struct in_str *input, int in_dquote);
4765 static int add_till_double_quote(o_string *dest, struct in_str *input) in add_till_double_quote() argument
4768 int ch = i_getch(input); in add_till_double_quote()
4777 ch = i_getch(input); in add_till_double_quote()
4781 if (!add_till_backquote(dest, input, /*in_dquote:*/ 1)) in add_till_double_quote()
4803 static int add_till_backquote(o_string *dest, struct in_str *input, int in_dquote) in add_till_backquote() argument
4806 int ch = i_getch(input); in add_till_backquote()
4811 ch = i_getch(input); in add_till_backquote()
4845 static int add_till_closing_bracket(o_string *dest, struct in_str *input, unsigned end_ch) in add_till_closing_bracket() argument
4860 ch = i_getch(input); in add_till_closing_bracket()
4873 if (i_peek_and_eat_bkslash_nl(input) == end_ch) { in add_till_closing_bracket()
4874 i_getch(input); /* eat second ')' */ in add_till_closing_bracket()
4882 if (!add_till_closing_bracket(dest, input, ch)) in add_till_closing_bracket()
4888 if (!add_till_single_quote(dest, input)) in add_till_closing_bracket()
4894 if (!add_till_double_quote(dest, input)) in add_till_closing_bracket()
4900 if (!add_till_backquote(dest, input, /*in_dquote:*/ 0)) in add_till_closing_bracket()
4907 ch = i_getch(input); in add_till_closing_bracket()
4932 #define parse_dollar_squote(as_string, dest, input) \ argument
4933 parse_dollar_squote(dest, input)
4936 static int parse_dollar_squote(o_string *as_string, o_string *dest, struct in_str *input) in parse_dollar_squote() argument
4939 int ch = i_peek_and_eat_bkslash_nl(input); /* first character after the $ */ in parse_dollar_squote()
4947 ch = i_getch(input); /* eat ' */ in parse_dollar_squote()
4950 ch = i_getch(input); in parse_dollar_squote()
4966 ch = i_getch(input); in parse_dollar_squote()
4976 ch = i_peek(input); in parse_dollar_squote()
4979 *++p = ch = i_getch(input); in parse_dollar_squote()
4984 ch = i_peek(input); in parse_dollar_squote()
4987 *++p = ch = i_getch(input); in parse_dollar_squote()
5021 # define parse_dollar_squote(as_string, dest, input) 0 argument
5026 #define parse_dollar(as_string, dest, input, quote_mask) \ argument
5027 parse_dollar(dest, input, quote_mask)
5032 struct in_str *input, unsigned char quote_mask) in parse_dollar() argument
5034 int ch = i_peek_and_eat_bkslash_nl(input); /* first character after the $ */ in parse_dollar()
5039 ch = i_getch(input); in parse_dollar()
5047 ch = i_peek_and_eat_bkslash_nl(input); in parse_dollar()
5052 ch = i_getch(input); in parse_dollar()
5058 ch = i_getch(input); in parse_dollar()
5078 ch = i_getch(input); /* eat '{' */ in parse_dollar()
5081 ch = i_getch_and_eat_bkslash_nl(input); /* first char after '{' */ in parse_dollar()
5104 || (len_single_ch == '#' && isdigit(i_peek_and_eat_bkslash_nl(input))) in parse_dollar()
5116 ch = i_getch_and_eat_bkslash_nl(input); in parse_dollar()
5135 ch = i_getch(input); in parse_dollar()
5148 || i_peek(input) != '}' in parse_dollar()
5162 && !strchr(MINUS_PLUS_EQUAL_QUESTION, i_peek(input)) in parse_dollar()
5171 if (i_peek(input) == '/') { /* ${var//pattern[/repl]}? */ in parse_dollar()
5172 i_getch(input); in parse_dollar()
5185 if (i_peek(input) == '/') { in parse_dollar()
5186 o_addchr(dest, i_getch(input)); in parse_dollar()
5192 last_ch = add_till_closing_bracket(dest, input, end_ch); in parse_dollar()
5232 ch = i_getch(input); in parse_dollar()
5235 if (i_peek_and_eat_bkslash_nl(input) == '(') { in parse_dollar()
5236 ch = i_getch(input); in parse_dollar()
5242 if (!add_till_closing_bracket(dest, input, ')' | DOUBLE_CLOSE_CHAR_FLAG)) in parse_dollar()
5258 if (!add_till_closing_bracket(dest, input, ')')) in parse_dollar()
5276 ch = i_getch(input); in parse_dollar()
5278 ch = i_peek_and_eat_bkslash_nl(input); in parse_dollar()
5294 #define encode_string(as_string, dest, input, dquote_end) \ argument
5295 encode_string(dest, input, dquote_end)
5300 struct in_str *input, in encode_string() argument
5307 ch = i_getch(input); in encode_string()
5321 next = i_peek(input); in encode_string()
5343 ch = i_getch(input); /* eat next */ in encode_string()
5354 if (!parse_dollar(as_string, dest, input, /*quote_mask:*/ 0x80)) { in encode_string()
5366 if (!add_till_backquote(dest, input, /*in_dquote:*/ dquote_end == '"')) in encode_string()
5393 struct in_str *input, in parse_stream() argument
5427 ch = i_getch(input); in parse_stream()
5486 ch = i_getch(input); in parse_stream()
5514 next = i_getch(input); in parse_stream()
5533 ch = i_getch(input); in parse_stream()
5540 next = i_peek_and_eat_bkslash_nl(input); in parse_stream()
5593 next = i_peek(input); in parse_stream()
5596 ch = i_getch(input); in parse_stream()
5642 heredoc_cnt = fetch_heredocs(&ctx.as_string, ctx.list_head, heredoc_cnt, input); in parse_stream()
5742 ch = i_getch(input); in parse_stream()
5751 if (parse_redirect(&ctx, redir_fd, redir_style, input)) in parse_stream()
5764 ch = i_getch(input); in parse_stream()
5768 ch = i_getch(input); in parse_stream()
5777 if (parse_redirect(&ctx, redir_fd, redir_style, input)) in parse_stream()
5791 ch = i_peek(input); in parse_stream()
5796 ch = i_getch(input); in parse_stream()
5830 if (parse_dollar_squote(&ctx.as_string, &ctx.word, input)) in parse_stream()
5832 if (!parse_dollar(&ctx.as_string, &ctx.word, input, /*quote_mask:*/ 0)) { in parse_stream()
5841 i_getch(input); /* eat second " */ in parse_stream()
5850 if (!encode_string(&ctx.as_string, &ctx.word, input, '"')) in parse_stream()
5861 if (!add_till_backquote(&ctx.word, input, /*in_dquote:*/ 0)) in parse_stream()
5884 ch = i_peek_and_eat_bkslash_nl(input); in parse_stream()
5887 ch = i_getch(input); in parse_stream()
5907 ch = i_getch(input); in parse_stream()
5923 ch = i_getch(input); in parse_stream()
5946 int n = parse_group(&ctx, input, ch); in parse_stream()
6159 struct in_str input; in encode_then_expand_string() local
6177 setup_string_in_str(&input, str); in encode_then_expand_string()
6178 encode_string(NULL, &dest, &input, EOF); in encode_then_expand_string()
6227 struct in_str input; in encode_then_expand_vararg() local
6235 setup_string_in_str(&input, str); in encode_then_expand_vararg()
6242 ch = i_getch(&input); in encode_then_expand_vararg()
6250 if (!add_till_single_quote_dquoted(&dest, &input)) in encode_then_expand_vararg()
6264 ch = i_getch(&input); in encode_then_expand_vararg()
6274 if (parse_dollar_squote(NULL, &dest, &input)) in encode_then_expand_vararg()
6276 if (!parse_dollar(NULL, &dest, &input, /*quote_mask:*/ 0x80)) { in encode_then_expand_vararg()
6287 if (!add_till_backquote(&dest, &input, in encode_then_expand_vararg()
6317 struct in_str input; in encode_then_append_var_plusminus() local
6335 setup_string_in_str(&input, str); in encode_then_append_var_plusminus()
6340 ch = i_getch(&input); in encode_then_append_var_plusminus()
6375 if (!add_till_single_quote_dquoted(&dest, &input)) in encode_then_append_var_plusminus()
6395 ch = i_getch(&input); in encode_then_append_var_plusminus()
6405 … if (!parse_dollar(NULL, &dest, &input, /*quote_mask:*/ (dest.o_expflags || dquoted) ? 0x80 : 0)) { in encode_then_append_var_plusminus()
6416 if (!add_till_backquote(&dest, &input, in encode_then_append_var_plusminus()
7553 struct in_str input; in parse_and_run_string() local
7556 setup_string_in_str(&input, s); in parse_and_run_string()
7557 parse_and_run_stream(&input, '\0'); in parse_and_run_string()
7563 struct in_str input; in parse_and_run_file() local
7567 setup_file_in_str(&input, fp); in parse_and_run_file()
7568 parse_and_run_stream(&input, ';'); in parse_and_run_file()
10472 HFILE *input; in hush_main() local
10475 input = hfopen("/etc/profile"); in hush_main()
10477 if (input != NULL) { in hush_main()
10479 parse_and_run_file(input); in hush_main()
10480 hfclose(input); in hush_main()
10494 input = hfopen(hp); in hush_main()
10551 HFILE *input; in hush_main() local
10562 input = hfopen(G.global_argv[0]); in hush_main()
10563 if (!input) { in hush_main()
10568 parse_and_run_file(input); in hush_main()
10570 hfclose(input); in hush_main()
11533 HFILE *input; in builtin_source() local
11557 input = hfopen(filename); in builtin_source()
11559 if (!input) { in builtin_source()
11578 parse_and_run_file(input); in builtin_source()
11579 hfclose(input); in builtin_source()