This makes the first non-option argument end getopt_long() parsing
stop rather than shuffling non-option arguments to the end. This is
necessary so that rig/rotator command language arguments can start
with a '-' character and also it enables the '-' pseudo command to
switch to reading commands from stdin work correctly.
The change also make checking for the '-', switch to stdin, command
stricter in that it must be where a command is expected and it must be
a word containing exactly a single '-' character.
Overall this allows the following styles of use:
$ rigctl R -
$ rigctl - <<EOF
>R -
>EOF
R -
$ echo "R -" | rigctl -
R -
$ rigctl -m 1 M CW -1
$ rigctl F 434000000 - <<EOF
>M FM 15000
>f m
>EOF
M FM 15000
f 145000000
m FM
15000
$
as well as the command line interpreter operation where no commands
nor '-' are provided:
$ rigctl
Rig command: R -
Rig command: r
Rptr Shift: -
Rig command: f
Frequency: 145000000
Rig command: m
Mode: FM
Passband: 15000
Rig command: F 434000000
Rig command: f
Frequency: 434000000
Rig command: q
$
Implement first cut at storing and recalling history. At this point
history is retained for the current session only.
History is stored as complete command lines even if values are entered
at separate prompts. Readline allows editing and even deleting recalled
history lines.
Initial implementation of Readline input handling. Only if 'configure'
finds Readline will it be enabled and when enabled it will only be used
by rotctl in interactive mode. Passing rotator commands from the rotctl
command line and rotctld use the original input handling which has not
been modified.
Implemented hash table to temporarily store and sort the rot models by ID
to print the --list by model numbers. Hash is implemented using
uthash.h, see http://uthash.sourceforge.net/
Suppressed rot backend register output by setting rig_debug_level to 0
for list output.
Removed rotlist definition of RPC backend.
Avoid null pointer segfault when -C param is specified with no '=' e.g.
"rigctl -C foo".
Thanks to Charles Suprin <hamaa1vs@gmail.com> for the report.
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3058 7ae35d74-ebe9-4afe-98af-79ac388436b8