Blender  V2.59
BLI_dynstr.h
Go to the documentation of this file.
00001 /*
00002  * $Id: BLI_dynstr.h 35215 2011-02-27 08:31:10Z campbellbarton $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  */
00029  
00030 #ifndef BLI_DYNSTR_H
00031 #define BLI_DYNSTR_H
00032 
00043 #include <stdarg.h>
00044 
00045 struct DynStr;
00046 
00048 typedef struct DynStr DynStr;
00049 
00055 DynStr* BLI_dynstr_new                                  (void);
00056 
00063 void    BLI_dynstr_append                               (DynStr *ds, const char *cstr);
00064 
00072 void    BLI_dynstr_nappend                              (DynStr *ds, const char *cstr, int len);
00073 
00080 void    BLI_dynstr_appendf                              (DynStr *ds, const char *format, ...)
00081 #ifdef __GNUC__
00082 __attribute__ ((format (printf, 2, 3)))
00083 #endif
00084 ;
00085 void    BLI_dynstr_vappendf                             (DynStr *ds, const char *format, va_list args);
00086 
00093 int             BLI_dynstr_get_len                              (DynStr *ds);
00094 
00103 char*   BLI_dynstr_get_cstring                  (DynStr *ds);
00104 
00110 void    BLI_dynstr_free                                 (DynStr *ds);
00111 
00112 #endif
00113