home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved error handling, more error catching, error messages.
[plomrogue]
/
src
/
keybindings.c
diff --git
a/src/keybindings.c
b/src/keybindings.c
index c318ec18f49c1501c0e72640d7e01db01303350a..3ce0e440b2d319af9ff0b81d1040bc468518c10f 100644
(file)
--- a/
src/keybindings.c
+++ b/
src/keybindings.c
@@
-18,7
+18,8
@@
extern void init_keybindings(struct World * world)
{
FILE * file = fopen("config/keybindings", "r");
uint16_t lines, linemax;
{
FILE * file = fopen("config/keybindings", "r");
uint16_t lines, linemax;
- textfile_sizes(file, &linemax, &lines);
+ char * err = "textfile_sizes() in init_keybindings() returns error.";
+ exit_err(textfile_sizes(file, &linemax, &lines), world, err);
struct KeyBinding * keybindings = malloc(lines * sizeof(struct KeyBinding));
char * command = malloc(linemax);
uint16_t commcount = 0;
struct KeyBinding * keybindings = malloc(lines * sizeof(struct KeyBinding));
char * command = malloc(linemax);
uint16_t commcount = 0;