You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/16 13:03:41 UTC
svn commit: r804662 -
/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
Author: mturk
Date: Sun Aug 16 11:03:41 2009
New Revision: 804662
URL: http://svn.apache.org/viewvc?rev=804662&view=rev
Log:
Fix typos
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=804662&r1=804661&r2=804662&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Sun Aug 16 11:03:41 2009
@@ -111,7 +111,7 @@
int cd;
/* Addition to APR. Allow \FilePath
* and construct \\?\CurrenttDrive:\FilePath
- * We use _getdrive CRT function
+ * We use _getdrive CRT function
*/
wcscpy (retstr, L"\\\\?\\");
if ((cd = _getdrive()))
@@ -179,8 +179,8 @@
return NULL;
if (!(len = MultiByteToWideChar(CP_UTF8,
MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
- str, -1, NULL, 0, NULL, 0))) {
- if (GetLastError() != ERROR_INSUFICIENT_BUFFER)
+ str, -1, NULL, 0))) {
+ if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
errno = EILSEQ;
return NULL;
}
@@ -193,7 +193,7 @@
free(res);
SetLastError(saved);
/* Update CRT errno as well */
- if (saved == ERROR_INSUFICIENT_BUFFER)
+ if (saved == ERROR_INSUFFICIENT_BUFFER)
errno = ENOMEM;
else
errno = EILSEQ;
@@ -209,19 +209,21 @@
int len;
char *res;
- if (!(len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, NULL))) {
- if (GetLastError() != ERROR_INSUFICIENT_BUFFER)
+ if (!(len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0,
+ NULL, NULL))) {
+ if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
errno = EILSEQ;
return NULL;
}
if (!(res = malloc(len)))
return NULL;
- if (!WideCharToMultiByte(CP_UTF8, 0, str, -1, res, len, NULL, NULL)) {
+ if (!WideCharToMultiByte(CP_UTF8, 0, str, -1, res, len,
+ NULL, NULL)) {
DWORD saved = GetLastError();
x_free(res);
SetLastError(saved);
/* Update CRT errno as well */
- if (saved == ERROR_INSUFICIENT_BUFFER)
+ if (saved == ERROR_INSUFFICIENT_BUFFER)
errno = ENOMEM;
else
errno = EILSEQ;