imgtools/imglib/host/h_utl.cpp
changeset 654 7c11c3d8d025
parent 626 ac03b93ca9c4
child 714 e5a58c351011
--- a/imgtools/imglib/host/h_utl.cpp	Mon Oct 25 11:53:21 2010 +0800
+++ b/imgtools/imglib/host/h_utl.cpp	Tue Oct 26 11:12:31 2010 +0800
@@ -19,11 +19,7 @@
 
 #define __INCLUDE_CAPABILITY_NAMES__
 
-#if defined(_MSVCDOTNET__) || defined(__TOOLS2__)
 
-#else //!__MSVCDOTNET__
-#include <string.h>
-#endif //__MSVCDOTNET__
 
 #include <stdarg.h>
 #include <stdlib.h>
@@ -33,6 +29,12 @@
 
 #include "h_utl.h"
 
+#if defined(__MSVCDOTNET__)|| defined(__TOOLS2__)
+
+#else //!__MSVCDOTNET__
+#include <string.h>
+#endif //__MSVCDOTNET__
+
 #ifdef __LINUX__
  
  // Convert the supplied string to uppercase, in-place 
@@ -155,7 +157,7 @@
 TVersion::TVersion(TInt aMajor, TInt aMinor, TInt aBuild)
 	: iMajor((TInt8)aMajor), iMinor((TInt8)aMinor), iBuild((TInt16)aBuild)
 	{}
-#ifdef __TOOLS2__
+#if defined(__TOOLS2__ ) ||  defined(__MSVCDOTNET__ )
 istringstream &operator>>(istringstream &is, TVersion &aVersion)
 #else
 istrstream &operator>>(istrstream &is, TVersion &aVersion)
@@ -164,7 +166,7 @@
 // Input a TVersion with syntax: major[.minor][(build)]
 //	
 	{
-#ifdef __TOOLS2__
+#if defined(__TOOLS2__ ) ||  defined(__MSVCDOTNET__ )
 string tmp = is.str();
 const char *str=tmp.c_str();
 #else
@@ -192,7 +194,7 @@
 		{ 
 		cout << "\n Warning: major version must be in range 0 - 127 \n";
 		}
-	char* pMinor = strchr(str, '.');
+	char* pMinor = (char*)strchr(str, '.');
 	if (pMinor)
 		{
 		pMinor++; 
@@ -300,7 +302,7 @@
 	TInt sec=0;
 	TInt mill=0;
 	char ch;
-	#ifdef __TOOLS2__
+	#if defined(__TOOLS2__) || defined(__MSVCDOTNET__)
 	istringstream val(aString);
 	#else
 	istrstream val(aString,strlen(aString));