KJ7LNW / xnec2c

Xnec2c is a high-performance multi-threaded electromagnetic simulation package to model antenna near- and far-field radiation patterns for Linux and UNIX operating systems.
https://www.xnec2c.org/
GNU General Public License v3.0
77 stars 16 forks source link

xnec2c --help output should go to stdout, not stderr #18

Closed ndim closed 1 year ago

ndim commented 1 year ago

The output of xnec2c --help should be written to stdout just like xnec2c --version already writes to stdout. Both the --help and the --version branch exit the program with exit(0) so there is no reason to assume either output is somewhat error related.

Note that fixing this does not mean we can enable the std-options Automake flag for make installcheck time checking that all installed programs support --help and --version.

For some reason (might be GTK3 limitations, limitations by the default way of using GTK3, or limitations by xnec2c), xnec2c opens the display before handling --help or --version.

So the check for --help and --version would fail in headless build environments until opening the display has been moved after parsing and handling of the CLI arguments.

KJ7LNW commented 1 year ago

Headless mode is on the list so things like this will work:

xnec2c --batch --headless --write-csv t.csv examples/airplane.nec

For now this commit is just fine, merging.