ReactOS 0.4.16-dev-340-g0540c21
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
58extern "C" {
59#endif
60
61#ifndef NULL
62#define NULL 0
63#endif
64
65extern void *memcpy __PR((void *, const void *, int));
66extern void *memmove __PR((void *, const void *, int));
67extern char *strcpy __PR((char *, const char *));
68extern char *strncpy __PR((char *, const char *, int));
69
70extern char *strcat __PR((char *, const char *));
71extern char *strncat __PR((char *, const char *, int));
72
73extern int memcmp __PR((const void *, const void *, int));
74extern int strcmp __PR((const char *, const char *));
75extern int strcoll __PR((const char *, const char *));
76extern int strncmp __PR((const char *, const char *, int));
77extern int strxfrm __PR((char *, const char *, int));
78
79extern void *memchr __PR((const void *, int, int));
80extern char *strchr __PR((const char *, int));
81
82extern int strcspn __PR((const char *, const char *));
83/* #pragma int_to_unsigned strcspn */
84
85extern char *strpbrk __PR((const char *, const char *));
86extern char *strrchr __PR((const char *, int));
87
88extern int strspn __PR((const char *, const char *));
89/* #pragma int_to_unsigned strspn */
90
91extern char *strstr __PR((const char *, const char *));
92extern char *strtok __PR((char *, const char *));
93extern void *memset __PR((void *, int, int));
94extern char *strerror __PR((int));
95
96extern int strlen __PR((const char *));
97/* #pragma int_to_unsigned strlen */
98
99extern void *memccpy __PR((void *, const void *, int, int));
100
101extern int strcasecmp __PR((const char *, const char *));
102extern 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: fake.h:10
#define strcasecmp
Definition: fake.h:9
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define memchr(s, c, n)
Definition: mkisofs.h:875
#define strcoll
Definition: util.h:34
#define __PR(a)
Definition: prototyp.h:106
_Check_return_ int __cdecl strcmp(_In_z_ const char *_Str1, _In_z_ const char *_Str2)
_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 char *__cdecl strerror(_In_ int)
char *__cdecl strncpy(char *_Dest, const char *_Source, size_t _Count)
_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 strcat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) char *_Dest, _In_z_ const char *_Source)
_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)
char *__cdecl strncat(char *_Dest, const char *_Source, size_t _Count)
_CRT_RESTORE_GCC_WARNINGS _Check_return_ _CRTIMP char *__cdecl strtok(_Inout_opt_z_ char *_Str, _In_z_ const char *_Delim)
_CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strpbrk(_In_z_ const char *_Str, _In_z_ const char *_Control)
_CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strstr(_In_z_ const char *_Str, _In_z_ const char *_SubStr)
_Must_inspect_result_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
_CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strchr(_In_z_ const char *_Str, _In_ int _Val)
_Check_return_ _CRTIMP size_t __cdecl strspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
_CRTIMP size_t __cdecl strlen(_In_z_ const char *_Str)
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
char *__cdecl strcpy(_Out_writes_z_(_String_length_(_Source)+1) char *_Dest, _In_z_ const char *_Source)
#define memset(x, y, z)
Definition: compat.h:39