buffer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef BUFFER_H
00008 #define BUFFER_H
00009
00010 #include <stdlib.h>
00011 #include <stdarg.h>
00012
00019 #if !(defined(__GNUC__) || defined(__clang__)) && !defined(__attribute__)
00020 #define __attribute__(x)
00021 #endif
00022
00024 typedef struct buffer_t buffer_t;
00025
00029 buffer_t *buffer_create(void);
00030
00034 void buffer_delete(buffer_t * b);
00035
00045 int buffer_vprintf(buffer_t * b, const char *format, va_list ap);
00046
00054 int buffer_printf(buffer_t * b, const char *format, ...)
00055 __attribute__ (( format(printf,2,3) )) ;
00056
00064 const char *buffer_tostring(buffer_t * b, size_t * size);
00065
00066 #endif