X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=dabc2f77eb18d8b705241acc0753fd2fbbe34736;hp=337c8062e2b4257f47e7412d3d1ca631edd503a1;hb=f5cf47f2bc4bb76d0d21e2467c5846cade38558f;hpb=9b406cbe5d20ba969713ca3d7a8033e697476d75 diff --git a/audioc.c b/audioc.c index 337c8062..dabc2f77 100644 --- a/audioc.c +++ b/audioc.c @@ -16,6 +16,8 @@ #include #include "audioc.cmdline.h" +#include "audiod_cmd.lsg.h" + #include "para.h" #include "error.h" #include "net.h" @@ -24,7 +26,8 @@ #include "ggo.h" #include "version.h" -INIT_AUDIOC_ERRLISTS; +/** Array of error strings. */ +DEFINE_PARA_ERRLIST; /** The gengetopt structure containing command line args. */ static struct audioc_args_info conf; @@ -71,7 +74,6 @@ fail: #include "sched.h" #include "buffer_tree.h" #include "interactive.h" -#include "audiod.completion.h" static struct sched sched; @@ -99,7 +101,7 @@ static void help_completer(struct i9e_completion_info *ci, static void version_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { - char *opts[] = {"-v", NULL}; + char *opts[] = {LSG_AUDIOD_CMD_VERSION_OPTS, NULL}; if (ci->word_num <= 2 && ci->word && ci->word[0] == '-') i9e_complete_option(opts, ci, cr); @@ -109,7 +111,7 @@ static void stat_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { char *sia[] = {STATUS_ITEM_ARRAY NULL}; - char *opts[] = {"-p", NULL}; + char *opts[] = {LSG_AUDIOD_CMD_STAT_OPTS, NULL}; if (ci->word_num <= 2 && ci->word && ci->word[0] == '-') i9e_complete_option(opts, ci, cr); @@ -120,12 +122,16 @@ static void stat_completer(struct i9e_completion_info *ci, static void grab_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { - char *opts[] = {"-ms", "-ms", "-ma", "-p=", "-n=", "-o", NULL}; + char *opts[] = {LSG_AUDIOD_CMD_GRAB_OPTS, NULL}; i9e_complete_option(opts, ci, cr); } +I9E_DUMMY_COMPLETER(SUPERCOMMAND_UNAVAILABLE); static struct i9e_completer audiod_completers[] = { - AUDIOD_COMPLETERS +#define LSG_AUDIOD_CMD_CMD(_name) {.name = #_name, \ + .completer = _name ## _completer} + LSG_AUDIOD_CMD_SUBCOMMANDS +#undef LSG_AUDIOD_CMD_CMD {.name = NULL} };