Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / fileio / filenm.c
index 0b31d704f5cc639ba6fea5fde6d9d9a0b7973c41..782424df600a423c45856ff35feda0a4e24b246c 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#include "filenm.h"
+#include "gmxpre.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "filenm.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
@@ -73,7 +70,7 @@ static const int trxs[] =
 #ifdef USE_XDR
     efXTC, efTRR, efCPT,
 #endif
-    efTRJ, efGRO, efG96, efPDB, efTNG
+    efGRO, efG96, efPDB, efTNG
 };
 #define NTRXS asize(trxs)
 
@@ -91,7 +88,7 @@ static const int tros[] =
 #ifdef USE_XDR
     efXTC, efTRR,
 #endif
-    efTRJ, efGRO, efG96, efPDB, efTNG
+    efGRO, efG96, efPDB, efTNG
 };
 #define NTROS asize(tros)
 
@@ -100,7 +97,7 @@ static const int trns[] =
 #ifdef USE_XDR
     efTRR, efCPT,
 #endif
-    efTRJ, efTNG
+    efTNG
 };
 #define NTRNS asize(trns)
 
@@ -110,29 +107,19 @@ static const int stos[] =
 
 static const int stxs[] =
 {
-    efGRO, efG96, efPDB, efBRK, efENT, efESP,
+    efGRO, efG96, efPDB, efBRK, efENT, efESP
 #ifdef USE_XDR
-    efTPR,
+    , efTPR
 #endif
-    efTPB, efTPA
 };
 #define NSTXS asize(stxs)
 
-static const int tpxs[] =
-{
-#ifdef USE_XDR
-    efTPR,
-#endif
-    efTPB, efTPA
-};
-#define NTPXS asize(tpxs)
-
 static const int tpss[] =
 {
 #ifdef USE_XDR
     efTPR,
 #endif
-    efTPB, efTPA, efGRO, efG96, efPDB, efBRK, efENT
+    efGRO, efG96, efPDB, efBRK, efENT
 };
 #define NTPSS asize(tpss)
 
@@ -157,7 +144,6 @@ static const t_deffile
     { eftGEN, ".???", "traj", NULL,
       "Full precision trajectory", NTRNS, trns },
     { eftXDR, ".trr", "traj", NULL, "Trajectory in portable xdr format" },
-    { eftBIN, ".trj", "traj", NULL, "Trajectory file (architecture specific)" },
     { eftGEN, ".???", "traj_comp", NULL,
       "Compressed trajectory (tng format or portable xdr format)", NTRCOMPRESSED, trcompressed},
     { eftXDR, ".xtc", "traj", NULL,
@@ -181,11 +167,8 @@ static const t_deffile
     { eftASC, ".ndx", "index",  "-n", "Index file", },
     { eftASC, ".top", "topol",  "-p", "Topology file"},
     { eftASC, ".itp", "topinc", NULL, "Include file for topology"},
-    { eftGEN, ".???", "topol", "-s", "Run input file", NTPXS, tpxs },
     { eftGEN, ".???", "topol", "-s", "Structure+mass(db)", NTPSS, tpss },
     { eftXDR, ".tpr", "topol",  "-s", "Portable xdr run input file"},
-    { eftASC, ".tpa", "topol",  "-s", "Ascii run input file"},
-    { eftBIN, ".tpb", "topol",  "-s", "Binary run input file"},
     { eftASC, ".tex", "doc",    "-o", "LaTeX file"},
     { eftASC, ".rtp", "residue", NULL, "Residue Type file used by pdb2gmx" },
     { eftASC, ".atp", "atomtp", NULL, "Atomtype file used by pdb2gmx" },
@@ -233,8 +216,6 @@ const char *ftp2ext_generic(int ftp)
                 return "sto";
             case efSTX:
                 return "stx";
-            case efTPX:
-                return "tpx";
             case efTPS:
                 return "tps";
             default:
@@ -563,7 +544,7 @@ int add_suffix_to_output_names(t_filenm *fnm, int nfile, const char *suffix)
                 *extpos = '\0';
                 sprintf(newname, "%s%s.%s", buf, suffix, extpos + 1);
                 sfree(fnm[i].fns[j]);
-                fnm[i].fns[j] = strdup(newname);
+                fnm[i].fns[j] = gmx_strdup(newname);
             }
         }
     }
@@ -581,7 +562,7 @@ t_filenm *dup_tfn(int nf, const t_filenm tfn[])
         ret[i] = tfn[i]; /* just directly copy all non-string fields */
         if (tfn[i].opt)
         {
-            ret[i].opt = strdup(tfn[i].opt);
+            ret[i].opt = gmx_strdup(tfn[i].opt);
         }
         else
         {
@@ -590,7 +571,7 @@ t_filenm *dup_tfn(int nf, const t_filenm tfn[])
 
         if (tfn[i].fn)
         {
-            ret[i].fn = strdup(tfn[i].fn);
+            ret[i].fn = gmx_strdup(tfn[i].fn);
         }
         else
         {
@@ -602,7 +583,7 @@ t_filenm *dup_tfn(int nf, const t_filenm tfn[])
             snew(ret[i].fns, tfn[i].nfiles);
             for (j = 0; j < tfn[i].nfiles; j++)
             {
-                ret[i].fns[j] = strdup(tfn[i].fns[j]);
+                ret[i].fns[j] = gmx_strdup(tfn[i].fns[j]);
             }
         }
     }