This file is indexed.

/usr/share/z88dk/include/string.h is in z88dk-data 1.8.ds1-10.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#ifndef __STRINGS_H__
#define __STRINGS_H__

/*
 *	This is strings.h
 *
 *	We have virtually a full set of these routines!
 *	Most of the common ones have been tested and
 *	used in my programs (dom).
 *
 *	BSDisms are catered for by #defines..
 *
 *	$Id: string.h,v 1.19 2007/07/04 03:22:36 aralbrec Exp $
 */

#include <sys/types.h>

// First a list of functions using CALLER and FASTCALL linkage

extern int  __LIB__ __FASTCALL__  strlen(char *);
extern char __LIB__              *strcat(char *, char *);
extern int  __LIB__               strcmp(char *, char *);
extern char __LIB__              *strcpy(char *, char *);
extern char __LIB__              *strncat(char *, char *, uint);
extern int  __LIB__               strncmp(char *, char *, uint);
extern char __LIB__              *strncpy(char *, char *, uint);
extern char __LIB__ __FASTCALL__ *strrev(char *);
extern char __LIB__              *strchr(unsigned char *, unsigned char);
extern char __LIB__              *strrchr(unsigned char *, unsigned char);
extern char __LIB__              *strrstrip(char *, char);
extern char __LIB__              *strstrip(char *, uint);
extern char __LIB__              *strstr(char *, char *);
extern char __LIB__              *strrstr(char *, char *);
extern char __LIB__              *strtok(char *, char *);
extern char __LIB__              *strpbrk(char *, char *);
extern int  __LIB__               strpos(char *, uint);
extern int  __LIB__               strcspn(char *, char *);
extern int  __LIB__               strspn(char *, char *);
extern int  __LIB__               stricmp(char *, char *);
extern int  __LIB__               strcasecmp(char *, char *);
extern int  __LIB__               strnicmp(char *, char *, uint);
extern int  __LIB__               strncasecmp(char *, char *, uint);
extern char __LIB__ __FASTCALL__ *strlwr(char *);
extern char __LIB__ __FASTCALL__ *strupr(char *);

extern void __LIB__              *memset(void *, unsigned char, uint);
extern void __LIB__              *memcpy(void *, void *,uint);
extern void __LIB__              *memmove(void *, void *, uint);
extern void __LIB__              *memchr(void *, unsigned char, uint);
extern int  __LIB__               memcmp(void *, void *, uint);
extern void __LIB__              *memswap(void *, void *, uint);
extern void __LIB__              *memopi(void *, void *, uint, uint);
extern void __LIB__              *memopd(void *, void *, uint, uint);

extern char __LIB__ __FASTCALL__ *strdup(char *);

// And now a list of the same non-FASTCALL functions using CALLEE linkage

extern char __LIB__ __CALLEE__   *strcat_callee(char *, char *);
extern int  __LIB__ __CALLEE__    strcmp_callee(char *, char *);
extern char __LIB__ __CALLEE__   *strcpy_callee(char *, char *);
extern char __LIB__ __CALLEE__   *strncat_callee(char *, char *, uint);
extern int  __LIB__ __CALLEE__    strncmp_callee(char *, char *, uint);
extern char __LIB__ __CALLEE__   *strncpy_callee(char *, char *, uint);
extern char __LIB__ __CALLEE__   *strchr_callee(unsigned char *, unsigned char);
extern char __LIB__ __CALLEE__   *strrchr_callee(unsigned char *, unsigned char);
extern char __LIB__ __CALLEE__   *strrstrip_callee(char *, char);
extern char __LIB__ __CALLEE__   *strstrip_callee(char *, uint);
extern char __LIB__ __CALLEE__   *strstr_callee(char *, char *);
extern char __LIB__ __CALLEE__   *strrstr_callee(char *, char *);
extern char __LIB__ __CALLEE__   *strtok_callee(char *, char *);
extern char __LIB__ __CALLEE__   *strpbrk_callee(char *, char *);
extern int  __LIB__ __CALLEE__    strpos_callee(char *, uint);
extern int  __LIB__ __CALLEE__    strcspn_callee(char *, char *);
extern int  __LIB__ __CALLEE__    strspn_callee(char *, char *);
extern int  __LIB__ __CALLEE__    stricmp_callee(char *, char *);
extern int  __LIB__ __CALLEE__    strnicmp_callee(char *, char *, uint);

