home · contact · privacy
Client: Fix outdated comment.
[plomrogue] / src / client / command_db.c
index aed92c95beff5d5450c4b93653f2ac0e0c4304c5..06329fc28b63934e18741845003366ec6ae6f1ee 100644 (file)
@@ -7,10 +7,10 @@
 #include <stdlib.h> /* free() */
 #include <string.h> /* 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;