Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxlib / viewit.c
index 8ecd5e1aa3f4d646eb8819323eb961f80b78ccbb..c6a3a690bb47fe76e4111561750b200a6f258615 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "gromacs/legacyheaders/viewit.h"
+
+#include "config.h"
 
+#include <stdlib.h>
 #include <string.h>
 
-#include "oenv.h"
-#include "viewit.h"
-#include "string2.h"
 #include "gromacs/fileio/filenm.h"
-#include "macros.h"
-#include "gmx_fatal.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/oenv.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
 
 static const int   can_view_ftp[] = {
     0,
@@ -58,7 +60,7 @@ static const char* view_program[] = {
     "ghostview",    "display",      NULL,           "xterm -e rasmol"
 };
 
-int can_view(int ftp)
+static int can_view(int ftp)
 {
     int i;
 
@@ -95,7 +97,7 @@ void do_view(const output_env_t oenv, const char *fn, const char *opts)
                 case efXVG:
                     if (!(cmd = getenv(env)) )
                     {
-                        if (getenv("XMGR") )
+                        if (getenv("GMX_USE_XMGR") )
                         {
                             cmd = "xmgr";
                         }