Lines Matching refs:input

340 #define b_getch(input) ((input)->get(input))  argument
341 #define b_peek(input) ((input)->peek(input)) argument
459 static int setup_redirect(struct p_context *ctx, int fd, redir_type style, struct in_str *input);
467 static int redirect_dup_num(struct in_str *input);
469 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su…
470 static int parse_group(o_string *dest, struct p_context *ctx, struct in_str *input, int ch);
474 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input);
810 FILE *input; in builtin_source() local
817 input = fopen(child->argv[1], "r"); in builtin_source()
818 if (!input) { in builtin_source()
827 mark_open(fileno(input)); in builtin_source()
828 status = parse_file_outer(input); in builtin_source()
829 mark_closed(fileno(input)); in builtin_source()
830 fclose(input); in builtin_source()
2287 struct in_str *input) argument
2313 redir->dup = redirect_dup_num(input);
2600 static int redirect_dup_num(struct in_str *input) argument
2603 ch = b_peek(input);
2606 b_getch(input); /* get the & */
2607 ch=b_peek(input);
2609 b_getch(input);
2615 b_getch(input);
2616 ch = b_peek(input);
2688 static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, int su… argument
2698 retcode = parse_stream(&result, &inner, input, subst_end);
2732 struct in_str *input, int ch) argument
2747 rcode=parse_stream(dest,&sub,input,endch);
2827 static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *input) argument
2837 int ch = input->peek(input); /* first character after the $ */
2842 while(ch=b_peek(input),isalnum(ch) || ch=='_') {
2843 b_getch(input);
2887 b_getch(input);
2889 while(ch=b_getch(input),ch!=EOF && ch!='}') {
2900 b_getch(input);
2901 process_command_subs(dest, ctx, input, ')');
2926 if (advance) b_getch(input);
2941 struct in_str *input, int end_trigger) argument
2955 while ((ch=b_getch(input))!=EOF) {
2958 if (input->__promptme == 0) return 1;
2960 next = (ch == '\n') ? 0 : b_peek(input);
2993 while(ch=b_peek(input),ch!=EOF && ch!='\n') { b_getch(input); }
3004 b_addqchr(dest, b_getch(input), dest->quote);
3007 if (handle_dollar(dest, ctx, input)!=0) return 1;
3011 while(ch=b_getch(input),ch!=EOF && ch!='\'') {
3013 if(input->__promptme == 0) return 1;
3028 process_command_subs(dest, ctx, input, '`');
3036 b_getch(input);
3041 setup_redirect(ctx, redir_fd, redir_style, input);
3049 b_getch(input);
3052 b_getch(input);
3057 setup_redirect(ctx, redir_fd, redir_style, input);
3067 b_getch(input);
3081 b_getch(input);
3098 if (parse_group(dest, ctx, input, ch)!=0) return 1;
3108 while (ch = b_getch(input), ch != EOF &&
3111 if (input->__promptme == 0)
3251 struct in_str input; local
3263 setup_string_in_str(&input, p);
3264 rcode = parse_stream_outer(&input, flag);
3269 setup_string_in_str(&input, s);
3270 return parse_stream_outer(&input, flag);
3283 struct in_str input; local
3285 setup_file_in_str(&input, f);
3287 setup_file_in_str(&input);
3289 rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
3378 FILE *input; local
3418 if ((input = fopen("/etc/profile", "r")) != NULL) {
3419 mark_open(fileno(input));
3420 parse_file_outer(input);
3421 mark_closed(fileno(input));
3422 fclose(input);
3425 input=stdin;
3460 if (argv[optind]==NULL && input==stdin &&
3483 input = xfopen(argv[optind], "r");
3484 opt = parse_file_outer(input);
3487 fclose(input);