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/09/02 09:02:44 UTC
svn commit: r810382 -
/commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
Author: mturk
Date: Wed Sep 2 07:02:44 2009
New Revision: 810382
URL: http://svn.apache.org/viewvc?rev=810382&view=rev
Log:
Fix typos
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c?rev=810382&r1=810381&r2=810382&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c Wed Sep 2 07:02:44 2009
@@ -17,6 +17,7 @@
#include "acr.h"
#include "acr_private.h"
#include "acr_arch.h"
+#include "acr_port.h"
#include "acr_error.h"
#include "acr_string.h"
#include "acr_memory.h"
@@ -41,7 +42,7 @@
NULL
};
-static const unsigned wchar_t padchar[] =
+static const wchar_t padchar[] =
L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static unsigned int randseed = 0;
@@ -102,9 +103,9 @@
*trv = L'\0';
rc = GetFileAttributesW(path);
*trv = s;
- if (rv == INVALID_FILE_ATTRIBUTES)
+ if (rc == INVALID_FILE_ATTRIBUTES)
return INVALID_HANDLE_VALUE;
- if (!(da & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (!(rc & FILE_ATTRIBUTE_DIRECTORY)) {
ACR_SET_OS_ERROR(ACR_ENOTDIR);
return INVALID_HANDLE_VALUE;
}
@@ -186,9 +187,9 @@
*trv = L'\0';
rc = GetFileAttributesW(path);
*trv = s;
- if (rv == INVALID_FILE_ATTRIBUTES)
+ if (rc == INVALID_FILE_ATTRIBUTES)
return -1;
- if (!(da & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (!(rc & FILE_ATTRIBUTE_DIRECTORY)) {
ACR_SET_OS_ERROR(ACR_ENOTDIR);
return -1;
}
@@ -232,7 +233,7 @@
wcslcpy(tp, path, TMP_PATH_MAX);
wcslcat(tp, L"\\.acrXXXXXX", TMP_PATH_MAX);
fh = getftemp(tp, FILE_ATTRIBUTE_NORMAL);
- if (IS_VALID_HANDLE(f)) {
+ if (IS_VALID_HANDLE(fh)) {
CloseHandle(fh);
return 1;
}
@@ -260,7 +261,7 @@
if (_temp_path[0])
return _temp_path;
while (_try_envs[i]) {
- wchar_t *val = ACR_EnvGet(_try_envs[i]);
+ wchar_t *val = _wgetenv(_try_envs[i]);
if (val && *val) {
if (wcslen(val) < TMP_PATH_MAX) {
if (_temp_test(val)) {
@@ -287,7 +288,7 @@
}
else {
/* Finally try the users %USERPROFILE% */
- char *val = ACR_EnvGet(L"USERPROFILE");
+ wchar_t *val = _wgetenv(L"USERPROFILE");
if (val && *val) {
if (wcslen(val) < TMP_PATH_MAX) {
if (_temp_test(val))