Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / include / strdefs.h
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* @(#)strdefs.h        1.8 03/03/09 Copyright 1996 J. Schilling */
14 /*
15  *      Definitions for strings
16  *
17  *      Copyright (c) 1996 J. Schilling
18  */
19 /*
20  * This program is free software; you can redistribute it and/or modify
21  * it under the terms of the GNU General Public License version 2
22  * as published by the Free Software Foundation.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License along with
30  * this program; see the file COPYING.  If not, write to the Free Software
31  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32  */
33
34 #ifndef _STRDEFS_H
35 #define _STRDEFS_H
36
37 #ifndef _MCONFIG_H
38 #include <mconfig.h>
39 #endif
40 #ifndef _PROTOTYP_H
41 #include <prototyp.h>
42 #endif
43
44 /*
45  * It may be that IBM's AIX has problems when doing
46  * #include <string.h>
47  * #include <strings.h>
48  * So I moved the #include <strings.h> to the top. As the file strings.h
49  * defines strcasecmp() we may need it...
50  *
51  * Note that the only real problem appears if we use rubbish FSF based code that
52  * #defines _NO_PROTO
53  */
54 #ifdef  HAVE_STRINGS_H
55 #ifndef _INCL_STRINGS_H
56 #include <strings.h>
57 #define _INCL_STRINGS_H
58 #endif
59 #endif  /* HAVE_STRINGS_H */
60
61
62 #ifdef  HAVE_STRING_H
63 #ifndef _INCL_STRING_H
64 #include <string.h>
65 #define _INCL_STRING_H
66 #endif
67 #else   /* HAVE_STRING_H */
68
69 #ifdef  __cplusplus
70 extern "C" {
71 #endif
72
73 #ifndef NULL
74 #define NULL    0
75 #endif
76
77 extern void *memcpy(void *, const void *, int);
78 extern void *memmove(void *, const void *, int);
79 extern char *strcpy(char *, const char *);
80 extern char *strncpy(char *, const char *, int);
81
82 extern char *strcat(char *, const char *);
83 extern char *strncat(char *, const char *, int);
84
85 extern int memcmp(const void *, const void *, int);
86 extern int strcmp(const char *, const char *);
87 extern int strcoll(const char *, const char *);
88 extern int strncmp(const char *, const char *, int);
89 extern int strxfrm(char *, const char *, int);
90
91 extern void *memchr(const void *, int, int);
92 extern char *strchr(const char *, int);
93
94 extern int strcspn(const char *, const char *);
95 /*#pragma int_to_unsigned strcspn*/
96
97 extern char *strpbrk(const char *, const char *);
98 extern char *strrchr(const char *, int);
99
100 extern int strspn(const char *, const char *);
101 /*#pragma int_to_unsigned strspn*/
102
103 extern char *strstr(const char *, const char *);
104 extern char *strtok(char *, const char *);
105 extern void *memset(void *, int, int);
106 extern char *strerror(int);
107
108 extern int strlen(const char *);
109 /*#pragma int_to_unsigned strlen*/
110
111 extern void *memccpy(void *, const void *, int, int);
112
113 extern int strcasecmp(const char *, const char *);
114 extern int strncasecmp(const char *, const char *, int);
115
116 /*#define       index   strchr*/
117 /*#define       rindex  strrchr*/
118
119 #ifdef  __cplusplus
120 }
121 #endif
122
123 #endif  /* HAVE_STRING_H */
124
125 #endif  /* _STRDEFS_H */