Changeset 21398 for trunk/src/msvcrt/dir.c
- Timestamp:
- Jul 28, 2010, 8:14:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/msvcrt/dir.c
r10005 r21398 31 31 #endif 32 32 33 #ifndef __MINIVCRT__ 34 33 35 #include "wine/port.h" 34 36 … … 49 51 50 52 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 53 54 #else /* !__MINIVCRT__ */ 55 56 #include "minivcrt.h" 57 #include "minivcrt_internal.h" 58 59 #include "winternl.h" 60 #include "wine/unicode.h" 61 62 #include <errno.h> 63 #include <stdlib.h> 64 65 #endif /* !__MINIVCRT__ */ 66 67 #ifndef __MINIVCRT__ 51 68 52 69 /* INTERNAL: Translate finddata_t to PWIN32_FIND_DATAA */ … … 70 87 } 71 88 89 #endif /* !__MINIVCRT__ */ 90 72 91 /* INTERNAL: Translate wfinddata_t to PWIN32_FIND_DATAA */ 73 92 static void msvcrt_wfttofd(LPWIN32_FIND_DATAW fd, struct _wfinddata_t* ft) … … 90 109 } 91 110 111 #ifndef __MINIVCRT__ 112 92 113 /********************************************************************* 93 114 * _chdir (MSVCRT.@) … … 103 124 } 104 125 126 #endif /* !__MINIVCRT__ */ 127 105 128 /********************************************************************* 106 129 * _wchdir (MSVCRT.@) … … 115 138 return 0; 116 139 } 140 141 #ifndef __MINIVCRT__ 117 142 118 143 /********************************************************************* … … 166 191 } 167 192 193 #endif /* !__MINIVCRT__ */ 194 168 195 /********************************************************************* 169 196 * _wfindfirst (MSVCRT.@) … … 185 212 } 186 213 214 #ifndef __MINIVCRT__ 215 187 216 /********************************************************************* 188 217 * _findnext (MSVCRT.@) … … 194 223 if (!FindNextFileA((HANDLE)hand, &find_data)) 195 224 { 196 *MSVCRT__errno() = MSVCRT _ENOENT;225 *MSVCRT__errno() = MSVCRT(ENOENT); 197 226 return -1; 198 227 } … … 202 231 } 203 232 233 #endif /* !__MINIVCRT__ */ 234 204 235 /********************************************************************* 205 236 * _wfindnext (MSVCRT.@) … … 211 242 if (!FindNextFileW((HANDLE)hand, &find_data)) 212 243 { 213 *MSVCRT__errno() = MSVCRT _ENOENT;244 *MSVCRT__errno() = MSVCRT(ENOENT); 214 245 return -1; 215 246 } … … 218 249 return 0; 219 250 } 251 252 #ifndef __MINIVCRT__ 220 253 221 254 /********************************************************************* … … 245 278 } 246 279 280 #endif /* !__MINIVCRT__ */ 281 247 282 /********************************************************************* 248 283 * _wgetcwd (MSVCRT.@) … … 264 299 if (dir_len >= size) 265 300 { 266 *MSVCRT__errno() = MSVCRT _ERANGE;301 *MSVCRT__errno() = MSVCRT(ERANGE); 267 302 return NULL; /* buf too small */ 268 303 } … … 270 305 return buf; 271 306 } 307 308 #ifndef __MINIVCRT__ 272 309 273 310 /********************************************************************* … … 322 359 } 323 360 361 #endif /* !__MINIVCRT__ */ 362 324 363 /********************************************************************* 325 364 * _wgetdcwd (MSVCRT.@) … … 342 381 if (GetDriveTypeW(drivespec) < DRIVE_REMOVABLE) 343 382 { 344 *MSVCRT__errno() = MSVCRT _EACCES;383 *MSVCRT__errno() = MSVCRT(EACCES); 345 384 return NULL; 346 385 } … … 349 388 if (dir_len >= size || dir_len < 1) 350 389 { 351 *MSVCRT__errno() = MSVCRT _ERANGE;390 *MSVCRT__errno() = MSVCRT(ERANGE); 352 391 return NULL; /* buf too small */ 353 392 } … … 360 399 return buf; 361 400 } 401 402 #ifndef __MINIVCRT__ 362 403 363 404 /********************************************************************* … … 399 440 } 400 441 442 #endif /* !__MINIVCRT__ */ 443 401 444 /********************************************************************* 402 445 * _wmkdir (MSVCRT.@) … … 410 453 } 411 454 455 #ifndef __MINIVCRT__ 456 412 457 /********************************************************************* 413 458 * _rmdir (MSVCRT.@) … … 420 465 return -1; 421 466 } 467 468 #endif /* !__MINIVCRT__ */ 422 469 423 470 /********************************************************************* … … 519 566 } 520 567 } 568 569 #ifndef __MINIVCRT__ 521 570 522 571 /* INTERNAL: Helper for _fullpath. Modified PD code from 'snippets'. */ … … 720 769 } 721 770 771 #endif /* !__MINIVCRT__ */ 772 722 773 /********************************************************************* 723 774 * _wmakepath (MSVCRT.@) … … 767 818 } 768 819 820 #ifndef __MINIVCRT__ 821 769 822 /********************************************************************* 770 823 * _searchenv (MSVCRT.@) … … 828 881 } 829 882 883 #endif /* !__MINIVCRT__ */ 884 830 885 MSVCRT_wchar_t* _wfullpath(MSVCRT_wchar_t* absPath,const MSVCRT_wchar_t* relPath,MSVCRT(size_t) size) 831 886 { … … 836 891 837 892 WideCharToMultiByte(CP_ACP, 0, relPath, -1, (LPSTR)asciirelPath, 280, NULL, NULL); 838 893 839 894 MSVCRT__fullpath(asciiabsPath, asciirelPath, size); 840 895 841 896 MultiByteToWideChar(CP_ACP, 0, asciiabsPath, -1, absPath, size); 842 897 843 return absPath; 844 } 898 return absPath; 899 }
Note:
See TracChangeset
for help on using the changeset viewer.