comparison src/video/Xext/Xv/Xv.c @ 1338:604d73db6802

Removed uses of stdlib.h and string.h
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 09:29:18 +0000
parents 3692456e7b0f
children 19418e4422cb
comparison
equal deleted inserted replaced
1337:c687f06c7473 1338:604d73db6802
232 Xfree(buffer); 232 Xfree(buffer);
233 UnlockDisplay(dpy); 233 UnlockDisplay(dpy);
234 SyncHandle(); 234 SyncHandle();
235 return(XvBadAlloc); 235 return(XvBadAlloc);
236 } 236 }
237 (void)SDL_strncpy(name, u.string, size); 237 (void)strncpy(name, u.string, size);
238 name[size] = '\0'; 238 name[size] = '\0';
239 pa->name = name; 239 pa->name = name;
240 240
241 u.buffer += (size + 3) & ~3; 241 u.buffer += (size + 3) & ~3;
242 242
384 Xfree(buffer); 384 Xfree(buffer);
385 UnlockDisplay(dpy); 385 UnlockDisplay(dpy);
386 SyncHandle(); 386 SyncHandle();
387 return(XvBadAlloc); 387 return(XvBadAlloc);
388 } 388 }
389 SDL_strncpy(name, u.string, size); 389 strncpy(name, u.string, size);
390 name[size] = '\0'; 390 name[size] = '\0';
391 pe->name = name; 391 pe->name = name;
392 pe++; 392 pe++;
393 393
394 u.buffer += (size + 3) & ~3; 394 u.buffer += (size + 3) & ~3;
900 for(i = 0; i < rep.num_formats; i++) { 900 for(i = 0; i < rep.num_formats; i++) {
901 p_XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo); 901 p_XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo);
902 ret[i].id = Info.id; 902 ret[i].id = Info.id;
903 ret[i].type = Info.type; 903 ret[i].type = Info.type;
904 ret[i].byte_order = Info.byte_order; 904 ret[i].byte_order = Info.byte_order;
905 SDL_memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); 905 memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16);
906 ret[i].bits_per_pixel = Info.bpp; 906 ret[i].bits_per_pixel = Info.bpp;
907 ret[i].format = Info.format; 907 ret[i].format = Info.format;
908 ret[i].num_planes = Info.num_planes; 908 ret[i].num_planes = Info.num_planes;
909 ret[i].depth = Info.depth; 909 ret[i].depth = Info.depth;
910 ret[i].red_mask = Info.red_mask; 910 ret[i].red_mask = Info.red_mask;
917 ret[i].horz_u_period = Info.horz_u_period; 917 ret[i].horz_u_period = Info.horz_u_period;
918 ret[i].horz_v_period = Info.horz_v_period; 918 ret[i].horz_v_period = Info.horz_v_period;
919 ret[i].vert_y_period = Info.vert_y_period; 919 ret[i].vert_y_period = Info.vert_y_period;
920 ret[i].vert_u_period = Info.vert_u_period; 920 ret[i].vert_u_period = Info.vert_u_period;
921 ret[i].vert_v_period = Info.vert_v_period; 921 ret[i].vert_v_period = Info.vert_v_period;
922 SDL_memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); 922 memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32);
923 ret[i].scanline_order = Info.scanline_order; 923 ret[i].scanline_order = Info.scanline_order;
924 (*num)++; 924 (*num)++;
925 } 925 }
926 } else 926 } else
927 p_XEatData(dpy, rep.length << 2); 927 p_XEatData(dpy, rep.length << 2);