]> Kevux Git Server - fll/commitdiff
Update: add all types of file open modes
authorKevin Day <kevin@kevux.org>
Sat, 10 Mar 2012 20:56:38 +0000 (14:56 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 10 Mar 2012 20:56:38 +0000 (14:56 -0600)
This also changes f_file_read_write to not create the file if it does not exist.
To create the file if it does not exist, use f_file_read_write_create.

level_0/f_file/c/file.h

index 2c7d87d5a5fa993edd6f3b4b2afe3b37e8b532c0..bfcb2d0c6e073d5d9d47f1a0badd3e7b1533d284 100644 (file)
@@ -37,9 +37,11 @@ extern "C"{
 #endif // _di_f_file_types_
 
 #ifndef _di_f_file_oldstyle_modes_
-  #define f_file_read_only  "r"
-  #define f_file_write_only "w"
-  #define f_file_read_write "rw"
+  #define f_file_read_only         "r"
+  #define f_file_read_write        "r+"
+  #define f_file_read_write_create "rw"
+  #define f_file_read_write_append "a+"
+  #define f_file_write_create      "w"
 #endif // _di_f_file_oldstyle_modes_
 
 #ifndef _di_f_file_seeks_