Clean up unused code from gmxfio
[alexxy/gromacs.git] / src / gromacs / fileio / gmxfio-impl.h
similarity index 81%
rename from src/gromacs/fileio/gmxfio_int.h
rename to src/gromacs/fileio/gmxfio-impl.h
index e7010b15f32fbecc34189362cb6f11e9712f0f16..486f0e0e8ac6113c4bb821726f6ee1a81f2c03ec 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifndef GMX_FILEIO_GMXFIO_INT_H
-#define GMX_FILEIO_GMXFIO_INT_H
+/*! \internal \file
+ * \brief
+ * Internal definitions shared by gmxfio*.c files.
+ */
+#ifndef GMX_FILEIO_GMXFIO_IMPL_H
+#define GMX_FILEIO_GMXFIO_IMPL_H
 
 /* This is the new improved and thread safe version of gmxfio.  */
 
 
    WARNING WARNING WARNING WARNING */
 
-
-/* XDR should be available on all platforms now,
- * but we keep the possibility of turning it off...
- */
-#define USE_XDR
-
 #include "thread_mpi/lock.h"
 
 #include "gromacs/fileio/xdrf.h"
 
-/* the reader/writer functions  for t_iotype */
+/** the reader function for t_iotype */
 typedef gmx_bool read_func (t_fileio *fio, void *item, int nitem, int eio,
                             const char *desc, const char *srcfile, int line);
+/** the writer function for t_iotype */
 typedef gmx_bool write_func (t_fileio *fio, const void *item, int nitem, int eio,
                              const char *desc, const char *srcfile, int line);
 
 
-/* these are pointers to the actual reading & writing functions */
 typedef struct
 {
     read_func  *nread;
     write_func *nwrite;
 } t_iotype;
 
-
-
 struct t_fileio
 {
     FILE           *fp;                /* the file pointer */
@@ -84,15 +80,12 @@ struct t_fileio
                     bRead,             /* the file is open for reading */
                     bDouble,           /* write doubles instead of floats */
                     bDebug,            /* the file ops should come with debug info */
-                    bStdio,            /* the file is actually stdin or stdout */
                     bReadWrite;        /* the file is open for reading and writing */
     char        *fn;                   /* the file name */
     XDR         *xdr;                  /* the xdr data pointer */
     enum xdr_op  xdrmode;              /* the xdr mode */
     int          iFTP;                 /* the file type identifier */
 
-    const char  *comment;              /* a comment string for debugging */
-
     t_fileio    *next, *prev;          /* next and previous file pointers in the
                                           linked list */
     tMPI_Lock_t  mtx;                  /* content locking mutex. This is a fast lock
@@ -101,30 +94,22 @@ struct t_fileio
                                           a lock */
 };
 
-
-
-extern const t_iotype asc_iotype;
-extern const t_iotype bin_iotype;
+/** handlers for XDR read/write */
 extern const t_iotype xdr_iotype;
-extern const t_iotype dummy_iotype;
 
+/** Names for different items that can be read/written with gmx_fio_do_*() */
 extern const char    *eioNames[eioNR];
 
-
-
-#define GMX_FIO_BUFLEN 256
-
-/* make a debug string if that is requested in the fio */
-const char *gmx_fio_dbgstr(t_fileio *fio, const char *desc, char *buf);
-/* check the number of items against the allowed number of items */
+/** check the number of items against the allowed number of items */
 void gmx_fio_check_nitem(int eio, int nitem, const char *file,
                          int line);
-/* check the output type against allowed values */
+/** check the output type against allowed values */
 void gmx_fio_fe(t_fileio *fio, int eio, const char *desc, const char *srcfile,
                 int line);
 
-/* lock/unlock the mutex associated with a fio  */
+/*lock the mutex associated with a fio  */
 void gmx_fio_lock(t_fileio *fio);
+/** unlock the mutex associated with a fio  */
 void gmx_fio_unlock(t_fileio *fio);
 
 #endif