summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2ef665)
raw | patch | inline | side by side (parent: b2ef665)
author | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 19:16:04 +0000 (20:16 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 19:16:04 +0000 (20:16 +0100) |
Remove another superfluous feature from the ncmpc-mini mode.
src/command.c | patch | blob | history | |
src/command.h | patch | blob | history | |
src/main.c | patch | blob | history | |
src/options.c | patch | blob | history |
diff --git a/src/command.c b/src/command.c
index 1b6519a53d5aeda6727f8911d39ee86310d87b0f..663ab7ad221cbea80778faba0ecbe00889b57598 100644 (file)
--- a/src/command.c
+++ b/src/command.c
}
}
+#ifndef NCMPC_MINI
+
static int
set_key_flags(command_definition_t *cp, command_t command, int flags)
{
return 1;
}
+#endif
+
const char *
get_key_names(command_t command, int all)
{
while (cmds[i].name) {
if (cmds[i].command == command) {
memcpy(cmds[i].keys, keys, sizeof(int)*MAX_COMMAND_KEYS);
+#ifndef NCMPC_MINI
cmds[i].flags |= COMMAND_KEY_MODIFIED;
+#endif
return 0;
}
i++;
return -1;
}
+#ifndef NCMPC_MINI
+
int
check_key_bindings(command_definition_t *cp, char *buf, size_t bufsize)
{
return ferror(f);
}
+
+#endif
diff --git a/src/command.h b/src/command.h
index ef1fee2e8e028062ba78d6c5a0d7132944184e0e..4df7a30f0f07c4f808ba8cf415a5ed8503c1f75e 100644 (file)
--- a/src/command.h
+++ b/src/command.h
#include "config.h"
#include <stddef.h>
+
+#ifndef NCMPC_MINI
#include <stdio.h>
+#endif
#define MAX_COMMAND_KEYS 3
} command_t;
+#ifndef NCMPC_MINI
/* command definition flags */
#define COMMAND_KEY_MODIFIED 0x01
#define COMMAND_KEY_CONFLICT 0x02
+#endif
/* write key bindings flags */
#define KEYDEF_WRITE_HEADER 0x01
command_t find_key_command(int key, command_definition_t *cmds);
void command_dump_keys(void);
+
+#ifndef NCMPC_MINI
+
int check_key_bindings(command_definition_t *cmds, char *buf, size_t size);
int write_key_bindings(FILE *f, int all);
+#endif
+
const char *key2str(int key);
const char *get_key_description(command_t command);
const char *get_key_command_name(command_t command);
diff --git a/src/main.c b/src/main.c
index 11f16acb842f57174986ffca34e4e7ddcd1c2769..752ccdfbb6c1c4827bd85b9bd46a5627d16a2f77 100644 (file)
--- a/src/main.c
+++ b/src/main.c
/* parse command line options - 1 pass get configuration files */
options_parse(argc, argv);
- /* read configuration */
#ifndef NCMPC_MINI
+ /* read configuration */
read_configuration();
-#endif
/* check key bindings */
check_key_bindings(NULL, NULL, 0);
+#endif
/* parse command line options - 2 pass */
options_parse(argc, argv);
diff --git a/src/options.c b/src/options.c
index 63674ef5c7465baa3b28d58d520ec83fd542c78d..8c62e4b83b3d41b191d9b2e39903b6d8c7050516 100644 (file)
--- a/src/options.c
+++ b/src/options.c
#include "conf.h"
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <glib.h>