summaryrefslogtreecommitdiffstats
path: root/src/ingen/cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ingen/cmdline.c')
-rw-r--r--src/ingen/cmdline.c118
1 files changed, 59 insertions, 59 deletions
diff --git a/src/ingen/cmdline.c b/src/ingen/cmdline.c
index bb41cb23..39ffff3e 100644
--- a/src/ingen/cmdline.c
+++ b/src/ingen/cmdline.c
@@ -1,7 +1,7 @@
/*
- File autogenerated by gengetopt
+ File autogenerated by gengetopt
generated with the following command:
- gengetopt -g
+ gengetopt -g
The developers of gengetopt consider the fixed text that goes in all
gengetopt output files to be in the public domain:
@@ -99,7 +99,7 @@ void clear_args (struct gengetopt_args_info *args_info)
args_info->path_orig = NULL;
args_info->run_arg = NULL;
args_info->run_orig = NULL;
-
+
}
static
@@ -119,7 +119,7 @@ void init_args_info(struct gengetopt_args_info *args_info)
args_info->parallelism_help = gengetopt_args_info_help[9] ;
args_info->path_help = gengetopt_args_info_help[10] ;
args_info->run_help = gengetopt_args_info_help[11] ;
-
+
}
void
@@ -164,7 +164,7 @@ void
cmdline_parser_params_init(struct cmdline_parser_params *params)
{
if (params)
- {
+ {
params->override = 0;
params->initialize = 1;
params->check_required = 1;
@@ -176,9 +176,9 @@ cmdline_parser_params_init(struct cmdline_parser_params *params)
struct cmdline_parser_params *
cmdline_parser_params_create(void)
{
- struct cmdline_parser_params *params =
+ struct cmdline_parser_params *params =
(struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params));
- cmdline_parser_params_init(params);
+ cmdline_parser_params_init(params);
return params;
}
@@ -210,8 +210,8 @@ cmdline_parser_release (struct gengetopt_args_info *args_info)
free_string_field (&(args_info->path_orig));
free_string_field (&(args_info->run_arg));
free_string_field (&(args_info->run_orig));
-
-
+
+
clear_given (args_info);
}
@@ -263,7 +263,7 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
write_into_file(outfile, "path", args_info->path_orig, 0);
if (args_info->run_given)
write_into_file(outfile, "run", args_info->run_orig, 0);
-
+
i = EXIT_SUCCESS;
return i;
@@ -328,7 +328,7 @@ cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *ar
cmdline_parser_free (args_info);
exit (EXIT_FAILURE);
}
-
+
return result;
}
@@ -337,7 +337,7 @@ cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_
{
int result;
struct cmdline_parser_params params;
-
+
params.override = override;
params.initialize = initialize;
params.check_required = check_required;
@@ -351,7 +351,7 @@ cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_
cmdline_parser_free (args_info);
exit (EXIT_FAILURE);
}
-
+
return result;
}
@@ -384,7 +384,7 @@ static char *package_name = 0;
*/
static
int update_arg(void *field, char **orig_field,
- unsigned int *field_given, unsigned int *prev_given,
+ unsigned int *field_given, unsigned int *prev_given,
char *value, char *possible_values[], const char *default_value,
cmdline_parser_arg_type arg_type,
int check_ambiguity, int override,
@@ -403,17 +403,17 @@ int update_arg(void *field, char **orig_field,
if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
{
if (short_opt != '-')
- fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n",
+ fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n",
package_name, long_opt, short_opt,
(additional_error ? additional_error : ""));
else
- fprintf (stderr, "%s: `--%s' option given more than once%s\n",
+ fprintf (stderr, "%s: `--%s' option given more than once%s\n",
package_name, long_opt,
(additional_error ? additional_error : ""));
return 1; /* failure */
}
-
+
if (field_given && *field_given && ! override)
return 0;
if (prev_given)
@@ -483,14 +483,14 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
int error = 0;
struct gengetopt_args_info local_args_info;
-
+
int override;
int initialize;
int check_required;
int check_ambiguity;
-
+
package_name = argv[0];
-
+
override = params->override;
initialize = params->initialize;
check_required = params->check_required;
@@ -543,120 +543,120 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
exit (EXIT_SUCCESS);
case 'C': /* Client OSC port. */
-
-
- if (update_arg( (void *)&(args_info->client_port_arg),
+
+
+ if (update_arg( (void *)&(args_info->client_port_arg),
&(args_info->client_port_orig), &(args_info->client_port_given),
&(local_args_info.client_port_given), optarg, 0, 0, ARG_INT,
check_ambiguity, override, 0, 0,
"client-port", 'C',
additional_error))
goto failure;
-
+
break;
case 'c': /* Connect to existing engine at URI. */
-
-
- if (update_arg( (void *)&(args_info->connect_arg),
+
+
+ if (update_arg( (void *)&(args_info->connect_arg),
&(args_info->connect_orig), &(args_info->connect_given),
&(local_args_info.connect_given), optarg, 0, "osc.udp://localhost:16180", ARG_STRING,
check_ambiguity, override, 0, 0,
"connect", 'c',
additional_error))
goto failure;
-
+
break;
case 'e': /* Run (JACK) engine. */
-
-
+
+
if (update_arg((void *)&(args_info->engine_flag), 0, &(args_info->engine_given),
&(local_args_info.engine_given), optarg, 0, 0, ARG_FLAG,
check_ambiguity, override, 1, 0, "engine", 'e',
additional_error))
goto failure;
-
+
break;
case 'E': /* Engine OSC port. */
-
-
- if (update_arg( (void *)&(args_info->engine_port_arg),
+
+
+ if (update_arg( (void *)&(args_info->engine_port_arg),
&(args_info->engine_port_orig), &(args_info->engine_port_given),
&(local_args_info.engine_port_given), optarg, 0, "16180", ARG_INT,
check_ambiguity, override, 0, 0,
"engine-port", 'E',
additional_error))
goto failure;
-
+
break;
case 'g': /* Launch the GTK graphical interface. */
-
-
+
+
if (update_arg((void *)&(args_info->gui_flag), 0, &(args_info->gui_given),
&(local_args_info.gui_given), optarg, 0, 0, ARG_FLAG,
check_ambiguity, override, 1, 0, "gui", 'g',
additional_error))
goto failure;
-
+
break;
case 'n': /* JACK client name. */
-
-
- if (update_arg( (void *)&(args_info->jack_name_arg),
+
+
+ if (update_arg( (void *)&(args_info->jack_name_arg),
&(args_info->jack_name_orig), &(args_info->jack_name_given),
&(local_args_info.jack_name_given), optarg, 0, "ingen", ARG_STRING,
check_ambiguity, override, 0, 0,
"jack-name", 'n',
additional_error))
goto failure;
-
+
break;
case 'l': /* Load patch. */
-
-
- if (update_arg( (void *)&(args_info->load_arg),
+
+
+ if (update_arg( (void *)&(args_info->load_arg),
&(args_info->load_orig), &(args_info->load_given),
&(local_args_info.load_given), optarg, 0, 0, ARG_STRING,
check_ambiguity, override, 0, 0,
"load", 'l',
additional_error))
goto failure;
-
+
break;
case 'p': /* Number of concurrent process threads. */
-
-
- if (update_arg( (void *)&(args_info->parallelism_arg),
+
+
+ if (update_arg( (void *)&(args_info->parallelism_arg),
&(args_info->parallelism_orig), &(args_info->parallelism_given),
&(local_args_info.parallelism_given), optarg, 0, "1", ARG_INT,
check_ambiguity, override, 0, 0,
"parallelism", 'p',
additional_error))
goto failure;
-
+
break;
case 'L': /* Target path for loaded patch. */
-
-
- if (update_arg( (void *)&(args_info->path_arg),
+
+
+ if (update_arg( (void *)&(args_info->path_arg),
&(args_info->path_orig), &(args_info->path_given),
&(local_args_info.path_given), optarg, 0, 0, ARG_STRING,
check_ambiguity, override, 0, 0,
"path", 'L',
additional_error))
goto failure;
-
+
break;
case 'r': /* Run script. */
-
-
- if (update_arg( (void *)&(args_info->run_arg),
+
+
+ if (update_arg( (void *)&(args_info->run_arg),
&(args_info->run_orig), &(args_info->run_given),
&(local_args_info.run_given), optarg, 0, 0, ARG_STRING,
check_ambiguity, override, 0, 0,
"run", 'r',
additional_error))
goto failure;
-
+
break;
case 0: /* Long option with no short option */
@@ -681,7 +681,7 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
return 0;
failure:
-
+
cmdline_parser_release (&local_args_info);
return (EXIT_FAILURE);
}