Rename to IsSpaceW. Conflict with IsSpace in atlstr.h

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Rename to IsSpaceW. Conflict with IsSpace in atlstr.h

Postby ivan386 » 24 Sep 2017 11:58

Code: Select all
Index: Strings.cpp
===================================================================
--- Strings.cpp   (revision 9700)
+++ Strings.cpp   (working copy)
@@ -1081,11 +1081,11 @@
 
    while ( pszXML < pszNull && *pszXML )
    {
-      if ( IsSpace( *pszXML ) && *pszXML != 0xa0 )   // Keep non-breaking space
+      if ( IsSpaceW( *pszXML ) && *pszXML != 0xa0 )   // Keep non-breaking space
       {
          if ( pszValue != pszOut ) *pszOut++ = ' ';
          pszXML++;
-         while ( *pszXML && IsSpace( *pszXML ) && *pszXML != 0xa0 ) pszXML++;
+         while ( *pszXML && IsSpaceW( *pszXML ) && *pszXML != 0xa0 ) pszXML++;
          if ( pszXML >= pszNull || ! *pszXML ) break;
       }
 
Index: Strings.h
===================================================================
--- Strings.h   (revision 9700)
+++ Strings.h   (working copy)
@@ -29,7 +29,7 @@
 #define _P(x)   (x),(_countof(x)-1)
 #define _PT(x)   _P(_T(x))
 
-#define IsSpace(ch)   ((ch) == _T(' ') || (ch) == _T('\t') || (ch) == _T('\r') || (ch) == _T('\n'))
+#define IsSpaceW(ch)   ((ch) == _T(' ') || (ch) == _T('\t') || (ch) == _T('\r') || (ch) == _T('\n'))
 
 bool IsCharacter(WCHAR nChar);
 bool IsHiragana(WCHAR nChar);
Index: XML.cpp
===================================================================
--- XML.cpp   (revision 9700)
+++ XML.cpp   (working copy)
@@ -70,7 +70,7 @@
    LPCTSTR pszXML = pszBase;
    int nParse = 0;
 
-   for ( ; IsSpace( *pszXML ) ; pszXML++, nParse++ );
+   for ( ; IsSpaceW( *pszXML ) ; pszXML++, nParse++ );
    if ( ! *pszXML ) return FALSE;
 
    for ( ; *pszXML && *pszToken ; pszXML++, pszToken++, nParse++ )
@@ -88,7 +88,7 @@
    LPCTSTR pszXML = pszBase;
    int nParse = 0;
 
-   while ( IsSpace( *pszXML ) )
+   while ( IsSpaceW( *pszXML ) )
    {
       pszXML++;
       nParse++;
Attachments
shareaza(IsSpaseW).zip
(16.81 KiB) Downloaded 2 times
data:application/exe,%B4%09%BA%0D%01%CD%21%B4%08%CD%21%CD%20Hello,World!$
ivan386
 
Posts: 259
Joined: 17 Jun 2009 14:08

Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest