src/ptra.c
void *
ptraRemoveLast(L_PTRA  *pa)
{
l_int32  imax;

    PROCNAME("ptraRemoveLast");

    if (!pa)
        return (void *)ERROR_PTR("pa not defined", procName, NULL);

        /* Remove the last item in the array.  No compaction is required. */
    ptraGetMaxIndex(pa, &imax);
    if (imax >= 0)
        return ptraRemove(pa, imax, L_NO_COMPACTION);
    else  /* empty */
        return NULL;
}
/*!
 *  ptraRemoveLast()
 *
 *      Input:  ptra
 *      Return: item, or null on error or if the array is empty
 */
ptraRemoveLast()
Input:  ptra
Return: item, or null on error or if the array is empty
ptraRemoveLast () Input : ptra Return : item or null on error or if the array is empty
void *
ptraRemoveLast(L_PTRA  *pa)
{
l_int32  imax;
    PROCNAME("ptraRemoveLast");
    if (!pa)
        return (void *)ERROR_PTR("pa not defined", procName, NULL);
    ptraGetMaxIndex(pa, &imax);
    if (imax >= 0)
        return ptraRemove(pa, imax, L_NO_COMPACTION);
    else  
        return NULL;
}
void * ptraRemoveLast ( L_PTRA * pa ) { l_int32 imax ; PROCNAME ( " " ) ; if ( ! pa ) return ( void * ) ERROR_PTR ( " " , procName , NULL ) ; ptraGetMaxIndex ( pa , & imax ) ; if ( imax >= 0 ) return ptraRemove ( pa , imax , L_NO_COMPACTION ) ; else return NULL ; }
ptraRemoveLast()
      Input:  ptra
      Return: item, or null on error or if the array is empty
ptraRemoveLast () Input : ptra Return : item or null on error or if the array is empty
/* Remove the last item in the array.  No compaction is required. */ /* empty */