summaryrefslogtreecommitdiff
path: root/file_use.c
diff options
context:
space:
mode:
Diffstat (limited to 'file_use.c')
-rw-r--r--file_use.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file_use.c b/file_use.c
index 0cfa823..8b72e25 100644
--- a/file_use.c
+++ b/file_use.c
@@ -170,8 +170,8 @@ f_file* f_file_open( const char *fname, int flags )
{
f_file *ret = NULL;
- char *f_flags_write="r";
- char *f_flags_read="w";
+ char *f_flags_write="w";
+ char *f_flags_read="r";
char *f_flags_rw="r+";
char *f_flags_tmp=NULL;
@@ -207,7 +207,7 @@ f_file* f_file_open( const char *fname, int flags )
ERROR("Unknown flag for opening \n");
goto exit_close_f;
}
- ret->fid = fopen( fname, "r" );
+ ret->fid = fopen( fname, f_flags_tmp );
if ( ret->fid == NULL )
{
ERROR("Cannot open file\n");