Lines Matching refs:input
338 #define b_getch(input) ((input)->get(input)) argument
339 #define b_peek(input) ((input)->peek(input)) argument
457 static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input);
465 static int redirect_dup_num(struct in_str *input);
467 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su…
468 static int parse_group(o_string *dest, struct p_context *ctx, struct in_str *input, int ch);
472 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input);
806 FILE *input; in builtin_source() local
813 input = fopen(child->argv[1], "r"); in builtin_source()
814 if (!input) { in builtin_source()
823 mark_open(fileno(input)); in builtin_source()
824 status = parse_file_outer(input); in builtin_source()
825 mark_closed(fileno(input)); in builtin_source()
826 fclose(input); in builtin_source()
2290 struct in_str *input) argument
2316 redir->dup = redirect_dup_num(input);
2603 static int redirect_dup_num(struct in_str *input) argument
2606 ch = b_peek(input);
2609 b_getch(input); /* get the & */
2610 ch=b_peek(input);
2612 b_getch(input);
2618 b_getch(input);
2619 ch = b_peek(input);
2691 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su… argument
2701 retcode = parse_stream(&result, &inner, input, subst_end);
2735 struct in_str *input, int ch) argument
2750 rcode=parse_stream(dest,&sub,input,endch);
2830 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input) argument
2840 int ch = input->peek(input); /* first character after the $ */
2845 while(ch=b_peek(input),isalnum(ch) || ch=='_') {
2846 b_getch(input);
2890 b_getch(input);
2892 while(ch=b_getch(input),ch!=EOF && ch!='}') {
2903 b_getch(input);
2904 process_command_subs(dest, ctx, input, ')');
2929 if (advance) b_getch(input);
2944 struct in_str *input, int end_trigger) argument
2958 while ((ch=b_getch(input))!=EOF) {
2961 if (input->__promptme == 0) return 1;
2963 next = (ch == '\n') ? 0 : b_peek(input);
2996 while(ch=b_peek(input),ch!=EOF && ch!='\n') { b_getch(input); }
3007 b_addqchr(dest, b_getch(input), dest->quote);
3010 if (handle_dollar(dest, ctx, input)!=0) return 1;
3014 while(ch=b_getch(input),ch!=EOF && ch!='\'') {
3016 if(input->__promptme == 0) return 1;
3031 process_command_subs(dest, ctx, input, '`');
3039 b_getch(input);
3044 setup_redirect(ctx, redir_fd, redir_style, input);
3052 b_getch(input);
3055 b_getch(input);
3060 setup_redirect(ctx, redir_fd, redir_style, input);
3070 b_getch(input);
3084 b_getch(input);
3101 if (parse_group(dest, ctx, input, ch)!=0) return 1;
3111 while (ch = b_getch(input), ch != EOF &&
3114 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 rcode = parse_stream_outer(&input, flag);
3295 struct in_str input; local
3297 setup_file_in_str(&input, f);
3299 setup_file_in_str(&input);
3301 rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
3374 FILE *input; local
3413 if ((input = fopen("/etc/profile", "r")) != NULL) {
3414 mark_open(fileno(input));
3415 parse_file_outer(input);
3416 mark_closed(fileno(input));
3417 fclose(input);
3420 input=stdin;
3455 if (argv[optind]==NULL && input==stdin &&
3478 input = xfopen(argv[optind], "r");
3479 opt = parse_file_outer(input);
3482 fclose(input);