]> Creatis software - gdcm.git/blobdiff - src/gdcmDictSet.cxx
Ajout fonctions
[gdcm.git] / src / gdcmDictSet.cxx
index 814ca802e223811cb31c608db41defeedf6d7bda..1c3c0a7781af7f43b6126bb75acd3754b3854010 100644 (file)
@@ -1,3 +1,5 @@
+// gdcmDictEntry
+
 #include <fstream>
 #include <stdlib.h>  // For getenv
 #include "gdcm.h"
@@ -16,9 +18,13 @@ gdcmDictSet::gdcmDictSet(void) {
 void gdcmDictSet::SetDictPath(void) {
        const char* EnvPath = (char*)0;
        EnvPath = getenv("GDCM_DICT_PATH");
-       if (EnvPath && (strlen(EnvPath) != 0))
+       if (EnvPath && (strlen(EnvPath) != 0)) {
                DictPath = EnvPath;
-       else
+               if (DictPath[DictPath.length() -1] != '/' )
+                       DictPath += '/';
+               dbg.Verbose(1, "gdcmDictSet::SetDictPath:",
+                     "Dictionary path set from environnement");
+       } else
                DictPath = PUB_DICT_PATH;
 }
 
@@ -31,7 +37,7 @@ int gdcmDictSet::LoadDicomV3Dict(void) {
 int gdcmDictSet::LoadDictFromFile(string FileName, DictKey Name) {
        gdcmDict *NewDict = new gdcmDict(FileName.c_str());
        dicts[Name] = NewDict;
-       return 0;
+       return 0;   //FIXME if this is a dummy return make the method void
 }
 
 void gdcmDictSet::Print(ostream& os) {