-// gdcmUtil.cxx
-//-----------------------------------------------------------------------------
-#include "gdcmUtil.h"
-
-#include <stdio.h>
-#include <ctype.h> // For isspace
-#include <string.h>
-
-//-----------------------------------------------------------------------------
-// Library globals.
-gdcmDebug dbg;
-
-//-----------------------------------------------------------------------------
-gdcmDebug::gdcmDebug(int level) {
- DebugLevel = level;
-}
-
-void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) {
- if (Level > DebugLevel)
- return ;
- std::cerr << Msg1 << ' ' << Msg2 << std::endl;
-}
-
-void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) {
- if (!Test)
- return;
- std::cerr << Msg1 << ' ' << Msg2 << std::endl;
- Exit(1);
-}
-
-void gdcmDebug::Error(const char* Msg1, const char* Msg2,
- const char* Msg3) {
- std::cerr << Msg1 << ' ' << Msg2 << ' ' << Msg3 << std::endl;
- Exit(1);
-}
-
-void gdcmDebug::Assert(int Level, bool Test,
- const char * Msg1, const char * Msg2) {
- if (Level > DebugLevel)
- return ;
- if (!Test)
- std::cerr << Msg1 << ' ' << Msg2 << std::endl;
-}
-
-void gdcmDebug::Exit(int a) {
-#ifdef __GNUC__
- std::exit(a);
-#endif
-#ifdef _MSC_VER
- exit(a); // Found in #include <stdlib.h>
-#endif
-}
-
-//-----------------------------------------------------------------------------
-gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
-gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
-gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
-gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
-gdcmGlobal gdcmGlob;
-
-gdcmGlobal::gdcmGlobal(void) {
- if (VR || TS || Dicts || ddElem)
- dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
- Dicts = new gdcmDictSet();
- VR = new gdcmVR();
- TS = new gdcmTS();
- ddElem = new gdcmDicomDirElement();
-}
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmUtil.cxx,v $
+ Language: C++
+ Date: $Date: 2004/10/12 04:35:48 $
+ Version: $Revision: 1.54 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/