Index: ossp-pkg/str/.cvsignore RCS File: /v/ossp/cvs/ossp-pkg/str/.cvsignore,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/str/.cvsignore,v' 2>/dev/null --- .cvsignore 2001/09/05 08:30:59 1.9 +++ .cvsignore 2001/09/10 09:55:13 1.10 @@ -21,3 +21,4 @@ shtool str.3 str-config.1 +str.h Index: ossp-pkg/str/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/str/configure.ac,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/str/configure.ac,v' 2>/dev/null --- configure.ac 2001/08/16 13:21:22 1.3 +++ configure.ac 2001/09/10 09:55:13 1.4 @@ -37,6 +37,7 @@ AC_OUTPUT(dnl Makefile dnl +str.h dnl str-config dnl ,dnl chmod a+x str-config Index: ossp-pkg/str/str.h RCS File: /v/ossp/cvs/ossp-pkg/str/Attic/str.h,v co -q -kk -p'1.21' '/v/ossp/cvs/ossp-pkg/str/Attic/str.h,v' | diff -u - /dev/null -L'ossp-pkg/str/str.h' 2>/dev/null --- ossp-pkg/str/str.h +++ /dev/null 2024-04-28 16:15:25.000000000 +0200 @@ -1,109 +0,0 @@ -/* -** Str - String Library -** Copyright (c) 1999-2001 Ralf S. Engelschall -** -** This file is part of Str, a string handling and manipulation -** library which can be found at http://www.engelschall.com/sw/str/. -** -** Permission to use, copy, modify, and distribute this software for -** any purpose with or without fee is hereby granted, provided that -** the above copyright notice and this permission notice appear in all -** copies. -** -** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR -** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -** SUCH DAMAGE. -** -** str.h: public API header -*/ - -#ifndef _STR_H_ -#define _STR_H_ - - /* C++ support */ -#ifdef __cplusplus -#define BEGIN_DECLARATION extern "C" { -#define END_DECLARATION } -#else -#define BEGIN_DECLARATION /*nop*/ -#define END_DECLARATION /*nop*/ -#endif - -#include -#include -#include -#include - -/* true and false boolean values and corresponding type */ -#undef TRUE -#undef FALSE -#undef BOOL -#ifdef __cplusplus -#define BOOL bool -#define TRUE true -#define FALSE false -#else -#define BOOL char -#define TRUE ((BOOL)(1 == 1)) -#define FALSE ((BOOL)(0 == 1)) -#endif - -/* null values for pointers and characters */ -#ifndef NULL -#define NULL ((void *)0) -#endif -#ifndef NUL -#define NUL '\0' -#endif - -BEGIN_DECLARATION - -typedef unsigned int str_size_t; - -#define STR_RIGHT (1 << 0) /* operate from right end */ -#define STR_COMPLEMENT (1 << 1) /* use complement */ -#define STR_NOCASE (1 << 2) /* no case sensitive operation */ -#define STR_STRIPQUOTES (1 << 3) /* strip quote characters */ -#define STR_BACKSLASHESC (1 << 4) /* enable ANSI C style (backslashed) escape sequences */ -#define STR_SKIPDELIMS (1 << 5) /* skip trailing delimiters before return */ -#define STR_TRIGRAPHS (1 << 6) /* enable ANSI C trigraph processing (implies STR_BACKSLASHESCAPE) */ - -#define STR_HASH_DJBX33 (1 << 0) /* Daniel J. Bernstein: Times 33 */ -#define STR_HASH_BJDDJ (1 << 1) /* Bob Jenkins: Dr. Dobbs Journal */ -#define STR_HASH_MACRC32 (1 << 2) /* Mark Adler: Cyclic Redudancy Check 32 */ - -#define STR_BASE64_ENCODE (1 << 0) /* encode: string -> base64 */ -#define STR_BASE64_DECODE (1 << 1) /* decode: base64 -> string */ -#define STR_BASE64_STRICT (1 << 2) /* strict encoding with no more than 72 chars/line */ - -extern str_size_t str_len (const char *); -extern char *str_copy (char *, const char *, str_size_t); -extern char *str_dup (const char *, str_size_t); -extern char *str_concat (char *, ...); -extern char *str_splice (char *, str_size_t, str_size_t, char *, str_size_t); -extern char *str_token (char **, const char *, const char *, const char *, int); -extern int str_parse (const char *, const char *, ...); -extern int str_compare (const char *, const char *, str_size_t, int); -extern char *str_span (const char *, str_size_t, const char *, int); -extern char *str_locate (const char *, str_size_t, const char *); -extern int str_format (char *, str_size_t, const char *, ...); -extern unsigned long str_hash (const char *, str_size_t, int); -extern int str_base64 (char *, str_size_t, unsigned char *, str_size_t, int); - -extern char *str_concat_va (char *, va_list); -extern int str_parse_va (const char *, const char *, va_list); -extern int str_format_va (char *, str_size_t, const char *, va_list); - -END_DECLARATION - -#endif /* _STR_H_ */ - Index: ossp-pkg/str/str.h.in RCS File: /v/ossp/cvs/ossp-pkg/str/str.h.in,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/str/str.h.in,v' | diff -u /dev/null - -L'ossp-pkg/str/str.h.in' 2>/dev/null --- ossp-pkg/str/str.h.in +++ - 2024-04-28 16:15:25.434675076 +0200 @@ -0,0 +1,112 @@ +/* +** Str - String Library +** Copyright (c) 1999-2001 Ralf S. Engelschall +** +** This file is part of Str, a string handling and manipulation +** library which can be found at http://www.engelschall.com/sw/str/. +** +** Permission to use, copy, modify, and distribute this software for +** any purpose with or without fee is hereby granted, provided that +** the above copyright notice and this permission notice appear in all +** copies. +** +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +** IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +** USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. +** +** str.h: public API header +*/ + +#ifndef _STR_H_ +#define _STR_H_ + + /* C++ support */ +#ifdef __cplusplus +#define BEGIN_DECLARATION extern "C" { +#define END_DECLARATION } +#else +#define BEGIN_DECLARATION /*nop*/ +#define END_DECLARATION /*nop*/ +#endif + +#define STR_VERSION_STR "@STR_VERSION_STR@" +#define STR_VERSION_HEX @STR_VERSION_HEX@ + +#include +#include +#include +#include + +/* true and false boolean values and corresponding type */ +#undef TRUE +#undef FALSE +#undef BOOL +#ifdef __cplusplus +#define BOOL bool +#define TRUE true +#define FALSE false +#else +#define BOOL char +#define TRUE ((BOOL)(1 == 1)) +#define FALSE ((BOOL)(0 == 1)) +#endif + +/* null values for pointers and characters */ +#ifndef NULL +#define NULL ((void *)0) +#endif +#ifndef NUL +#define NUL '\0' +#endif + +BEGIN_DECLARATION + +typedef unsigned int str_size_t; + +#define STR_RIGHT (1 << 0) /* operate from right end */ +#define STR_COMPLEMENT (1 << 1) /* use complement */ +#define STR_NOCASE (1 << 2) /* no case sensitive operation */ +#define STR_STRIPQUOTES (1 << 3) /* strip quote characters */ +#define STR_BACKSLASHESC (1 << 4) /* enable ANSI C style (backslashed) escape sequences */ +#define STR_SKIPDELIMS (1 << 5) /* skip trailing delimiters before return */ +#define STR_TRIGRAPHS (1 << 6) /* enable ANSI C trigraph processing (implies STR_BACKSLASHESCAPE) */ + +#define STR_HASH_DJBX33 (1 << 0) /* Daniel J. Bernstein: Times 33 */ +#define STR_HASH_BJDDJ (1 << 1) /* Bob Jenkins: Dr. Dobbs Journal */ +#define STR_HASH_MACRC32 (1 << 2) /* Mark Adler: Cyclic Redudancy Check 32 */ + +#define STR_BASE64_ENCODE (1 << 0) /* encode: string -> base64 */ +#define STR_BASE64_DECODE (1 << 1) /* decode: base64 -> string */ +#define STR_BASE64_STRICT (1 << 2) /* strict encoding with no more than 72 chars/line */ + +extern str_size_t str_len (const char *); +extern char *str_copy (char *, const char *, str_size_t); +extern char *str_dup (const char *, str_size_t); +extern char *str_concat (char *, ...); +extern char *str_splice (char *, str_size_t, str_size_t, char *, str_size_t); +extern char *str_token (char **, const char *, const char *, const char *, int); +extern int str_parse (const char *, const char *, ...); +extern int str_compare (const char *, const char *, str_size_t, int); +extern char *str_span (const char *, str_size_t, const char *, int); +extern char *str_locate (const char *, str_size_t, const char *); +extern int str_format (char *, str_size_t, const char *, ...); +extern unsigned long str_hash (const char *, str_size_t, int); +extern int str_base64 (char *, str_size_t, unsigned char *, str_size_t, int); + +extern char *str_concat_va (char *, va_list); +extern int str_parse_va (const char *, const char *, va_list); +extern int str_format_va (char *, str_size_t, const char *, va_list); + +END_DECLARATION + +#endif /* _STR_H_ */ +