summaryrefslogtreecommitdiff
path: root/7ed.h
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-04-19 23:18:03 +0200
committerOskar <[email protected]>2024-04-19 23:18:03 +0200
commit73b0414254e6b888656b4e5346292f27b67ac9d9 (patch)
tree1427052e0515364278638d270755d213768d45c4 /7ed.h
parent645a02d84b174376beed51de9e8820fe4d217ede (diff)
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.
Diffstat (limited to '7ed.h')
-rw-r--r--7ed.h3
1 files changed, 3 insertions, 0 deletions
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);