X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=src%2Fclient%2Finterface_conf.c;h=679f6c7a92549e8c6c094826e8c072eb0fd8a9a1;hb=c1c88f66166ed26d0bd346570c37f006e3c8364b;hp=65debb0b51882944672a1cbb10a2b072c89e59c0;hpb=1cb57a35a3b3cc4ec8870531ca254a655c0bdda2;p=plomrogue
diff --git a/src/client/interface_conf.c b/src/client/interface_conf.c
index 65debb0..679f6c7 100644
--- a/src/client/interface_conf.c
+++ b/src/client/interface_conf.c
@@ -1,6 +1,11 @@
-/* src/client/interface_conf.c */
+/* src/client/interface_conf.c
+ *
+ * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+ * or any later version. For details on its copyright, license, and warranties,
+ * see the file NOTICE in the root directory of the PlomRogue source package.
+ */
-#define _POSIX_C_SOURCE 200809L /* getopt(), optarg, strdup() */
+#define _POSIX_C_SOURCE 200809L /* getopt(), optarg, strdup(), snprintf() */
#include "interface_conf.h"
#include /* delwin() */
#include /* NULL, size_t */
@@ -19,7 +24,6 @@
#include "cleanup.h" /* set_cleanup_flag() */
#include "command_db.h" /* get_command() */
#include "keybindings.h" /* KeyBinding, KeyBindingDB, get_command_to_keycode()*/
-#include "map.h" /* map_center() */
#include "parse.h" /* EDIT_STARTED, parse_file(), parse_flagval(),
* parse_and_reduce_to_readyflag(), parse_id_uniq()
* parsetest_defcontext(), parse_unknown_arg(),
@@ -243,7 +247,7 @@ static uint8_t start_win(char * token0, char * token1, char * str_win,
}
*win = (struct Win *) parse_init_entry(win_flags, sizeof(struct Win));
parsetest_singlechar(token1);
- parse_id_uniq(world.winDB.ids && (NULL!=strchr(world.winDB.ids,token1[0])));
+ parse_id_uniq(world.winDB.ids && strchr(world.winDB.ids,token1[0]));
(*win)->id = token1[0];
return 1;
}
@@ -367,7 +371,7 @@ static void set_keybindings(char * token1, uint8_t flags,
}
kb.keycode = atoi(token1);
char * err_uniq = "Binding to key already defined.";
- err_line(NULL != get_command_to_keycode(kbdb, kb.keycode), err_uniq);
+ err_line(!(!get_command_to_keycode(kbdb, kb.keycode)), err_uniq);
kb.command = get_command(token2);
err_line(!(kb.command), "No such command in command DB.");
array_append(kbdb->n_of_kbs, sizeof(struct KeyBinding), (void *) &kb,
@@ -476,6 +480,5 @@ extern void reload_interface_conf()
{
unload_interface_conf();
load_interface_conf();
- map_center();
world.winDB.v_screen_offset = 0;
}