ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
setup.c
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Licenced under Academic Free License version 2.0
7 # Review ps2sdk README & LICENSE files for further details.
8 */
9 
15 #include <kernel.h>
16 
17 #ifdef F_kCopy
18 int kCopy(void *dest, const void *src, int size)
19 {
20  const u32 *pSrc;
21  u32 *pDest;
22  int i;
23 
24  if(size/4 != 0)
25  {
26  pDest = (u32*)dest;
27  pSrc = (const u32*)src;
28  for(i=0; i<size; i+=4,pDest++,pSrc++)
29  *pDest = *pSrc;
30  }
31 
32  return 0;
33 }
34 #endif
35 
36 #ifdef F_kCopyBytes
37 int kCopyBytes(void *dest, const void *src, int size)
38 {
39  const u8 *pSrc;
40  u8 *pDest;
41  int i;
42 
43  if(size != 0)
44  {
45  pDest = (u8*)dest;
46  pSrc = (const u8*)src;
47  for(i=0; i<size; i++,pDest++,pSrc++)
48  *pDest = *pSrc;
49  }
50 
51  return 0;
52 }
53 #endif
int kCopy(void *dest, const void *src, int size)
int kCopyBytes(void *dest, const void *src, int size)
unsigned int u32
Definition: tamtypes.h:30
unsigned char u8
Definition: tamtypes.h:23