memcpy -> memmove

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1278 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-03-09 12:55:31 +00:00
parent 42fab7d679
commit 85f5e1110d
36 changed files with 134 additions and 134 deletions

View File

@@ -227,7 +227,7 @@ void CFrameBuffer::init(const char * const fbDevice)
goto nolfb;
}
memcpy(&oldscreen, &screeninfo, sizeof(screeninfo));
memmove(&oldscreen, &screeninfo, sizeof(screeninfo));
if (ioctl(fd, FBIOGET_FSCREENINFO, &fix)<0) {
perror("FBIOGET_FSCREENINFO");
@@ -1484,7 +1484,7 @@ void CFrameBuffer::paintBackgroundBoxRel(int x, int y, int dx, int dy)
fb_pixel_t * bkpos = background + x + BACKGROUNDIMAGEWIDTH * y;
for(int count = 0;count < dy; count++)
{
memcpy(fbpos, bkpos, dx * sizeof(fb_pixel_t));
memmove(fbpos, bkpos, dx * sizeof(fb_pixel_t));
fbpos += stride;
bkpos += BACKGROUNDIMAGEWIDTH;
}
@@ -1499,7 +1499,7 @@ void CFrameBuffer::paintBackground()
if (useBackgroundPaint && (background != NULL))
{
for (int i = 0; i < 576; i++)
memcpy(((uint8_t *)getFrameBufferPointer()) + i * stride, (background + i * BACKGROUNDIMAGEWIDTH), BACKGROUNDIMAGEWIDTH * sizeof(fb_pixel_t));
memmove(((uint8_t *)getFrameBufferPointer()) + i * stride, (background + i * BACKGROUNDIMAGEWIDTH), BACKGROUNDIMAGEWIDTH * sizeof(fb_pixel_t));
}
else
{
@@ -1530,7 +1530,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m
fb_pixel_t * bkpos = memp;
for (int count = 0; count < dy; count++)
{
memcpy(bkpos, fbpos, dx * sizeof(fb_pixel_t));
memmove(bkpos, fbpos, dx * sizeof(fb_pixel_t));
fbpos += stride;
bkpos += dx;
}
@@ -1547,7 +1547,7 @@ void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * cons
fb_pixel_t * bkpos = memp;
for (int count = 0; count < dy; count++)
{
memcpy(fbpos, bkpos, dx * sizeof(fb_pixel_t));
memmove(fbpos, bkpos, dx * sizeof(fb_pixel_t));
fbpos += stride;
bkpos += dx;
}
@@ -1562,7 +1562,7 @@ void CFrameBuffer::switch_signal (int signal)
virtual_fb = new uint8_t[thiz->stride * thiz->yRes];
thiz->active = false;
if (virtual_fb != NULL)
memcpy(virtual_fb, thiz->lfb, thiz->stride * thiz->yRes);
memmove(virtual_fb, thiz->lfb, thiz->stride * thiz->yRes);
ioctl(thiz->tty, VT_RELDISP, 1);
printf ("release display\n");
}
@@ -1572,7 +1572,7 @@ void CFrameBuffer::switch_signal (int signal)
printf ("acquire display\n");
thiz->paletteSet(NULL);
if (virtual_fb != NULL)
memcpy(thiz->lfb, virtual_fb, thiz->stride * thiz->yRes);
memmove(thiz->lfb, virtual_fb, thiz->stride * thiz->yRes);
else
memset(thiz->lfb, 0, thiz->stride * thiz->yRes);
}
@@ -1674,7 +1674,7 @@ void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32
}
#if 0
for(int i = 0; i < yc; i++){
memcpy(clfb + (i + yoff)*stride + xoff*4, ip + (i + yp)*width + xp, xc*4);
memmove(clfb + (i + yoff)*stride + xoff*4, ip + (i + yp)*width + xp, xc*4);
}
#endif
}

View File

@@ -188,7 +188,7 @@ static int copy_template(uint8_t *dst, uint8_t *src, int len)
//-- reset buffer --
memset(dst, 0xFF, SIZE_TS_PKT);
//-- copy PMT template --
memcpy(dst, src, len);
memmove(dst, src, len);
return len;
}

View File

