Lines Matching refs:as_string

738 	o_string as_string;  member
3846 ctx->as_string.data, in done_pipe()
3847 ctx->as_string.length - 1 /* do not copy last char, "&" */ in done_pipe()
4068 int len = old->as_string.length; in reserved_word()
4070 o_addstr(&old->as_string, ctx->as_string.data); in reserved_word()
4071 o_free(&ctx->as_string); in reserved_word()
4073 str = old->as_string.data + len; in reserved_word()
4074 if (str > old->as_string.data) in reserved_word()
4076 while (str > old->as_string.data && isalpha(str[-1])) in reserved_word()
4298 #define parse_redir_right_fd(as_string, input) \ argument
4301 static int parse_redir_right_fd(o_string *as_string, struct in_str *input) in parse_redir_right_fd() argument
4310 nommu_addchr(as_string, ch); in parse_redir_right_fd()
4314 nommu_addchr(as_string, ch); in parse_redir_right_fd()
4323 nommu_addchr(as_string, ch); in parse_redir_right_fd()
4349 dup_num = parse_redir_right_fd(&ctx->as_string, input); in parse_redirect()
4357 nommu_addchr(&ctx->as_string, ch); in parse_redirect()
4370 nommu_addchr(&ctx->as_string, ch); in parse_redirect()
4443 #define fetch_till_str(as_string, input, word, skip_tabs) \ argument
4446 static char *fetch_till_str(o_string *as_string, in fetch_till_str() argument
4469 nommu_addchr(as_string, ch); in fetch_till_str()
4491 nommu_addchr(as_string, ch); in fetch_till_str()
4521 nommu_addchr(as_string, ch); in fetch_till_str()
4534 #define fetch_heredocs(as_string, pi, heredoc_cnt, input) \ argument
4537 static int fetch_heredocs(o_string *as_string, struct pipe *pi, int heredoc_cnt, struct in_str *inp… 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()
4605 # define as_string NULL in parse_group() macro
4607 char *as_string = NULL; in parse_group()
4634 nommu_addchr(&ctx->as_string, ch); in parse_group()
4642 nommu_addchr(&ctx->as_string, ch); in parse_group()
4678 nommu_addchr(&ctx->as_string, ch); in parse_group()
4683 pipe_list = parse_stream(&as_string, &heredoc_cnt, input, endch); in parse_group()
4686 if (as_string) in parse_group()
4687 o_addstr(&ctx->as_string, as_string); in parse_group()
4694 free(as_string); in parse_group()
4700 as_string[strlen(as_string) - 1] = '\0'; /* plink ')' or '}' */ in parse_group()
4701 command->group_as_string = as_string; in parse_group()
4731 #undef as_string in parse_group()
4932 #define parse_dollar_squote(as_string, dest, input) \ argument
4934 #define as_string NULL macro
4936 static int parse_dollar_squote(o_string *as_string, o_string *dest, struct in_str *input) in parse_dollar_squote() argument
4948 nommu_addchr(as_string, ch); in parse_dollar_squote()
4951 nommu_addchr(as_string, ch); in parse_dollar_squote()
4967 nommu_addchr(as_string, ch); in parse_dollar_squote()
4980 nommu_addchr(as_string, ch); in parse_dollar_squote()
4988 nommu_addchr(as_string, ch); in parse_dollar_squote()
5018 # undef as_string 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
5028 #define as_string NULL macro
5030 static int parse_dollar(o_string *as_string, in parse_dollar() argument
5040 nommu_addchr(as_string, ch); in parse_dollar()
5053 nommu_addchr(as_string, ch); in parse_dollar()
5059 nommu_addchr(as_string, ch); in parse_dollar()
5079 nommu_addchr(as_string, ch); in parse_dollar()
5094 nommu_addchr(as_string, ch); in parse_dollar()
5117 nommu_addchr(as_string, ch); in parse_dollar()
5136 nommu_addchr(as_string, ch); in parse_dollar()
5173 nommu_addchr(as_string, '/'); in parse_dollar()
5198 if (as_string) { in parse_dollar()
5199 o_addstr(as_string, dest->data + pos); in parse_dollar()
5200 o_addchr(as_string, last_ch); in parse_dollar()
5233 nommu_addchr(as_string, ch); in parse_dollar()
5237 nommu_addchr(as_string, ch); in parse_dollar()
5244 if (as_string) { in parse_dollar()
5245 o_addstr(as_string, dest->data + pos); in parse_dollar()
5246 o_addchr(as_string, ')'); in parse_dollar()
5247 o_addchr(as_string, ')'); in parse_dollar()
5260 if (as_string) { in parse_dollar()
5261 o_addstr(as_string, dest->data + pos); in parse_dollar()
5262 o_addchr(as_string, ')'); in parse_dollar()
5277 nommu_addchr(as_string, ch); in parse_dollar()
5290 #undef as_string in parse_dollar()
5294 #define encode_string(as_string, dest, input, dquote_end) \ argument
5296 #define as_string NULL macro
5298 static int encode_string(o_string *as_string, in encode_string() argument
5309 nommu_addchr(as_string, ch); in encode_string()
5348 nommu_addchr(as_string, ch); in encode_string()
5354 if (!parse_dollar(as_string, dest, input, /*quote_mask:*/ 0x80)) { in encode_string()
5380 #undef as_string in encode_string()
5462 debug_printf_parse("as_string1 '%s'\n", ctx.as_string.data); in parse_stream()
5464 *pstring = ctx.as_string.data; in parse_stream()
5466 o_free(&ctx.as_string); in parse_stream()
5489 nommu_addchr(&ctx.as_string, '\\'); in parse_stream()
5491 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5507 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5511 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5524 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5642 heredoc_cnt = fetch_heredocs(&ctx.as_string, ctx.list_head, heredoc_cnt, input); in parse_stream()
5705 debug_printf_parse("as_string2 '%s'\n", ctx.as_string.data); in parse_stream()
5707 *pstring = ctx.as_string.data; in parse_stream()
5709 o_free(&ctx.as_string); in parse_stream()
5743 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5765 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5769 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5793 nommu_addchr(&ctx.as_string, '\n'); 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()
5843 nommu_addchr(&ctx.as_string, next); in parse_stream()
5850 if (!encode_string(&ctx.as_string, &ctx.word, input, '"')) in parse_stream()
5864 o_addstr(&ctx.as_string, ctx.word.data + pos); in parse_stream()
5865 o_addchr(&ctx.as_string, '`'); in parse_stream()
5888 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5908 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5924 nommu_addchr(&ctx.as_string, ch); in parse_stream()
5998 o_free(&pctx->as_string); in parse_stream()