1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 20:54:07 +01:00

missing mode in rdm

This commit is contained in:
q-posev 2021-03-04 14:00:56 +01:00
parent d2efb67a9d
commit 88d2808200
2 changed files with 3 additions and 2 deletions

View File

@ -438,7 +438,7 @@ rdm_t* trexio_text_read_rdm(trexio_text_t* file) {
if (file->parent.mode == 'w') {
rdm->file = fopen(file_name,"a");
} else {
rdm->file = fopen(file_name,"");
rdm->file = fopen(file_name,"r");
}
free(file_name);
file->rdm = rdm ;

View File

@ -99,6 +99,7 @@ typedef struct trexio_text_s {
#+end_src
*** Init/deinit functions
#+begin_src c :tangle trexio_text.h
trexio_exit_code trexio_text_init(trexio_t* file);
@ -611,7 +612,7 @@ rdm_t* trexio_text_read_rdm(trexio_text_t* file) {
if (file->parent.mode == 'w') {
rdm->file = fopen(file_name,"a");
} else {
rdm->file = fopen(file_name,"");
rdm->file = fopen(file_name,"r");
}
free(file_name);
file->rdm = rdm ;