X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fclient%2Fcommand_db.c;h=3837d2ab888bb6c8fdb0f86aad4f2964a9b9acb7;hb=39ab34a368fbe30dc6639e021da89b1a20243fd6;hp=57ea2f344acb60e531b529fc5fe11e618b98c639;hpb=d6093b3a7d57aa34d3ee2a84112c59328bf1feed;p=plomrogue diff --git a/src/client/command_db.c b/src/client/command_db.c index 57ea2f3..3837d2a 100644 --- a/src/client/command_db.c +++ b/src/client/command_db.c @@ -6,10 +6,10 @@ #include /* FILE, sprintf() */ #include /* free() */ #include /* memset(), strlen(), strcmp() */ -#include "../common/readwrite.h" /* try_fopen(),try_fclose(),textfile_sizes() */ +#include "../common/err_try_fgets.h" /* reset_err_try_fgets_counter() */ +#include "../common/readwrite.h" /* try_fopen(),try_fclose(),textfile_width() */ #include "../common/rexit.h" /* exit_trouble() */ #include "../common/try_malloc.h" /* try_malloc() */ -#include "err_try_fgets.h" /* reset_err_try_fgets_counter() */ #include "misc.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;