Updated the formatting

This commit is contained in:
gunnar_g 2010-04-02 10:45:33 +00:00
parent d4eef968e5
commit fb9ed5a65e
1 changed files with 20 additions and 19 deletions

View File

@ -37,6 +37,7 @@
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#include "bygfoot.h"
#include "bet_struct.h" #include "bet_struct.h"
#include "debug.h" #include "debug.h"
#include "file.h" #include "file.h"
@ -83,7 +84,7 @@ main_parse_cl_arguments(gint *argc, gchar ***argv)
gboolean testcom = FALSE, calodds = FALSE; gboolean testcom = FALSE, calodds = FALSE;
gchar *support_dir = NULL, *lang = NULL, gchar *support_dir = NULL, *lang = NULL,
*testcom_file = NULL, *token_file = NULL, *testcom_file = NULL, *token_file = NULL,
*event_name = NULL, *event_name = NULL,
*country_sid = NULL; *country_sid = NULL;
gint number_of_passes = 1, gint number_of_passes = 1,
@ -93,9 +94,9 @@ main_parse_cl_arguments(gint *argc, gchar ***argv)
GOptionEntry entries[] = GOptionEntry entries[] =
{{ "last-save", 'l', 0, G_OPTION_ARG_NONE, &load_last_save, _("Load last savegame"), NULL }, {{ "last-save", 'l', 0, G_OPTION_ARG_NONE, &load_last_save, _("Load last savegame"), NULL },
{ "support-dir", 's', 0, G_OPTION_ARG_STRING, &support_dir, { "support-dir", 's', 0, G_OPTION_ARG_STRING, &support_dir,
_("Specify additional support directory (takes priority over default ones)"), "DIR" }, _("Specify additional support directory (takes priority over default ones)"), "DIR" },
{ "country", 'c', 0, G_OPTION_ARG_STRING, &country_sid, _("String id of the country to load"), "SID" }, { "country", 'c', 0, G_OPTION_ARG_STRING, &country_sid, _("String id of the country to load"), "SID" },
{ "lang", 'L', 0, G_OPTION_ARG_STRING, &lang, _("Language to use (a code like 'de')"), "CODE" }, { "lang", 'L', 0, G_OPTION_ARG_STRING, &lang, _("Language to use (a code like 'de')"), "CODE" },
@ -195,8 +196,8 @@ main_parse_debug_cl_arguments(gint *argc, gchar ***argv)
GOptionContext *context = NULL; GOptionContext *context = NULL;
GOptionEntry entries[] = GOptionEntry entries[] =
{{ "debug-level", 'd', 0, G_OPTION_ARG_INT, &deb_level, "[developer] Debug level to use", "N" }, {{ "debug-level", 'd', 0, G_OPTION_ARG_INT, &deb_level, "[developer] Debug level to use", "N" },
{ "debug-output", 'o', 0, G_OPTION_ARG_INT, &deb_output, "[developer] Debug output to use", "0, 1 or 2" }, { "debug-output", 'o', 0, G_OPTION_ARG_INT, &deb_output, "[developer] Debug output to use", "0, 1 or 2" },
{ "deb", 'D', 0, G_OPTION_ARG_STRING, &debug_text, { "deb", 'D', 0, G_OPTION_ARG_STRING, &debug_text,
"[developer] A debug command like 'deb100 to set the debug level'; see the debug window and debug.c", "STRING" }, "[developer] A debug command like 'deb100 to set the debug level'; see the debug window and debug.c", "STRING" },
{NULL}}; {NULL}};
@ -262,13 +263,13 @@ main_init_variables(void)
window.main = window.startup = window.main = window.startup =
window.live = window.warning = window.progress = window.digits = window.live = window.warning = window.progress = window.digits =
window.stadium = window.job_offer = window.yesno = window.stadium = window.job_offer = window.yesno =
window.options = window.font_sel = window.options = window.font_sel =
window.file_chooser = window.contract = window.file_chooser = window.contract =
window.menu_player = window.user_management = window.menu_player = window.user_management =
window.mmatches = window.bets = window.splash = window.mmatches = window.bets = window.splash =
window.training_camp = NULL; window.training_camp = NULL;
users = g_array_new(FALSE, FALSE, sizeof(User)); users = g_array_new(FALSE, FALSE, sizeof(User));
transfer_list = g_array_new(FALSE, FALSE, sizeof(Transfer)); transfer_list = g_array_new(FALSE, FALSE, sizeof(Transfer));
season_stats = g_array_new(FALSE, FALSE, sizeof(SeasonStat)); season_stats = g_array_new(FALSE, FALSE, sizeof(SeasonStat));
@ -282,10 +283,10 @@ main_init_variables(void)
save_file = NULL; save_file = NULL;
constants_app.list = settings.list = constants_app.list = settings.list =
constants.list = options.list = tokens.list = constants.list = options.list = tokens.list =
hints.list = NULL; hints.list = NULL;
constants_app.datalist = settings.datalist = constants_app.datalist = settings.datalist =
constants.datalist = options.datalist = constants.datalist = options.datalist =
tokens.datalist = hints.datalist = NULL; tokens.datalist = hints.datalist = NULL;
selected_row = -1; selected_row = -1;
@ -302,11 +303,11 @@ main_init_variables(void)
file_load_conf_files(); file_load_conf_files();
xml_strategy_load_strategies(); xml_strategy_load_strategies();
current_interest = rint(math_rnd(const_float("float_finance_interest_lower"), current_interest = rint(math_rnd(const_float("float_finance_interest_lower"),
const_float("float_finance_interest_upper")) / const_float("float_finance_interest_upper")) /
const_float("float_finance_interest_step")) * const_float("float_finance_interest_step"); const_float("float_finance_interest_step")) * const_float("float_finance_interest_step");
language_set(language_get_code_index(opt_str("string_opt_language_code")) + 1); language_set(language_get_code_index(opt_str("string_opt_language_code")) + 1);
option_add(&options, "int_opt_calodds", 0, NULL); option_add(&options, "int_opt_calodds", 0, NULL);
@ -364,8 +365,8 @@ main_init(gint *argc, gchar ***argv)
sprintf(buf, "%s%ssaves", dir, G_DIR_SEPARATOR_S); sprintf(buf, "%s%ssaves", dir, G_DIR_SEPARATOR_S);
file_add_support_directory_recursive(buf); file_add_support_directory_recursive(buf);
g_free(dir); g_free(dir);
#else #else
dir = file_get_mac_resource_path("support_files"); dir = file_get_mac_resource_path("support_files");
file_add_support_directory_recursive(dir); file_add_support_directory_recursive(dir);
#endif #endif
@ -411,9 +412,9 @@ main (gint argc, gchar *argv[])
{ {
stat0 = STATUS_SPLASH; stat0 = STATUS_SPLASH;
window_show_splash(); window_show_splash();
if(os_is_unix) if(os_is_unix)
file_check_home_dir(); file_check_home_dir();
} }
else else
{ {
@ -443,7 +444,7 @@ main_exit_program(gint exit_code, gchar *format, ...)
gchar text[SMALL]; gchar text[SMALL];
va_list args; va_list args;
if(format != NULL) if(format != NULL)
{ {
va_start (args, format); va_start (args, format);
@ -462,6 +463,6 @@ main_exit_program(gint exit_code, gchar *format, ...)
debug_print_message("Press RETURN. Program will exit."); debug_print_message("Press RETURN. Program will exit.");
getchar(); getchar();
} }
exit(exit_code); exit(exit_code);
} }