Sort includes outside src/gromacs
[alexxy/gromacs.git] / src / programs / view / manager.cpp
index 9871238f5aae335dd165545b496c9d75c311ab58..c77acc18466db37b02142cd41eb7e291b0e0f9de 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.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
 
 #include <ctype.h>
+#include <stdlib.h>
 #include <string.h>
 
-#include "sysstuff.h"
-#include "smalloc.h"
-#include "typedefs.h"
-#include "smalloc.h"
-#include "macros.h"
-#include "atomprop.h"
-#include "names.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h> // for usleep()
+#endif
+
 #include "manager.h"
-#include "pbc.h"
-#include "nmol.h"
-#include "copyrite.h"
-#include "vec.h"
-#include "string2.h"
 
-#include "gromacs/fileio/futil.h"
 #include "gromacs/fileio/tpxio.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/math/utilities.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/atomprop.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
+
+#include "3dview.h"
+#include "nmol.h"
 
 static void add_object(t_manager *man, eObject eO, atom_id ai, atom_id aj)
 {
@@ -227,7 +232,7 @@ void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
     man->natom =
         read_first_x(man->oenv, &man->status, trajectory, &(man->time), &(man->x),
                      man->box);
-    man->trajfile = strdup(trajectory);
+    man->trajfile = gmx_strdup(trajectory);
     if (man->natom > man->top.atoms.nr)
     {
         gmx_fatal(FARGS, "Topology %s (%d atoms) and trajectory %s (%d atoms) "
@@ -237,7 +242,7 @@ void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
 
     cool_quote(quote, 255, NULL);
     sprintf(buf, "%s: %s", *man->top.name, quote);
-    man->title.text = strdup(buf);
+    man->title.text = gmx_strdup(buf);
     man->view       = init_view(man->box);
     at              = &(man->top.atoms);
     aps             = gmx_atomprop_init();