#ifndef BUFFER_H #define BUFFER_H #include #include #define GROW_SIZE 10 typedef struct { char *content; size_t used; size_t size; } growable_buffer; bool init_growable_buffer(growable_buffer *buffer); bool grow_growable_buffer(growable_buffer *buffer, size_t at_least); void free_growable_buffer(growable_buffer *buffer); typedef struct { char *content; size_t size; } fixed_buffer; bool init_fixed_buffer(fixed_buffer *buffer, char *orig); void free_fixed_buffer(fixed_buffer *buffer); #endif // BUFFER_H