* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "fflibutil.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "config.h"
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include "network.h"
-#include "fflibutil.h"
-
+#include "gromacs/legacyheaders/network.h"
#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
-#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/path.h"
#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
sprintf(fn_dir, "%s%c%s", dir, DIR_SEPARATOR, nextname);
/* Copy the file name, possibly including the path. */
- fns[n] = strdup(fn_dir);
+ fns[n] = gmx_strdup(fn_dir);
if (ffdir == NULL)
{
srenew(fns_short, n+1);
if (strcmp(dir, ".") == 0 || bEnvIsSet)
{
- fns_short[n] = strdup(fn_dir);
+ fns_short[n] = gmx_strdup(fn_dir);
}
else
{
- fns_short[n] = strdup(nextname);
+ fns_short[n] = gmx_strdup(nextname);
}
}
n++;
{
/* We have a match */
srenew(dns, n+1);
- dns[n] = strdup(f_short[i]);
+ dns[n] = gmx_strdup(f_short[i]);
n++;
}
}