Lines Matching defs:output

608  * debugging output pretty */
1074 /* "set -x" output should not be redirectable with subsequent 2>FILE.
1076 * for all subsequent output.
6492 static int expand_vars_to_list(o_string *output, int n, char *arg);
6537 * Return in output->ended_in_ifs:
6540 static int expand_on_ifs(o_string *output, int n, const char *str)
6552 if (!(output->o_expflags & EXP_FLAG_GLOB)) {
6553 o_addblock(output, str, word_len);
6559 o_addblock_duplicate_backslash(output, str, word_len);
6561 /*o_addblock(output, str, word_len); - WRONG: "v='\*'; echo Z$v" prints "Z*" instead of "Z\*" */
6562 /*o_addqblock(output, str, word_len); - WRONG: "v='*'; echo Z$v" prints "Z*" instead of Z* files */
6588 if (output->has_quoted_part
6598 || output->data[output->length - 1]
6601 o_addchr(output, '\0');
6602 debug_print_list("expand_on_ifs", output, n);
6603 n = o_save_ptr(output, n);
6607 output->ended_in_ifs = last_is_ifs;
6608 debug_print_list("expand_on_ifs[1]", output, n);
6778 static NOINLINE int encode_then_append_var_plusminus(o_string *output, int n,
6794 output->has_quoted_part = 1;
6796 return expand_vars_to_list(output, n, str);
6811 if (!dquoted && !(output->o_expflags & EXP_FLAG_SINGLEWORD) && strchr(G.ifs, ch)) {
6816 n = expand_vars_to_list(output, n, dest.data);
6818 o_addchr(output, '\0');
6819 n = o_save_ptr(output, n); /* create next word */
6821 if (output->length != o_get_last_ptr(output, n)
6822 || output->has_quoted_part
6833 o_addchr(output, '\0');
6834 n = o_save_ptr(output, n); /* create next word */
6907 n = expand_vars_to_list(output, n, dest.data);
7013 static int append_str_maybe_ifs_split(o_string *output, int n,
7017 debug_printf_expand("unquoted '%s', output->o_escape:%d\n", val,
7018 !!(output->o_expflags & EXP_FLAG_ESC_GLOB_CHARS));
7020 n = expand_on_ifs(output, n, val);
7022 output->has_quoted_part = 1;
7023 debug_printf_expand("quoted '%s', output->o_escape:%d\n", val,
7024 !!(output->o_expflags & EXP_FLAG_ESC_GLOB_CHARS));
7026 o_addQstr(output, val);
7033 static NOINLINE int expand_one_var(o_string *output, int n,
7393 n = encode_then_append_var_plusminus(output, n, exp_word,
7447 n = append_str_maybe_ifs_split(output, n, first_ch, val);
7458 static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg)
7460 /* output->o_expflags & EXP_FLAG_SINGLEWORD (0x80) if we are in
7467 !!(output->o_expflags & EXP_FLAG_SINGLEWORD));
7468 debug_print_list("expand_vars_to_list[0]", output, n);
7476 if (output->ended_in_ifs) {
7477 o_addchr(output, '\0');
7478 n = o_save_ptr(output, n);
7479 output->ended_in_ifs = 0;
7482 o_addblock(output, arg, p - arg);
7483 debug_print_list("expand_vars_to_list[1]", output, n);
7490 first_ch = arg[0] | (output->o_expflags & EXP_FLAG_SINGLEWORD);
7514 n = expand_on_ifs(output, n, G.global_argv[i]);
7519 o_addchr(output, '\0');
7520 debug_print_list("expand_vars_to_list[2]", output, n);
7521 n = o_save_ptr(output, n);
7522 debug_print_list("expand_vars_to_list[3]", output, n);
7529 && !(output->o_expflags & EXP_FLAG_SINGLEWORD) /* not v="$@" case */
7532 o_addQstr(output, G.global_argv[i]);
7535 o_addchr(output, '\0');
7536 debug_print_list("expand_vars_to_list[4]", output, n);
7537 n = o_save_ptr(output, n);
7541 o_addQstr(output, G.global_argv[i]);
7545 o_addchr(output, G.ifs[0]);
7547 output->has_quoted_part = 1;
7554 output->has_quoted_part = 1;
7562 o_addchr(output, SPECIAL_VAR_SYMBOL);
7572 /* Can't just stuff it into output o_string,
7579 n = append_str_maybe_ifs_split(output, n, first_ch, subst_result.data);
7597 /* && (output->o_expflags & EXP_FLAG_ESC_GLOB_CHARS) */
7603 o_grow_by(output, 1);
7604 output->data[output->length++] = '\\';
7606 o_addstr(output, arith_buf);
7612 n = expand_one_var(output, n, first_ch, arg, &p);
7625 if (output->ended_in_ifs) {
7626 o_addchr(output, '\0');
7627 n = o_save_ptr(output, n);
7629 debug_print_list("expand_vars_to_list[a]", output, n);
7633 o_addstr(output, arg);
7634 debug_print_list("expand_vars_to_list[b]", output, n);
7636 if (output->length == o_get_last_ptr(output, n) /* expansion is empty */
7638 && !output->has_quoted_part
7642 output->has_empty_slot = 1;
7652 o_string output = NULL_O_STRING;
7654 output.o_expflags = expflags;
7659 output.ended_in_ifs = 0;
7660 n = o_save_ptr(&output, n);
7666 n = expand_vars_to_list(&output, n, *argv++);
7667 /* if (!output->has_empty_slot) -- need this?? */
7668 o_addchr(&output, '\0');
7670 debug_print_list("expand_variables", &output, n);
7672 /* output.data (malloced in one block) gets returned in "list" */
7673 list = o_finalize_list(&output, n);
8191 * parent shell's traps. It only says that its output
8201 * # (trap) <--- trap is in subshell - no output (correct, traps are reset)
8202 * # true | trap <--- trap is in subshell - no output (ditto)
8203 * # echo `true | trap` <--- in subshell - output (but traps are reset!)
8205 * # echo `(trap)` <--- in subshell in subshell - output
8207 * # echo `true | (trap)` <--- in subshell in subshell in subshell - output!
10019 /* If someone gives us an empty string: `cmd with empty output` */
10311 /* Pass read (output) pipe end to next iteration */
10952 * in bash, set -o produces this output:
11389 * standard output is a terminal