ReactOS  0.4.14-dev-593-g1793dcc
string.h
Go to the documentation of this file.
1 /* @(#)string.h 1.12 11/11/24 Copyright 1996-2011 J. Schilling */
2 /*
3  * Definitions for strings
4  *
5  * Copyright (c) 1996-2011 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License"). You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef _SCHILY_STRING_H
22 #define _SCHILY_STRING_H
23 
24 #ifndef _SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 
28 #ifndef _SCHILY_TYPES_H
29 #include <schily/types.h> /* Try to get size_t */
30 #endif
31 
32 /*
33  * It may be that IBM's AIX has problems when doing
34  * #include <string.h>
35  * #include <strings.h>
36  * So I moved the #include <strings.h> to the top. As the file strings.h
37  * defines strcasecmp() we may need it...
38  *
39  * Note that the only real problem appears if we use rubbish FSF based code that
40  * #defines _NO_PROTO
41  */
42 #ifdef HAVE_STRINGS_H
43 #ifndef _INCL_STRINGS_H
44 #include <strings.h>
45 #define _INCL_STRINGS_H
46 #endif
47 #endif /* HAVE_STRINGS_H */
48 
49 
50 #ifdef HAVE_STRING_H
51 #ifndef _INCL_STRING_H
52 #include <string.h>
53 #define _INCL_STRING_H
54 #endif
55 #else /* HAVE_STRING_H */
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 #ifndef NULL
62 #define NULL 0
63 #endif
64 
65 extern void *memcpy __PR((void *, const void *, int));
66 extern void *memmove __PR((void *, const void *, int));
67 extern char *strcpy __PR((char *, const char *));
68 extern char *strncpy __PR((char *, const char *, int));
69 
70 extern char *strcat __PR((char *, const char *));
71 extern char *strncat __PR((char *, const char *, int));
72 
73 extern int memcmp __PR((const void *, const void *, int));
74 extern int strcmp __PR((const char *, const char *));
75 extern int strcoll __PR((const char *, const char *));
76 extern int strncmp __PR((const char *, const char *, int));
77 extern int strxfrm __PR((char *, const char *, int));
78 
79 extern void *memchr __PR((const void *, int, int));
80 extern char *strchr __PR((const char *, int));
81 
82 extern int strcspn __PR((const char *, const char *));
83 /* #pragma int_to_unsigned strcspn */
84 
85 extern char *strpbrk __PR((const char *, const char *));
86 extern char *strrchr __PR((const char *, int));
87 
88 extern int strspn __PR((const char *, const char *));
89 /* #pragma int_to_unsigned strspn */
90 
91 extern char *strstr __PR((const char *, const char *));
92 extern char *strtok __PR((char *, const char *));
93 extern void *memset __PR((void *, int, int));
94 extern char *strerror __PR((int));
95 
96 extern int strlen __PR((const char *));
97 /* #pragma int_to_unsigned strlen */
98 
99 extern void *memccpy __PR((void *, const void *, int, int));
100 
101 extern int strcasecmp __PR((const char *, const char *));
102 extern int strncasecmp __PR((const char *, const char *, size_t));
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* HAVE_STRING_H */
109 
110 #endif /* _SCHILY_STRING_H */
#define strncasecmp
Definition: string.h:1150
_Check_return_ _CRTIMP char *__cdecl strtok(_Inout_opt_z_ char *_Str, _In_z_ const char *_Delim)
char *__cdecl strcat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) char *_Dest, _In_z_ const char *_Source)
_Must_inspect_result_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
_Check_return_ int __cdecl strncmp(_In_reads_or_z_(_MaxCount) const char *_Str1, _In_reads_or_z_(_MaxCount) const char *_Str2, _In_ size_t _MaxCount)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strchr(_In_z_ const char *_Str, _In_ int _Val)
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
_CRTIMP void *__cdecl memccpy(_Out_writes_bytes_opt_(_Size) void *_Dst, _In_reads_bytes_opt_(_Size) const void *_Src, _In_ int _Val, _In_ size_t _Size)
char *__cdecl strncat(char *_Dest, const char *_Source, size_t _Count)
char *__cdecl strncpy(char *_Dest, const char *_Source, size_t _Count)
_Check_return_ _CRTIMP size_t __cdecl strspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
void *__cdecl memmove(_Out_writes_bytes_all_opt_(_MaxCount) void *_Dst, _In_reads_bytes_opt_(_MaxCount) const void *_Src, _In_ size_t _MaxCount)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
size_t __cdecl strlen(_In_z_ const char *_Str)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strpbrk(_In_z_ const char *_Str, _In_z_ const char *_Control)
_Check_return_ _CRTIMP char *__cdecl strerror(_In_ int)
void *memcpy __PR((void *, const void *, int))
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
char *__cdecl strcpy(_Out_writes_z_(_String_length_(_Source)+1) char *_Dest, _In_z_ const char *_Source)
#define strcasecmp
Definition: string.h:1149
_Check_return_ _CRTIMP int __cdecl strcoll(_In_z_ const char *_Str1, _In_z_ const char *_Str2)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strstr(_In_z_ const char *_Str, _In_z_ const char *_SubStr)
_Check_return_opt_ _CRTIMP size_t __cdecl strxfrm(_Out_writes_opt_(_MaxCount) _Post_maybez_ char *_Dst, _In_z_ const char *_Src, _In_ size_t _MaxCount)
_Check_return_ int __cdecl strcmp(_In_z_ const char *_Str1, _In_z_ const char *_Str2)
#define memset(x, y, z)
Definition: compat.h:39
_Must_inspect_result_ _CRTIMP _CONST_RETURN void *__cdecl memchr(_In_reads_bytes_opt_(_MaxCount) const void *_Buf, _In_ int _Val, _In_ size_t _MaxCount)