deps/kb_meme/meme-5.0.1/src/buffer.c
/*
 * buf_fwrite
 * writes data from the buffer to the file ptr
 * returns the number of bytes written
 */
buf_fwrite
writes data from the buffer to the file ptr
returns the number of bytes written
buf_fwrite writes data from the buffer to the file ptr returns the number of bytes written
int buf_fwrite(BUF_T *buf, FILE *fp) {
  int remaining, rvalue;
  char *src;
  remaining = (buf->limit - buf->position);
  if (remaining == 0) return 0;
  src = (buf->buffer)+(buf->position);
  rvalue = fwrite(src, sizeof(char), remaining, fp);
  if (rvalue > 0)
    buf->position += rvalue;
  return rvalue;
}
int buf_fwrite ( BUF_T * buf , FILE * fp ) { int remaining , rvalue ; char * src ; remaining = ( buf -> limit - buf -> position ) ; if ( remaining == 0 ) return 0 ; src = ( buf -> buffer ) + ( buf -> position ) ; rvalue = fwrite ( src , sizeof ( char ) , remaining , fp ) ; if ( rvalue > 0 ) buf -> position += rvalue ; return rvalue ; }
buf_fwrite
 writes data from the buffer to the file ptr
 returns the number of bytes written
buf_fwrite writes data from the buffer to the file ptr returns the number of bytes written