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

strobj.h

Go to the documentation of this file.
00001 /* 00002 * $Id: strobj.h,v 1.9 2003/12/23 03:43:56 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 __STRING_H 00018 #define __STRING_H 00019 00020 /*****************************************************************************/ 00021 00028 /*****************************************************************************/ 00029 00035 typedef struct 00036 { 00037 char *str; 00039 int alloc; 00040 int len; 00041 BOOL can_resize; 00042 BOOL managed; 00043 } String; 00044 00045 /*****************************************************************************/ 00046 00047 EXTERN_C_BEGIN 00048 00049 /*****************************************************************************/ 00050 00051 LIBGIFT_EXPORT 00052 void string_init (String *sobj); 00053 00054 LIBGIFT_EXPORT 00055 void string_finish (String *sobj); 00056 00057 LIBGIFT_EXPORT 00058 char *string_finish_keep (String *sobj); 00059 00060 /*****************************************************************************/ 00061 00062 LIBGIFT_EXPORT 00063 String *string_new (char *str, int alloc, int len, BOOL can_resize); 00064 00065 LIBGIFT_EXPORT 00066 void string_free (String *sobj); 00067 00068 LIBGIFT_EXPORT 00069 char *string_free_keep (String *sobj); 00070 00071 /*****************************************************************************/ 00072 00073 LIBGIFT_EXPORT 00074 void string_set_buf (String *sobj, char *str, int alloc, int len, 00075 BOOL can_resize); 00076 00077 /*****************************************************************************/ 00078 00079 LIBGIFT_EXPORT 00080 int string_appendvf (String *sobj, const char *fmt, va_list args); 00081 00082 LIBGIFT_EXPORT 00083 int string_appendf (String *sobj, const char *fmt, ...); 00084 00085 LIBGIFT_EXPORT 00086 int string_append (String *sobj, const char *str); 00087 00088 LIBGIFT_EXPORT 00089 int string_appendu (String *sobj, unsigned char *str, size_t len); 00090 00091 LIBGIFT_EXPORT 00092 int string_appendc (String *sobj, char c); 00093 00094 /*****************************************************************************/ 00095 00096 EXTERN_C_END 00097 00098 /*****************************************************************************/ 00099 00100 #endif /* __STRING_H */

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