FreeBSD/contrib/libxo/libxo/xo_encoder.c
/*
 * A couple of function varieties here, to allow for multiple
 * use cases.  This variant is for when the main program knows
 * its own encoder needs.
 */
A couple of function varieties here, to allow for multiple
use cases.  This variant is for when the main program knows
its own encoder needs.
A couple of function varieties here to allow for multiple use cases . This variant is for when the main program knows its own encoder needs .
xo_handle_t *
xo_encoder_create (const char *name, xo_xof_flags_t flags)
{
    xo_handle_t *xop;
    xop = xo_create(XO_STYLE_ENCODER, flags);
    if (xop) {
	if (xo_encoder_init(xop, name)) {
	    xo_destroy(xop);
	    xop = NULL;
	}
    }
    return xop;
}
xo_handle_t * xo_encoder_create ( const char * name , xo_xof_flags_t flags ) { xo_handle_t * xop ; xop = xo_create ( XO_STYLE_ENCODER , flags ) ; if ( xop ) { if ( xo_encoder_init ( xop , name ) ) { xo_destroy ( xop ) ; xop = NULL ; } } return xop ; }
A couple of function varieties here, to allow for multiple
 use cases.
A couple of function varieties here to allow for multiple use cases .