/** * Prints options as selected when invoking the program with -v option * @param opt the options_t * structure that contains all selected options * from the command line and that will be used by the program. */ static void print_selected_options(options_t *opt) { if (opt != NULL) { fprintf(stdout, _("\n%s options are:\n"), PROGRAM_NAME); print_string_option(_("Configuration file: %s\n"), opt->configfile); print_string_option(_("server's IP address: %s\n"), opt->ip); fprintf(stdout, _("server's port number: %d\n"), opt->port); } }
/** * Prints options as selected when invoking the program with -v option * @param opt the options_t * structure that contains all selected options * from the command line and that will be used by the program. */ static void print_selected_options(options_t *opt) { gchar *blocksize = NULL; if (opt != NULL) { fprintf(stdout, _("\n%s options are:\n"), PROGRAM_NAME); print_filelist(opt->dirname_list, _("Directory list:\n")); print_filelist(opt->exclude_list, _("Exclude list:\n")); if (opt->adaptive == FALSE) { /** * We need to translate this number into a string before * inserting it into the final string in order to allow * this final string to be translated in an other language. */ blocksize = g_strdup_printf("%" G_GINT64_FORMAT, opt->blocksize); fprintf(stdout, _("Blocksize: %s\n"), blocksize); free_variable(blocksize); } else { fprintf(stdout, _("Blocksize: adaptive mode\n")); } print_string_option(_("Configuration file: %s\n"), opt->configfile); print_string_option(_("Cache directory: %s\n"), opt->dircache); print_string_option(_("Cache database name: %s\n"), opt->dbname); if (opt->srv_conf != NULL) { print_string_option(_("Server's IP address: %s\n"), opt->srv_conf->ip); fprintf(stdout, _("Server's port number: %d\n"), opt->srv_conf->port); } fprintf(stdout, _("Buffersize: %d\n"), opt->buffersize); } }