deps/kb_meme/meme-5.0.1/src/buffer.c
/*
 * buf_fread
 * reads data from the file ptr into the buffer
 * returns the number of bytes read
 */
buf_fread
reads data from the file ptr into the buffer
returns the number of bytes read
buf_fread reads data from the file ptr into the buffer returns the number of bytes read
int buf_fread(BUF_T *buf, FILE *fp) {
  int remaining, rvalue;
  char *dest;
  remaining = (buf->limit - buf->position);
  if (remaining == 0) return 0;
  dest = (buf->buffer)+(buf->position);
  rvalue = fread(dest, sizeof(char), remaining, fp);
  if (rvalue > 0)
    buf->position += rvalue;
  return rvalue;
}
int buf_fread ( BUF_T * buf , FILE * fp ) { int remaining , rvalue ; char * dest ; remaining = ( buf -> limit - buf -> position ) ; if ( remaining == 0 ) return 0 ; dest = ( buf -> buffer ) + ( buf -> position ) ; rvalue = fread ( dest , sizeof ( char ) , remaining , fp ) ; if ( rvalue > 0 ) buf -> position += rvalue ; return rvalue ; }
buf_fread
 reads data from the file ptr into the buffer
 returns the number of bytes read
buf_fread reads data from the file ptr into the buffer returns the number of bytes read