struct alsa_write_args_info *conf = para_calloc(sizeof(*conf));
/* exits on errors */
- alsa_cmdline_parser(argc, argv, conf);
+ alsa_write_cmdline_parser(argc, argv, conf);
return conf;
}
static void alsa_free_config(void *conf)
{
- alsa_cmdline_parser_free(conf);
+ alsa_write_cmdline_parser_free(conf);
}
/**
{
struct alsa_write_args_info dummy;
- alsa_cmdline_parser_init(&dummy);
+ alsa_write_cmdline_parser_init(&dummy);
w->close = alsa_close;
w->pre_select = alsa_write_pre_select;
w->post_select = alsa_write_post_select;
.short_help = alsa_write_args_info_help,
.detailed_help = alsa_write_args_info_detailed_help
};
- alsa_cmdline_parser_free(&dummy);
+ alsa_write_cmdline_parser_free(&dummy);
}
struct amp_filter_args_info *amp_conf = para_calloc(sizeof(*amp_conf));
int ret = -E_AMP_SYNTAX;
- if (amp_cmdline_parser(argc, argv, amp_conf))
+ if (amp_filter_cmdline_parser(argc, argv, amp_conf))
goto err;
ret = -ERRNO_TO_PARA_ERROR(EINVAL);
if (amp_conf->amp_arg < 0)
static void amp_free_config(void *conf)
{
- amp_cmdline_parser_free(conf);
+ amp_filter_cmdline_parser_free(conf);
}
/**
{
struct amp_filter_args_info dummy;
- amp_cmdline_parser_init(&dummy);
+ amp_filter_cmdline_parser_init(&dummy);
f->open = amp_open;
f->close = amp_close;
f->pre_select = generic_filter_pre_select;
struct ao_write_args_info *conf = para_calloc(sizeof(*conf));
/* exits on errors */
- ao_cmdline_parser(argc, argv, conf);
+ ao_write_cmdline_parser(argc, argv, conf);
return conf;
}
static void aow_free_config(void *conf)
{
- ao_cmdline_parser_free(conf);
+ ao_write_cmdline_parser_free(conf);
}
/**
ao_info **driver_list;
char **dh; /* detailed help */
- ao_cmdline_parser_init(&dummy);
+ ao_write_cmdline_parser_init(&dummy);
w->close = aow_close;
w->pre_select = aow_pre_select;
w->post_select = aow_post_select;
}
dh[num_lines] = NULL;
w->help.detailed_help = (const char **)dh;
- ao_cmdline_parser_free(&dummy);
+ ao_write_cmdline_parser_free(&dummy);
ao_shutdown();
}
= para_calloc(sizeof(*compress_conf));
ret = -E_COMPRESS_SYNTAX;
- if (compress_cmdline_parser(argc, argv, compress_conf))
+ if (compress_filter_cmdline_parser(argc, argv, compress_conf))
goto err;
*config = compress_conf;
return 1;
static void compress_free_config(void *conf)
{
- compress_cmdline_parser_free(conf);
+ compress_filter_cmdline_parser_free(conf);
}
/**
{
struct compress_filter_args_info dummy;
- compress_cmdline_parser_init(&dummy);
+ compress_filter_cmdline_parser_init(&dummy);
f->open = compress_open;
f->close = compress_close;
f->pre_select = generic_filter_pre_select;
struct file_write_args_info *conf = para_calloc(sizeof(*conf));
/* exits on errors */
- file_cmdline_parser(argc, argv, conf);
+ file_write_cmdline_parser(argc, argv, conf);
return conf;
}
static void file_write_free_config(void *conf)
{
- file_cmdline_parser_free(conf);
+ file_write_cmdline_parser_free(conf);
}
/** the init function of the file writer */
{
struct file_write_args_info dummy;
- file_cmdline_parser_init(&dummy);
+ file_write_cmdline_parser_init(&dummy);
w->pre_select = file_write_pre_select;
w->post_select = file_write_post_select;
w->parse_config_or_die = file_write_parse_config_or_die;
.short_help = file_write_args_info_help,
.detailed_help = file_write_args_info_detailed_help
};
- file_cmdline_parser_free(&dummy);
+ file_write_cmdline_parser_free(&dummy);
}
-args "--unamed-opts=audio_file"
+args "--unamed-opts=audio_file --no-handle-version"
include(header.m4)
<qu>
-args "--unamed-opts=command"
+args "--unamed-opts=command --conf-parser --no-handle-version"
include(header.m4)
<qu>
-args "--no-handle-help"
+args "--no-handle-help --no-handle-version --conf-parser"
include(header.m4)
define(CURRENT_PROGRAM,para_audiod)
-args "--unamed-opts=command --no-handle-error"
+args "--unamed-opts=command --no-handle-error --conf-parser --no-handle-version"
include(header.m4)
define(CURRENT_PROGRAM,para_client)
+args "--conf-parser --no-handle-version"
+
section "General options"
#########################
-args "--no-handle-help"
+args "--no-handle-help --no-handle-version --conf-parser"
include(header.m4)
include(loglevel.m4)
+args "--conf-parser --no-handle-version"
+
include(header.m4)
define(CURRENT_PROGRAM,para_gui)
define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf)
-module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
-
-$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir)
- @[ -z "$(Q)" ] || echo 'GGO $<'
- $(Q) $(GENGETOPT) $(module_ggo_opts) \
- --output-dir=$(cmdline_dir) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
-
-$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo | $(cmdline_dir)
- @[ -z "$(Q)" ] || echo 'GGO $<'
- $(Q) $(GENGETOPT) $(module_ggo_opts) \
- --output-dir=$(cmdline_dir) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
-$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
- @[ -z "$(Q)" ] || echo 'GGO $<'
- $(Q) $(GENGETOPT) $(module_ggo_opts) \
- --output-dir=$(cmdline_dir) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
-
-define ggo-opts
---conf-parser \
---output-dir=$(cmdline_dir) \
---no-handle-version \
---file-name=$(*F).cmdline \
---func-name=$(*F)_cmdline_parser \
---arg-struct-name=$(*F)_args_info \
---set-package="para_$(*F)" \
---set-version="$(PACKAGE_VERSION)"
+define ggo_opts
+ --output-dir=$(cmdline_dir) \
+ --set-version="$(PACKAGE_VERSION)" \
+ --arg-struct-name=$(*F)_args_info \
+ --file-name=$(*F).cmdline \
+ --func-name=$(*F)_cmdline_parser \
+ --set-package="para_$(*F)"
endef
$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
@[ -z "$(Q)" ] || echo 'GGO $<'
- $(Q) $(GENGETOPT) $(ggo-opts) < $<
+ $(Q) $(GENGETOPT) $(ggo_opts) < $<
$(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
$(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \
-args "--no-handle-help"
+args "--no-handle-help --no-handle-version"
include(header.m4)
include(loglevel.m4)
+args "--conf-parser --no-handle-version"
+
include(header.m4)
define(CURRENT_PROGRAM,para_server)
define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf)
-args "--no-handle-help"
+args "--no-handle-help --no-handle-version"
include(header.m4)
include(loglevel.m4)
mp3_conf = para_calloc(sizeof(*mp3_conf));
ret = -E_MP3DEC_SYNTAX;
- if (mp3dec_cmdline_parser(argc, argv, mp3_conf))
+ if (mp3dec_filter_cmdline_parser(argc, argv, mp3_conf))
goto err;
*config = mp3_conf;
return 1;
static void mp3dec_free_config(void *conf)
{
- mp3dec_cmdline_parser_free(conf);
+ mp3dec_filter_cmdline_parser_free(conf);
}
/**
* The init function of the mp3dec filter.
{
struct mp3dec_filter_args_info dummy;
- mp3dec_cmdline_parser_init(&dummy);
+ mp3dec_filter_cmdline_parser_init(&dummy);
f->open = mp3dec_open;
f->close = mp3dec_close;
f->parse_config = mp3dec_parse_config;
struct oss_write_args_info *conf = para_calloc(sizeof(*conf));
/* exits on errors */
- oss_cmdline_parser(argc, argv, conf);
+ oss_write_cmdline_parser(argc, argv, conf);
return conf;
}
static void oss_free_config(void *conf)
{
- oss_cmdline_parser_free(conf);
+ oss_write_cmdline_parser_free(conf);
}
/**
{
struct oss_write_args_info dummy;
- oss_cmdline_parser_init(&dummy);
+ oss_write_cmdline_parser_init(&dummy);
w->close = oss_close;
w->pre_select = oss_pre_select;
w->post_select = oss_post_select;
.short_help = oss_write_args_info_help,
.detailed_help = oss_write_args_info_detailed_help
};
- oss_cmdline_parser_free(&dummy);
+ oss_write_cmdline_parser_free(&dummy);
}
struct osx_write_args_info *conf = para_calloc(sizeof(*conf));
/* exits on errors */
- osx_cmdline_parser(argc, argv, conf);
+ osx_write_cmdline_parser(argc, argv, conf);
return conf;
}
static void osx_free_config(void *conf)
{
- osx_cmdline_parser_free(conf);
+ osx_write_cmdline_parser_free(conf);
}
static void osx_write_close(struct writer_node *wn)
{
struct osx_write_args_info dummy;
- osx_cmdline_parser_init(&dummy);
+ osx_write_cmdline_parser_init(&dummy);
w->close = osx_write_close;
w->pre_select = osx_write_pre_select;
w->post_select = osx_write_post_select;
.short_help = osx_write_args_info_help,
.detailed_help = osx_write_args_info_detailed_help
};
- osx_cmdline_parser_free(&dummy);
+ osx_write_cmdline_parser_free(&dummy);
}
= para_calloc(sizeof(*prebuffer_conf));
int ret = -E_PREBUFFER_SYNTAX;
- if (prebuffer_cmdline_parser(argc, argv, prebuffer_conf))
+ if (prebuffer_filter_cmdline_parser(argc, argv, prebuffer_conf))
goto err;
ret = -ERRNO_TO_PARA_ERROR(EINVAL);
if (prebuffer_conf->duration_arg < 0)
static void prebuffer_free_config(void *conf)
{
- prebuffer_cmdline_parser_free(conf);
+ prebuffer_filter_cmdline_parser_free(conf);
}
/**
{
struct prebuffer_filter_args_info dummy;
- prebuffer_cmdline_parser_init(&dummy);
+ prebuffer_filter_cmdline_parser_init(&dummy);
f->open = prebuffer_open;
f->close = prebuffer_close;
f->parse_config = prebuffer_parse_config;