equal
deleted
inserted
replaced
19 #if !defined(__H_UTL_H__) |
19 #if !defined(__H_UTL_H__) |
20 #define __H_UTL_H__ |
20 #define __H_UTL_H__ |
21 // |
21 // |
22 #include <stdio.h> |
22 #include <stdio.h> |
23 |
23 |
24 #ifdef __VC32__ |
24 #ifdef _MSC_VER |
25 #ifdef __MSVCDOTNET__ |
25 #if (_MSC_VER > 1200) //!__MSVCDOTNET__ |
|
26 #define __MSVCDOTNET__ 1 |
26 #include <iostream> |
27 #include <iostream> |
27 #include <strstream> |
28 #include <sstream> |
28 #include <fstream> |
29 #include <fstream> |
29 using namespace std; |
30 using namespace std; |
30 #else //!__MSVCDOTNET__ |
31 #else //!__MSVCDOTNET__ |
31 #include <iostream.h> |
32 #include <iostream.h> |
32 #include <strstrea.h> |
33 #include <strstrea.h> |
149 extern TBool PVerbose; |
150 extern TBool PVerbose; |
150 // |
151 // |
151 TAny *operator new(TUint aSize); |
152 TAny *operator new(TUint aSize); |
152 void operator delete(TAny *aPtr); |
153 void operator delete(TAny *aPtr); |
153 // |
154 // |
154 #ifdef __TOOLS2__ |
155 #if defined(__TOOLS2__) || defined(__MSVCDOTNET__) |
155 istringstream &operator>>(istringstream &is, TVersion &aVersion); |
156 istringstream &operator>>(istringstream &is, TVersion &aVersion); |
156 #else |
157 #else |
157 istrstream &operator>>(istrstream &is, TVersion &aVersion); |
158 istrstream &operator>>(istrstream &is, TVersion &aVersion); |
158 #endif |
159 #endif |
159 // |
160 // |
171 template <class T> |
172 template <class T> |
172 TInt Val(T& aVal, const char* aStr) |
173 TInt Val(T& aVal, const char* aStr) |
173 { |
174 { |
174 |
175 |
175 T x; |
176 T x; |
176 #ifdef __TOOLS2__ |
177 #if defined(__TOOLS2__) || defined(__MSVCDOTNET__) |
177 istringstream val(aStr); |
178 istringstream val(aStr); |
178 #else |
179 #else |
179 istrstream val((char*)aStr,strlen(aStr)); |
180 istrstream val((char*)aStr,strlen(aStr)); |
180 #endif |
181 #endif |
181 #if defined(__MSVCDOTNET__) || defined (__TOOLS2__) |
182 #if defined (__TOOLS2__) || defined(__MSVCDOTNET__) |
182 val >> setbase(0); |
183 val >> setbase(0); |
183 #endif //__MSVCDOTNET__ |
184 #endif //__MSVCDOTNET__ |
184 val >> x; |
185 val >> x; |
185 if (!val.eof() || val.fail()) |
186 if (!val.eof() || val.fail()) |
186 return KErrGeneral; |
187 return KErrGeneral; |