src/pixcomp.c
l_int32
pixacompExtendArray(PIXAC  *pixac)
{
    PROCNAME("pixacompExtendArray");

    if (!pixac)
        return ERROR_INT("pixac not defined", procName, 1);

    if ((pixac->pixc = (PIXC **)reallocNew((void **)&pixac->pixc,
                            sizeof(PIXC *) * pixac->nalloc,
                            2 * sizeof(PIXC *) * pixac->nalloc)) == NULL)
        return ERROR_INT("new ptr array not returned", procName, 1);
    pixac->nalloc = 2 * pixac->nalloc;
    boxaExtendArray(pixac->boxa);
    return 0;
}
/*!
 *  pixacompExtendArray()
 *
 *      Input:  pixac
 *      Return: 0 if OK; 1 on error
 *
 *  Notes:
 *      (1) We extend the boxa array simultaneously.  This is
 *          necessary in case we are NOT adding boxes simultaneously
 *          with adding pixc.  We always want the sizes of the
 *          pixac and boxa ptr arrays to be equal.
 */
pixacompExtendArray()
Input:  pixac
Return: 0 if OK; 1 on error

(1) We extend the boxa array simultaneously.  This is
necessary in case we are NOT adding boxes simultaneously
with adding pixc.  We always want the sizes of the
pixac and boxa ptr arrays to be equal.
pixacompExtendArray () Input : pixac Return : 0 if OK ; 1 on error ( 1 ) We extend the boxa array simultaneously . This is necessary in case we are NOT adding boxes simultaneously with adding pixc . We always want the sizes of the pixac and boxa ptr arrays to be equal .
l_int32
pixacompExtendArray(PIXAC  *pixac)
{
    PROCNAME("pixacompExtendArray");
    if (!pixac)
        return ERROR_INT("pixac not defined", procName, 1);
    if ((pixac->pixc = (PIXC **)reallocNew((void **)&pixac->pixc,
                            sizeof(PIXC *) * pixac->nalloc,
                            2 * sizeof(PIXC *) * pixac->nalloc)) == NULL)
        return ERROR_INT("new ptr array not returned", procName, 1);
    pixac->nalloc = 2 * pixac->nalloc;
    boxaExtendArray(pixac->boxa);
    return 0;
}
l_int32 pixacompExtendArray ( PIXAC * pixac ) { PROCNAME ( " " ) ; if ( ! pixac ) return ERROR_INT ( " " , procName , 1 ) ; if ( ( pixac -> pixc = ( PIXC * * ) reallocNew ( ( void * * ) & pixac -> pixc , sizeof ( PIXC * ) * pixac -> nalloc , 2 * sizeof ( PIXC * ) * pixac -> nalloc ) ) == NULL ) return ERROR_INT ( " " , procName , 1 ) ; pixac -> nalloc = 2 * pixac -> nalloc ; boxaExtendArray ( pixac -> boxa ) ; return 0 ; }
pixacompExtendArray()
      Input:  pixac
      Return: 0 if OK; 1 on error
pixacompExtendArray () Input : pixac Return : 0 if OK ; 1 on error