tools: add shared parent path helper
Move the common parent path extraction helper into tools.c and declare it in net.h. Replace the local implementations in RIGHTS, NDIR and NWTESTS with tool_parent_path(). The helper keeps the existing behavior of uppercasing the path and preserving a trailing volume colon for parent paths such as SYS:. No behavior change.
This commit is contained in:
1
net.h
1
net.h
@@ -166,6 +166,7 @@ extern void tool_header_path(char *out, char *path, int max);
|
||||
extern int tool_is_dot_dir(char *name);
|
||||
extern void tool_join_path(char *out, char *base, char *name, int max);
|
||||
extern int tool_has_wildcards(char *path);
|
||||
extern void tool_parent_path(char *dst, char *src, int max);
|
||||
extern void tool_parent_pattern(char *dir, char *pattern, char *path,
|
||||
int maxdir, int maxpat);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user