Index: ext/libicpf/libicpf.vc80.sln =================================================================== diff -u -N --- ext/libicpf/libicpf.vc80.sln (revision 0) +++ ext/libicpf/libicpf.vc80.sln (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -0,0 +1,40 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libicpf", "libicpf.vc80.vcproj", "{AA9F2D67-CBB7-4062-A29B-119677DEB039}" +EndProject +Global + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Debug-Unicode|Win32 = Debug-Unicode|Win32 + Debug-Unicode|x64 = Debug-Unicode|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Release-Unicode|Win32 = Release-Unicode|Win32 + Release-Unicode|x64 = Release-Unicode|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug|Win32.Build.0 = Debug|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug|x64.ActiveCfg = Debug|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug|x64.Build.0 = Debug|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug-Unicode|Win32.ActiveCfg = Debug-Unicode|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug-Unicode|Win32.Build.0 = Debug-Unicode|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug-Unicode|x64.ActiveCfg = Debug-Unicode|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Debug-Unicode|x64.Build.0 = Debug-Unicode|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release|Win32.ActiveCfg = Release|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release|Win32.Build.0 = Release|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release|x64.ActiveCfg = Release|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release|x64.Build.0 = Release|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release-Unicode|Win32.ActiveCfg = Release-Unicode|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release-Unicode|Win32.Build.0 = Release-Unicode|Win32 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release-Unicode|x64.ActiveCfg = Release-Unicode|x64 + {AA9F2D67-CBB7-4062-A29B-119677DEB039}.Release-Unicode|x64.Build.0 = Release-Unicode|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Index: ext/libicpf/libicpf.vc80.vcproj =================================================================== diff -u -N --- ext/libicpf/libicpf.vc80.vcproj (revision 0) +++ ext/libicpf/libicpf.vc80.vcproj (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -0,0 +1,798 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ext/libicpf/src/cfg_xml.cpp =================================================================== diff -u -N -rea1d52b4f82729e45b3b6683df8341edcd9f7348 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/cfg_xml.cpp (.../cfg_xml.cpp) (revision ea1d52b4f82729e45b3b6683df8341edcd9f7348) +++ ext/libicpf/src/cfg_xml.cpp (.../cfg_xml.cpp) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -10,20 +10,13 @@ /// Buffer size for reading xml data from a file #define XML_BUFFER 65536 -/// Definition of a standard string depending on the unicode support -#ifdef _UNICODE - #define tstring std::wstring -#else - #define tstring std::string -#endif - // forward declaration class xml_node; /// Xml node storage -typedef std::map xml_storage; +typedef std::map xml_storage; /// String storage (key(s)=>value(s)) -typedef std::multimap attr_storage; +typedef std::multimap attr_storage; /** Class manages a single xml node. */ @@ -95,14 +88,14 @@ if (_tcscmp(attrs[t], _t("value")) == 0) { // this is the value type tag - pState->pNode->m_mAttr.insert(attr_storage::value_type(tstring(name), tstring(attrs[t+1]))); + pState->pNode->m_mAttr.insert(attr_storage::value_type(tstring_t(name), tstring_t(attrs[t+1]))); bContainer=false; } } if (bContainer) { - std::pair pr=pState->pNode->m_mNodes.insert(xml_storage::value_type(tstring(name), xml_node(pState->pNode))); + std::pair pr=pState->pNode->m_mNodes.insert(xml_storage::value_type(tstring_t(name), xml_node(pState->pNode))); pState->pNode=&((*pr.first).second); } } @@ -234,7 +227,7 @@ if (pSign) { // locate the xml_node associated with the name - xml_storage::iterator it=pNode->m_mNodes.find(tstring(pszName, pSign-pszName)); + xml_storage::iterator it=pNode->m_mNodes.find(tstring_t(pszName, pSign-pszName)); if (it != pNode->m_mNodes.end()) return find(&(*it).second, pSign+1); else @@ -302,12 +295,12 @@ const tchar_t* pszSign=_tcschr(pszName, _t('/')); if (pszSign != NULL) { - xml_storage::iterator it=pNode->m_mNodes.find(tstring(pszName, pszSign-pszName)); + xml_storage::iterator it=pNode->m_mNodes.find(tstring_t(pszName, pszSign-pszName)); if (it != pNode->m_mNodes.end()) set_value(&(*it).second, pszSign+1, pszValue, a); else { - std::pair pr=pNode->m_mNodes.insert(xml_storage::value_type(tstring(pszName, pszSign-pszName), xml_node(pNode))); + std::pair pr=pNode->m_mNodes.insert(xml_storage::value_type(tstring_t(pszName, pszSign-pszName), xml_node(pNode))); set_value(&(*pr.first).second, pszSign+1, pszValue, a); } } @@ -319,7 +312,7 @@ case config_base::action_replace: pNode->m_mAttr.clear(); case config_base::action_add: - pNode->m_mAttr.insert(attr_storage::value_type(tstring(pszName), tstring(pszValue))); + pNode->m_mAttr.insert(attr_storage::value_type(tstring_t(pszName), tstring_t(pszValue))); break; default: assert(false); @@ -351,13 +344,13 @@ if (pSign) { // locate the xml_node associated with the name - xml_storage::iterator it=pNode->m_mNodes.find(tstring(pszName, pSign-pszName)); + xml_storage::iterator it=pNode->m_mNodes.find(tstring_t(pszName, pSign-pszName)); if (it != pNode->m_mNodes.end()) clear(&(*it).second, pSign+1); } else { - std::pair pr=pNode->m_mAttr.equal_range(tstring(pszName)); + std::pair pr=pNode->m_mAttr.equal_range(tstring_t(pszName)); pNode->m_mAttr.erase(pr.first, pr.second); } } Index: ext/libicpf/src/cfg_xml.h =================================================================== diff -u -N -rfd1f0cf4d6ad9ff63fd9252a3f2f31c992431842 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/cfg_xml.h (.../cfg_xml.h) (revision fd1f0cf4d6ad9ff63fd9252a3f2f31c992431842) +++ ext/libicpf/src/cfg_xml.h (.../cfg_xml.h) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -1,16 +1,16 @@ -#ifndef __CFGXML_H__ -#define __CFGXML_H__ - -#include "gen_types.h" -#include "libicpf.h" -#include "config_base.h" - -BEGIN_ICPF_NAMESPACE - -/** Class provides the necessary base handlers for config class. - * It handles the xml data streams contained in the files, providing - * a way to set and retrieve data contained in the xml document. - */ +#ifndef __CFGXML_H__ +#define __CFGXML_H__ + +#include "gen_types.h" +#include "libicpf.h" +#include "config_base.h" + +BEGIN_ICPF_NAMESPACE + +/** Class provides the necessary base handlers for config class. + * It handles the xml data streams contained in the files, providing + * a way to set and retrieve data contained in the xml document. + */ class xml_cfg : public config_base { public: @@ -55,7 +55,7 @@ protected: ptr_t m_hStorage; ///< Handle to the internal xml storage }; - -END_ICPF_NAMESPACE - -#endif + +END_ICPF_NAMESPACE + +#endif Index: ext/libicpf/src/circ_buffer.cpp =================================================================== diff -u -N -r2446443341715955423610c01b43fe7841a10e3e -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/circ_buffer.cpp (.../circ_buffer.cpp) (revision 2446443341715955423610c01b43fe7841a10e3e) +++ ext/libicpf/src/circ_buffer.cpp (.../circ_buffer.cpp) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -519,7 +519,7 @@ else { // call the callback function with the ucData as a param - byte_t uc=(byte_t)(w & 0xff) << (8-ulBitsCount); + byte_t uc=(byte_t)((w & 0xff) << (8-ulBitsCount)); uc >>= 8-ulBitsCount; (*pfn)(uc, pParam); Index: ext/libicpf/src/config_property.cpp =================================================================== diff -u -N -rfd1f0cf4d6ad9ff63fd9252a3f2f31c992431842 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/config_property.cpp (.../config_property.cpp) (revision fd1f0cf4d6ad9ff63fd9252a3f2f31c992431842) +++ ext/libicpf/src/config_property.cpp (.../config_property.cpp) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -1,9 +1,9 @@ -#include "config_property.h" -#include -#include - -BEGIN_ICPF_NAMESPACE - +#include "config_property.h" +#include +#include + +BEGIN_ICPF_NAMESPACE + ////////////////////////////////////////////////////////////////////////////////// // property class // fast access to the array property types @@ -972,5 +972,5 @@ return atoll(pszSrc); #endif } - -END_ICPF_NAMESPACE + +END_ICPF_NAMESPACE Index: ext/libicpf/src/config_property.h =================================================================== diff -u -N -rfd1f0cf4d6ad9ff63fd9252a3f2f31c992431842 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/config_property.h (.../config_property.h) (revision fd1f0cf4d6ad9ff63fd9252a3f2f31c992431842) +++ ext/libicpf/src/config_property.h (.../config_property.h) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -1,11 +1,11 @@ -#ifndef __CONFIGPROPERTY_H__ -#define __CONFIGPROPERTY_H__ - -#include "gen_types.h" -#include "libicpf.h" - -BEGIN_ICPF_NAMESPACE - +#ifndef __CONFIGPROPERTY_H__ +#define __CONFIGPROPERTY_H__ + +#include "gen_types.h" +#include "libicpf.h" + +BEGIN_ICPF_NAMESPACE + /** \brief Basic property description class. */ class LIBICPF_API property @@ -157,7 +157,7 @@ } ull; } m_range; }; - -END_ICPF_NAMESPACE - -#endif + +END_ICPF_NAMESPACE + +#endif Index: ext/libicpf/src/gen_types.h =================================================================== diff -u -N -r6dae57f5e7aeeb965bc018024d8360069f6e15c1 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/gen_types.h (.../gen_types.h) (revision 6dae57f5e7aeeb965bc018024d8360069f6e15c1) +++ ext/libicpf/src/gen_types.h (.../gen_types.h) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -23,7 +23,7 @@ #ifndef __GENTYPES_H__ #define __GENTYPES_H__ -#ifdef HAVE_CONFIG_H +#if defined(HAVE_CONFIG_H) #include "config.h" #endif @@ -86,7 +86,7 @@ /// 32bit unsigned integer typedef unsigned long uint_t; /// 32bit unsigned long - typedef unsigned long ulong_t + typedef unsigned long ulong_t; #else /// 32bit integer typedef int int_t; @@ -108,8 +108,8 @@ typedef unsigned int ulong_t; #endif -// 64-bit integers -/// 64bit long long +// 64-bit integers; +/// 64bit; typedef long long longlong_t; /// 64bit unsigned long long typedef unsigned long long ulonglong_t; Index: ext/libicpf/src/log.cpp =================================================================== diff -u -N -r6dae57f5e7aeeb965bc018024d8360069f6e15c1 -rd5bb2e19e22f57bd018e9db355108b54dfbc364c --- ext/libicpf/src/log.cpp (.../log.cpp) (revision 6dae57f5e7aeeb965bc018024d8360069f6e15c1) +++ ext/libicpf/src/log.cpp (.../log.cpp) (revision d5bb2e19e22f57bd018e9db355108b54dfbc364c) @@ -490,7 +490,7 @@ * \param[in] pszStr - format string for the given parameters * \param[in] iSysErr - system error to be shown */ -void log_file::logerr(const tchar_t* pszStr, int iSysErr, ...) +void log_file::logerr(const tchar_t* pszStr, int_t iSysErr, ...) { tchar_t szNewFmt[2048]; if (prepare_fmt(pszStr, iSysErr, szNewFmt)) @@ -517,7 +517,7 @@ * \param[in] pszStr - format string for the given parameters * \param[in] iSysErr - system error to be shown */ -void log_file::logerrs(const tchar_t* pszStr, int iSysErr, ...) +void log_file::logerrs(const tchar_t* pszStr, int_t iSysErr, ...) { tchar_t szNewFmt[2048]; if (prepare_fmt(pszStr, iSysErr, szNewFmt)) @@ -543,7 +543,7 @@ * \param[out] pszOut - pointer to a buffer that will receive the data (must be 2048 bytes in size) * \return If the %err string was found and replaced within a given format string. */ -bool log_file::prepare_fmt(const tchar_t* pszStr, int iSysErr, tchar_t* pszOut) const +bool log_file::prepare_fmt(const tchar_t* pszStr, int_t iSysErr, tchar_t* pszOut) const { // find the %err in pszStr const tchar_t* pszFnd=_tcsstr(pszStr, _t("%err"));