1 /* match.h - interface to shell ##/%% matching code */
4 #define SHELL_MATCH_H 1
6 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
8 typedef char *(*scan_t)(char *string, char *match, bool match_at_left);
10 char *scanleft(char *string, char *match, bool match_at_left);
11 char *scanright(char *string, char *match, bool match_at_left);
13 static inline scan_t pick_scan(char op1, char op2, bool *match_at_left)
21 *match_at_left = true;
22 return op1 == op2 ? scanright : scanleft;
24 *match_at_left = false;
25 return op1 == op2 ? scanleft : scanright;
29 POP_SAVED_FUNCTION_VISIBILITY