diff options
author | William Harrington <kb0iic@berzerkula.org> | 2025-01-14 16:06:02 -0600 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2025-01-14 16:06:02 -0600 |
commit | 0cc9b20c15460213e488bf5e70963b941482f628 (patch) | |
tree | bb0143245583ec846630f39bfa2258dba640ccd7 /sdk/std/string.h | |
parent | 0e084ade5069756d487b5c948c48b777e37c00c9 (diff) |
Add source.
Diffstat (limited to 'sdk/std/string.h')
-rw-r--r-- | sdk/std/string.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/sdk/std/string.h b/sdk/std/string.h new file mode 100644 index 0000000..bf642cf --- /dev/null +++ b/sdk/std/string.h @@ -0,0 +1,75 @@ +/* + * Portable string handling routines. + * $Id$ + * Copyright (c) 1997 by Tycho Softworks. + * For conditions of distribution and reuse see product license. + */ + +#ifndef __STD_STRINGS_H__ +#define __STD_STRINGS_H__ + +#ifndef __STD_TYPES_H__ +#include <std/types.h> +#endif + +#include <string.h> +#include <ctype.h> + +#ifndef STRCASECMP_F_MISSING +#define stricmp(s1, s2) strcasecmp(s1, s2) +#define strnicmp(s1, s2, n) strncasecmp(s1, s2, n) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __NAMESPACE +#define __SPACES __NAMESPACE(__SPACES) +#endif + +extern char __SPACES[]; + +#ifdef STRICMP_F_MISSING +#ifdef __NAMESPACE +#define stricmp __NAMESPACE(stricmp) +#define strnicmp __NAMESPACE(strnicmp) +#endif + +int stricmp(const char *s1, const char *s2); +int strnicmp(const char *s1, const char *s2, size_t n); +#endif + +#ifdef STRLWR_F_MISSING + +#ifdef __NAMESPACE +#define strupr __NAMESPACE(strupr) +#define strlwr __NAMESPACE(strlwr) +#endif + +char *strlwr(char *s1); +char *strupr(char *s2); +#endif + +#ifdef STRDUP_F_MISSING + +#ifdef __NAMESPACE +#define strdup __NAMESPACE(strdup) +#endif + +char *strdup(const char *s); +#endif + +#ifdef STRISTR_F_MISSING +#ifdef __NAMESPACE +#define stristr __NAMESPACE(stristr) +#endif + +char *stristr(char *s1, const char *s2); +#endif + +#ifdef __cplusplus +} +#endif + +#endif |