PS2SDK
PS2 Homebrew Libraries
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  if (size / 4 != 0) {
21  const u32 *pSrc;
22  u32 *pDest;
23  int i;
24 
25  pDest = (u32 *)dest;
26  pSrc = (const u32 *)src;
27  for (i = 0; i < size; i += 4, pDest++, pSrc++)
28  *pDest = *pSrc;
29  }
30 
31  return 0;
32 }
33 #endif
34 
35 #ifdef F_kCopyBytes
36 int kCopyBytes(void *dest, const void *src, int size)
37 {
38  if (size != 0) {
39  const u8 *pSrc;
40  u8 *pDest;
41  int i;
42 
43  pDest = (u8 *)dest;
44  pSrc = (const u8 *)src;
45  for (i = 0; i < size; i++, pDest++, pSrc++)
46  *pDest = *pSrc;
47  }
48 
49  return 0;
50 }
51 #endif
kernel.h