From 37493581668294ac136df42f56a0bb937890805a Mon Sep 17 00:00:00 2001 From: Oskar <> Date: Tue, 26 Mar 2024 21:36:34 +0100 Subject: vimmn seems ok now, alot of cases that should technically fail do get past this function but thats out of the scope for it anyway so its fine. Alot of the cases it fails should already be covered by the functions before it. --- startmode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'startmode.c') diff --git a/startmode.c b/startmode.c index e9064f4..821610a 100644 --- a/startmode.c +++ b/startmode.c @@ -25,13 +25,14 @@ int ncat(char filename[]) { return 0; } -int display_name_linecount(char *filename, uint64_t Flines) { +int display_name_linecount(char *filename) { + uint64_t Flines; int returnval = count_lines_in_file(filename, &Flines); if (returnval == 1) { return 1; } - fprintf(stdout,"%s %lu lines\n", filename, Flines); + fprintf(stdout,"%s %ld lines\n", filename, Flines); return 0; } @@ -39,7 +40,7 @@ int display_name_linecount(char *filename, uint64_t Flines) { int startmode(char filename[]) { // The entry to the program. Count lines and display the count. Also show which file is being edited. uint64_t Flines; - int dnl = display_name_linecount(filename, Flines); + int dnl = display_name_linecount(filename); if (dnl == 1) { return EXIT_FAILURE; } @@ -139,7 +140,7 @@ int startmode(char filename[]) { case 'C': case 'c': - int dnl = display_name_linecount(filename, Flines); + int dnl = display_name_linecount(filename); if (dnl == 1) { return EXIT_FAILURE; } -- cgit v1.2.3