home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplified textfile_sizes() and replaced all get_linemax() calls with it.
[plomrogue]
/
src
/
keybindings.c
diff --git
a/src/keybindings.c
b/src/keybindings.c
index 52c6c7077a8e8b0ed67b33ed0d293748bf42e0f5..0fd2cdcd56d77d47f831145ced0eb09a2c0a7559 100644
(file)
--- a/
src/keybindings.c
+++ b/
src/keybindings.c
@@
-146,9
+146,8
@@
extern void init_keybindings(char * path, struct KeyBiData * kbd)
char * f_name = "init_keybindings()";
FILE * file = try_fopen(path, "r", f_name);
char * f_name = "init_keybindings()";
FILE * file = try_fopen(path, "r", f_name);
- uint16_t lines, linemax;
- char * err = "textfile_sizes() in init_keybindings() returns error.";
- exit_err(textfile_sizes(file, &linemax, &lines), err);
+ uint16_t lines;
+ uint16_t linemax = textfile_sizes(file, &lines);
char command[linemax + 1];
char * cmdptr;
char command[linemax + 1];
char * cmdptr;
@@
-233,8
+232,7
@@
extern void free_keybindings(struct KeyBinding * kb_start)
extern void mod_selected_keyb(struct KeyBiData * kbd)
{
kbd->edit = 1;
extern void mod_selected_keyb(struct KeyBiData * kbd)
{
kbd->edit = 1;
- char * err = "Trouble with draw_all_wins() in mod_selected_keyb().";
- exit_err(draw_all_wins(world.wmeta), err);
+ draw_all_wins();
int key = getch();
if (key < 1000)
{
int key = getch();
if (key < 1000)
{