Commit Graph

16 Commits

Author SHA1 Message Date
Mario Fetka
b6bdbf958f 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.
2026-05-29 12:46:13 +02:00
Mario Fetka
3740e1450c ncpapi: rename c32ncp files to NCP API names
Finish the c32ncp.c/c32ncp.h to ncpapi.c/ncpapi.h rename.

Update the build files, include directives, dependency tracking, header guard,
README references and file-level comments to use the new ncpapi naming. This
matches the current split where ncpapi contains the ncpXX_YY_* protocol API
wrappers and ncpcall contains the lower-level requester/transport helpers.

No behavior change.
2026-05-29 11:48:03 +02:00
Mario Fetka
40e7ebf939 ncpcalls: rename remaining C32 transport symbols
Rename the remaining C32-prefixed transport helpers, probe helpers, types and
constants to protocol-oriented NCP names.

This removes implementation-oriented c32/C32 naming from the shared NCP API and
transport layer while keeping the current c32ncp.c/c32ncp.h file names until
the later ncpapi.c/ncpapi.h rename. The new names avoid conflicts by using
ncp_* helper names and NCP_* type/constant prefixes.

No behavior change.
2026-05-29 11:32:09 +02:00
Mario Fetka
7c1499a16c ncpapi: use protocol names for NCP wrapper functions
Rename the public NCP wrapper functions in c32ncp.c/c32ncp.h from c32_ncp*
implementation-oriented names to protocol-oriented ncpXX_YY_* names.

This prepares the code for a later c32ncp.c/c32ncp.h -> ncpapi.c/ncpapi.h
file rename while keeping the current file names unchanged for now. The new
names keep the NCP function/subfunction visible and describe the operation
performed by each wrapper.

Update all callers to use the new names. Transport-specific helpers such as
c32_get_ncp_handle() are left unchanged.

No behavior change.
2026-05-29 10:50:05 +02:00
Mario Fetka
adf16cab28 ncpcalls: keep bindery access level wrapper on NCP14 name
Rename the bindery access level wrapper from ncp17_46_get_bindery_access_level()
to ncp14_46_get_bindery_access_level().

The previous rename made the operation look like a normal NCP17 bindery wrapper,
but the historic implementation used the ncp_14_46 naming. Keep that protocol
reference visible while retaining the descriptive operation name.

No behavior change.
2026-05-29 10:01:48 +02:00
Mario Fetka
53e28c6bfe ncpcalls: use descriptive names for NCP wrapper functions
Rename the low-level NCP wrapper functions in ncpcall.c and net.h to include
both the NCP function/subfunction number and the operation they perform.

This keeps the numeric protocol reference visible for comparison with SDK
documentation and MARS-NWE logs, while making call sites easier to understand.
Update all callers to use the new names.

No behavior change.
2026-05-29 09:55:33 +02:00
Mario Fetka
b3cec8eecf tools: add shared current directory handle helper
Add tool_current_dhandle_only() as a small wrapper for callers that only need
the current NetWare directory handle.

Replace the local creator_current_dhandle() and tests_current_dhandle()
implementations in CREATOR and NWTESTS with the shared helper. This removes
duplicate requester-current-directory code without changing behavior.
2026-05-29 09:38:08 +02:00
Mario Fetka
5fa36cc6f4 dosutils: use shared case-insensitive string helper
Replace local case-insensitive argument comparison helpers in MAP, SLIST,
WHOAMI and NWTESTS with the shared tool_strsame() helper.

This removes small duplicate helpers without changing command parsing behavior.
Trustee-specific wrappers and the experimental NCOPY code are intentionally
left untouched.
2026-05-29 09:32:23 +02:00
Mario Fetka
fc91f3f274 tools: add shared NCP22 name helper
Move the common NCP22 DOS name buffer helper into tools.c and declare it in
net.h.

Replace the local copy/uppercase implementations in CREATOR, FLAG, FLAGDIR,
NDIR and NWTESTS with tool_copy_ncp22_name(). The helper keeps the existing
behavior: uppercase conversion, path separator rejection and the 1..12 byte
DOS name length limit.

NCOPY is intentionally left untouched while its NCP copy path remains under
investigation.
2026-05-29 09:26:28 +02:00
Mario Fetka
50524cf759 dosutils: add GPL-2 headers and file descriptions
Add GPL-2-or-later license headers to the DOS utility source files and
document the purpose and local dependencies of each C, header and assembler
file.

Preserve the original Martin Stover copyright attribution for the historic
MARS-NWE utility sources, including files that did not previously carry an
explicit header but are part of the original tool set. Add Mario Fetka as the
2026 copyright holder for the current maintenance work, and use Mario-only
headers for files without original Martin Stover ownership.

Also add a root-level COPYING file containing the GPL-2 license text.
2026-05-29 08:07:09 +02:00
Mario Fetka
0df41482c7 dosutils: add creator and supporting NCP helpers
Add the CREATOR utility and wire it into the DOS tools build and NET
command dispatch.

Extend the client-side NCP helpers with the calls needed by the new and
updated tools, including DOS namespace information and effective-rights
queries. Also update MAP handling for automatic drive mappings used by
the login script.

This commit contains the tool/source support only. The DOS baseline test
suite is kept separate and will be added in a follow-up commit.
2026-05-27 13:31:02 +02:00
Mario Fetka
87c1e50cf9 feat: add Client32 NCP support for FLAG 2026-05-24 00:33:28 +02:00
Mario Fetka
7f98d73738 test: add DOS interrupt and kernel test helpers 2026-05-24 00:33:17 +02:00
Mario Fetka
82b0f918dd build: add Open Watcom build support 2026-05-24 00:30:28 +02:00
Mario Fetka
f375f79cce mars_dosutils-0.10 2026-05-24 00:29:46 +02:00
Mario Fetka
5e6805dd31 mars_dosutils-0.01 2011-11-13 00:40:40 +01:00