deps/kb_meme/meme-5.0.1/src/buffer.c
/*
 * buf_create
 * takes the initial size of the buffer
 */
buf_create
takes the initial size of the buffer
buf_create takes the initial size of the buffer
BUF_T* buf_create(int capacity) {
  BUF_T *buf = mm_malloc(sizeof(BUF_T));
  buf->buffer = mm_malloc(sizeof(char)*capacity);
  buf->capacity = capacity;
  buf->limit = capacity;
  buf->position = 0;
  buf->mark = -1;
  return buf;
}
BUF_T * buf_create ( int capacity ) { BUF_T * buf = mm_malloc ( sizeof ( BUF_T ) ) ; buf -> buffer = mm_malloc ( sizeof ( char ) * capacity ) ; buf -> capacity = capacity ; buf -> limit = capacity ; buf -> position = 0 ; buf -> mark = -1 ; return buf ; }
buf_create
 takes the initial size of the buffer
buf_create takes the initial size of the buffer