From ae2e52d578ca1dd78e31beed4c63a9b17ce3bb60 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 28 Jan 2006 00:14:29 +0000 Subject: First stage of standardizing string functions. --- common/stringx.h | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'common/stringx.h') diff --git a/common/stringx.h b/common/stringx.h index 042cf2d..3949d70 100644 --- a/common/stringx.h +++ b/common/stringx.h @@ -36,18 +36,37 @@ * */ -#ifndef __STRINGX_H__ -#define __STRINGX_H__ +#ifndef __COMPAT_H__ +#define __COMPAT_H__ -void remove_cr(char* data); +#include "config.h" +#ifndef HAVE_STRLCPY +size_t strlcpy(char *dst, const char *src, size_t len); +#endif + +#ifndef HAVE_STRLCAT +size_t strlcat(char* dst, const char* src, size_t siz); +#endif + +#ifndef HAVE_STRCLN +void strcln(char* data); +#endif + +#ifndef HAVE_STRBTRIM char* trim_start(const char* data); +#endif + +#ifndef HAVE_STRETRIM void trim_end(char* data); +#endif + +#ifndef HAVE_STRTRIM char* trim_space(char* data); +#endif +#ifndef HAVE_STRTOB int strtob(const char* str); +#endif -size_t -strlcpy(char *dst, const char *src, size_t len); - -#endif /* __STRINGX_H__ */ +#endif /* __COMPAT_H__ */ -- cgit v1.2.3