Changeset 6401 for trunk/src/custombuild/guid.c
- Timestamp:
- Jul 29, 2001, 9:02:35 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/custombuild/guid.c
r6374 r6401 1 /* $Id: guid.c,v 1. 1 2001-07-20 15:41:43sandervl Exp $ */1 /* $Id: guid.c,v 1.2 2001-07-29 19:02:35 sandervl Exp $ */ 2 2 #define ICOM_CINTERFACE 1 3 3 #include <odin.h> … … 51 51 return towupper(*str1) - towupper(*str2); 52 52 } 53 54 /********************************************************************* 55 * wcstombs (NTDLL.@) 56 */ 57 INT __cdecl NTDLL_wcstombs( LPSTR dst, LPCWSTR src, INT n ) 58 { 59 INT ret; 60 if (n <= 0) return 0; 61 ret = WideCharToMultiByte( CP_ACP, 0, src, -1, dst, dst ? n : 0, NULL, NULL ); 62 if (!ret) return n; /* overflow */ 63 return ret - 1; /* do not count terminating NULL */ 64 } 65 66 /********************************************************************* 67 * _wtol (NTDLL.@) 68 * Like atol, but for wide character strings. 69 */ 70 LONG __cdecl _wtol(LPWSTR string) 71 { 72 char buffer[30]; 73 NTDLL_wcstombs( buffer, string, sizeof(buffer) ); 74 return atol( buffer ); 75 } 76 77 /********************************************************************* 78 * _wtoi (NTDLL.@) 79 */ 80 INT __cdecl _wtoi(LPWSTR string) 81 { 82 return _wtol(string); 83 }
Note:
See TracChangeset
for help on using the changeset viewer.