@@ -215,7 +215,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/)
while(ciptr->output_scanline < ciptr->output_height)
{
jpeg_read_scanlines(ciptr, &lb, 1);
memcpy(bp,lb,px*c);
memmove(bp,lb,px*c);
bp+=px*c;
}

View File

@@ -78,7 +78,7 @@ void blit2FB(void *fbbuff,
unsigned int stride = CFrameBuffer::getInstance()->getStride();
for(i = 0; i < yc; i++){
memcpy(lfb+(i+yoffs)*stride+xoffs*4, ip + (i+yp)*pic_xs+xp, xc*4);
memmove(lfb+(i+yoffs)*stride+xoffs*4, ip + (i+yp)*pic_xs+xp, xc*4);
}
}

View File

@@ -87,7 +87,7 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
{
if(DGifGetLine(gft,slb,px)==GIF_ERROR) mgrflush;
m_rend_gif_decodecolormap(slb,lb,cmap,cmaps,px);
memcpy(fbptr,lb,px*3);
memmove(fbptr,lb,px*3);
}
}
else
@@ -99,7 +99,7 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
{
if(DGifGetLine(gft,slb,px)==GIF_ERROR) mgrflush;
m_rend_gif_decodecolormap(slb,lb,cmap,cmaps,px);
memcpy(fbptr,lb,px*3);
memmove(fbptr,lb,px*3);
}
}
}

View File

@@ -203,7 +203,7 @@ int fh_jpeg_load_local(const char *filename,unsigned char **buffer,int* x,int* y
while(ciptr->output_scanline < ciptr->output_height)
{
jpeg_read_scanlines(ciptr, &lb, 1);
memcpy(bp,lb,px*c);
memmove(bp,lb,px*c);
bp+=px*c;
}

View File

@@ -380,9 +380,9 @@ void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b
for (int y = sy; y < sy + width; y++) {
for (int x = sx; x < sx + width; x++) {
memcpy (busy_buffer_wrk, fb + y * stride + x * cpp, cpp);
memmove (busy_buffer_wrk, fb + y * stride + x * cpp, cpp);
busy_buffer_wrk += cpp;
memcpy (fb + y * stride + x * cpp, fb_buffer, cpp);
memmove (fb + y * stride + x * cpp, fb_buffer, cpp);
}
}
m_busy_x = sx;
@@ -403,7 +403,7 @@ void CPictureViewer::hideBusy ()
for (int y = m_busy_y; y < m_busy_y + m_busy_width; y++) {
for (int x = m_busy_x; x < m_busy_x + m_busy_width; x++) {
memcpy (fb + y * stride + x * m_busy_cpp, busy_buffer_wrk, m_busy_cpp);
memmove (fb + y * stride + x * m_busy_cpp, busy_buffer_wrk, m_busy_cpp);
busy_buffer_wrk += m_busy_cpp;
}
}
@@ -624,7 +624,7 @@ unsigned char * CPictureViewer::Resize(unsigned char *orgin, int ox, int oy, int
for(i=0,k=0;i<dx;i++,k+=3)
{
ip=i*ox/dx*3;
memcpy(l+k, p+ip, 3);
memmove(l+k, p+ip, 3);
}
}
} else {

View File

@@ -21,7 +21,7 @@ unsigned char * simple_resize(unsigned char * orgin,int ox,int oy,int dx,int dy)
for(i=0,k=0;i<dx;i++,k+=3)
{
ip=i*ox/dx*3;
memcpy(l+k, p+ip, 3);
memmove(l+k, p+ip, 3);
}
}
free(orgin);

View File

@@ -86,7 +86,7 @@ void packet_stdout (int fd, unsigned char * buf, int count, void * /*p*/)
/* send buffer is not empty, so copy from
input buffer to get a complete packet */
if (writebuf_size) {
memcpy(writebuf + writebuf_size, buf, size);
memmove(writebuf + writebuf_size, buf, size);
bp = writebuf;
}
@@ -127,7 +127,7 @@ void packet_stdout (int fd, unsigned char * buf, int count, void * /*p*/)
* then store them in the send buffer and increase send
* buffer size */
if (count) {
memcpy(writebuf + writebuf_size, buf, count);
memmove(writebuf + writebuf_size, buf, count);
writebuf_size += count;
}
}