X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fclient%2Fcommand_db.c;h=06329fc28b63934e18741845003366ec6ae6f1ee;hb=169b8dda5f4c4373300b5be5edc113a376799737;hp=aed92c95beff5d5450c4b93653f2ac0e0c4304c5;hpb=6f98f0b029c3e84f1df0f2f3642f88e91b17cf33;p=plomrogue diff --git a/src/client/command_db.c b/src/client/command_db.c index aed92c9..06329fc 100644 --- a/src/client/command_db.c +++ b/src/client/command_db.c @@ -7,10 +7,10 @@ #include /* free() */ #include /* memset(), strlen(), strcmp() */ #include "../common/err_try_fgets.h" /* reset_err_try_fgets_counter() */ -#include "../common/readwrite.h" /* try_fopen(),try_fclose(),textfile_sizes() */ +#include "../common/readwrite.h" /* try_fopen(),try_fclose(),textfile_width() */ #include "../common/rexit.h" /* exit_trouble() */ #include "../common/try_malloc.h" /* try_malloc() */ -#include "misc.h" /* array_append() */ +#include "array_append.h" /* array_append() */ #include "world.h" /* global world */ #include "cleanup.h" /* set_cleanup_flag() */ @@ -50,7 +50,7 @@ extern void init_command_db() char * f_name = "init_command_db()"; char * context = "Failed reading command DB file. "; FILE * file = try_fopen(world.path_commands, "r", f_name); - uint32_t linemax = textfile_sizes(file, NULL); + uint32_t linemax = textfile_width(file); char line[linemax + 1]; reset_err_try_fgets_counter(); uint8_t i = 0;