1 /* match.h - interface to shell ##/%% matching code */
4 #define SHELL_MATCH_H 1
6 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
8 //TODO! Why ash.c still uses internal version?!
10 typedef char *(*scan_t)(char *string, char *match, bool match_at_left);
12 char *scanleft(char *string, char *match, bool match_at_left);
13 char *scanright(char *string, char *match, bool match_at_left);
15 static inline scan_t pick_scan(char op1, char op2, bool *match_at_left)
23 *match_at_left = true;
24 return op1 == op2 ? scanright : scanleft;
26 *match_at_left = false;
27 return op1 == op2 ? scanleft : scanright;
31 POP_SAVED_FUNCTION_VISIBILITY