libdacav 0.9.0
|
00001 /* 00002 * Copyright 2009 2010 Giovanni Simoni 00003 * 00004 * This file is part of LibDacav. 00005 * 00006 * LibDacav is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * LibDacav 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 LibDacav. If not, see <http://www.gnu.org/licenses/>. 00018 * 00019 */ 00020 00026 #ifndef __defined_dacav_dacavstrbuf_h 00027 #define __defined_dacav_dacavstrbuf_h 00028 00029 #include <dacav/dacav.h> 00030 #include <stdlib.h> 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00038 00040 typedef struct dstrbuf dstrbuf_t; 00041 00052 dstrbuf_t *dstrbuf_new (const char *sep, size_t len); 00053 00064 void dstrbuf_insert (dstrbuf_t *strbuf, const char *str, size_t len); 00065 00073 char *dstrbuf_read (dstrbuf_t *strbuf); 00074 00085 char *dstrbuf_extract (dstrbuf_t *strbuf); 00086 00091 void dstrbuf_free (dstrbuf_t *strbuf); 00092 00095 #ifdef __cplusplus 00096 } 00097 #endif 00098 00099 #endif // __defined_dacav_dacavstrbuf_h