[ros-diffs] [cwittich] 29459: -fix compilation with msvc -fix some memory leaks

cwittich at svn.reactos.org cwittich at svn.reactos.org
Mon Oct 8 21:18:42 CEST 2007


Author: cwittich
Date: Mon Oct  8 23:18:42 2007
New Revision: 29459

URL: http://svn.reactos.org/svn/reactos?rev=29459&view=rev
Log:
-fix compilation with msvc
-fix some memory leaks

Modified:
    trunk/reactos/tools/rgenstat/rgenstat.c
    trunk/reactos/tools/sysreg/conf_parser.cpp
    trunk/reactos/tools/sysreg/rosboot_test.cpp
    trunk/reactos/tools/sysreg/sysreg.cpp
    trunk/reactos/tools/sysreg/user_types.h

Modified: trunk/reactos/tools/rgenstat/rgenstat.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rgenstat/rgenstat.c?rev=29459&r1=29458&r2=29459&view=diff
==============================================================================
--- trunk/reactos/tools/rgenstat/rgenstat.c (original)
+++ trunk/reactos/tools/rgenstat/rgenstat.c Mon Oct  8 23:18:42 2007
@@ -13,6 +13,9 @@
 #ifdef WIN32
 #include <io.h>
 #include <dos.h>
+#include <windows.h>
+int __cdecl strcasecmp (const char * __sz1, const char * __sz2)
+	{return _stricmp (__sz1, __sz2);}
 #else
 #include <sys/io.h>
 #include <errno.h>

Modified: trunk/reactos/tools/sysreg/conf_parser.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.cpp?rev=29459&r1=29458&r2=29459&view=diff
==============================================================================
--- trunk/reactos/tools/sysreg/conf_parser.cpp (original)
+++ trunk/reactos/tools/sysreg/conf_parser.cpp Mon Oct  8 23:18:42 2007
@@ -69,8 +69,8 @@
 				}
 			}
 		}
+		fclose(file);
 		return ret;
-
 	}
 
 //---------------------------------------------------------------------------------------

Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.cpp?rev=29459&r1=29458&r2=29459&view=diff
==============================================================================
--- trunk/reactos/tools/sysreg/rosboot_test.cpp (original)
+++ trunk/reactos/tools/sysreg/rosboot_test.cpp Mon Oct  8 23:18:42 2007
@@ -27,7 +27,7 @@
 #include <assert.h>
 #include <math.h>
 #include <signal.h>
-//#include <io.h>
+#include <io.h>
 
 namespace Sysreg_
 {

Modified: trunk/reactos/tools/sysreg/sysreg.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.cpp?rev=29459&r1=29458&r2=29459&view=diff
==============================================================================
--- trunk/reactos/tools/sysreg/sysreg.cpp (original)
+++ trunk/reactos/tools/sysreg/sysreg.cpp Mon Oct  8 23:18:42 2007
@@ -77,9 +77,11 @@
         if (!ret)
         {
             cout << "The regression test has failed at stage: " << i << endl;
+			delete regtest;
             return -2;
         }
     }
 	cout << "The regression test completed successfully" << endl;
+	delete regtest;
 	return 0;
 }

Modified: trunk/reactos/tools/sysreg/user_types.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/user_types.h?rev=29459&r1=29458&r2=29459&view=diff
==============================================================================
--- trunk/reactos/tools/sysreg/user_types.h (original)
+++ trunk/reactos/tools/sysreg/user_types.h Mon Oct  8 23:18:42 2007
@@ -18,26 +18,12 @@
 #define pclose _pclose
 #endif
 
-	typedef std::basic_string<char> string;
-	typedef std::basic_istringstream<char> istringstream;
+typedef std::basic_string<char> string;
+typedef std::basic_istringstream<char> istringstream;
 
-
-#ifdef UNICODE
-
-	using std::wcout;
-	using std::wcerr;
-	using std::endl;
-
-#define cout wcout
-#define cerr wcerr
-
-#else
-
-	using std::cout;
-	using std::cerr;
-	using std::endl;
-
-#endif
+using std::cout;
+using std::cerr;
+using std::endl;
 
 
 #endif // end of USER_TYPES_H__ 




More information about the Ros-diffs mailing list