StudyGlib/app/src/main/cpp/study/buf.c
/**
 * vips_buf_set_dynamic:
 * @buf: the buffer
 * @mx: the size of the storage area
 *
 * Attach the buffer to a heap memory area. The buffer needs to have been
 * initialised. The memory area needs to be at least 4 bytes long.
 */
@buf: the buffer
@mx: the size of the storage area

Attach the buffer to a heap memory area. The buffer needs to have been
initialised. The memory area needs to be at least 4 bytes long.
@buf : the buffer @mx : the size of the storage area Attach the buffer to a heap memory area . The buffer needs to have been initialised . The memory area needs to be at least 4 bytes long .
void
vips_buf_set_dynamic( VipsBuf *buf, int mx )
{
	g_assert( mx >= 4 );
	if( buf->mx == mx && buf->dynamic ) 
		vips_buf_rewind( buf );
	else {
		vips_buf_destroy( buf );
		if( !(buf->base = VIPS_ARRAY( NULL, mx, char )) )
			buf->full = TRUE;
		else {
			buf->mx = mx;
			buf->dynamic = TRUE;
			vips_buf_rewind( buf );
		}
	}
}
void vips_buf_set_dynamic ( VipsBuf * buf , int mx ) { g_assert ( mx >= 4 ) ; if ( buf -> mx == mx && buf -> dynamic ) vips_buf_rewind ( buf ) ; else { vips_buf_destroy ( buf ) ; if ( ! ( buf -> base = VIPS_ARRAY ( NULL , mx , char ) ) ) buf -> full = TRUE ; else { buf -> mx = mx ; buf -> dynamic = TRUE ; vips_buf_rewind ( buf ) ; } } }
vips_buf_set_dynamic:
 @buf: the buffer
 @mx: the size of the storage area
vips_buf_set_dynamic : @buf : the buffer @mx : the size of the storage area
/* No change?
		 */ /* No error return, so just block writes.
			 */