Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/usr.bin/nc
Module Name: src
Committed By: kre
Date: Tue Mar 3 03:14:41 UTC 2026
Modified Files:
src/usr.bin/nc: netcat.c
Log Message:
Clean up code, NFCI.
Add the /* $NetBSD$ */ header line, which wasn't added
when this was originally imported (NetBSD __RCSID was).
Move more of the CRYPTO related code into #ifdef CRYPTO
than was done before (global var decls, etc).
The -e option is CRYPTO related, does nothing without
the CRYPTO code, so move it out of the regular options,
retaining it only with CRYPTO.
The V option however (which was included with the CRYPTO
options in the getopts() arg string) is not CRYPTO related,
it is OpenBSD, and (when building for OpenBSD) would apply
to either CRYPTO or not. Fix that (though it makes no
difference when we exclude both CRYPTO & OpenBSD options).
Don't do run time tests that can never be relevant (like
insisting that -c cannot be used with -u, when there is
no -c option when CRYPTO is not defined). This change was
also needed as the var that -c would set, and which was
being tested, no longer exists without CRYPTO. The tests
moved into the #ifdef CRYPTO section.
None of this makes any practical difference to the operation
of nc on NetBSD (usage message changes slightly, as the
useless -e is now gone from it).
nb: this code does not build with CRYPTO defined, it would
need work should anyone desire any of that to be included.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/nc/netcat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index