Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / utility / errorformat.cpp
index f13df46188dc26dc9aa21f8d635049931c987b72..a8f7159c296e910c5ee7c90380928a15ba1fda06 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2010,2011,2012,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.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_utility
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "gmxpre.h"
 
 #include "errorformat.h"
 
+#include "config.h"
+
 #include <cctype>
 #include <cstdio>
 #include <cstring>
 
-#include "gromacs/legacyheaders/copyrite.h"
-
-#include "gromacs/utility/programinfo.h"
+#include "gromacs/utility/baseversion.h"
+#include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/stringutil.h"
 
 namespace gmx
@@ -69,14 +68,14 @@ void printFatalErrorHeader(FILE *fp, const char *title,
     const char *programName = "GROMACS";
     try
     {
-        programName = ProgramInfo::getInstance().programName().c_str();
+        programName = getProgramContext().displayName();
     }
     catch (const std::exception &)
     {
     }
 
     std::fprintf(fp, "\n-------------------------------------------------------\n");
-    std::fprintf(fp, "Program:     %s, %s\n", programName, GromacsVersion());
+    std::fprintf(fp, "Program:     %s, %s\n", programName, gmx_version());
     if (file != NULL)
     {
         // TODO: Check whether this works on Windows. If it doesn't, perhaps