Changeset 6712 for trunk/src/NTDLL
- Timestamp:
- Sep 15, 2001, 11:47:44 AM (24 years ago)
- Location:
- trunk/src/NTDLL
- Files:
-
- 4 edited
-
initterm.cpp (modified) (3 diffs)
-
rtlstr.c (modified) (34 diffs)
-
unknown.cpp (modified) (2 diffs)
-
wcstring.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/initterm.cpp
r6648 r6712 1 /* $Id: initterm.cpp,v 1.13 2001-09-05 13:14:08 bird Exp $ 2 * 1 /* 3 2 * DLL entry point 4 3 * … … 54 53 case DLL_THREAD_ATTACH: 55 54 case DLL_THREAD_DETACH: 56 return NTDLL_LibMain(hinstDLL, fdwReason, fImpLoad);55 return NTDLL_LibMain(hinstDLL, fdwReason, fImpLoad); 57 56 58 57 case DLL_PROCESS_DETACH: 59 NTDLL_LibMain(hinstDLL, fdwReason, fImpLoad);60 ctordtorTerm();61 return TRUE;58 NTDLL_LibMain(hinstDLL, fdwReason, fImpLoad); 59 ctordtorTerm(); 60 return TRUE; 62 61 } 63 62 return FALSE; … … 89 88 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 90 89 91 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab);92 if(dllHandle == 0) 93 return 0UL;90 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab); 91 if(dllHandle == 0) 92 return 0UL; 94 93 95 94 break; 96 95 case 1 : 97 96 if(dllHandle) { 98 UnregisterLxDll(dllHandle);97 UnregisterLxDll(dllHandle); 99 98 } 100 99 break; -
trunk/src/NTDLL/rtlstr.c
r6648 r6712 1 /* $Id: rtlstr.c,v 1.4 2001-09-05 13:14:08 bird Exp $ */2 1 /* 3 2 * Rtl string functions … … 24 23 25 24 /************************************************************************** 26 * RtlInitAnsiString (NTDLL.@)25 * RtlInitAnsiString (NTDLL.@) 27 26 */ 28 27 void WINAPI RtlInitAnsiString( PSTRING target, LPCSTR source) … … 38 37 39 38 /************************************************************************** 40 * RtlInitString (NTDLL.@)39 * RtlInitString (NTDLL.@) 41 40 */ 42 41 void WINAPI RtlInitString( PSTRING target, LPCSTR source ) … … 47 46 48 47 /************************************************************************** 49 * RtlFreeAnsiString (NTDLL.@)48 * RtlFreeAnsiString (NTDLL.@) 50 49 */ 51 50 void WINAPI RtlFreeAnsiString( PSTRING str ) … … 56 55 57 56 /************************************************************************** 58 * RtlFreeOemString (NTDLL.@)57 * RtlFreeOemString (NTDLL.@) 59 58 */ 60 59 void WINAPI RtlFreeOemString( PSTRING str ) … … 65 64 66 65 /************************************************************************** 67 * RtlCopyString (NTDLL.@)66 * RtlCopyString (NTDLL.@) 68 67 */ 69 68 void WINAPI RtlCopyString( STRING *dst, const STRING *src ) … … 80 79 81 80 /************************************************************************** 82 * RtlInitUnicodeString (NTDLL.@)81 * RtlInitUnicodeString (NTDLL.@) 83 82 */ 84 83 void WINAPI RtlInitUnicodeString( PUNICODE_STRING target, LPCWSTR source ) … … 94 93 95 94 /************************************************************************** 96 * RtlCreateUnicodeString (NTDLL.@)95 * RtlCreateUnicodeString (NTDLL.@) 97 96 */ 98 97 BOOLEAN WINAPI RtlCreateUnicodeString( PUNICODE_STRING target, LPCWSTR src ) … … 108 107 109 108 /************************************************************************** 110 * RtlCreateUnicodeStringFromAsciiz (NTDLL.@)109 * RtlCreateUnicodeStringFromAsciiz (NTDLL.@) 111 110 */ 112 111 BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz( PUNICODE_STRING target, LPCSTR src ) … … 119 118 120 119 /************************************************************************** 121 * RtlFreeUnicodeString (NTDLL.@)120 * RtlFreeUnicodeString (NTDLL.@) 122 121 */ 123 122 void WINAPI RtlFreeUnicodeString( PUNICODE_STRING str ) … … 128 127 129 128 /************************************************************************** 130 * RtlCopyUnicodeString (NTDLL.@)129 * RtlCopyUnicodeString (NTDLL.@) 131 130 */ 132 131 void WINAPI RtlCopyUnicodeString( UNICODE_STRING *dst, const UNICODE_STRING *src ) … … 145 144 146 145 /************************************************************************** 147 * RtlEraseUnicodeString (NTDLL.@)146 * RtlEraseUnicodeString (NTDLL.@) 148 147 */ 149 148 void WINAPI RtlEraseUnicodeString( UNICODE_STRING *str ) … … 161 160 162 161 /****************************************************************************** 163 * RtlCompareString (NTDLL.@)162 * RtlCompareString (NTDLL.@) 164 163 */ 165 164 LONG WINAPI RtlCompareString( const STRING *s1, const STRING *s2, BOOLEAN CaseInsensitive ) … … 187 186 188 187 /****************************************************************************** 189 * RtlCompareUnicodeString (NTDLL.@)188 * RtlCompareUnicodeString (NTDLL.@) 190 189 */ 191 190 LONG WINAPI RtlCompareUnicodeString( const UNICODE_STRING *s1, const UNICODE_STRING *s2, … … 214 213 215 214 /************************************************************************** 216 * RtlEqualString (NTDLL.@)215 * RtlEqualString (NTDLL.@) 217 216 */ 218 217 BOOLEAN WINAPI RtlEqualString( const STRING *s1, const STRING *s2, BOOLEAN CaseInsensitive ) … … 224 223 225 224 /************************************************************************** 226 * RtlEqualUnicodeString (NTDLL.@)225 * RtlEqualUnicodeString (NTDLL.@) 227 226 */ 228 227 BOOLEAN WINAPI RtlEqualUnicodeString( const UNICODE_STRING *s1, const UNICODE_STRING *s2, … … 235 234 236 235 /************************************************************************** 237 * RtlPrefixString (NTDLL.@)236 * RtlPrefixString (NTDLL.@) 238 237 * 239 238 * Test if s1 is a prefix in s2 … … 259 258 260 259 /************************************************************************** 261 * RtlPrefixUnicodeString (NTDLL.@)260 * RtlPrefixUnicodeString (NTDLL.@) 262 261 * 263 262 * Test if s1 is a prefix in s2 … … 285 284 286 285 /* 287 COPY BETWEEN ANSI_STRING or UNICODE_STRING288 there is no parameter checking, it just crashes286 COPY BETWEEN ANSI_STRING or UNICODE_STRING 287 there is no parameter checking, it just crashes 289 288 */ 290 289 291 290 292 291 /************************************************************************** 293 * RtlAnsiStringToUnicodeString (NTDLL.@)292 * RtlAnsiStringToUnicodeString (NTDLL.@) 294 293 * 295 294 * NOTES: … … 319 318 320 319 /************************************************************************** 321 * RtlOemStringToUnicodeString (NTDLL.@)320 * RtlOemStringToUnicodeString (NTDLL.@) 322 321 * 323 322 * NOTES … … 348 347 349 348 /************************************************************************** 350 * RtlUnicodeStringToAnsiString (NTDLL.@)349 * RtlUnicodeStringToAnsiString (NTDLL.@) 351 350 * 352 351 * NOTES … … 382 381 383 382 /************************************************************************** 384 * RtlUnicodeStringToOemString (NTDLL.@)383 * RtlUnicodeStringToOemString (NTDLL.@) 385 384 * 386 385 * NOTES … … 416 415 417 416 /************************************************************************** 418 * RtlMultiByteToUnicodeN (NTDLL.@)417 * RtlMultiByteToUnicodeN (NTDLL.@) 419 418 * 420 419 * NOTES … … 432 431 433 432 /************************************************************************** 434 * RtlOemToUnicodeN (NTDLL.@)433 * RtlOemToUnicodeN (NTDLL.@) 435 434 */ 436 435 NTSTATUS WINAPI RtlOemToUnicodeN( LPWSTR dst, DWORD dstlen, LPDWORD reslen, … … 445 444 446 445 /************************************************************************** 447 * RtlUnicodeToMultiByteN (NTDLL.@)446 * RtlUnicodeToMultiByteN (NTDLL.@) 448 447 */ 449 448 NTSTATUS WINAPI RtlUnicodeToMultiByteN( LPSTR dst, DWORD dstlen, LPDWORD reslen, … … 459 458 460 459 /************************************************************************** 461 * RtlUnicodeToOemN (NTDLL.@)460 * RtlUnicodeToOemN (NTDLL.@) 462 461 */ 463 462 NTSTATUS WINAPI RtlUnicodeToOemN( LPSTR dst, DWORD dstlen, LPDWORD reslen, … … 477 476 478 477 /************************************************************************** 479 * RtlUpperString (NTDLL.@)478 * RtlUpperString (NTDLL.@) 480 479 */ 481 480 void WINAPI RtlUpperString( STRING *dst, const STRING *src ) … … 489 488 490 489 /************************************************************************** 491 * RtlUpcaseUnicodeString (NTDLL.@)490 * RtlUpcaseUnicodeString (NTDLL.@) 492 491 * 493 492 * NOTES: … … 516 515 517 516 /************************************************************************** 518 * RtlUpcaseUnicodeStringToAnsiString (NTDLL.@)517 * RtlUpcaseUnicodeStringToAnsiString (NTDLL.@) 519 518 * 520 519 * NOTES … … 538 537 539 538 /************************************************************************** 540 * RtlUpcaseUnicodeStringToOemString (NTDLL.@)539 * RtlUpcaseUnicodeStringToOemString (NTDLL.@) 541 540 * 542 541 * NOTES … … 560 559 561 560 /************************************************************************** 562 * RtlUpcaseUnicodeToMultiByteN (NTDLL.@)561 * RtlUpcaseUnicodeToMultiByteN (NTDLL.@) 563 562 */ 564 563 NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN( LPSTR dst, DWORD dstlen, LPDWORD reslen, … … 578 577 579 578 /************************************************************************** 580 * RtlUpcaseUnicodeToOemN (NTDLL.@)579 * RtlUpcaseUnicodeToOemN (NTDLL.@) 581 580 */ 582 581 NTSTATUS WINAPI RtlUpcaseUnicodeToOemN( LPSTR dst, DWORD dstlen, LPDWORD reslen, … … 596 595 597 596 /* 598 STRING SIZE597 STRING SIZE 599 598 */ 600 599 … … 742 741 743 742 /* 744 MISC743 MISC 745 744 */ 746 745 747 746 /************************************************************************** 748 * RtlIsTextUnicode749 * 750 * Apply various feeble heuristics to guess whether751 * the text buffer contains Unicode.752 * FIXME: should implement more tests.747 * RtlIsTextUnicode 748 * 749 * Apply various feeble heuristics to guess whether 750 * the text buffer contains Unicode. 751 * FIXME: should implement more tests. 753 752 */ 754 753 DWORD WINAPI RtlIsTextUnicode( 755 LPVOID buf,756 DWORD len,757 DWORD *pf)758 { 759 LPWSTR s = buf;760 DWORD flags = -1, out_flags = 0;761 762 if (!len)763 goto out;764 if (pf)765 flags = *pf;766 /*767 * Apply various tests to the text string. According to the768 * docs, each test "passed" sets the corresponding flag in769 * the output flags. But some of the tests are mutually770 * exclusive, so I don't see how you could pass all tests ...771 */772 773 /* Check for an odd length ... pass if even. */774 if (!(len & 1))775 out_flags |= IS_TEXT_UNICODE_ODD_LENGTH;776 777 /* Check for the special unicode marker byte. */778 if (*s == 0xFEFF)779 out_flags |= IS_TEXT_UNICODE_SIGNATURE;780 781 /*782 * Check whether the string passed all of the tests.783 */784 flags &= ITU_IMPLEMENTED_TESTS;785 if ((out_flags & flags) != flags)786 len = 0;754 LPVOID buf, 755 DWORD len, 756 DWORD *pf) 757 { 758 LPWSTR s = buf; 759 DWORD flags = -1, out_flags = 0; 760 761 if (!len) 762 goto out; 763 if (pf) 764 flags = *pf; 765 /* 766 * Apply various tests to the text string. According to the 767 * docs, each test "passed" sets the corresponding flag in 768 * the output flags. But some of the tests are mutually 769 * exclusive, so I don't see how you could pass all tests ... 770 */ 771 772 /* Check for an odd length ... pass if even. */ 773 if (!(len & 1)) 774 out_flags |= IS_TEXT_UNICODE_ODD_LENGTH; 775 776 /* Check for the special unicode marker byte. */ 777 if (*s == 0xFEFF) 778 out_flags |= IS_TEXT_UNICODE_SIGNATURE; 779 780 /* 781 * Check whether the string passed all of the tests. 782 */ 783 flags &= ITU_IMPLEMENTED_TESTS; 784 if ((out_flags & flags) != flags) 785 len = 0; 787 786 out: 788 if (pf)789 *pf = out_flags;790 return len;791 } 787 if (pf) 788 *pf = out_flags; 789 return len; 790 } -
trunk/src/NTDLL/unknown.cpp
r6647 r6712 1 /* $Id: unknown.cpp,v 1. 9 2001-09-05 13:14:30 birdExp $ */1 /* $Id: unknown.cpp,v 1.10 2001-09-15 09:36:50 sandervl Exp $ */ 2 2 3 3 /* … … 425 425 * Opens a thread... 426 426 * @returns Error code? 427 * @param p hThreadHandle427 * @param pThreadHandle 428 428 * @param dwFlags 429 * @param p AttribsPointer to some attribute structure.429 * @param pvAttribs Pointer to some attribute structure. 430 430 * @param padwOpenThreadParam Pointer to array of dword it seems. 2 entries? 431 431 * @status stub -
trunk/src/NTDLL/wcstring.c
r6648 r6712 1 /* $Id: wcstring.c,v 1.2 2001-09-05 13:14:08 bird Exp $ */2 1 /* 3 2 * NTDLL wide-char functions … … 287 286 { 288 287 LPSTR sA = HEAP_strdupWtoA(GetProcessHeap(),0,s),endA; 289 INT ret = strtol(sA,&endA,base);288 INT ret = strtol(sA,&endA,base); 290 289 291 290 HeapFree(GetProcessHeap(),0,sA); … … 326 325 327 326 if (radix > 36 || radix <= 1) 328 return 0;327 return 0; 329 328 330 329 while (v || tp == tmp) 331 330 { 332 i = v % radix;333 v = v / radix;334 if (i < 10)335 *tp++ = i + '0';336 else337 *tp++ = i + 'a' - 10;331 i = v % radix; 332 v = v / radix; 333 if (i < 10) 334 *tp++ = i + '0'; 335 else 336 *tp++ = i + 'a' - 10; 338 337 } 339 338 340 339 sp = string; 341 340 while (tp > tmp) 342 *sp++ = *--tp;341 *sp++ = *--tp; 343 342 *sp = 0; 344 343 return string;
Note:
See TracChangeset
for help on using the changeset viewer.
