X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmUtil.cxx;h=936e0dde2985bf64a8f3a43c250290de15514f26;hb=cfc4bc0156d2846054d5e79cc6a9b5770a2a729f;hp=0129a6dd279352865d06c46cf36427a46cb5a063;hpb=5a3f5987606019da462e19f84565f6713e3ec801;p=gdcm.git diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 0129a6dd..936e0dde 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/11/03 14:04:43 $ - Version: $Revision: 1.174 $ + Date: $Date: 2005/11/29 13:02:46 $ + Version: $Revision: 1.179 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,7 +18,9 @@ #include "gdcmUtil.h" #include "gdcmDebug.h" + #include +#include // for va_list // For GetCurrentDate, GetCurrentTime #include @@ -813,7 +815,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 @@ -837,7 +839,7 @@ inline int getlastdigit(unsigned char *data) } /** - * \brief Encode the mac address on a fixed lenght string of 15 characters. + * \brief Encode the mac address on a fixed length string of 15 characters. * we save space this way. */ std::string Util::GetMACAddress() @@ -870,14 +872,14 @@ std::string Util::GetMACAddress() } else { - gdcmWarningMacro("Problem in finding the MAC Address"); + gdcmStaticWarningMacro("Problem in finding the MAC Address"); return ""; } } /** - * \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 */ @@ -912,7 +914,7 @@ std::string Util::CreateUniqueUID(const std::string &root) // If append is too long we need to rehash it if ( (prefix + append).size() > 64 ) { - gdcmErrorMacro( "Size of UID is too long." ); + gdcmStaticErrorMacro( "Size of UID is too long." ); // we need a hash function to truncate this number // if only md5 was cross plateform // MD5(append); @@ -1145,6 +1147,14 @@ std::string Util::GetIPAddress() return str; } +void Util::hfpswap(double *a, double *b) +{ + double tmp; + tmp=*a; + *a=*b; + *b=tmp; +} + //------------------------------------------------------------------------- } // end namespace gdcm