extern void __LIB__ __CALLEE__   *memset_callee(void *, unsigned char, uint);
extern void __LIB__ __CALLEE__   *memcpy_callee(void *, void *,uint);
extern void __LIB__ __CALLEE__   *memmove_callee(void *, void *, uint);
extern void __LIB__ __CALLEE__   *memchr_callee(void *, unsigned char, uint);
extern int  __LIB__ __CALLEE__    memcmp_callee(void *, void *, uint);
extern void __LIB__ __CALLEE__   *memswap_callee(void *, void *, uint);
extern void __LIB__ __CALLEE__   *memopi_callee(void *, void *, uint, uint);
extern void __LIB__ __CALLEE__   *memopd_callee(void *, void *, uint, uint);

// And now we make CALLEE linkage default to make compiled progs shorter and faster
// These defines will generate warnings for function pointers but that's ok

#define strcat(a,b)         strcat_callee(a,b)
#define strcmp(a,b)         strcmp_callee(a,b)
#define strcpy(a,b)         strcpy_callee(a,b)
#define strncat(a,b,c)      strncat_callee(a,b,c)
#define strncmp(a,b,c)      strncmp_callee(a,b,c)
#define strncpy(a,b,c)      strncpy_callee(a,b,c)
#define strchr(a,b)         strchr_callee(a,b)
#define strrchr(a,b)        strrchr_callee(a,b)
#define strrstrip(a,b)      strrstrip_callee(a,b)
#define strstrip(a,b)       strstrip_callee(a,b)
#define strstr(a,b)         strstr_callee(a,b)
#define strrstr(a,b)        strrstr_callee(a,b)
#define strtok(a,b)         strtok_callee(a,b)
#define strpbrk(a,b)        strpbrk_callee(a,b)
#define strpos(a,b)         strpos_callee(a,b)
#define strcspn(a,b)        strcspn_callee(a,b)
#define strspn(a,b)         strspn_callee(a,b)
#define stricmp(a,b)        stricmp_callee(a,b)
#define strnicmp(a,b,c)     strnicmp_callee(a,b,c)
#define strcasecmp(a,b)     stricmp_callee(a,b)
#define strncasecmp(a,b,c)  strnicmp_callee(a,b,c)

#define memset(a,b,c)   memset_callee(a,b,c)
#define memcpy(a,b,c)   memcpy_callee(a,b,c)
#define memmove(a,b,c)  memmove_callee(a,b,c)
#define memchr(a,b,c)   memchr_callee(a,b,c)
#define memcmp(a,b,c)   memcmp_callee(a,b,c)
#define memswap(a,b,c)  memswap_callee(a,b,c)
#define memopi(a,b,c,d) memopi_callee(a,b,c,d)
#define memopd(a,b,c,d) memopd_callee(a,b,c,d)

/*
 * Now handle far stuff
 */

#ifdef FARDATA

#define strlen(s) strlen_far(s)
extern int __LIB__ strlen_far(far char *);

#undef strcat
#define strcat(s1,s2) strcat_far(s1,s2)
extern far char __LIB__ *strcat_far(far char *, far char *);

#undef strcpy
#define strcpy(s1,s2) strcpy_far(s1,s2)
extern far char __LIB__ *strcpy_far(far char *, far char *);

#undef strncat
#define strncat(s1,s2) strncat_far(s1,s2,n)
extern far char __LIB__ *strncat_far(far char *, far char *, int);

#undef strncpy
#define strncpy(s1,s2) strncpy_far(s1,s2,n)
extern far char __LIB__ *strncpy_far(far char *, far char *, int);

#define strlwr(s) strlwr_far(s)
extern far char __LIB__ *strlwr_far(far char *);

#define strupr(s) strupr_far(s)
extern far char __LIB__ *strupr_far(far char *);

#undef strchr
#define strchr(s,c) strchr_far(s1,c)
extern far char __LIB__ *strchr_far(far unsigned char *, unsigned char);

#undef strrchr
#define strrchr(s,c) strrchr_far(s1,c)
extern far char __LIB__ *strrchr_far(far unsigned char *, unsigned char);

#define strdup(s) strdup_far(s)
extern far char __LIB__ *strdup_far(far char *);

#endif


/*
 * Okay..some nice BSD-isms now..
 */

extern void __LIB__  *bzero(void *, uint);
extern int  __LIB__   bcmp(void *, void *, uint);
extern void __LIB__  *bcopy(void *, void *,uint);
extern char __LIB__  *index(unsigned char *, unsigned char);
extern char __LIB__  *rindex(unsigned char *, unsigned char);

#define bzero(s,n)    memset_callee(s,0,n)
#define bcmp(s1,s2,n) memcmp_callee(s1,s2,n)
#define bcopy(s,d,l)  memcpy_callee(d,s,l)
#define index(s,b)    strchr_callee(s,b)
#define rindex(s,b)   strrchr_callee(s,b)


#endif