aboutsummaryrefslogtreecommitdiffstats
path: root/src/options.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 14:25:45 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 14:25:45 +0200
commit7e81521772240ec3567a1773d2919a3e90d104c7 (patch)
tree9f6346e662afe4617567a5904e28a832a87e7aef /src/options.c
parent88af2c3ace0fa42dbb816cc9fe8c4b54ce89233a (diff)
downloadmpd-7e81521772240ec3567a1773d2919a3e90d104c7.tar.gz
mpd-7e81521772240ec3567a1773d2919a3e90d104c7.tar.xz
mpd-7e81521772240ec3567a1773d2919a3e90d104c7.zip
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.
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c10
1 files changed, 3 insertions, 7 deletions
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;
}