Branch: Tag:

2014-09-03

2014-09-03 18:14:04 by Martin Nilsson <nilsson@opera.com>

memcpy is C89 and 4.3BSD

129:    size -= 1;    while (size>increment)    { -  MEMCPY(dest,from,increment*sizeof(rgb_group)); +  memcpy(dest,from,increment*sizeof(rgb_group));    size-=increment,dest+=increment;    if (increment<1024) increment *= 2;    } -  if(size>0) MEMCPY(dest,from,size*sizeof(rgb_group)); +  if(size>0) memcpy(dest,from,size*sizeof(rgb_group));    }    THREADS_DISALLOW();   }
162:    if(!length)    break; /* Break to the while(0). */    for(x=0; x<length; x++) *(foo+x) = rgb; -  while(--y) MEMCPY((foo+=xs), from, length*sizeof(rgb_group)); +  while(--y) memcpy((foo+=xs), from, length*sizeof(rgb_group));    } while(0);    THREADS_DISALLOW();    }
189:       THREADS_ALLOW();    if(!moddest && !modsrc) -  MEMCPY(dest,src,sizeof(rgb_group)*width*lines); +  memcpy(dest,src,sizeof(rgb_group)*width*lines);    else    while (lines--)    { -  MEMCPY(dest,src,sizeof(rgb_group)*width); +  memcpy(dest,src,sizeof(rgb_group)*width);    dest+=moddest;    src+=modsrc;    }
222:    {    *dest=*img;    THREADS_ALLOW(); -  MEMCPY(new,img->img,(x2-x1+1)*(y2-y1+1)*sizeof(rgb_group)); +  memcpy(new,img->img,(x2-x1+1)*(y2-y1+1)*sizeof(rgb_group));    THREADS_DISALLOW();    dest->img=new;    return;
261:    if (newimg->img) free(newimg->img);    newimg->img=xalloc(sizeof(rgb_group)*img->xsize*img->ysize+RGB_VEC_PAD);    THREADS_ALLOW(); -  MEMCPY(newimg->img,img->img,sizeof(rgb_group)*img->xsize*img->ysize); +  memcpy(newimg->img,img->img,sizeof(rgb_group)*img->xsize*img->ysize);    THREADS_DISALLOW();    newimg->xsize=img->xsize;    newimg->ysize=img->ysize;