src/pixabasic.c
l_int32
pixaExtendArrayToSize(PIXA    *pixa,
                      l_int32  size)
{
    PROCNAME("pixaExtendArrayToSize");

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

    if (size > pixa->nalloc) {
        if ((pixa->pix = (PIX **)reallocNew((void **)&pixa->pix,
                                 sizeof(PIX *) * pixa->nalloc,
                                 size * sizeof(PIX *))) == NULL)
            return ERROR_INT("new ptr array not returned", procName, 1);
        pixa->nalloc = size;
    }
    return boxaExtendArrayToSize(pixa->boxa, size);
}
/*!
 *  pixaExtendArrayToSize()
 *
 *      Input:  pixa
 *      Return: 0 if OK; 1 on error
 *
 *  Notes:
 *      (1) If necessary, reallocs new pixa and boxa ptrs arrays to @size.
 *          The pixa and boxa ptr arrays must always be equal in size.
 */
pixaExtendArrayToSize()
Input:  pixa
Return: 0 if OK; 1 on error

(1) If necessary, reallocs new pixa and boxa ptrs arrays to @size.
The pixa and boxa ptr arrays must always be equal in size.
pixaExtendArrayToSize () Input : pixa Return : 0 if OK ; 1 on error ( 1 ) If necessary reallocs new pixa and boxa ptrs arrays to @size . The pixa and boxa ptr arrays must always be equal in size .
l_int32
pixaExtendArrayToSize(PIXA    *pixa,
                      l_int32  size)
{
    PROCNAME("pixaExtendArrayToSize");
    if (!pixa)
        return ERROR_INT("pixa not defined", procName, 1);
    if (size > pixa->nalloc) {
        if ((pixa->pix = (PIX **)reallocNew((void **)&pixa->pix,
                                 sizeof(PIX *) * pixa->nalloc,
                                 size * sizeof(PIX *))) == NULL)
            return ERROR_INT("new ptr array not returned", procName, 1);
        pixa->nalloc = size;
    }
    return boxaExtendArrayToSize(pixa->boxa, size);
}
l_int32 pixaExtendArrayToSize ( PIXA * pixa , l_int32 size ) { PROCNAME ( " " ) ; if ( ! pixa ) return ERROR_INT ( " " , procName , 1 ) ; if ( size > pixa -> nalloc ) { if ( ( pixa -> pix = ( PIX * * ) reallocNew ( ( void * * ) & pixa -> pix , sizeof ( PIX * ) * pixa -> nalloc , size * sizeof ( PIX * ) ) ) == NULL ) return ERROR_INT ( " " , procName , 1 ) ; pixa -> nalloc = size ; } return boxaExtendArrayToSize ( pixa -> boxa , size ) ; }
pixaExtendArrayToSize()
      Input:  pixa
      Return: 0 if OK; 1 on error
pixaExtendArrayToSize () Input : pixa Return : 0 if OK ; 1 on error