diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-12-05 13:54:35 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-12-05 13:54:35 (GMT) |
commit | 5b842271c661b6ce24e52b3a9575e05423acb8fe (patch) | |
tree | 4d5efb2241e518d28619915dd55d70a47422f340 | |
parent | 358bc6548e5d4215f890a38233dacfeb7a3e9769 (diff) |
Write headers first in file. Seek to end when appending to file.
-rw-r--r-- | src/lib/tng_io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 4b85c97..89168e2 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -1516,6 +1516,8 @@ static tng_function_status tng_general_info_block_write return(TNG_CRITICAL); } + fseek(tng_data->output_file, 0, SEEK_SET); + /* If the strings are unallocated allocate memory for just string * termination */ if(!tng_data->first_program_name) @@ -15947,6 +15949,8 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_open (*tng_data_p)->input_file_path = 0; } tng_output_append_file_set(*tng_data_p, filename); + + fseek((*tng_data_p)->output_file, 0, SEEK_END); } return(TNG_SUCCESS); |