Provide local implementation of wcscasecmp() under Windows, where it's non-

existent.
This commit is contained in:
Konstantin Isakov 2009-02-02 01:10:16 +00:00
parent 9f41c3304a
commit 13d0637357

View file

@ -10,6 +10,27 @@ namespace Details {
using std::wstring; using std::wstring;
using std::list; using std::list;
#ifdef __WIN32
// wcscasecmp() function is a GNU extension, we need to reimplement it
// for non-GNU systems.
int wcscasecmp( const wchar_t *s1, const wchar_t *s2 )
{
for( ; ; ++s1, ++s2 )
{
if ( towlower( *s1 ) != towlower( *s2 ) )
return towlower( *s1 ) > towlower( *s2 ) ? 1 : -1;
if ( !*s1 )
break;
}
return 0;
}
#endif
/////////////// ArticleDom /////////////// ArticleDom
wstring ArticleDom::Node::renderAsText() const wstring ArticleDom::Node::renderAsText() const