cextern/cfitsio/lib/eval_l.c
/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c FF_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
Allocate and initialize an input buffer state.
@param file A readable stream.
@param size The character buffer size in bytes. When in doubt, use @c FF_BUF_SIZE.

@return the allocated buffer state.
Allocate and initialize an input buffer state . @param file A readable stream . @param size The character buffer size in bytes . When in doubt use @c FF_BUF_SIZE . @return the allocated buffer state .
FF_BUFFER_STATE ff_create_buffer  (FILE * file, int  size )
{
	FF_BUFFER_STATE b;
	b = (FF_BUFFER_STATE) ffalloc(sizeof( struct ff_buffer_state )  );
	if ( ! b )
		FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" );
	b->ff_buf_size = size;
	b->ff_ch_buf = (char *) ffalloc(b->ff_buf_size + 2  );
	if ( ! b->ff_ch_buf )
		FF_FATAL_ERROR( "out of dynamic memory in ff_create_buffer()" );
	b->ff_is_our_buffer = 1;
	ff_init_buffer(b,file );
	return b;
}
FF_BUFFER_STATE ff_create_buffer ( FILE * file , int size ) { FF_BUFFER_STATE b ; b = ( FF_BUFFER_STATE ) ffalloc ( sizeof ( struct ff_buffer_state ) ) ; if ( ! b ) FF_FATAL_ERROR ( " " ) ; b -> ff_buf_size = size ; b -> ff_ch_buf = ( char * ) ffalloc ( b -> ff_buf_size + 2 ) ; if ( ! b -> ff_ch_buf ) FF_FATAL_ERROR ( " " ) ; b -> ff_is_our_buffer = 1 ; ff_init_buffer ( b , file ) ; return b ; }
Allocate and initialize an input buffer state.
Allocate and initialize an input buffer state .
/* ff_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */