2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/rtlfuncs.h
4 * PURPOSE: Prototypes for Runtime Library Functions not defined in DDK/IFS
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
12 #include <ndk/rtltypes.h>
13 #include <ndk/pstypes.h>
15 /* FIXME: FILE NEEDS TO BE CLEANED UP AT THE END WHEN ALL THE FUNCTIONS HAVE BEEN ADDED */
19 * InitializeListHead (
20 * PLIST_ENTRY ListHead
23 * FUNCTION: Initializes a double linked list
25 * ListHead = Caller supplied storage for the head of the list
29 IN PLIST_ENTRY ListHead
)
31 ListHead
->Flink
= ListHead
->Blink
= ListHead
;
38 * PLIST_ENTRY ListHead,
42 * FUNCTION: Inserts an entry in a double linked list
44 * ListHead = Head of the list
45 * Entry = Entry to insert
49 IN PLIST_ENTRY ListHead
,
53 OldFlink
= ListHead
->Flink
;
54 Entry
->Flink
= OldFlink
;
55 Entry
->Blink
= ListHead
;
56 OldFlink
->Blink
= Entry
;
57 ListHead
->Flink
= Entry
;
64 * PLIST_ENTRY ListHead,
69 * Inserts an entry in a double linked list
72 * ListHead = Head of the list
73 * Entry = Entry to insert
77 IN PLIST_ENTRY ListHead
,
81 OldBlink
= ListHead
->Blink
;
82 Entry
->Flink
= ListHead
;
83 Entry
->Blink
= OldBlink
;
84 OldBlink
->Flink
= Entry
;
85 ListHead
->Blink
= Entry
;
91 * PLIST_ENTRY ListHead
95 * Checks if a double linked list is empty
98 * ListHead = Head of the list
100 #define IsListEmpty(ListHead) \
101 ((ListHead)->Flink == (ListHead))
107 * PSINGLE_LIST_ENTRY ListHead
111 * Removes an entry from the head of a single linked list
114 * ListHead = Head of the list
119 #define PopEntryList(ListHead) \
122 PSINGLE_LIST_ENTRY _FirstEntry; \
123 _FirstEntry = (ListHead)->Next; \
124 if (_FirstEntry != NULL) \
125 (ListHead)->Next = _FirstEntry->Next; \
128 #define PushEntryList(_ListHead, _Entry) \
129 (_Entry)->Next = (_ListHead)->Next; \
130 (_ListHead)->Next = (_Entry); \
139 * Removes an entry from a double linked list
142 * ListEntry = Entry to remove
144 static __inline BOOLEAN
146 IN PLIST_ENTRY Entry
)
148 PLIST_ENTRY OldFlink
;
149 PLIST_ENTRY OldBlink
;
151 OldFlink
= Entry
->Flink
;
152 OldBlink
= Entry
->Blink
;
153 OldFlink
->Blink
= OldBlink
;
154 OldBlink
->Flink
= OldFlink
;
155 return (OldFlink
== OldBlink
);
162 * PLIST_ENTRY ListHead
166 * Removes the head entry from a double linked list
169 * ListHead = Head of the list
174 static __inline PLIST_ENTRY
176 IN PLIST_ENTRY ListHead
)
181 Entry
= ListHead
->Flink
;
182 Flink
= Entry
->Flink
;
183 ListHead
->Flink
= Flink
;
184 Flink
->Blink
= ListHead
;
192 * PLIST_ENTRY ListHead
196 * Removes the tail entry from a double linked list
199 * ListHead = Head of the list
204 static __inline PLIST_ENTRY
206 IN PLIST_ENTRY ListHead
)
211 Entry
= ListHead
->Blink
;
212 Blink
= Entry
->Blink
;
213 ListHead
->Blink
= Blink
;
214 Blink
->Flink
= ListHead
;
221 * PLIST_ENTRY ListHead,
225 #define IsFirstEntry(ListHead, Entry) ((ListHead)->Flink == Entry)
227 #define IsLastEntry(ListHead, Entry) ((ListHead)->Blink == Entry)
230 #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
232 #define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
234 PLIST_ENTRY current;\
236 current = (ListHead)->Flink;\
237 while (current != (ListHead))\
239 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
240 (NewEntry)->SortField)\
244 current = current->Flink;\
247 InsertTailList(current, &((NewEntry)->ListEntryField));\
251 #define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
253 PLIST_ENTRY current;\
255 current = (ListHead)->Flink;\
256 while (current != (ListHead))\
258 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
259 (NewEntry)->SortField)\
263 current = current->Flink;\
266 InsertTailList(current, &((NewEntry)->ListEntryField));\
270 #define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
272 PLIST_ENTRY current;\
274 current = (ListHead)->Flink;\
275 while (current != (ListHead))\
277 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
278 (NewEntry)->SortField)\
282 current = current->Flink;\
285 InsertTailList(current, &((NewEntry)->ListEntryField));\
289 #define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
291 PLIST_ENTRY current;\
293 current = (ListHead)->Flink;\
294 while (current != (ListHead))\
296 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
297 (NewEntry)->SortField)\
301 current = current->Flink;\
304 InsertTailList(current, &((NewEntry)->ListEntryField));\
319 RtlAbsoluteToSelfRelativeSD (
320 IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor
,
321 IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor
,
322 IN PULONG BufferLength
327 RtlAddAccessAllowedAce (
330 ACCESS_MASK AccessMask
,
336 RtlAllocateAndInitializeSid (
337 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
338 IN UCHAR SubAuthorityCount
,
339 IN ULONG SubAuthority0
,
340 IN ULONG SubAuthority1
,
341 IN ULONG SubAuthority2
,
342 IN ULONG SubAuthority3
,
343 IN ULONG SubAuthority4
,
344 IN ULONG SubAuthority5
,
345 IN ULONG SubAuthority6
,
346 IN ULONG SubAuthority7
,
353 IN HANDLE HeapHandle
,
360 RtlAppendUnicodeToString (
361 PUNICODE_STRING Destination
,
367 RtlAppendUnicodeStringToString (
368 PUNICODE_STRING Destination
,
369 PUNICODE_STRING Source
374 RtlAddAtomToAtomTable (
375 IN PRTL_ATOM_TABLE AtomTable
,
383 PVOID FailedAssertion
,
398 RtlCopyLuidAndAttributesArray(
400 PLUID_AND_ATTRIBUTES Src
,
401 PLUID_AND_ATTRIBUTES Dest
406 RtlCopySidAndAttributesArray(
408 PSID_AND_ATTRIBUTES Src
,
410 PSID_AND_ATTRIBUTES Dest
,
412 PVOID
* RemainingSidArea
,
413 PULONG RemainingSidAreaSize
418 RtlCompareMemory(IN
const VOID
*Source1
,
419 IN
const VOID
*Source2
,
424 RtlCompareUnicodeString (
425 PUNICODE_STRING String1
,
426 PUNICODE_STRING String2
,
427 BOOLEAN CaseInsensitive
432 RtlEqualUnicodeString (
433 PCUNICODE_STRING String1
,
434 PCUNICODE_STRING String2
,
435 BOOLEAN CaseInsensitive
453 IN USHORT CompressionFormatAndEngine
,
454 IN PUCHAR UncompressedBuffer
,
455 IN ULONG UncompressedBufferSize
,
456 OUT PUCHAR CompressedBuffer
,
457 IN ULONG CompressedBufferSize
,
458 IN ULONG UncompressedChunkSize
,
459 OUT PULONG FinalCompressedSize
,
465 RtlConvertSidToUnicodeString (
466 OUT PUNICODE_STRING DestinationString
,
468 IN BOOLEAN AllocateDestinationString
480 RtlCopyUnicodeString(PUNICODE_STRING DestinationString
,
481 PUNICODE_STRING SourceString
);
495 IN PVOID BaseAddress OPTIONAL
,
496 IN ULONG SizeToReserve OPTIONAL
,
497 IN ULONG SizeToCommit OPTIONAL
,
498 IN PVOID Lock OPTIONAL
,
499 IN PRTL_HEAP_DEFINITION Definition OPTIONAL
506 IN OUT PRTL_ATOM_TABLE
*AtomTable
511 RtlCreateSecurityDescriptor(
512 PSECURITY_DESCRIPTOR SecurityDescriptor
,
517 RtlCreateSecurityDescriptorRelative(
518 PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor
,
524 RtlCreateUserThread (
525 IN HANDLE ProcessHandle
,
526 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
527 IN BOOLEAN CreateSuspended
,
528 IN LONG StackZeroBits
,
529 IN OUT PULONG StackReserve
,
530 IN OUT PULONG StackCommit
,
531 IN PTHREAD_START_ROUTINE StartAddress
,
533 IN OUT PHANDLE ThreadHandle
,
534 IN OUT PCLIENT_ID ClientId
539 RtlCreateUnicodeString(
540 OUT PUNICODE_STRING DestinationString
,
541 IN PCWSTR SourceString
546 RtlDecompressBuffer (
547 IN USHORT CompressionFormat
,
548 OUT PUCHAR UncompressedBuffer
,
549 IN ULONG UncompressedBufferSize
,
550 IN PUCHAR CompressedBuffer
,
551 IN ULONG CompressedBufferSize
,
552 OUT PULONG FinalUncompressedSize
557 RtlExpandEnvironmentStrings_U (
559 PUNICODE_STRING Source
,
560 PUNICODE_STRING Destination
,
564 PRTL_USER_PROCESS_PARAMETERS
566 RtlDeNormalizeProcessParams (
567 IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
570 PRTL_USER_PROCESS_PARAMETERS
572 RtlNormalizeProcessParams (
573 IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
578 RtlDeleteAtomFromAtomTable (
579 IN PRTL_ATOM_TABLE AtomTable
,
585 RtlDeleteCriticalSection (
586 PRTL_CRITICAL_SECTION CriticalSection
591 RtlDestroyAtomTable (
592 IN PRTL_ATOM_TABLE AtomTable
597 RtlEnterCriticalSection (
598 PRTL_CRITICAL_SECTION CriticalSection
603 RtlInitializeCriticalSection (
604 PRTL_CRITICAL_SECTION CriticalSection
609 RtlLeaveCriticalSection (
610 PRTL_CRITICAL_SECTION CriticalSection
616 IN PRTL_BITMAP BitMapHeader
,
617 IN PULONG BitMapBuffer
,
618 IN ULONG SizeOfBitMap
);
623 IN PRTL_BITMAP BitMapHeader
,
624 IN ULONG StartingIndex
,
630 IN PRTL_BITMAP BitMapHeader
,
631 IN ULONG StartingIndex
,
637 IN PRTL_BITMAP BitMapHeader
,
638 IN ULONG StartingIndex
,
639 IN ULONG NumberToClear
645 PRTL_BITMAP BitMapHeader
,
652 RtlFindClearBitsAndSet (
653 PRTL_BITMAP BitMapHeader
,
660 RtlMultiByteToUnicodeN (
661 PWCHAR UnicodeString
,
664 const PCHAR MbString
,
670 RtlMultiByteToUnicodeSize (
678 RtlPrefixUnicodeString (
679 PUNICODE_STRING String1
,
680 PUNICODE_STRING String2
,
681 BOOLEAN CaseInsensitive
685 RtlUpperChar (CHAR Source
);
689 RtlUpcaseUnicodeChar (
695 RtlAnsiStringToUnicodeString (
696 PUNICODE_STRING DestinationString
,
697 PANSI_STRING SourceString
,
698 BOOLEAN AllocateDestinationString
703 RtlAnsiStringToUnicodeSize (
704 PANSI_STRING AnsiString
709 RtlUnicodeToMultiByteN (
713 PWCHAR UnicodeString
,
719 RtlOemStringToUnicodeSize (
720 POEM_STRING AnsiString
725 RtlOemStringToUnicodeString (
726 PUNICODE_STRING DestinationString
,
727 POEM_STRING SourceString
,
728 BOOLEAN AllocateDestinationString
733 RtlImageDirectoryEntryToData (
743 IN ACCESS_MASK DesiredAccess
,
744 OUT PHANDLE KeyHandle
);
747 RtlDowncaseUnicodeChar(IN WCHAR Source
);
751 RtlUpcaseUnicodeToMultiByteN (
755 PWCHAR UnicodeString
,
761 RtlUnicodeToMultiByteSize (
763 PWCHAR UnicodeString
,
771 ULONG MaxBytesInUnicodeString
,
772 PULONG BytesInUnicodeString
,
774 ULONG BytesInOemString
783 PWCHAR UnicodeString
,
789 RtlUpcaseUnicodeStringToOemString (
790 IN OUT POEM_STRING DestinationString
,
791 IN PUNICODE_STRING SourceString
,
792 IN BOOLEAN AllocateDestinationString
797 RtlUnicodeStringToAnsiSize (
798 IN PUNICODE_STRING UnicodeString
803 RtlUnicodeStringToOemSize (
804 IN PUNICODE_STRING UnicodeString
809 RtlUnicodeStringToAnsiString (
810 IN OUT PANSI_STRING DestinationString
,
811 IN PUNICODE_STRING SourceString
,
812 IN BOOLEAN AllocateDestinationString
817 RtlUnicodeStringToInteger (
818 IN PUNICODE_STRING String
,
834 IN PVOID Destination
,
844 IN PVOID BaseAddress
,
848 OUT PRTL_MESSAGE_RESOURCE_ENTRY
*MessageResourceEntry
854 IN PANSI_STRING AnsiString
860 IN HANDLE HeapHandle
,
873 RtlFreeUnicodeString(
874 IN PUNICODE_STRING UnicodeString
);
879 IN POEM_STRING OemString
884 RtlGetCompressionWorkSpaceSize (
885 IN USHORT CompressionFormatAndEngine
,
886 OUT PULONG CompressBufferWorkSpaceSize
,
887 OUT PULONG CompressFragmentWorkSpaceSize
892 RtlGetDaclSecurityDescriptor (
893 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
894 OUT PBOOLEAN DaclPresent
,
896 OUT PBOOLEAN DaclDefaulted
901 RtlGetGroupSecurityDescriptor (
902 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
904 OUT PBOOLEAN GroupDefaulted
909 RtlGetOwnerSecurityDescriptor (
910 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
912 OUT PBOOLEAN OwnerDefaulted
918 PIMAGE_NT_HEADERS NtHeader
,
921 PIMAGE_SECTION_HEADER
*SectionHeader
930 PIMAGE_SECTION_HEADER
932 RtlImageRvaToSection (
933 PIMAGE_NT_HEADERS NtHeader
,
951 IN ULONG Base OPTIONAL
,
952 IN ULONG Length OPTIONAL
,
958 RtlIntegerToUnicodeString (
961 IN OUT PUNICODE_STRING String
974 RtlUshortByteSwap (IN USHORT Source
);
988 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
989 IN UCHAR SubAuthorityCount
995 IN PUSHORT AnsiTableBase
,
996 IN PUSHORT OemTableBase
,
997 IN PUSHORT CaseTableBase
,
998 OUT PNLSTABLEINFO NlsTable
1003 RtlInitCodePageTable (
1004 IN PUSHORT TableBase
,
1005 OUT PCPTABLEINFO CodePageTable
1010 RtlGetSaclSecurityDescriptor (
1011 PSECURITY_DESCRIPTOR SecurityDescriptor
,
1012 PBOOLEAN SaclPresent
,
1014 PBOOLEAN SaclDefaulted
1019 RtlQueryAtomInAtomTable (
1020 IN PRTL_ATOM_TABLE AtomTable
,
1022 IN OUT PULONG RefCount OPTIONAL
,
1023 IN OUT PULONG PinCount OPTIONAL
,
1024 IN OUT PWSTR AtomName OPTIONAL
,
1025 IN OUT PULONG NameLength OPTIONAL
1030 RtlLookupAtomInAtomTable (
1031 IN PRTL_ATOM_TABLE AtomTable
,
1038 RtlResetRtlTranslations (
1039 IN PNLSTABLEINFO NlsTable
1045 IN PEXCEPTION_RECORD ExceptionRecord
1050 RtlInitUnicodeString(
1051 IN OUT PUNICODE_STRING DestinationString
,
1052 IN PCWSTR SourceString
);
1057 PANSI_STRING DestinationString
,
1063 RtlIsNameLegalDOS8Dot3 (
1064 IN PUNICODE_STRING UnicodeName
,
1065 IN PANSI_STRING AnsiName
,
1071 RtlLengthRequiredSid (
1072 IN UCHAR SubAuthorityCount
1083 RtlNtStatusToDosError (
1088 RtlFormatCurrentUserKeyPath (IN OUT PUNICODE_STRING KeyPath
);
1092 RtlQueryEnvironmentVariable_U (
1094 PUNICODE_STRING Name
,
1095 PUNICODE_STRING Value
1100 RtlQueryTimeZoneInformation (
1101 IN OUT LPTIME_ZONE_INFORMATION TimeZoneInformation
1104 VOID STDCALL
RtlRaiseStatus(NTSTATUS Status
);
1108 RtlSecondsSince1970ToTime (
1109 IN ULONG SecondsSince1970
,
1110 OUT PLARGE_INTEGER Time
1116 PRTL_BITMAP BitMapHeader
,
1117 ULONG StartingIndex
,
1121 #if (VER_PRODUCTBUILD >= 2195)
1125 RtlSelfRelativeToAbsoluteSD (
1126 IN PSECURITY_DESCRIPTOR SelfRelativeSD
,
1127 OUT PSECURITY_DESCRIPTOR AbsoluteSD
,
1128 IN PULONG AbsoluteSDSize
,
1134 IN PULONG OwnerSize
,
1135 IN PSID PrimaryGroup
,
1136 IN PULONG PrimaryGroupSize
1139 #endif /* (VER_PRODUCTBUILD >= 2195) */
1143 RtlSetDaclSecurityDescriptor (
1144 PSECURITY_DESCRIPTOR SecurityDescriptor
,
1145 BOOLEAN DaclPresent
,
1147 BOOLEAN DaclDefaulted
1152 RtlSetGroupSecurityDescriptor (
1153 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
1155 IN BOOLEAN GroupDefaulted
1160 RtlSetOwnerSecurityDescriptor (
1161 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
1163 IN BOOLEAN OwnerDefaulted
1168 RtlSetSaclSecurityDescriptor (
1169 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
1170 IN BOOLEAN SaclPresent
,
1172 IN BOOLEAN SaclDefaulted
1177 RtlSubAuthorityCountSid (
1183 RtlSubAuthoritySid (
1185 IN ULONG SubAuthority
1190 RtlUpcaseUnicodeStringToCountedOemString (
1191 IN OUT POEM_STRING DestinationString
,
1192 IN PUNICODE_STRING SourceString
,
1193 IN BOOLEAN AllocateDestinationString
1197 RtlSetTimeZoneInformation (IN OUT LPTIME_ZONE_INFORMATION TimeZoneInformation
);
1201 RtlUpcaseUnicodeString (
1202 IN OUT PUNICODE_STRING DestinationString
,
1203 IN PCUNICODE_STRING SourceString
,
1204 IN BOOLEAN AllocateDestinationString
1209 RtlUnicodeStringToOemString (
1210 IN OUT POEM_STRING DestinationString
,
1211 IN PUNICODE_STRING SourceString
,
1212 IN BOOLEAN AllocateDestinationString
1217 RtlUpcaseUnicodeToOemN (
1221 PWCHAR UnicodeString
,
1227 RtlLargeIntegerToChar (
1228 IN PLARGE_INTEGER Value
,
1236 RtlVerifyVersionInfo(
1237 IN PRTL_OSVERSIONINFOEXW VersionInfo
,
1239 IN ULONGLONG ConditionMask
1245 IN OUT PRTL_OSVERSIONINFOW lpVersionInformation
);
1249 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination
,
1255 RtlTimeFieldsToTime (
1256 PTIME_FIELDS TimeFields
,
1262 RtlTimeToTimeFields (
1263 PLARGE_INTEGER Time
,
1264 PTIME_FIELDS TimeFields
1269 RtlQueryRegistryValues (
1270 IN ULONG RelativeTo
,
1272 IN PRTL_QUERY_REGISTRY_TABLE QueryTable
,
1274 IN PVOID Environment
1279 RtlWriteRegistryValue (
1291 PEXCEPTION_REGISTRATION RegistrationFrame
,
1292 PVOID ReturnAddress
,
1293 PEXCEPTION_RECORD ExceptionRecord
,
1298 RtlDestroyHeap (HANDLE hheap
);
1308 RtlLockHeap (IN HANDLE Heap
);
1311 RtlUnlockHeap (IN HANDLE Heap
);
1315 IN PVOID HeapHandle
,
1317 IN PVOID MemoryPointer
1339 /* functions exported from NTOSKRNL.EXE which are considered RTL */
1340 char *_itoa (int value
, char *string
, int radix
);
1341 wchar_t *_itow (int value
, wchar_t *string
, int radix
);
1342 int _snprintf(char * buf
, size_t cnt
, const char *fmt
, ...);
1343 int _snwprintf(wchar_t *buf
, size_t cnt
, const wchar_t *fmt
, ...);
1344 int _stricmp(const char *s1
, const char *s2
);
1345 char * _strlwr(char *x
);
1346 int _strnicmp(const char *s1
, const char *s2
, size_t n
);
1347 char * _strnset(char* szToFill
, int szFill
, size_t sizeMaxFill
);
1348 char * _strrev(char *s
);
1349 char * _strset(char* szToFill
, int szFill
);
1350 char * _strupr(char *x
);
1351 int _vsnprintf(char *buf
, size_t cnt
, const char *fmt
, va_list args
);
1352 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
);
1353 wchar_t * _wcslwr (wchar_t *x
);
1354 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
);
1355 wchar_t* _wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
);
1356 wchar_t * _wcsrev(wchar_t *s
);
1357 wchar_t *_wcsupr(wchar_t *x
);
1359 int atoi(const char *str
);
1360 long atol(const char *str
);
1366 int isxdigit(int c
);
1367 size_t mbstowcs (wchar_t *wcstr
, const char *mbstr
, size_t count
);
1368 int mbtowc (wchar_t *wchar
, const char *mbchar
, size_t count
);
1369 void * memchr(const void *s
, int c
, size_t n
);
1370 void * memcpy(void *to
, const void *from
, size_t count
);
1371 void * memmove(void *dest
,const void *src
, size_t count
);
1372 void * memset(void *src
, int val
, size_t count
);
1375 int sprintf(char * buf
, const char *fmt
, ...);
1376 void srand(unsigned seed
);
1377 char * strcat(char *s
, const char *append
);
1378 char * strchr(const char *s
, int c
);
1379 int strcmp(const char *s1
, const char *s2
);
1380 char * strcpy(char *to
, const char *from
);
1381 size_t strlen(const char *str
);
1382 char * strncat(char *dst
, const char *src
, size_t n
);
1383 int strncmp(const char *s1
, const char *s2
, size_t n
);
1384 char *strncpy(char *dst
, const char *src
, size_t n
);
1385 char *strrchr(const char *s
, int c
);
1386 size_t strspn(const char *s1
, const char *s2
);
1387 char *strstr(const char *s
, const char *find
);
1388 int swprintf(wchar_t *buf
, const wchar_t *fmt
, ...);
1391 wchar_t towlower(wchar_t c
);
1392 wchar_t towupper(wchar_t c
);
1393 int vsprintf(char *buf
, const char *fmt
, va_list args
);
1394 wchar_t * wcscat(wchar_t *dest
, const wchar_t *src
);
1395 wchar_t * wcschr(const wchar_t *str
, wchar_t ch
);
1396 int wcscmp(const wchar_t *cs
, const wchar_t *ct
);
1397 wchar_t* wcscpy(wchar_t* str1
, const wchar_t* str2
);
1398 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
);
1399 size_t wcslen(const wchar_t *s
);
1400 wchar_t * wcsncat(wchar_t *dest
, const wchar_t *src
, size_t count
);
1401 int wcsncmp(const wchar_t *cs
, const wchar_t *ct
, size_t count
);
1402 wchar_t * wcsncpy(wchar_t *dest
, const wchar_t *src
, size_t count
);
1403 wchar_t * wcsrchr(const wchar_t *str
, wchar_t ch
);
1404 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
);
1405 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
);
1406 size_t wcstombs (char *mbstr
, const wchar_t *wcstr
, size_t count
);
1407 int wctomb (char *mbchar
, wchar_t wchar
);