00001 00011 #ifndef OP_GROWABLE_BUFFER_H 00012 #define OP_GROWABLE_BUFFER_H 00013 00014 #include <stddef.h> 00015 00016 struct growable_buffer { 00017 void * p; 00018 size_t size; 00019 size_t max_size; 00020 }; 00021 00029 void init_buffer(struct growable_buffer * buffer); 00030 00035 void free_buffer(struct growable_buffer * buffer); 00036 00043 void add_data(struct growable_buffer * b, void const * data, size_t len); 00044 00045 #endif /* !OP_GROWABLE_BUFFER_H */