Author: ekohl Date: Sun Apr 25 22:49:29 2010 New Revision: 47022
URL: http://svn.reactos.org/svn/reactos?rev=47022&view=rev Log: [MKHIVE] Fix a buggy format string (%s --> %S). Add _wcsicmp to rtl.c.
Modified: trunk/reactos/tools/mkhive/reginf.c trunk/reactos/tools/mkhive/rtl.c
Modified: trunk/reactos/tools/mkhive/reginf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/reginf.c?rev=4... ============================================================================== --- trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/reginf.c [iso-8859-1] Sun Apr 25 22:49:29 2010 @@ -354,7 +354,7 @@ if (Data == NULL) return FALSE;
- DPRINT("setting binary data %s len %d\n", ValueName, Size); + DPRINT("setting binary data %S len %d\n", ValueName, Size); InfHostGetBinaryField (Context, 5, Data, Size, NULL); }
Modified: trunk/reactos/tools/mkhive/rtl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/rtl.c?rev=4702... ============================================================================== --- trunk/reactos/tools/mkhive/rtl.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/rtl.c [iso-8859-1] Sun Apr 25 22:49:29 2010 @@ -207,3 +207,32 @@ } return Mask ? 1 : 0; } + +#undef tolower +WCHAR towlower(WCHAR ch) +{ + if (ch < L'A') + { + return ch; + } + else if (ch <= L'Z') + { + return ch + (L'a' - L'A'); + } + + return ch; +} + +int _wcsicmp(PCWSTR cs, PCWSTR ct) +{ + while (towlower(*cs) == towlower(*ct)) + { + if (*cs == 0) + return 0; + + cs++; + ct++; + } + + return towlower(*cs) - towlower(*ct); +}