Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / programs / view / logo.cpp
index 38c29f835f1f343c3f55ac7ae051f6b9fb9a2038..fdab4e52333c5dbd3393f9f076ff3665a529b72f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2013, 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.
  * 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 <stdlib.h>
 
-#include "sysstuff.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "xutil.h"
 #include "Xstuff.h"
-#include "smalloc.h"
-#include "copyrite.h"
+#include "gromacs/legacyheaders/copyrite.h"
 #include "logo.h"
 
+#include "gromacs/utility/real.h"
+#include "gromacs/utility/smalloc.h"
+
 typedef struct {
     int            x, y, rad;
     unsigned long *col;
@@ -111,7 +112,6 @@ static bool LogoCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
     };
 #define NMESS asize(Mess)
     int             i;
-    real            wfac, hfac;
     t_logo         *logo;
     t_windata      *wd;
 
@@ -119,8 +119,8 @@ static bool LogoCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
     wd   = &(logo->wd);
     if (bFirst)
     {
-        wfac = wd->width/110.0;
-        hfac = wd->height/110.0;
+        const real wfac = wd->width/110.0;
+        const real hfac = wd->height/110.0;
         for (i = 0; (i < asize(c)); i++)
         {
             c[i].x *= wfac;
@@ -199,7 +199,7 @@ t_logo *init_logo(t_x11 *x11, Window parent, bool bQuitOnClick)
     logo->bQuitOnClick = bQuitOnClick;
     InitWin(&logo->wd, 0, 0, 360, 270, 1, "GROMACS");
     bg = LIGHTGREY;
-    if ((newcol = getenv("LOGO")) != NULL)
+    if ((newcol = getenv("GMX_LOGO_COLOR")) != NULL)
     {
         GetNamedColor(x11, newcol, &bg);
     }