]> git.tuebingen.mpg.de Git - paraslash.git/commit
Convert audiod commands to lopsub.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 7 May 2016 08:59:01 +0000 (10:59 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
commitf5cf47f2bc4bb76d0d21e2467c5846cade38558f
treede0360240df224457f1d53cdcd499b06890d4802
parentdbb405c2381c2264ab7da2aa80bdb2cfc6e9d51d
Convert audiod commands to lopsub.

The four command lists (server, afs, audiod, play) and all executables
will be converted to the long option parser library (lopsub). This
first patch converts the audiod commands (on, off, cycle...) and adds
the necessary infrastructure to the build system. The option parser
for para_audiod is still generated by gengetopt and will be converted
in a subsequent patch.

The build system is updated to include an autoconf test which
checks for the lopsub library and the lopsubgen executable. If the
check fails, it prints instructions on how to download the lopsub
package. Moreover, a section on lopsub is added to the INSTALL file
and the library is listed as a required tool in the manual.

The options and help texts of all audiod commands are moved from
audiod.cmd to the new file audiod_cmd.suite.m4. Until all command
lists are converted, man_util.bash needs an ugly hack to deal with
the two kinds of files.

The help texts have been reworked slightly, but no syntactical
changes were performed. However, one side effect of the change is
that options to audiod commands now accept short and long options,
and that short options may be combined in the usual way.

The error subsystem of paraslash is extended to treat lopsub errors
analogous to errors from the osl libary: we reserve a new bit for
error codes returned from lopsub library functions and a lls() wrapper
function that must be used for all lopsub functions which return a
lopsub error code on failure. The E_INVALID_AUDIOD_CMD error code
can be removed since invalid commands are now detected by the lopsub
library, which returns its own error code in this case.

As a result of the conversion, struct audiod_command can be removed.
Command handlers now take a pointer to a lopsub parse result instead
of the (argc, argv) pair.

The patch also changes the completers for audiod commands in
audioc.c. to use the information in the generated audioc_cmd.lsg.h
header file instead of duplicating this information.

With the patch applied, para_audiod and para_audioc need to be linked
with -llopsub.

We still need to include ggo.h from audiod_command.c until receivers,
filters and writers have been converted as well.
15 files changed:
INSTALL
Makefile.in
Makefile.real
audioc.c
audiod.c
audiod.cmd
audiod_command.c
configure.ac
error.h
grab_client.c
grab_client.h
m4/lls/audiod_cmd.suite.m4 [new file with mode: 0644]
m4/lls/makefile [new file with mode: 0644]
man_util.bash
web/manual.md