From 0cc9b20c15460213e488bf5e70963b941482f628 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 14 Jan 2025 16:06:02 -0600 Subject: Add source. --- sdk/std/string.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sdk/std/string.h (limited to 'sdk/std/string.h') 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 +#endif + +#include +#include + +#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 -- cgit v1.2.3-54-g00ecf