summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7a5ac5)
raw | patch | inline | side by side (parent: c7a5ac5)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:30:18 +0000 (08:30 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:30:18 +0000 (08:30 +0100) |
Options which are disabled at compile time shouldn't reserve space for
their values in the options struct.
their values in the options struct.
src/command.c | patch | blob | history | |
src/command.h | patch | blob | history | |
src/conf.c | patch | blob | history | |
src/options.c | patch | blob | history | |
src/options.h | patch | blob | history |
diff --git a/src/command.c b/src/command.c
index fa7fe2e3afb79e6a45575091552d9e064a33468b..92ee27ea072f22e797798d87585f8a40207a0c99 100644 (file)
--- a/src/command.c
+++ b/src/command.c
{ { -1, -1, -1 }, 0, CMD_NONE, NULL, NULL }
};
+#ifdef ENABLE_KEYDEF_SCREEN
command_definition_t *
get_command_definitions(void)
{
return cmds;
}
+#endif
const char *
key2str(int key)
diff --git a/src/command.h b/src/command.h
index b48bf80f6b43584249a6e9644ba43849f5324917..55d7a9cd82e480a5eb963ba559d82365cec51577 100644 (file)
--- a/src/command.h
+++ b/src/command.h
const char *description;
} command_definition_t;
+#ifdef ENABLE_KEYDEF_SCREEN
command_definition_t *get_command_definitions(void);
+#endif
+
command_t find_key_command(int key, command_definition_t *cmds);
void command_dump_keys(void);
diff --git a/src/conf.c b/src/conf.c
index 1630f6231752d04ded067543802b561f0a20aa7a..5b3ebb3f7558652753832ff828d5d84f06212c95 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
else if (!strcasecmp(CONF_XTERM_TITLE, name))
options.enable_xterm_title = str2bool(value);
else if (!strcasecmp(CONF_ENABLE_MOUSE, name))
+#ifdef HAVE_GETMOUSE
options.enable_mouse = str2bool(value);
+#else
+ {}
+#endif
else if (!strcasecmp(CONF_CROSSFADE_TIME, name))
options.crossfade_time = atoi(value);
else if (!strcasecmp(CONF_SEARCH_MODE, name))
else if (!strcasecmp(CONF_PASSWORD, name))
options.password = get_format(value);
else if (!strcasecmp(CONF_LYRICS_TIMEOUT, name))
+#ifdef ENABLE_LYRICS_SCREEN
options.lyrics_timeout = atoi(get_format(value));
+#else
+ {}
+#endif
else if (!strcasecmp(CONF_SCROLL, name))
options.scroll = str2bool(value);
else if (!strcasecmp(CONF_SCROLL_SEP, name)) {
diff --git a/src/options.c b/src/options.c
index 853f105452c0d47c610b1b8c7381600d9c71bfca..3c39bdaf6ff4aae9aa49e67d7153e2b9c43abdf6 100644 (file)
--- a/src/options.c
+++ b/src/options.c
.port = DEFAULT_PORT,
.crossfade_time = DEFAULT_CROSSFADE_TIME,
.seek_time = 1,
+#ifdef ENABLE_LYRICS_SCREEN
.lyrics_timeout = DEFAULT_LYRICS_TIMEOUT,
+#endif
.find_wrap = true,
.wide_cursor = true,
.audible_bell = true,
#endif
break;
case 'm': /* --mouse */
+#ifdef HAVE_GETMOUSE
options.enable_mouse = true;
+#endif
break;
case 'M': /* --no-mouse */
+#ifdef HAVE_GETMOUSE
options.enable_mouse = false;
+#endif
break;
case 'e': /* --exit */
/* deprecated */
diff --git a/src/options.h b/src/options.h
index 791ec2f09c9faa3971ebf8ee0bcaf9135f805505..5496e78ca468a82db9517bb26754d7139a7dd357 100644 (file)
--- a/src/options.h
+++ b/src/options.h
int search_mode;
int hide_cursor;
int seek_time;
+#ifdef ENABLE_LYRICS_SCREEN
int lyrics_timeout;
+#endif
bool find_wrap;
bool find_show_last_pattern;
bool list_wrap;
bool audible_bell;
bool visible_bell;
bool enable_xterm_title;
+#ifdef HAVE_GETMOUSE
bool enable_mouse;
+#endif
bool scroll;
bool visible_bitrate;
bool welcome_screen_list;