diff options
author | David Robillard <d@drobilla.net> | 2009-05-13 16:04:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-13 16:04:14 +0000 |
commit | aa473d19780f2670bb828835ee7ce970571016cf (patch) | |
tree | 0483fcb2cc350b3cc2f660f22449f803ae12f93d /src/ingen | |
parent | 44ddb73018b96a6979b4339f4ba234e5c97741f8 (diff) | |
download | ingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.gz ingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.bz2 ingen-aa473d19780f2670bb828835ee7ce970571016cf.zip |
Strip trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/ingen')
-rw-r--r-- | src/ingen/cmdline.c | 118 | ||||
-rw-r--r-- | src/ingen/cmdline.h | 6 | ||||
-rw-r--r-- | src/ingen/main.cpp | 30 |
3 files changed, 77 insertions, 77 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); } diff --git a/src/ingen/cmdline.h b/src/ingen/cmdline.h index 8777d391..e185ffbe 100644 --- a/src/ingen/cmdline.h +++ b/src/ingen/cmdline.h @@ -1,6 +1,6 @@ /** @file cmdline.h * @brief The header file for the command line option parser - * generated by GNU Gengetopt + * generated by GNU Gengetopt * http://www.gnu.org/software/gengetopt. * DO NOT modify this file, since it can be overwritten * @author GNU Gengetopt by Lorenzo Bettini */ @@ -62,7 +62,7 @@ struct gengetopt_args_info char * run_arg; /**< @brief Run script. */ char * run_orig; /**< @brief Run script original value given at command line. */ const char *run_help; /**< @brief Run script help description. */ - + unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ unsigned int client_port_given ; /**< @brief Whether client-port was given. */ @@ -161,7 +161,7 @@ void cmdline_parser_print_help(void); void cmdline_parser_print_version(void); /** - * Initializes all the fields a cmdline_parser_params structure + * Initializes all the fields a cmdline_parser_params structure * to their default values * @param params the structure to initialize */ diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index b5256c21..4bf60080 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -1,15 +1,15 @@ /* This file is part of Ingen. * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * + * * Ingen is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -180,14 +180,14 @@ main(int argc, char** argv) cerr << "Unable to load engine module." << endl; } } - + /* Load client library */ if (args.load_given || args.gui_given) { client_module = Ingen::Shared::load_module("ingen_client"); if (!client_module) cerr << "Unable to load client module." << endl; } - + /* If we don't have a local engine interface (for GUI), use network */ if (client_module && ! engine_interface) { SharedPtr<Shared::EngineInterface> (*new_remote_interface)(const std::string&) = NULL; @@ -200,7 +200,7 @@ main(int argc, char** argv) return -1; } } - + /* Activate the engine, if we have one */ if (engine) { Ingen::JackAudioDriver* (*new_driver)( @@ -217,9 +217,9 @@ main(int argc, char** argv) engine->activate(args.parallelism_arg); } - + world->engine = engine_interface; - + void (*gui_run)() = NULL; /* Load GUI */ @@ -247,7 +247,7 @@ main(int argc, char** argv) boost::optional<Path> data_path = Path("/"); boost::optional<Path> parent; boost::optional<Symbol> symbol; - + if (args.path_given) { const Glib::ustring path = args.path_arg; if (Path::is_valid(path)) { @@ -266,15 +266,15 @@ main(int argc, char** argv) bool found = false; if (!world->serialisation_module) world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); - + Serialisation::Parser* (*new_parser)() = NULL; if (world->serialisation_module) found = world->serialisation_module->get_symbol("new_parser", (void*&)new_parser); - + if (world->serialisation_module && found) { SharedPtr<Serialisation::Parser> parser(new_parser()); - + // Assumption: Containing ':' means URI, otherwise filename string uri = args.load_arg; if (uri.find(':') == string::npos) { @@ -293,7 +293,7 @@ main(int argc, char** argv) return -1; } } - + /* Run GUI (if applicable) */ if (run_gui) gui_run(); @@ -319,14 +319,14 @@ main(int argc, char** argv) #else cerr << "This build of ingen does not support scripting." << endl; #endif - + /* Listen to OSC and do our own main thing. */ } else if (engine && !run_gui) { signal(SIGINT, catch_int); signal(SIGTERM, catch_int); engine->main(); } - + if (engine) { engine->deactivate(); engine.reset(); |