Main Page | Class List | File List | Class Members | File Members | Related Pages

parse.h

Go to the documentation of this file.
00001 /* 00002 * $Id: parse.h,v 1.22 2003/10/16 18:50:54 jasta Exp $ 00003 * 00004 * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2, or (at your option) any 00009 * later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 */ 00016 00017 #ifndef __PARSE_H 00018 #define __PARSE_H 00019 00020 /*****************************************************************************/ 00021 00029 /*****************************************************************************/ 00030 00031 EXTERN_C_BEGIN 00032 00033 /*****************************************************************************/ 00034 00042 LIBGIFT_EXPORT 00043 char *stringf (const char *fmt, ...); 00044 00051 LIBGIFT_EXPORT 00052 char *stringf_dup (const char *fmt, ...); 00053 00054 /*****************************************************************************/ 00055 00061 LIBGIFT_EXPORT 00062 char *string_upper (char *s); 00063 00067 LIBGIFT_EXPORT 00068 char *string_lower (char *s); 00069 00070 /*****************************************************************************/ 00071 00077 LIBGIFT_EXPORT 00078 char *gift_strdup (const char *s); 00079 #ifndef USE_TCGPROF 00080 # define STRDUP gift_strdup 00081 #else 00082 # define STRDUP strdup 00083 #endif 00084 00095 LIBGIFT_EXPORT 00096 char *gift_strndup (const char *s, size_t len); 00097 #define STRDUP_N gift_strndup 00098 00111 LIBGIFT_EXPORT 00112 char *gift_strncpy (char *dst, const char *src, size_t len); 00113 #define STRNCPY gift_strncpy 00114 00115 /*****************************************************************************/ 00116 00123 LIBGIFT_EXPORT 00124 size_t gift_strlen (const char *s); 00125 #define STRLEN(str) gift_strlen(str) 00126 00132 LIBGIFT_EXPORT 00133 size_t gift_strlen0 (const char *s); 00134 #define STRLEN_0(str) gift_strlen0(str) 00135 00136 /*****************************************************************************/ 00137 00144 LIBGIFT_EXPORT 00145 int gift_strcmp (const char *s1, const char *s2); 00146 #define STRCMP gift_strcmp 00147 00151 LIBGIFT_EXPORT 00152 int gift_strcasecmp (const char *s1, const char *s2); 00153 #define STRCASECMP gift_strcasecmp 00154 00155 /*****************************************************************************/ 00156 00163 LIBGIFT_EXPORT 00164 long gift_strtol (const char *str); 00165 #define ATOI gift_strtol /* grumble */ 00166 #define ATOL gift_strtol 00167 00171 LIBGIFT_EXPORT 00172 unsigned long gift_strtoul (const char *str); 00173 #define ATOUL gift_strtoul 00174 00179 LIBGIFT_EXPORT 00180 char *gift_ltostr (long integer); 00181 #define ITOA gift_ltostr 00182 #define LTOA gift_ltostr 00183 00187 LIBGIFT_EXPORT 00188 char *gift_ultostr (unsigned long integer); 00189 #define ULTOA gift_ultostr 00190 00191 /*****************************************************************************/ 00192 00196 LIBGIFT_EXPORT 00197 char *gift_strmove (char *dst, const char *src); 00198 #define string_move gift_strmove 00199 00200 /*****************************************************************************/ 00201 00209 LIBGIFT_EXPORT 00210 BOOL string_isempty (const char *s); 00211 00221 LIBGIFT_EXPORT 00222 char *string_trim (char *s); 00223 00228 LIBGIFT_EXPORT 00229 char *string_sep_set (char **string, const char *charset); 00230 00236 LIBGIFT_EXPORT 00237 char *string_sep (char **string, const char *delim); 00238 00239 /*****************************************************************************/ 00240 00246 #define STRING_NULL(str) (((str) && *(str)) ? ((char *)(str)) : ((char *)NULL)) 00247 00252 #define STRING_NOTNULL(str) ((str) ? ((char *)(str)) : "") 00253 00254 /*****************************************************************************/ 00255 00256 EXTERN_C_END 00257 00258 /*****************************************************************************/ 00259 00260 #endif /* __PARSE_H */

Generated on Sun Aug 22 08:07:10 2004 by doxygen 1.3.7