openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/libsmartcols/src/column.c
int scols_column_set_wrapfunc(
    struct libscols_column* cl,
    size_t (*wrap_chunksize)(const struct libscols_column*, const char*, void*),
    char* (*wrap_nextchunk)(const struct libscols_column*, char*, void*),
    void* userdata)
{
    if (!cl)
        return -EINVAL;

    cl->wrap_nextchunk = wrap_nextchunk;
    cl->wrap_chunksize = wrap_chunksize;
    cl->wrapfunc_data = userdata;
    return 0;
}
/**
 * scols_column_set_wrapfunc:
 * @cl: a pointer to a struct libscols_column instance
 * @wrap_chunksize: function to return size of the largest chink of data
 * @wrap_nextchunk: function to return next zero terminated data
 * @userdata: optional stuff for callbacks
 *
 * Extends SCOLS_FL_WRAP and allows to set custom wrap function. The default
 * is to wrap by column size, but you can create functions to wrap for example
 * after \n or after words, etc.
 *
 * Returns: 0, a negative value in case of an error.
 *
 * Since: 2.29
 */
@cl: a pointer to a struct libscols_column instance
@wrap_chunksize: function to return size of the largest chink of data
@wrap_nextchunk: function to return next zero terminated data
@userdata: optional stuff for callbacks

Extends SCOLS_FL_WRAP and allows to set custom wrap function. The default
is to wrap by column size, but you can create functions to wrap for example
after \n or after words, etc.

0, a negative value in case of an error.


@cl : a pointer to a struct libscols_column instance @wrap_chunksize : function to return size of the largest chink of data @wrap_nextchunk : function to return next zero terminated data @userdata : optional stuff for callbacks Extends SCOLS_FL_WRAP and allows to set custom wrap function . The default is to wrap by column size but you can create functions to wrap for example after \ n or after words etc . 0 a negative value in case of an error .
int scols_column_set_wrapfunc(
    struct libscols_column* cl,
    size_t (*wrap_chunksize)(const struct libscols_column*, const char*, void*),
    char* (*wrap_nextchunk)(const struct libscols_column*, char*, void*),
    void* userdata)
{
    if (!cl)
        return -EINVAL;
    cl->wrap_nextchunk = wrap_nextchunk;
    cl->wrap_chunksize = wrap_chunksize;
    cl->wrapfunc_data = userdata;
    return 0;
}
int scols_column_set_wrapfunc ( struct libscols_column * cl , size_t ( * wrap_chunksize ) ( const struct libscols_column * , const char * , void * ) , char * ( * wrap_nextchunk ) ( const struct libscols_column * , char * , void * ) , void * userdata ) { if ( ! cl ) return - EINVAL ; cl -> wrap_nextchunk = wrap_nextchunk ; cl -> wrap_chunksize = wrap_chunksize ; cl -> wrapfunc_data = userdata ; return 0 ; }
scols_column_set_wrapfunc:
 @cl: a pointer to a struct libscols_column instance
 @wrap_chunksize: function to return size of the largest chink of data
 @wrap_nextchunk: function to return next zero terminated data
 @userdata: optional stuff for callbacks
scols_column_set_wrapfunc : @cl : a pointer to a struct libscols_column instance @wrap_chunksize : function to return size of the largest chink of data @wrap_nextchunk : function to return next zero terminated data @userdata : optional stuff for callbacks