summaryrefslogtreecommitdiff
path: root/functions.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2023-11-19 22:58:00 +0100
committerOskar <[email protected]>2023-11-19 22:58:00 +0100
commit5f973bc0b3a0d1ddbb33cc83c74ad6fa39688a9a (patch)
treedd0fce16458344249b901513d650d652ecdb0e42 /functions.c
parentc79c2b6b2aa7b8d259044bc9f90c0eee16a9bc0a (diff)
minor fixes, changed some variables and stuff
Diffstat (limited to 'functions.c')
-rw-r--r--functions.c7
1 files changed, 4 insertions, 3 deletions
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 <time.h>
#include <string.h>
+#include <stdint.h>
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