From 3740e1450ca6974bc85cc711ce039068f1b9ca1c Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 29 May 2026 11:48:03 +0200 Subject: [PATCH] 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. --- CMakeLists.txt | 4 ++-- README.md | 6 +++--- creator.c | 4 ++-- flag.c | 4 ++-- flagdir.c | 4 ++-- grant.c | 4 ++-- kern_wasm.asm | 2 +- ncopy.c | 4 ++-- c32ncp.c => ncpapi.c | 4 ++-- c32ncp.h => ncpapi.h | 8 ++++---- ncpcall.c | 6 +++--- ndir.c | 4 ++-- net.h | 2 +- nwtests.c | 4 ++-- remove.c | 4 ++-- revoke.c | 4 ++-- rights.c | 4 ++-- trustee.c | 2 +- whoami.c | 4 ++-- 19 files changed, 39 insertions(+), 39 deletions(-) rename c32ncp.c => ncpapi.c (99%) rename c32ncp.h => ncpapi.h (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 101a7b8..ae434cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ if(MARS_NWE_BUILD_DOSUTILS) revoke.c remove.c trustee.c - c32ncp.c + ncpapi.c nwcrypt.c nwdebug.c nwtests.c @@ -122,7 +122,7 @@ if(MARS_NWE_BUILD_DOSUTILS) "${CMAKE_CURRENT_SOURCE_DIR}/${src}" "${CMAKE_CURRENT_SOURCE_DIR}/net.h" "${CMAKE_CURRENT_SOURCE_DIR}/kern.h" - "${CMAKE_CURRENT_SOURCE_DIR}/c32ncp.h" + "${CMAKE_CURRENT_SOURCE_DIR}/ncpapi.h" "${CMAKE_CURRENT_SOURCE_DIR}/nwcrypt.h" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" VERBATIM diff --git a/README.md b/README.md index 572d8e1..948a866 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,8 @@ CAPTURE.EXE LPT1 Q1 The modern Client32 path is implemented through a small reusable helper layer: -- `c32ncp.c` -- `c32ncp.h` +- `ncpapi.c` +- `ncpapi.h` - Client32 assembly entry points in `kern_wasm.asm` The working sequence is: @@ -678,7 +678,7 @@ They also install selected copies such as `login.exe`, `map.exe`, and `slist.exe - `kern_wasm.asm` is the 16-bit Open Watcom assembly implementation used by the modern build. - `kern.c` was an experimental C-side test wrapper and is no longer required by the current Client32 FLAG/FLAGDIR path. -- `c32ncp.c` and `c32ncp.h` contain reusable Client32 NCP helper functions for DOS tools. +- `ncpapi.c` and `ncpapi.h` contain reusable Client32 NCP helper functions for DOS tools. - `trustee.c` and `trustee.h` contain shared code for `GRANT`, `REVOKE`, and `REMOVE`. - `tools.c` contains shared command/frontend helpers so future smaller multicall binaries can reuse common parsing and path code. - The verified Client32 path uses NCP 87 subfunction 6 for obtaining DOS information, subfunction 7 for modifying DOS information, subfunction 29 for effective rights, and trustee scan/add/delete calls for the trustee tools. diff --git a/creator.c b/creator.c index 55be176..34e21ea 100644 --- a/creator.c +++ b/creator.c @@ -19,7 +19,7 @@ /* * Purpose: CREATOR utility for showing and changing NetWare file creator/owner metadata. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ /* creator.c - friendly creator/modifier/archiver metadata test tool * @@ -29,7 +29,7 @@ */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #define DM_CREATE_DATE 0x00000004UL #define DM_CREATE_TIME 0x00000008UL diff --git a/flag.c b/flag.c index b6704a7..907dd53 100644 --- a/flag.c +++ b/flag.c @@ -19,12 +19,12 @@ /* * Purpose: FLAG utility for displaying and changing NetWare DOS file attributes. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ /* flag.c - Novell FLAG-like DOS utility, stage 1 */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include /* diff --git a/flagdir.c b/flagdir.c index fd65cba..ed2ce23 100644 --- a/flagdir.c +++ b/flagdir.c @@ -19,12 +19,12 @@ /* * Purpose: FLAGDIR utility for displaying and changing NetWare directory attributes. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ /* flagdir.c - Novell FLAGDIR-like DOS utility, Client32 version */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include #include diff --git a/grant.c b/grant.c index 625d71e..cb36ea2 100644 --- a/grant.c +++ b/grant.c @@ -19,12 +19,12 @@ /* * Purpose: GRANT utility for assigning trustee rights on NetWare directories and files. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ /* grant.c - Novell GRANT-like DOS utility, first Client32 implementation */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #define GRANT_BINDERY_USER 0x0001 #define GRANT_BINDERY_GROUP 0x0002 diff --git a/kern_wasm.asm b/kern_wasm.asm index e039606..a59ffd2 100644 --- a/kern_wasm.asm +++ b/kern_wasm.asm @@ -18,7 +18,7 @@ ; along with this program; if not, see . ; Purpose: Open Watcom WASM/MASM-syntax port of the low-level DOS, IPX, NetWare requester and Client32 glue. -; Depends on: kern.h declarations, netcall.c and c32ncp.c callers, net.h shared types. +; Depends on: kern.h declarations, netcall.c and ncpapi.c callers, net.h shared types. ; diff --git a/ncopy.c b/ncopy.c index 3bafb23..dd89f9d 100644 --- a/ncopy.c +++ b/ncopy.c @@ -19,7 +19,7 @@ /* * Purpose: NCOPY utility implementation and experimental server-side-copy/NCP74 investigation code. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ @@ -31,7 +31,7 @@ */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include #include #include diff --git a/c32ncp.c b/ncpapi.c similarity index 99% rename from c32ncp.c rename to ncpapi.c index fcc7a5c..154f765 100644 --- a/c32ncp.c +++ b/ncpapi.c @@ -20,11 +20,11 @@ /* * Purpose: Semantically named NCP API helper implementation used by the NetWare DOS tools. - * Depends on: net.h, c32ncp.h, ncpcall.c requester/transport helpers, and netcall.c for shared requester state. This file is planned to become ncpapi.c. + * Depends on: net.h, ncpapi.h, ncpcall.c requester/transport helpers, and netcall.c for shared requester state. This file contains the protocol API layer above the low-level requester transport helpers. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" /* * Legacy bindery/login NCP API wrappers. diff --git a/c32ncp.h b/ncpapi.h similarity index 97% rename from c32ncp.h rename to ncpapi.h index 3b1da9a..dae18d5 100644 --- a/c32ncp.h +++ b/ncpapi.h @@ -19,14 +19,14 @@ /* * Purpose: Public declarations for namespace and file-system NCP API helpers. - * Depends on: net.h data types and c32ncp.c implementation; this file is planned to become ncpapi.h. + * Depends on: net.h data types and ncpapi.c implementation; this file is planned to become ncpapi.h. */ -/* c32ncp.h - namespace/file-system NCP API helpers for mars-dosutils */ +/* ncpapi.h - NetWare/NCP protocol API helpers for mars-dosutils */ -#ifndef C32NCP_H -#define C32NCP_H +#ifndef NCPAPI_H +#define NCPAPI_H UI ncp_build_handle_path(uint8 *buf, uint8 dhandle, uint16 dirbase, uint8 style, diff --git a/ncpcall.c b/ncpcall.c index 08fb9a3..9ed97f2 100644 --- a/ncpcall.c +++ b/ncpcall.c @@ -20,15 +20,15 @@ /* * Purpose: Low-level NCP requester and Client32 transport helpers for the NetWare DOS tools. - * Depends on: net.h, c32ncp.h, netcall.c requester glue, and kern_wasm.asm/kern.asm Net_Call/Client32 request entry points. + * Depends on: net.h, ncpapi.h, netcall.c requester glue, and kern_wasm.asm/kern.asm Net_Call/Client32 request entry points. * - * The public ncpXX_YY_* protocol wrappers live in c32ncp.c, which is planned + * The public ncpXX_YY_* protocol wrappers live in ncpapi.c, which is planned * to become ncpapi.c. This file keeps the lower-level requester/transport * helpers that those API wrappers use. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" /* Client32 raw requester transport helpers used by the NCP API wrappers. */ diff --git a/ndir.c b/ndir.c index fe70c0e..41c29e3 100644 --- a/ndir.c +++ b/ndir.c @@ -19,14 +19,14 @@ /* * Purpose: NDIR utility for Novell-style directory listings and metadata display. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ /* ndir.c - first Novell NDIR-like directory listing utility */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include #include #include diff --git a/net.h b/net.h index 1db7d24..599f3ad 100644 --- a/net.h +++ b/net.h @@ -20,7 +20,7 @@ /* * Purpose: Shared public header for the DOS utility collection: types, prototypes and common structures. - * Depends on: kern.h, all command modules, netcall.c, ncpcall.c, tools.c and c32ncp.c. + * Depends on: kern.h, all command modules, netcall.c, ncpcall.c, tools.c and ncpapi.c. */ #include diff --git a/nwtests.c b/nwtests.c index 2abbe55..1451c2d 100644 --- a/nwtests.c +++ b/nwtests.c @@ -20,11 +20,11 @@ /* * Purpose: NWTESTS diagnostic utility for exercising NetWare requester, NCP and namespace behavior. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #define TEST_RIGHT_S 0x01 #define TEST_RIGHT_R 0x02 diff --git a/remove.c b/remove.c index 911d223..658ced5 100644 --- a/remove.c +++ b/remove.c @@ -19,11 +19,11 @@ /* * Purpose: REMOVE utility for removing trustee rights from NetWare directories and files. - * Depends on: net.h, c32ncp.h, trustee.h/trustee.c trustee helpers, netcall.c requester helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, trustee.h/trustee.c trustee helpers, netcall.c requester helpers, tools.c shared utility routines. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include "trustee.h" #include #include diff --git a/revoke.c b/revoke.c index 4fa8bff..9038bce 100644 --- a/revoke.c +++ b/revoke.c @@ -19,11 +19,11 @@ /* * Purpose: REVOKE utility for deleting trustee assignments from NetWare directories and files. - * Depends on: net.h, c32ncp.h, trustee.h/trustee.c trustee helpers, netcall.c requester helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, trustee.h/trustee.c trustee helpers, netcall.c requester helpers, tools.c shared utility routines. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include "trustee.h" #ifndef _A_NORMAL diff --git a/rights.c b/rights.c index ac3514d..8a983dc 100644 --- a/rights.c +++ b/rights.c @@ -19,11 +19,11 @@ /* * Purpose: RIGHTS utility for displaying effective NetWare rights. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #include #include #include diff --git a/trustee.c b/trustee.c index 69325a3..510d3f7 100644 --- a/trustee.c +++ b/trustee.c @@ -19,7 +19,7 @@ /* * Purpose: Shared trustee and rights helper implementation for GRANT, REMOVE and REVOKE style tools. - * Depends on: net.h, trustee.h, c32ncp.h callers, netcall.c requester helpers, tools.c shared utility routines. + * Depends on: net.h, trustee.h, ncpapi.h callers, netcall.c requester helpers, tools.c shared utility routines. */ #include "net.h" diff --git a/whoami.c b/whoami.c index a21d2ba..f3125f9 100644 --- a/whoami.c +++ b/whoami.c @@ -19,11 +19,11 @@ /* * Purpose: WHOAMI utility for displaying the current NetWare login identity and context information. - * Depends on: net.h, c32ncp.h, netcall.c requester helpers, c32ncp.c namespace/NCP helpers, tools.c shared utility routines. + * Depends on: net.h, ncpapi.h, netcall.c requester helpers, ncpapi.c namespace/NCP helpers, tools.c shared utility routines. */ #include "net.h" -#include "c32ncp.h" +#include "ncpapi.h" #define WHO_BINDERY_USER 0x0001 #define WHO_BINDERY_GROUP 0x0002