]> Creatis software - gdcm.git/blobdiff - src/gdcmUtil.cxx
misstyping
[gdcm.git] / src / gdcmUtil.cxx
index 5267b38d7626e361b0e70be21fb4b8f52ffd8577..a99f5068516a8a37be907ad6f20e1460cd15fb1f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/28 15:52:46 $
-  Version:   $Revision: 1.172 $
+  Date:      $Date: 2005/11/07 09:51:35 $
+  Version:   $Revision: 1.175 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -110,7 +110,7 @@ std::string Util::GDCM_MAC_ADRESS = GetMACAddress();
 /**
  * \brief Provide a better 'c++' approach for sprintf
  * For example c code is:
- * char result[200]; // hope 200 is enough
+ * char result[2048]; // hope 2048 is enough
  * sprintf(result, "%04x|%04x", group , elem);
  *
  * c++ code is 
@@ -126,7 +126,7 @@ std::string Util::GDCM_MAC_ADRESS = GetMACAddress();
  */
 std::string Util::Format(const char *format, ...)
 {
-   char buffer[2048];
+   char buffer[2048]; // hope 2048 is enough
    va_list args;
    va_start(args, format);
    vsprintf(buffer, format, args);  //might be a security flaw
@@ -813,7 +813,7 @@ int GetMacAddrSys ( unsigned char *addr )
    close(sd);
 #endif
    // Not implemented platforms (or no cable !)
-   perror("in Get MAC Adress (internal) : There was a configuration problem on your plateform");
+   perror("in Get MAC Adress (internal) : There was a configuration problem (or no cable !) on your plateform");
    memset(addr,0,6);
    return -1;
 #endif //__sun
@@ -876,8 +876,8 @@ std::string Util::GetMACAddress()
 }
 
 /**
- * \brief Creates a new UID. As stipulate in the DICOM ref
- *        each time a DICOM image is create it should have 
+ * \brief Creates a new UID. As stipulated in the DICOM ref
+ *        each time a DICOM image is created it should have 
  *        a unique identifier (URI)
  * @param root is the DICOM prefix assigned by IOS group
  */
@@ -978,7 +978,7 @@ std::ostream &binary_write(std::ostream &os, const uint32_t &val)
 std::ostream &binary_write(std::ostream &os, const double &val)
 {
 #if defined(GDCM_WORDS_BIGENDIAN) || defined(GDCM_FORCE_BIGENDIAN_EMULATION)    
-   double swap;
+   double swap = val;
    
    char *beg = (char *)&swap;
    char *end = beg + 7;