Author: janderwald
Date: Tue Oct 24 15:45:21 2006
New Revision: 24643
URL:
http://svn.reactos.org/svn/reactos?rev=24643&view=rev
Log:
- fix string define mess
Modified:
trunk/reactos/tools/sysreg/comp_factory.h
trunk/reactos/tools/sysreg/conf_parser.cpp
trunk/reactos/tools/sysreg/conf_parser.h
trunk/reactos/tools/sysreg/env_var.cpp
trunk/reactos/tools/sysreg/env_var.h
trunk/reactos/tools/sysreg/file_reader.h
trunk/reactos/tools/sysreg/pipe_reader.cpp
trunk/reactos/tools/sysreg/pipe_reader.h
trunk/reactos/tools/sysreg/reg_test.h
trunk/reactos/tools/sysreg/rosboot_test.cpp
trunk/reactos/tools/sysreg/sym_file.cpp
trunk/reactos/tools/sysreg/sym_file.h
trunk/reactos/tools/sysreg/sysreg.cpp
trunk/reactos/tools/sysreg/sysreg.h
trunk/reactos/tools/sysreg/user_types.h
Modified: trunk/reactos/tools/sysreg/comp_factory.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/comp_factory.…
==============================================================================
--- trunk/reactos/tools/sysreg/comp_factory.h (original)
+++ trunk/reactos/tools/sysreg/comp_factory.h Tue Oct 24 15:45:21 2006
@@ -11,6 +11,7 @@
*/
+#include "user_types.h"
#include <map>
#include <vector>
@@ -18,20 +19,6 @@
{
using std::map;
using std::vector;
-
-#ifdef UNICODE
-
- using std::wcout;
- using std::endl;
-
-#define cout wcout;
-
-#else
-
- using std::cout;
- using std::endl;
-
-#endif
//----------------------------------------------------------
///
Modified: trunk/reactos/tools/sysreg/conf_parser.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.c…
==============================================================================
--- trunk/reactos/tools/sysreg/conf_parser.cpp (original)
+++ trunk/reactos/tools/sysreg/conf_parser.cpp Tue Oct 24 15:45:21 2006
@@ -14,20 +14,6 @@
namespace Sysreg_
{
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
-
-#define cerr wcerr
-
-#else
-
- using std::cerr;
- using std::endl;
-
-#endif
-
using std::ifstream;
//---------------------------------------------------------------------------------------
ConfigParser::ConfigParser()
Modified: trunk/reactos/tools/sysreg/conf_parser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.h…
==============================================================================
--- trunk/reactos/tools/sysreg/conf_parser.h (original)
+++ trunk/reactos/tools/sysreg/conf_parser.h Tue Oct 24 15:45:21 2006
@@ -11,14 +11,11 @@
*/
#include "user_types.h"
-#include <string>
#include <map>
-#include <tchar.h>
namespace Sysreg_
{
using std::map;
- using std::wstring;
//---------------------------------------------------------------------------------------
///
/// class ConfigParser
@@ -36,8 +33,6 @@
{
public:
- typedef std::basic_string<TCHAR> string;
- typedef std::basic_istringstream<TCHAR> istringstream;
typedef map<string, string> ConfigMap;
//---------------------------------------------------------------------------------------
///
Modified: trunk/reactos/tools/sysreg/env_var.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/env_var.cpp?r…
==============================================================================
--- trunk/reactos/tools/sysreg/env_var.cpp (original)
+++ trunk/reactos/tools/sysreg/env_var.cpp Tue Oct 24 15:45:21 2006
@@ -13,20 +13,6 @@
namespace System_
{
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
-
-#define cerr wcerr
-
-#else
-
- using std::cerr;
- using std::endl;
-
-#endif
-
EnvironmentVariable::EnvironmentMap EnvironmentVariable::m_Map;
@@ -44,7 +30,7 @@
//---------------------------------------------------------------------------------------
- bool EnvironmentVariable::getValue(const System_::string &EnvName, System_::string
&EnvValue)
+ bool EnvironmentVariable::getValue( string const &EnvName, string &EnvValue)
{
EnvironmentMap::const_iterator it = m_Map.find (EnvName);
if (it != m_Map.end())
Modified: trunk/reactos/tools/sysreg/env_var.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/env_var.h?rev…
==============================================================================
--- trunk/reactos/tools/sysreg/env_var.h (original)
+++ trunk/reactos/tools/sysreg/env_var.h Tue Oct 24 15:45:21 2006
@@ -10,15 +10,13 @@
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at)
*/
-#include <string>
+#include "user_types.h"
#include <map>
-#include <tchar.h>
+
namespace System_
{
-
using std::map;
- typedef std::basic_string<TCHAR> string;
//---------------------------------------------------------------------------------------
///
/// class EnvironmentVariable
Modified: trunk/reactos/tools/sysreg/file_reader.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.h…
==============================================================================
--- trunk/reactos/tools/sysreg/file_reader.h (original)
+++ trunk/reactos/tools/sysreg/file_reader.h Tue Oct 24 15:45:21 2006
@@ -12,7 +12,6 @@
#include "user_types.h"
-
#include <vector>
namespace System_
Modified: trunk/reactos/tools/sysreg/pipe_reader.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.c…
==============================================================================
--- trunk/reactos/tools/sysreg/pipe_reader.cpp (original)
+++ trunk/reactos/tools/sysreg/pipe_reader.cpp Tue Oct 24 15:45:21 2006
@@ -14,20 +14,6 @@
namespace System_
{
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
-
-#define cerr wcerr
-
-#else
-
- using std::cerr;
- using std::endl;
-
-#endif
-
//---------------------------------------------------------------------------------------
PipeReader::PipeReader() : m_File(NULL)
{
@@ -42,7 +28,7 @@
//---------------------------------------------------------------------------------------
- bool PipeReader::openPipe(const System_::string &PipeCmd, System_::string
AccessMode)
+ bool PipeReader::openPipe(string const & PipeCmd, string AccessMode)
{
if (m_File != NULL)
{
@@ -92,11 +78,11 @@
//---------------------------------------------------------------------------------------
- string::size_type PipeReader::readPipe(System_::string &Buffer)
+ string::size_type PipeReader::readPipe(string &Buffer)
{
TCHAR * buf = (TCHAR *)Buffer.c_str();
- System_::string::size_type size = Buffer.capacity();
+ string::size_type size = Buffer.capacity();
//#ifdef NDEBUG
memset(buf, 0x0, sizeof(TCHAR) * size);
Modified: trunk/reactos/tools/sysreg/pipe_reader.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.h…
==============================================================================
--- trunk/reactos/tools/sysreg/pipe_reader.h (original)
+++ trunk/reactos/tools/sysreg/pipe_reader.h Tue Oct 24 15:45:21 2006
@@ -12,14 +12,12 @@
-#include <string>
-#include <tchar.h>
+#include "user_types.h"
#include <stdio.h>
#include <stdlib.h>
namespace System_
{
- typedef std::basic_string<TCHAR> string;
//---------------------------------------------------------------------------------------
///
/// class PipeReader
Modified: trunk/reactos/tools/sysreg/reg_test.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/reg_test.h?re…
==============================================================================
--- trunk/reactos/tools/sysreg/reg_test.h (original)
+++ trunk/reactos/tools/sysreg/reg_test.h Tue Oct 24 15:45:21 2006
@@ -10,16 +10,12 @@
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at)
*/
+#include "user_types.h"
#include "conf_parser.h"
-
-#include <string>
-#include <tchar.h>
namespace Sysreg_
{
using Sysreg_::ConfigParser;
-
- typedef std::basic_string<TCHAR> string;
//-------------------------------------------------------------------
///
/// class RegressionTest
Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
==============================================================================
--- trunk/reactos/tools/sysreg/rosboot_test.cpp (original)
+++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 24 15:45:21 2006
@@ -30,20 +30,6 @@
namespace Sysreg_
{
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
-
-#define cerr wcerr
-
-#else
-
- using std::cerr;
- using std::endl;
-
-#endif
-
using std::vector;
using System_::PipeReader;
using System_::SymbolFile;
@@ -376,7 +362,7 @@
return ret;
}
//---------------------------------------------------------------------------------------
- bool RosBootTest::fetchDebugByFile(Sysreg_::string boot_cmd, Sysreg_::string debug_log)
+ bool RosBootTest::fetchDebugByFile(string boot_cmd, string debug_log)
{
PipeReader pipe_reader;
Modified: trunk/reactos/tools/sysreg/sym_file.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sym_file.cpp?…
==============================================================================
--- trunk/reactos/tools/sysreg/sym_file.cpp (original)
+++ trunk/reactos/tools/sysreg/sym_file.cpp Tue Oct 24 15:45:21 2006
@@ -26,23 +26,7 @@
namespace System_
{
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
-
-#define cerr wcerr
-
-#else
-
- using std::cerr;
- using std::endl;
-
-#endif
-
-
using std::vector;
-
string SymbolFile::VAR_ROS_OUTPUT = _T("ROS_OUTPUT");
string SymbolFile::ROS_ADDR2LINE = _T("ROS_ADDR2LINE");
string SymbolFile::m_SymbolPath= _T("");
@@ -62,7 +46,7 @@
}
//---------------------------------------------------------------------------------------
- bool SymbolFile::initialize(ConfigParser & conf_parser, const System_::string
&Path)
+ bool SymbolFile::initialize(ConfigParser & conf_parser, string const &Path)
{
vector<string> vect;
string current_dir;
@@ -194,7 +178,7 @@
}
//---------------------------------------------------------------------------------------
- bool SymbolFile::getSymbolFilePath(const System_::string &ModuleName,
System_::string &FilePath)
+ bool SymbolFile::getSymbolFilePath(string const &ModuleName, string &FilePath)
{
SymbolMap::const_iterator it = m_Map.find (ModuleName);
Modified: trunk/reactos/tools/sysreg/sym_file.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sym_file.h?re…
==============================================================================
--- trunk/reactos/tools/sysreg/sym_file.h (original)
+++ trunk/reactos/tools/sysreg/sym_file.h Tue Oct 24 15:45:21 2006
@@ -12,15 +12,10 @@
*/
#include "conf_parser.h"
-
-#include <string>
-#include <tchar.h>
#include <map>
namespace System_
{
-
- typedef std::basic_string<TCHAR> string;
using Sysreg_::ConfigParser;
//---------------------------------------------------------------------------------------
Modified: trunk/reactos/tools/sysreg/sysreg.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.cpp?re…
==============================================================================
--- trunk/reactos/tools/sysreg/sysreg.cpp (original)
+++ trunk/reactos/tools/sysreg/sysreg.cpp Tue Oct 24 15:45:21 2006
@@ -10,27 +10,6 @@
#include "sysreg.h"
-
-#ifdef UNICODE
-
- using std::wcerr;
- using std::endl;
- using std::wcout;
-
-#define cerr wcerr
-#define cout wcout
-
-#else
-
- using std::cerr;
- using std::cout;
- using std::endl;
-
-#endif
-
-
-typedef std::basic_string<TCHAR> string;
-
using System_::EnvironmentVariable;
using System_::ComponentFactoryTemplate;
Modified: trunk/reactos/tools/sysreg/sysreg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.h?rev=…
==============================================================================
--- trunk/reactos/tools/sysreg/sysreg.h (original)
+++ trunk/reactos/tools/sysreg/sysreg.h Tue Oct 24 15:45:21 2006
@@ -10,25 +10,15 @@
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at)
*/
-#include <tchar.h>
-#include <string>
-#include <iostream>
-
-
-
+#include "user_types.h"
#include "env_var.h"
-#include "pipe_reader.h"
+#include "sym_file.h"
#include "comp_factory.h"
#include "conf_parser.h"
// regression test classes
#include "rosboot_test.h"
-//test include
-#include "sym_file.h"
-
-
-
#endif /* end of SYSREG_H__ */
Modified: trunk/reactos/tools/sysreg/user_types.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/user_types.h?…
==============================================================================
--- trunk/reactos/tools/sysreg/user_types.h (original)
+++ trunk/reactos/tools/sysreg/user_types.h Tue Oct 24 15:45:21 2006
@@ -12,7 +12,27 @@
#include <string>
#include <tchar.h>
+#include <iostream>
typedef std::basic_string<TCHAR> string;
+ typedef std::basic_istringstream<TCHAR> 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
+
+
+#endif // end of USER_TYPES_H__