From cba237c9e6b74e94fee72378f6ef88a6ab63dac5 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 2 Jun 2026 15:47:48 +0000 Subject: [PATCH] docs: clarify direct print versus queue printing --- AI.md | 33 ++++++++++++++++++--------------- TODO.md | 14 ++++++++------ src/nwconn.c | 19 +++++++++++++------ 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/AI.md b/AI.md index 16355db..03c389d 100644 --- a/AI.md +++ b/AI.md @@ -11,18 +11,18 @@ When the user says this is a new chat or asks to continue mars-nwe work, first read this file before proposing patches or making assumptions. Then ask for, or use, the current project status that the user pasted into the chat. -## Current handoff status after patch 0218 +## Current handoff status after patch 0219 The current accepted patch line in this chat is expected to include: - endpoint-audit/documentation patches through `0176-docs-audit-direct-lifecycle-buffer-endpoints.patch`; - redesign documentation patches `0177` through `0198`; -- endpoint-audit/documentation patches `0199` through `0218`; -- latest expected patch name: `0218-docs-audit-print-spool-stubs.patch`. +- endpoint-audit/documentation patches `0199` through `0219`; +- latest expected patch name: `0219-docs-clarify-direct-print-vs-queue-printing.patch`. When continuing in a new chat, first ask the user which patch was actually last -applied. If they confirm `0218`, build the next patch as `0219-...` against a -tree that already contains `0218`. If any patch failed or was skipped, rebuild +applied. If they confirm `0219`, build the next patch as `0220-...` against a +tree that already contains `0219`. If any patch failed or was skipped, rebuild against the last confirmed applied patch instead of assuming the file in `/mnt/data` was accepted. @@ -198,18 +198,21 @@ Schema/import direction: Latest endpoint audit note: -- Patch `0218` audits SDK `0x2222/17` / wire `0x11` Print/Spool as a +- Patch `0218` audits SDK `0x2222/17` / wire `0x11` direct Print/Spool as a NetWare 2.x/3.x/4.x compatibility family. No active top-level source - handler exists, so the documented selector slots `17/00` Write To Spool - File, `17/01` Close Spool File, `17/02` Set Spool File Flags, `17/03` - Spool A Disk File, `17/06` Get Printer Status, `17/09` Create Spool File, - and `17/10` Get Printer's Queue are recorded as a disabled `#if 0` source - stub in `src/nwconn.c`. -- Future implementation belongs to a print/spool compatibility provider, - probably sharing queue provider concepts for queued output, but not to - `nwnds`. The stub is intentionally inactive and has no runtime effect. + handler exists for these legacy direct spool NCPs, so the documented selector + slots `17/00` Write To Spool File, `17/01` Close Spool File, `17/02` Set + Spool File Flags, `17/03` Spool A Disk File, `17/06` Get Printer Status, + `17/09` Create Spool File, and `17/10` Get Printer's Queue are recorded as a + disabled `#if 0` source stub in `src/nwconn.c`. +- Do not describe printing as wholly unimplemented: queue-based printing already + exists through print queues, `Q_UNIX_PRINT`, and queue-job close/service + paths. The audited gap is the older direct SDK 17 spool/printer NCP family. +- Future direct-spool implementation should reuse or bridge to the existing + queue printing machinery where possible, but it does not belong to `nwnds`. + The stub is intentionally inactive and has no runtime effect. -The next patch number should be `0219` if `0218` was applied. Likely next +The next patch number should be `0220` if `0219` was applied. Likely next blocks are deeper `0x2222/23` bindery/property/admin subfunction coverage, SDK `0x2222/36`/`37` NCP Extension scope, SDK `0x2222/90` scope, or another user-selected endpoint family. diff --git a/TODO.md b/TODO.md index 7ec626e..35ab681 100644 --- a/TODO.md +++ b/TODO.md @@ -206,13 +206,15 @@ Present in the code but not yet fully endpoint-audited: planned NetWare-4.x/NDS work. The top-level source case remains active as unsupported (`0xfb`), while the documented 104/01..104/08 selector slots are recorded behind `#if MARS_NWE_4` in `src/nwconn.c`. -- SDK `0x2222/17` / wire `0x11` Print/Spool is source-stub-audited +- SDK `0x2222/17` / wire `0x11` direct Print/Spool is source-stub-audited as a NetWare 2.x/3.x/4.x compatibility family. There is no active - top-level handler, so patch 0218 records the documented selector slots - `17/00`, `17/01`, `17/02`, `17/03`, `17/06`, `17/09`, and `17/10` as a - disabled `#if 0` stub in `src/nwconn.c`. Future implementation belongs to - a print/spool compatibility provider, likely integrated with queue handling, - not to `nwnds`. + top-level handler for these legacy direct spool NCPs, so patch 0218 records + the documented selector slots `17/00`, `17/01`, `17/02`, `17/03`, `17/06`, + `17/09`, and `17/10` as a disabled `#if 0` stub in `src/nwconn.c`. This + is not a statement that all printing is absent: queue-based printing already + exists through print queues, `Q_UNIX_PRINT`, and queue-job close/service + paths. Any future direct-spool implementation should reuse that queue + printing machinery where possible, and it does not belong to `nwnds`. SDK-listed blocks that do not currently show a top-level handler in `src/nwconn.c`: diff --git a/src/nwconn.c b/src/nwconn.c index 1b9ebd4..27e3971 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -5568,18 +5568,25 @@ static int handle_ncp_serv(void) break; #if 0 - case 0x11 : { /* SDK 17 / wire 0x11 Print / Spool group. - * Coverage: missing top-level handler in the current - * source, so keep the eligible NetWare 2.x/3.x/4.x print - * selector map as a disabled documentation stub. + case 0x11 : { /* SDK 17 / wire 0x11 direct Print / Spool group. + * Coverage: no active top-level handler for these legacy + * direct spool NCPs exists in the current source, so keep + * the eligible NetWare 2.x/3.x/4.x selector map as a + * disabled documentation stub. This does not mean that + * all printing is missing: MARS-NWE already has queue- + * based print handling through print queues, Q_UNIX_PRINT, + * and queue-job close/service paths. The gap here is the + * old SDK 17 direct spool/printer NCP family. * Request handoff: SDK 17 requests carry a 16-bit * SubFunctionStrucLen at requestdata[0..1], followed by * the one-byte SubFunctionCode at requestdata[2]. * Reply ownership: a future print/spool provider would * return normal Completion plus per-subfunction payload; * nwconn would still own the final client reply envelope. - * Future owner: print/spool compatibility provider, likely - * integrated with queue handling but not with nwnds. + * Future owner: direct print/spool compatibility provider or + * queue-provider glue; it should reuse the existing queue + * printing implementation where possible, not move to + * nwnds. */ int print_sub = (requestlen >= (int)sizeof(NCPREQUEST) + 3) ? (int)requestdata[2] : -1;