- /* First check whether we have to make a backup,
- * only for writing, not for read or append.
- */
- if (newmode[0] == 'w')
- {
-#ifndef GMX_FAHCORE
- /* only make backups for normal gromacs */
- make_backup(fn);
-#endif
- }
- else
- {
- /* Check whether file exists */
- if (!gmx_fexist(fn))
- {
- gmx_open(fn);
- }
- }
- /* Open the file */
- fio->fp = gmx_ffopen(fn, newmode);
-