dosutils: factor shared helpers and update README
Move common DOS utility helper code into tools.c and expose it through net.h. This removes duplicated command-local helpers from GRANT, RIGHTS, FLAG, FLAGDIR and the trustee helper layer. The shared helpers cover case-insensitive argument comparison, help and option detection, /FILES and /SUBDIRS parsing, current network directory handle lookup, current volume prefix formatting, uppercase DOS path copying, basename/header-path handling, wildcard detection and simple path joining/splitting. Keep the command frontends smaller and less coupled so the current multicall utility can later be split into smaller grouped multicall binaries, such as trustee tools, login/session tools and file/flag tools. Update the DOS utilities README for the newer Client32 and trustee commands. Document RIGHTS, GRANT, REVOKE and REMOVE in the status, feature, command and install sections. Add command reference entries for the trustee tools, including Novell-style syntax, supported rights, recursive/file options and missing-trustee behavior. Also mention the shared trustee helper layer and common tools.c helpers used by the newer command frontends.
This commit is contained in:
20
net.h
20
net.h
@@ -146,6 +146,26 @@ extern uint8 *upstr(uint8 *s);
|
||||
extern void korrpath(char *s);
|
||||
extern void get_path_fn(char *s, char *p, char *fn);
|
||||
|
||||
/* Shared DOS utility helpers. Keep command frontends small so the
|
||||
* historical multicall net.exe can later be split into smaller groups. */
|
||||
extern int tool_strsame(char *a, char *b);
|
||||
extern int tool_is_help_arg(char *s);
|
||||
extern int tool_is_option(char *s);
|
||||
extern int tool_is_files_option(char *s);
|
||||
extern int tool_is_subdirs_option(char *s);
|
||||
extern int tool_get_current_drive(void);
|
||||
extern int tool_current_dhandle(uint8 *connid, uint8 *dhandle);
|
||||
extern int tool_current_prefix(char *out, int max);
|
||||
extern int tool_is_current_path(char *path);
|
||||
extern void tool_upcopy(char *dst, char *src, int max);
|
||||
extern void tool_basename(char *dst, char *src, int max);
|
||||
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_pattern(char *dir, char *pattern, char *path,
|
||||
int maxdir, int maxpat);
|
||||
|
||||
#define reb(s) deb((s)),leb((s))
|
||||
|
||||
extern void deb(uint8 *s);
|
||||
|
||||
Reference in New Issue
Block a user