[1/3] msxml3: Rename Vars for correctness

André Hentschel nerv at dawncrow.de
Tue Mar 30 12:56:20 CDT 2010


actually \r is carriage return and \n is linefeed
---
 dlls/msxml3/node.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 500fb94..884ee51 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1294,8 +1294,8 @@ static HRESULT WINAPI xmlnode_put_dataType(
 
 static BSTR EnsureCorrectEOL(BSTR sInput)
 {
-    static const WCHAR SZ_RETURN[] = {'\n',0};
-    static const WCHAR SZ_LINEFEED[] = {'\r',0};
+    static const WCHAR SZ_CRETURN[]  = {'\r',0};
+    static const WCHAR SZ_LINEFEED[] = {'\n',0};
     int nNum = 0;
     BSTR sNew;
     int nLen;
@@ -1305,22 +1305,22 @@ static BSTR EnsureCorrectEOL(BSTR sInput)
     /* Count line endings */
     for(i=0; i < nLen; i++)
     {
-        if(sInput[i] == SZ_RETURN[0])
+        if(sInput[i] == SZ_LINEFEED[0])
             nNum++;
     }
 
     TRACE("len=%d, num=%d\n", nLen, nNum);
 
-    /* Add linefeed as needed */
+    /* Add carriage returns as needed */
     if(nNum > 0)
     {
         int nPlace = 0;
         sNew = SysAllocStringLen(NULL, nLen + nNum+1);
         for(i=0; i < nLen; i++)
         {
-            if(sInput[i] == SZ_RETURN[0])
+            if(sInput[i] == SZ_LINEFEED[0])
             {
-                sNew[i+nPlace] = SZ_LINEFEED[0];
+                sNew[i+nPlace] = SZ_CRETURN[0];
                 nPlace++;
             }
             sNew[i+nPlace] = sInput[i];
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list