From 5f973bc0b3a0d1ddbb33cc83c74ad6fa39688a9a Mon Sep 17 00:00:00 2001 From: Oskar Date: Sun, 19 Nov 2023 22:58:00 +0100 Subject: minor fixes, changed some variables and stuff --- functions.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'functions.c') diff --git a/functions.c b/functions.c index edba69b..0d7c500 100644 --- a/functions.c +++ b/functions.c @@ -4,6 +4,7 @@ #include "7ed.h" #include #include +#include void CONFIRM() { struct termios old,new; @@ -20,7 +21,7 @@ void CONFIRM() { } int CHOICE() { - int choice; + char choice; do { @@ -46,11 +47,11 @@ int CHOICE() { return EXIT_FAILURE; } -int COUNT_LINES_IN_FILE (char filename[], size_t *lines) { +int COUNT_LINES_IN_FILE (char filename[], uint64_t *lines) { // Does not follow posix because this function accounts for if the last line does not end with a newline. - size_t line_count = 0; // Counter starting at 0 + uint64_t line_count = 0; // Counter starting at 0 FILE *file; file = fopen(filename,"rb"); // Open file -- cgit v1.2.3