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

gi_string.h

Go to the documentation of this file.
00001 /* 00002 * $Id: gi_string.h,v 1.1.2.8 2004/07/07 09:30:42 jasta Exp $ 00003 * 00004 * Copyright (C) 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 __GI_STRING_H 00018 #define __GI_STRING_H 00019 00020 /*****************************************************************************/ 00021 00033 /*****************************************************************************/ 00034 00035 /* FIXME */ 00036 #ifndef HAVE_STRTOL 00037 #define HAVE_STRTOL 00038 #endif /* !HAVE_STRTOL */ 00039 00040 #ifndef HAVE_STRTOUL 00041 #define HAVE_STRTOUL 00042 #endif /* !HAVE_STRTOUL */ 00043 00044 /*****************************************************************************/ 00045 00046 EXTERN_C_BEGIN 00047 00048 /*****************************************************************************/ 00049 00054 LIBGIFT_EXPORT 00055 char *gi_stringf (char *buffer, size_t size, const char *fmt, ...); 00056 00067 #define GFMT gi_stringf 00068 #define GSZ(buf) (buf), sizeof(buf) 00069 00074 LIBGIFT_EXPORT 00075 char *gi_stringf_dup (const char *fmt, ...); 00076 00077 /*****************************************************************************/ 00078 00082 LIBGIFT_EXPORT 00083 char *gi_strerrno (void); 00084 00085 /*****************************************************************************/ 00086 00090 LIBGIFT_EXPORT 00091 char *gi_stpcpy (char *dst, const char *src); 00092 00093 /*****************************************************************************/ 00094 00095 #ifndef HAVE_STRSPN 00096 LIBGIFT_EXPORT 00097 size_t strspn (const char *str, const char *accept); 00098 #endif /* !HAVE_STRSPN */ 00099 00100 #ifndef HAVE_STRCSPN 00101 LIBGIFT_EXPORT 00102 size_t strcspn (const char *str, const char *reject); 00103 #endif /* !HAVE_STRCSPN */ 00104 00105 #ifndef HAVE_STRPBRK 00106 LIBGIFT_EXPORT 00107 char *strpbrk (const char *str, const char *accept); 00108 #endif /* !HAVE_STRPBRK */ 00109 00110 /*****************************************************************************/ 00111 00112 #ifndef HAVE_STRLCPY 00113 LIBGIFT_EXPORT 00114 size_t strlcpy (char *dst, const char *src, size_t siz); 00115 #endif /* !HAVE_STRLCPY */ 00116 00117 #ifndef HAVE_STRLCAT 00118 LIBGIFT_EXPORT 00119 size_t strlcat (char *dst, const char *src, size_t siz); 00120 #endif /* !HAVE_STRLCAT */ 00121 00122 /*****************************************************************************/ 00123 00124 #ifndef HAVE_STRSEP 00125 LIBGIFT_EXPORT 00126 char *strsep (char **stringp, const char *delim); 00127 #endif /* !HAVE_STRSEP */ 00128 00129 /*****************************************************************************/ 00130 00131 #ifndef HAVE_STRCASECMP 00132 LIBGIFT_EXPORT 00133 int strcasecmp (const char *s1, const char *s2); 00134 #endif /* !HAVE_STRCASECMP */ 00135 00136 #ifndef HAVE_STRNCASECMP 00137 LIBGIFT_EXPORT 00138 int strncasecmp (const char *s1, const char *s2, size_t n); 00139 #endif /* !HAVE_STRNCASECMP */ 00140 00144 LIBGIFT_EXPORT 00145 int strcasecmp_s (const char *s1, const char *s2); 00146 00150 LIBGIFT_EXPORT 00151 int strcmp_s (const char *s1, const char *s2); 00152 00153 /*****************************************************************************/ 00154 00158 LIBGIFT_EXPORT 00159 size_t strlen_s (const char *str); 00160 00164 LIBGIFT_EXPORT 00165 size_t strlen0_s (const char *str); 00166 00167 /*****************************************************************************/ 00168 00169 #ifndef HAVE_STRTOL 00170 LIBGIFT_EXPORT 00171 long strtol (const char *nptr, char **endptr, int base); 00172 #endif /* !HAVE_STRTOL */ 00173 00174 #ifndef HAVE_STRTOUL 00175 LIBGIFT_EXPORT 00176 unsigned long strtoul (const char *nptr, char **endptr, int base); 00177 #endif /* !HAVE_STRTOUL */ 00178 00182 LIBGIFT_EXPORT 00183 long strtol_s (const char *nptr, char **endptr, int base); 00184 00188 LIBGIFT_EXPORT 00189 unsigned long strtoul_s (const char *nptr, char **endptr, int base); 00190 00191 /*****************************************************************************/ 00192 00193 #ifndef HAVE_STRMOVE 00194 LIBGIFT_EXPORT 00195 char *strmove (char *dst, const char *src); 00196 #endif /* !HAVE_STRMOVE */ 00197 00201 LIBGIFT_EXPORT 00202 char *strmove_s (char *dst, const char *src); 00203 00204 /*****************************************************************************/ 00205 00214 LIBGIFT_EXPORT 00215 char *strtrim_s (char *str); 00216 00217 /*****************************************************************************/ 00218 00225 LIBGIFT_EXPORT 00226 char *strupper_s (char *str); 00227 00231 LIBGIFT_EXPORT 00232 char *strlower_s (char *str); 00233 00234 /*****************************************************************************/ 00235 00239 LIBGIFT_EXPORT 00240 char *strdup_s (const char *str); 00241 00242 #ifndef HAVE_MEMDUP 00243 LIBGIFT_EXPORT 00244 void *memdup (const void *ptr, size_t len); 00245 #endif /* HAVE_MEMDUP */ 00246 00250 LIBGIFT_EXPORT 00251 void *memdup_s (const void *ptr, size_t len); 00252 00253 /*****************************************************************************/ 00254 00255 EXTERN_C_END 00256 00257 /*****************************************************************************/ 00258 00259 #endif /* __GI_STRING_H */

Generated on Sun Aug 22 07:56:40 2004 by doxygen 1.3.7