]> Creatis software - gdcm.git/blobdiff - src/gdcmDebug.cxx
* src/gdcmFile.h : bug fix. Variable type and variable name had same name
[gdcm.git] / src / gdcmDebug.cxx
index a2e8f3d3ebc4140b8fd80706f0f25eabdcf789f0..6bff5c2b828c18efcd3f26921f22fa9b9b119367 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/10/12 04:35:44 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2004/11/09 22:30:43 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,7 +53,7 @@ void Debug::Verbose(int level, const char * msg1, const char * msg2)
    {
       return ;
    }
-   std::cerr << msg1 << ' ' << msg2 << std::endl;
+   std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl << std::flush;
 }
 
 /**
@@ -68,7 +68,7 @@ void Debug::Error(bool test, const char * msg1, const char * msg2)
    {
       return;
    }
-   std::cerr << msg1 << ' ' << msg2 << std::endl;
+   std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl << std::flush;
    Exit(1);
 }
 
@@ -81,7 +81,8 @@ void Debug::Error(bool test, const char * msg1, const char * msg2)
 void Debug::Error(const char* msg1, const char* msg2,
                       const char* msg3) 
 {
-   std::cerr << msg1 << ' ' << msg2 << ' ' << msg3 << std::endl;
+   std::cerr << "gdcm::" << msg1 << ' ' << msg2 << ' ' << msg3
+             << std::endl << std::flush;
    Exit(1);
 }
 
@@ -101,7 +102,8 @@ void Debug::Assert(int level, bool test, const char * msg1,
    }
    if (!test)
    {
-      std::cerr << msg1 << ' ' << msg2 << std::endl;
+      std::cerr << "gdcm::" <<  msg1 << ' ' << msg2
+                << std::endl << std::flush;
    }
 }
 
@@ -114,7 +116,7 @@ void Debug::Exit(int a)
 #ifdef __GNUC__
    std::exit(a);
 #endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BORLANDC__)
    exit(a);    // Found in #include <stdlib.h>
 #endif
 }