aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-09-22 21:36:29 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-09-22 21:36:29 +0200
commit86f0064afb8200e60dd80827535cac30d0eab028 (patch)
treec7ef61653b157b69fb0956709366996ddbc4ecfa /libpsn00b/include
parent5746b6ef9df16447d78e77d00ad21a4dba0fe169 (diff)
downloadpsn00bsdk-86f0064afb8200e60dd80827535cac30d0eab028.tar.gz
Update version number, clean up old headers
Diffstat (limited to 'libpsn00b/include')
-rw-r--r--libpsn00b/include/ctype.h23
-rw-r--r--libpsn00b/include/gtereg.inc (renamed from libpsn00b/include/gtereg.h)0
-rw-r--r--libpsn00b/include/hwregs_a.inc (renamed from libpsn00b/include/hwregs_a.h)0
-rw-r--r--libpsn00b/include/inline_s.inc (renamed from libpsn00b/include/inline_s.h)0
-rw-r--r--libpsn00b/include/string.h20
-rw-r--r--libpsn00b/include/strings.h23
6 files changed, 34 insertions, 32 deletions
diff --git a/libpsn00b/include/ctype.h b/libpsn00b/include/ctype.h
index b79498a..24ee9d9 100644
--- a/libpsn00b/include/ctype.h
+++ b/libpsn00b/include/ctype.h
@@ -1,7 +1,20 @@
-#ifndef _CTYPE_H
-#define _CTYPE_H
+/*
+ * PSn00bSDK standard library
+ * (C) 2019-2022 PSXSDK authors, Lameguy64, spicyjpeg - MPL licensed
+ */
-extern int tolower(int chr);
-extern int toupper(int chr);
+#ifndef __CTYPE_H
+#define __CTYPE_H
-#endif \ No newline at end of file
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int tolower(int chr);
+int toupper(int chr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libpsn00b/include/gtereg.h b/libpsn00b/include/gtereg.inc
index 0d051fc..0d051fc 100644
--- a/libpsn00b/include/gtereg.h
+++ b/libpsn00b/include/gtereg.inc
diff --git a/libpsn00b/include/hwregs_a.h b/libpsn00b/include/hwregs_a.inc
index c78b41a..c78b41a 100644
--- a/libpsn00b/include/hwregs_a.h
+++ b/libpsn00b/include/hwregs_a.inc
diff --git a/libpsn00b/include/inline_s.h b/libpsn00b/include/inline_s.inc
index 68e0d07..68e0d07 100644
--- a/libpsn00b/include/inline_s.h
+++ b/libpsn00b/include/inline_s.inc
diff --git a/libpsn00b/include/string.h b/libpsn00b/include/string.h
index 365d238..ceee066 100644
--- a/libpsn00b/include/string.h
+++ b/libpsn00b/include/string.h
@@ -1,13 +1,10 @@
/*
- * string.h
- *
- * Prototypes for string functions of the C library
- *
- * PSXSDK
+ * PSn00bSDK standard library
+ * (C) 2019-2022 PSXSDK authors, Lameguy64, spicyjpeg - MPL licensed
*/
-#ifndef _STRING_H
-#define _STRING_H
+#ifndef __STRING_H
+#define __STRING_H
#ifdef __cplusplus
extern "C" {
@@ -19,11 +16,6 @@ char *strpbrk(const char *dst , const char *src);
char *strtok(char *s , char *set);
char *strstr(const char *big , const char *little);
-//int strspn(char *s , char *set);
-//int strcspn(char *s , char *set);
-//int index(char *s , int c);
-//int rindex(char *s , int c);
-
char *strcat(char *s , const char *append);
char *strncat(char *s , const char *append, int n);
char *strcpy(char *dst , const char *src);
@@ -34,9 +26,6 @@ char *strrchr(const char *s , int c);
void *memmove(void *dst , const void *src , int n);
void *memchr(void *s , int c , int n);
-
-// Functions converted to ASM
-
void *memcpy(void *dst , const void *src , int n);
void *memset(void *dst , char c , int n);
int memcmp(const void *b1 , const void *b2 , int n);
@@ -46,4 +35,3 @@ int memcmp(const void *b1 , const void *b2 , int n);
#endif
#endif
-
diff --git a/libpsn00b/include/strings.h b/libpsn00b/include/strings.h
index e5e88d4..7223ab9 100644
--- a/libpsn00b/include/strings.h
+++ b/libpsn00b/include/strings.h
@@ -1,18 +1,19 @@
-/*
- * strings.h
- *
- * PSXSDK
+/*
+ * PSn00bSDK standard library
+ * (C) 2019-2022 PSXSDK authors, Lameguy64, spicyjpeg - MPL licensed
*/
-#ifndef _STRINGS_H
-#define _STRINGS_H
+#ifndef __STRINGS_H
+#define __STRINGS_H
#include <string.h>
-#define bcopy(src,dst,len) memmove(dst,src,len)
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcmp(b1,b2,len) memcmp(b1,b2,len)
-#define index(s, c) strchr(s, c)
-#define rindex(s, c) strrchr(s, c)
+/* Compatibility macros (this header is useless) */
+
+#define bcopy(src, dst, len) memmove(dst, src, len)
+#define bzero(ptr, len) memset(ptr, 0, len)
+#define bcmp(b1, b2, len) memcmp(b1, b2, len)
+#define index(s, c) strchr(s, c)
+#define rindex(s, c) strrchr(s, c)
#endif