Author: tjansen Date: Tue Oct 27 16:14:25 2009 New Revision: 1337 Log: Cosmetics: Moved cd_get_cmdargs() behind cd_print_version() and cd_print_usage(). This saves 2 forward declarations. Modified: trunk/pisacd/cdmain.c Modified: trunk/pisacd/cdmain.c ============================================================================== --- trunk/pisacd/cdmain.c Tue Oct 27 16:14:15 2009 (r1336) +++ trunk/pisacd/cdmain.c Tue Oct 27 16:14:25 2009 (r1337) @@ -54,12 +54,6 @@ }; /** - * Prototype declarations of functions. - */ -static void cd_print_usage(char **argv); -static void cd_print_version(void); - -/** * A connection is removed permanently from the list. Clean up all associated * state. * @@ -138,46 +132,6 @@ } /** - * Get command line arguments and parse them. - * - * @param argc number of command arguments - * @param argv pointer to the array of command arguments - */ -static void cd_get_cmdargs(int argc, char **argv) -{ - int c = 0; - int option_index = 0; - - while ((c = getopt_long(argc, argv, OPTS, cd_longopts, &option_index)) != -1) { - switch (c) { - case 'f': - strncpy(cd_cfg.conffile, optarg, sizeof(cd_cfg.conffile)); - break; - case 'p': - cd_cfg.port_control = atoi(optarg); - break; - case 'q': - cd_cfg.port_data = atoi(optarg); - break; - case 'b': - cd_ctx.is_bgrun = TRUE; - break; - case 'd': - strncpy(cd_cfg.debuglevel, "all", sizeof(cd_cfg.debuglevel)); - break; - case 'v': - cd_print_version(); - break; - case 'h': - cd_print_usage(argv); - break; - default: - cd_print_usage(argv); - } - } -} - -/** * static void cd_print_usage(char **argv) * * Print usage instructions of client daemon. @@ -257,6 +211,46 @@ } /** + * Get command line arguments and parse them. + * + * @param argc number of command arguments + * @param argv pointer to the array of command arguments + */ +static void cd_get_cmdargs(int argc, char **argv) +{ + int c = 0; + int option_index = 0; + + while ((c = getopt_long(argc, argv, OPTS, cd_longopts, &option_index)) != -1) { + switch (c) { + case 'f': + strncpy(cd_cfg.conffile, optarg, sizeof(cd_cfg.conffile)); + break; + case 'p': + cd_cfg.port_control = atoi(optarg); + break; + case 'q': + cd_cfg.port_data = atoi(optarg); + break; + case 'b': + cd_ctx.is_bgrun = TRUE; + break; + case 'd': + strncpy(cd_cfg.debuglevel, "all", sizeof(cd_cfg.debuglevel)); + break; + case 'v': + cd_print_version(); + break; + case 'h': + cd_print_usage(argv); + break; + default: + cd_print_usage(argv); + } + } +} + +/** * Terminate PISA client daemon by receiving signal * * @param quitcode signal quit code