/* primary string parsing: */
static int redirect_dup_num(struct in_str *input);
static int redirect_opt_num(o_string *o);
+#if ENABLE_HUSH_TICK
static int process_command_subs(o_string *dest, struct p_context *ctx, struct in_str *input, const char *subst_end);
+#endif
static int parse_group(o_string *dest, struct p_context *ctx, struct in_str *input, int ch);
static const char *lookup_param(const char *src);
static char *make_string(char **inp);
return num;
}
+#if ENABLE_HUSH_TICK
static FILE *generate_stream_from_list(struct pipe *head)
{
FILE *pf;
debug_printf("pclosed, retcode=%d\n", retcode);
return retcode;
}
+#endif
static int parse_group(o_string *dest, struct p_context *ctx,
struct in_str *input, int ch)
}
b_addchr(dest, SPECIAL_VAR_SYMBOL);
break;
+#if ENABLE_HUSH_TICK
case '(':
b_getch(input);
process_command_subs(dest, ctx, input, ")");
break;
+#endif
case '-':
case '_':
/* still unhandled, but should be eventually */
dest->nonnull = 1;
dest->quote = !dest->quote;
break;
+#if ENABLE_HUSH_TICK
case '`':
process_command_subs(dest, ctx, input, "`");
break;
+#endif
case '>':
redir_fd = redirect_opt_num(dest);
done_word(dest, ctx);
* and on most machines that would be faster (reduced L1 cache use).
*/
memset(charmap, CHAR_ORDINARY, sizeof(charmap));
+#if ENABLE_HUSH_TICK
set_in_charmap("\\$\"`", CHAR_SPECIAL);
+#else
+ set_in_charmap("\\$\"", CHAR_SPECIAL);
+#endif
set_in_charmap("<>;&|(){}#'", CHAR_ORDINARY_IF_QUOTED);
- set_in_charmap(ifs, CHAR_IFS); /* also flow through if quoted */
+ set_in_charmap(ifs, CHAR_IFS); /* are ordinary if quoted */
}
/* most recursion does not come through here, the exception is