diff options
author | Paul Smith <psmith@gnu.org> | 2013-10-05 16:10:30 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-10-05 16:10:30 -0400 |
commit | 9297abbdaabdd594716550fe48cd5902c895ea39 (patch) | |
tree | 7bd7b902fd68f6df94c90d7544184067031a2502 /main.c | |
parent | 67fa98eac519d6958f805f495e45b87146835432 (diff) | |
download | make-9297abbdaabdd594716550fe48cd5902c895ea39.tar.gz |
Sanitize the registered function interface.
Expand the characters which are legal in a function name, and check
the name for validity. Create a type for the function pointer.
Convert the last argument from a boolean to flags, to allow for expansion.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -612,10 +612,13 @@ initialize_stopchar_map () stopchar_map[(int)':'] = MAP_COLON; stopchar_map[(int)'%'] = MAP_PERCENT; stopchar_map[(int)'|'] = MAP_PIPE; - stopchar_map[(int)'.'] = MAP_DOT; + stopchar_map[(int)'.'] = MAP_DOT | MAP_USERFUNC; stopchar_map[(int)','] = MAP_COMMA; stopchar_map[(int)'$'] = MAP_VARIABLE; + stopchar_map[(int)'-'] = MAP_USERFUNC; + stopchar_map[(int)'_'] = MAP_USERFUNC; + stopchar_map[(int)'/'] = MAP_PATHSEP; #if defined(VMS) stopchar_map[(int)']'] = MAP_PATHSEP; @@ -629,6 +632,8 @@ initialize_stopchar_map () stopchar_map[i] = MAP_BLANK; if (isspace(i)) stopchar_map[i] |= MAP_SPACE; + if (isalnum(i)) + stopchar_map[i] = MAP_USERFUNC; } } |