[mlpack-svn] r11879 - mlpack/trunk/src/mlpack/core/util

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Sat Mar 17 15:39:24 EDT 2012


Author: rcurtin
Date: 2012-03-17 15:39:23 -0400 (Sat, 17 Mar 2012)
New Revision: 11879

Modified:
   mlpack/trunk/src/mlpack/core/util/log.cpp
Log:
No colors on Windows because command.exe doesn't recognize ANSI color escape sequences...

Modified: mlpack/trunk/src/mlpack/core/util/log.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/util/log.cpp	2012-03-17 19:37:07 UTC (rev 11878)
+++ mlpack/trunk/src/mlpack/core/util/log.cpp	2012-03-17 19:39:23 UTC (rev 11879)
@@ -11,12 +11,20 @@
 
 #include "log.hpp"
 
-// Color code escape sequences.
-#define BASH_RED "\033[0;31m"
-#define BASH_GREEN "\033[0;32m"
-#define BASH_YELLOW "\033[0;33m"
-#define BASH_CYAN "\033[0;36m"
-#define BASH_CLEAR "\033[0m"
+// Color code escape sequences -- but not on Windows.
+#ifndef _WIN32
+  #define BASH_RED "\033[0;31m"
+  #define BASH_GREEN "\033[0;32m"
+  #define BASH_YELLOW "\033[0;33m"
+  #define BASH_CYAN "\033[0;36m"
+  #define BASH_CLEAR "\033[0m"
+#else
+  #define BASH_RED ""
+  #define BASH_GREEN ""
+  #define BASH_YELLOW ""
+  #define BASH_CYAN ""
+  #define BASH_CLEAR ""
+#endif
 
 using namespace mlpack;
 using namespace mlpack::io;




More information about the mlpack-svn mailing list