head 1.23; access; symbols STR_0_9_12:1.23 LMTP2NNTP_1_4_1:1.23 LMTP2NNTP_1_4_0:1.23 STR_0_9_11:1.23 STR_0_9_10:1.23 LMTP2NNTP_1_3_0:1.22 LMTP2NNTP_1_3b2:1.22 LMTP2NNTP_1_3b1:1.22 LMTP2NNTP_1_3a3:1.22 LMTP2NNTP_1_3a2:1.22 STR_0_9_9:1.22 LMTP2NNTP_1_3a1:1.21 STR_0_9_8:1.21 LMTP2NNTP_1_2_0:1.21 LMTP2NNTP_1_2b4:1.21 LMTP2NNTP_1_2b3:1.21 LMTP2NNTP_1_2b2:1.21 LMTP2NNTP_1_2b1:1.21 LMTP2NNTP_1_2a8:1.21 LMTP2NNTP_1_2a7:1.21 LMTP2NNTP_1_2a6:1.20 LMTP2NNTP_1_2a5:1.20 STR_0_9_7:1.20 LMTP2NNTP_1_2a4:1.18 LMTP2NNTP_1_2a3:1.18 OSSP_RC_SPEC:1.18 LMTP2NNTP_1_2a1:1.17 LMTP2NNTP_1_1_1:1.17 LMTP2NNTP_1_1_0:1.17 LMTP2NNTP_1_1b4:1.17 LMTP2NNTP_1_1b3:1.17 LMTP2NNTP_1_1b2:1.17 LMTP2NNTP_1_1b1:1.17 STR_0_9_6:1.17 STR_0_9_5:1.16 STR_0_9_4:1.15 STR_0_9_3:1.13 STR_0_9_2:1.13 STR_0_9_1:1.13 STR_0_9_0:1.13; locks; strict; comment @ * @; 1.23 date 2005.01.24.15.22.19; author rse; state Exp; branches; next 1.22; 1.22 date 2004.04.23.10.03.09; author thl; state Exp; branches; next 1.21; 1.21 date 2003.01.06.19.13.47; author rse; state Exp; branches; next 1.20; 1.20 date 2002.04.01.09.03.49; author rse; state Exp; branches; next 1.19; 1.19 date 2002.04.01.08.32.54; author rse; state Exp; branches; next 1.18; 1.18 date 2002.01.02.17.09.13; author rse; state Exp; branches; next 1.17; 1.17 date 2001.09.11.10.40.56; author thl; state Exp; branches; next 1.16; 1.16 date 2001.08.16.13.21.22; author rse; state Exp; branches; next 1.15; 1.15 date 2000.05.25.13.04.22; author rse; state Exp; branches; next 1.14; 1.14 date 2000.03.01.09.59.38; author rse; state Exp; branches; next 1.13; 1.13 date 2000.01.01.13.05.18; author rse; state Exp; branches; next 1.12; 1.12 date 99.12.28.10.19.00; author rse; state Exp; branches; next 1.11; 1.11 date 99.12.27.15.53.31; author rse; state Exp; branches; next 1.10; 1.10 date 99.12.27.13.43.06; author rse; state Exp; branches; next 1.9; 1.9 date 99.12.26.16.08.46; author rse; state Exp; branches; next 1.8; 1.8 date 99.12.26.15.24.58; author rse; state Exp; branches; next 1.7; 1.7 date 99.12.26.15.19.22; author rse; state dead; branches; next 1.6; 1.6 date 99.12.26.14.45.12; author rse; state Exp; branches; next 1.5; 1.5 date 99.12.26.14.08.44; author rse; state Exp; branches; next 1.4; 1.4 date 99.12.25.18.33.25; author rse; state Exp; branches; next 1.3; 1.3 date 99.12.25.18.26.09; author rse; state Exp; branches; next 1.2; 1.2 date 99.11.26.17.08.35; author rse; state Exp; branches; next 1.1; 1.1 date 99.11.23.15.07.46; author rse; state Exp; branches; next ; desc @@ 1.23 log @Adjusted copyright messages for new year 2004/2005. @ text @/* ** OSSP str - String Handling ** Copyright (c) 1999-2005 Ralf S. Engelschall ** Copyright (c) 1999-2005 The OSSP Project ** ** This file is part of OSSP str, a string handling and manipulation ** library which can be found at http://www.ossp.org/pkg/lib/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_p.h: private API header */ #ifndef _STR_P_H_ #define _STR_P_H_ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* for malloc, etc. */ #include /* ... */ #include "str.h" #include "str_pcre.h" #if defined(HAVE_DMALLOC_H) && defined(WITH_DMALLOC) #include "dmalloc.h" #endif /* explicit support for unsigned char based ctype stuff */ #define str_isalpha(c) (isalpha(((unsigned char)(c)))) #define str_isdigit(c) (isdigit(((unsigned char)(c)))) #define str_isxdigit(c) (isxdigit(((unsigned char)(c)))) #define str_islower(c) (islower(((unsigned char)(c)))) #define str_tolower(c) (tolower((unsigned char)(c))) extern void *(*str_mem_alloc)(size_t); extern void *(*str_mem_realloc)(void *, size_t); extern void (*str_mem_free)(void *); extern void *(*str_mem_dup)(void *, size_t); extern void *(*str_mem_set)(void *, int, size_t); extern void *(*str_mem_move)(void *, const void *, size_t); extern void *(*str_mem_rev)(void *, size_t); extern void *(*str_mem_char)(const void *, int, size_t); extern void *(*str_mem_mem)(const void *, size_t, const void *, size_t); extern int (*str_mem_cmp)(const void *, const void *, size_t); typedef struct str_vformat_st str_vformat_t; struct str_vformat_st { char *curpos; char *endpos; union { int i; long l; double d; void *p; } data[6]; int (*flush)(struct str_vformat_st *); char *(*format)( struct str_vformat_st *, char *, char *, int *, char *, int, char *, int, va_list ); }; int str_vformat(str_vformat_t *, const char *, va_list); #define str_ilen(n,s) \ do { \ register const char *_s = (const char *)(s); \ while (*_s++) \ /*nop*/; \ (n) = _s - (const char *)(s) - 1; \ } while(0) #endif /* _STR_P_H_ */ @ 1.22 log @Replace modf(3) with hand-crafted inlined function to avoid dependency to external libm; see Checkin [4512] @ text @d3 2 a4 2 ** Copyright (c) 1999-2003 Ralf S. Engelschall ** Copyright (c) 1999-2003 The OSSP Project @ 1.21 log @- adjust copyright messages for new year 2003 - strip trailing whitespaces - consistently use OSSP ASCII-art - add standard devtool.conf stuff from OSSP sa @ text @a37 1 #include /* for modf(3) */ @ 1.20 log @- switch to our OSSP ts sub-library - switch from str_config.h to just config.h @ text @d3 2 a4 2 ** Copyright (c) 1999-2002 Ralf S. Engelschall ** Copyright (c) 1999-2002 The OSSP Project d6 1 a6 1 ** This file is part of OSSP str, a string handling and manipulation d70 3 a72 3 union { int i; long l; double d; void *p; @ 1.19 log @finally switch to full OSSP branding @ text @d33 3 a35 2 #include "str.h" #include "str_config.h" d41 1 @ 1.18 log @bump copyright year @ text @d2 1 a2 1 ** Str - String Library d4 1 d6 2 a7 2 ** This file is part of Str, a string handling and manipulation ** library which can be found at http://www.engelschall.com/sw/str/. @ 1.17 log @add Dmalloc support to Str @ text @d3 1 a3 1 ** Copyright (c) 1999-2001 Ralf S. Engelschall @ 1.16 log @Adjust copyright for year 2001. @ text @d41 4 @ 1.15 log @*** empty log message *** @ text @d3 1 a3 1 ** Copyright (c) 1999-2000 Ralf S. Engelschall @ 1.14 log @*** empty log message *** @ text @d46 1 a46 2 #define str_tolower(c) (isupper((unsigned char)(c)) ? \ tolower((unsigned char)(c)) : (int)(c)) @ 1.13 log @*** empty log message *** @ text @d78 8 @ 1.12 log @*** empty log message *** @ text @d3 1 a3 1 ** Copyright (c) 1999 Ralf S. Engelschall @ 1.11 log @*** empty log message *** @ text @d39 2 @ 1.10 log @. @ text @d58 18 @ 1.9 log @*** empty log message *** @ text @d40 6 a45 5 #define str_isalpha(c) (isalpha(((unsigned char)(c)))) #define str_isdigit(c) (isdigit(((unsigned char)(c)))) #define str_islower(c) (islower(((unsigned char)(c)))) #define str_tolower(c) (isupper((unsigned char)(c)) ? \ tolower((unsigned char)(c)) : (int)(c)) @ 1.8 log @*** empty log message *** @ text @d53 1 a53 1 extern void *(*str_mem_char)(const void *, unsigned char, size_t); @ 1.7 log @*** empty log message *** @ text @a45 1 /* our own memory stuff */ @ 1.6 log @*** empty log message *** @ text @@ 1.5 log @*** empty log message *** @ text @d53 1 @ 1.4 log @*** empty log message *** @ text @d37 1 d46 10 @ 1.3 log @*** empty log message *** @ text @d38 1 a38 1 /* explicit support for unsigned char */ d42 3 @ 1.2 log @*** empty log message *** @ text @d1 3 a3 2 /* ** str_p.h -- String Library API Header (private) d5 2 a6 2 ** ==================================================================== ** Copyright (c) 1999 Ralf S. Engelschall. All rights reserved. d8 4 a11 3 ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: d13 12 a24 2 ** 1. Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. d26 1 a26 18 ** 2. Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** ** THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``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 RALF S. ENGELSCHALL OR ** ITS 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. ** ==================================================================== @ 1.1 log @*** empty log message *** @ text @a39 1 #include /* for inaddr etc. */ @