Author: greatlrd
Date: Sat May 27 15:37:44 2006
New Revision: 22070
URL:
http://svn.reactos.ru/svn/reactos?rev=22070&view=rev
Log:
replacing _swab with wine cvs 2006-05-11 version, this will take care of our problem with
overlapped memory problem with swab, and this make also two more wine test pass in wine
msvcrt test. 100% pass okay now with wine msvcrt string test.
Modified:
trunk/reactos/lib/crt/stdlib/swab.c
Modified: trunk/reactos/lib/crt/stdlib/swab.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/stdlib/swab.c?rev=2…
==============================================================================
--- trunk/reactos/lib/crt/stdlib/swab.c (original)
+++ trunk/reactos/lib/crt/stdlib/swab.c Sat May 27 15:37:44 2006
@@ -12,17 +12,23 @@
/*
* @implemented
+ *
+ * copy this swab from wine cvs 2006-05-24
*/
-void _swab (const char* caFrom, char* caTo, size_t sizeToCopy)
+void _swab (const char * src, char * dst, size_t sizeToCopy
+ )
+
{
- if (sizeToCopy > 1)
+ if (sizeToCopy > 1)
{
- sizeToCopy = sizeToCopy >> 1;
+ sizeToCopy = (unsigned)sizeToCopy >> 1;
while (sizeToCopy--) {
- *caTo++ = caFrom[1];
- *caTo++ = *caFrom++;
- caFrom++;
+ char s0 = src[0];
+ char s1 = src[1];
+ *dst++ = s1;
+ *dst++ = s0;
+ src = src + 2;
}
}
}