Lines Matching refs:input
342 #define b_getch(input) ((input)->get(input)) argument
343 #define b_peek(input) ((input)->peek(input)) argument
461 static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input);
469 static int redirect_dup_num(struct in_str *input);
471 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su…
472 static int parse_group(o_string *dest, struct p_context *ctx, struct in_str *input, int ch);
476 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input);
812 FILE *input; in builtin_source() local
819 input = fopen(child->argv[1], "r"); in builtin_source()
820 if (!input) { in builtin_source()
829 mark_open(fileno(input)); in builtin_source()
830 status = parse_file_outer(input); in builtin_source()
831 mark_closed(fileno(input)); in builtin_source()
832 fclose(input); in builtin_source()
2298 struct in_str *input) argument
2324 redir->dup = redirect_dup_num(input);
2611 static int redirect_dup_num(struct in_str *input) argument
2614 ch = b_peek(input);
2617 b_getch(input); /* get the & */
2618 ch=b_peek(input);
2620 b_getch(input);
2626 b_getch(input);
2627 ch = b_peek(input);
2699 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su… argument
2709 retcode = parse_stream(&result, &inner, input, subst_end);
2743 struct in_str *input, int ch) argument
2758 rcode=parse_stream(dest,&sub,input,endch);
2838 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input) argument
2848 int ch = input->peek(input); /* first character after the $ */
2853 while(ch=b_peek(input),isalnum(ch) || ch=='_') {
2854 b_getch(input);
2898 b_getch(input);
2900 while(ch=b_getch(input),ch!=EOF && ch!='}') {
2911 b_getch(input);
2912 process_command_subs(dest, ctx, input, ')');
2937 if (advance) b_getch(input);
2952 struct in_str *input, int end_trigger) argument
2966 while ((ch=b_getch(input))!=EOF) {
2969 if (input->__promptme == 0) return 1;
2971 next = (ch == '\n') ? 0 : b_peek(input);
3004 while(ch=b_peek(input),ch!=EOF && ch!='\n') { b_getch(input); }
3015 b_addqchr(dest, b_getch(input), dest->quote);
3018 if (handle_dollar(dest, ctx, input)!=0) return 1;
3022 while(ch=b_getch(input),ch!=EOF && ch!='\'') {
3024 if(input->__promptme == 0) return 1;
3039 process_command_subs(dest, ctx, input, '`');
3047 b_getch(input);
3052 setup_redirect(ctx, redir_fd, redir_style, input);
3060 b_getch(input);
3063 b_getch(input);
3068 setup_redirect(ctx, redir_fd, redir_style, input);
3078 b_getch(input);
3092 b_getch(input);
3109 if (parse_group(dest, ctx, input, ch)!=0) return 1;
3119 while (ch = b_getch(input), ch != EOF &&
3122 if (input->__promptme == 0)
3262 struct in_str input; local
3274 setup_string_in_str(&input, p);
3275 rcode = parse_stream_outer(&input, flag);
3280 setup_string_in_str(&input, s);
3281 return parse_stream_outer(&input, flag);
3294 struct in_str input; local
3296 setup_file_in_str(&input, f);
3298 setup_file_in_str(&input);
3300 rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
3389 FILE *input; local
3429 if ((input = fopen("/etc/profile", "r")) != NULL) {
3430 mark_open(fileno(input));
3431 parse_file_outer(input);
3432 mark_closed(fileno(input));
3433 fclose(input);
3436 input=stdin;
3471 if (argv[optind]==NULL && input==stdin &&
3494 input = xfopen(argv[optind], "r");
3495 opt = parse_file_outer(input);
3498 fclose(input);