From 73b0414254e6b888656b4e5346292f27b67ac9d9 Mon Sep 17 00:00:00 2001 From: Oskar Date: Fri, 19 Apr 2024 23:18:03 +0200 Subject: Added a way for the program to check if file exists or not. If not then it creates it. If changes are made to the file like writing newlines or edits from editmode is written then it will create the file. --- 7ed.h | 3 +++ 1 file changed, 3 insertions(+) (limited to '7ed.h') diff --git a/7ed.h b/7ed.h index 85ccd9f..aafdb94 100644 --- a/7ed.h +++ b/7ed.h @@ -12,6 +12,9 @@ #define TRUE_7ED 0 #define FALSE_7ED 1 +#define FILE_EXISTS 0 +#define FILE_NOT_FOUND 1 + int count_lines_in_file(char filename[], uint64_t *lines); int count_lines_in_file_posix(char filename[], size_t *lines); -- cgit v1.2.3