From 7e81521772240ec3567a1773d2919a3e90d104c7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Oct 2008 14:25:45 +0200 Subject: options: don't pass the "options" pointer around Just make everybody use the global "options" variable. This eliminates namespace confusion and the NO_GLOBAL_OPTIONS hack. --- src/options.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/options.c') diff --git a/src/options.c b/src/options.c index 1b592a567..53f54b7eb 100644 --- a/src/options.c +++ b/src/options.c @@ -217,7 +217,7 @@ handle_option(int c, const char *arg) break; #ifndef NDEBUG case 'K': /* --dump-keys */ - read_configuration(&options); + read_configuration(); write_key_bindings(stdout, KEYDEF_WRITE_ALL | KEYDEF_COMMENT_ALL); exit(EXIT_SUCCESS); break; @@ -231,7 +231,7 @@ handle_option(int c, const char *arg) } } -options_t * +void options_parse(int argc, const char *argv[]) { int i; @@ -310,11 +310,9 @@ options_parse(int argc, const char *argv[]) option_cb (opt->shortopt, NULL); else if (opt && opt->argument) option_error(ERROR_MISSING_ARGUMENT, opt->longopt, opt->argument); - - return &options; } -options_t * +void options_init(void) { const char *value; @@ -357,6 +355,4 @@ options_init(void) options.lyrics_timeout = DEFAULT_LYRICS_TIMEOUT; options.scroll = DEFAULT_SCROLL; options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP); - - return &options; } -- cgit v1.2.3