imfilter.c
/* increase the number of available masks */
increase the number of available masks
increase the number of available masks
static void incnmask(void)
{
  int oldmax;
  if( ++nmask >= maxmask ){
    oldmax = maxmask;
    maxmask += MASKINC;
    masks = (RegionsMask)realloc(masks, maxmask*sizeof(RegionsMaskRec));
    memset(masks+oldmax, 0, (maxmask-oldmax)*sizeof(RegionsMaskRec));
  }
}
static void incnmask ( void ) { int oldmax ; if ( ++ nmask >= maxmask ) { oldmax = maxmask ; maxmask += MASKINC ; masks = ( RegionsMask ) realloc ( masks , maxmask * sizeof ( RegionsMaskRec ) ) ; memset ( masks + oldmax , 0 , ( maxmask - oldmax ) * sizeof ( RegionsMaskRec ) ) ; } }
increase the number of available masks
increase the number of available masks