Hybrid Call Patch for NNCP

As of v8.12.0, NNCP no longer compiles into a suite of standalone programs, one for each utility (nncp-file, nncp-call, nncp-toss, etc.). It now compiles into a single binary, and each utility is invoked by creating a symlink named as the utility (nncp-file -> nncp, nncp-call -> nncp, nncp-toss -> nncp, etc.). The program checks the name it was called as, then it invokes the utility specified by the name. This paradigm is referred to as a "multi-call" binary.

Unfortunately, this broke my workflow with NNCP. I'd created a script called 'nncp' that took the first argument and invoked the utility named by the argument (nncp file -> nncp-file, nncp call -> nncp-call, nncp toss -> nncp-toss, etc.). This is referred to as a "single-call" binary. After the v8.12.0 update, the unified binary now conflicted with my script in $PATH, and the official binary did not accept my argument-based syntax.

My preference would be to have a hybrid single- and multi-call binary. Busybox behaves in a similar way: to invoke busybox's "ls" utility, one can either run "busybox ls" at the command line, or one can create a symlink "ls -> busybox" and invoke "ls".

Recently I learned just enough Go to modify NNCP to my liking. Fortunately, I only needed to do was change one source file to include the intended behavior, so the change was quite easy.

I want to submit this patch to Sergey, the developer of NNCP, but all of my messages are bouncing from both his personal e-mail address and the nncp-devel mailing list. However, I still want to share the patch in case anyone else wants to use it. I'm therefore attaching it to this post.

nncp-hybrid-call.patch

Posted in: s/NNCP

๐Ÿš€ jsreed5 [mod]

2025-12-23 ยท 4 months ago ยท ๐Ÿ‘ BBSman, nerd, Cotteux, DdlyHeadshot