Invoking `readexe` without arguments gives garbage
More precisely, when invoking readexe without any arguments, the "not enough arguments" message is normally prefixed with the program's name; however, the included err.c functions instead get the message prefixed with nothing, or worse, random garbage, like this DOSbox screenshot of the Watcom 16-bit DOS build shows:
Ideally, it should read readexe or READEXE.EXE or something similar.
Defining NEED_ERR for the preprocessor was all that was required. The failure was in the failure to call setprogname() in main() as it was conditionally compiled only if NEED_ERR was set. As a result, err()-family functions would use the pointer returned by getprogname(), stored in the __progname variable. Unfortunately, this is only initialized by a call to setprogname(), and without this call, the value of __progname is undefined.