Added all ISO C functions

This commit is contained in:
Gitea 2020-12-16 17:39:56 -06:00
parent b93d34176f
commit 9922fa882d

View file

@ -15,7 +15,9 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <types/size_t.h> #include <types/size_t.h>
#ifdef _POSIX_C_SOURCE
#include <types/locale_t.h> #include <types/locale_t.h>
#endif
#ifndef NULL #ifndef NULL
#define NULL (void *) 0 #define NULL (void *) 0
@ -25,19 +27,36 @@
void * memcpy(void * __restrict, const void * __restrict, size_t); void * memcpy(void * __restrict, const void * __restrict, size_t);
void * memmove(void *, const void *, size_t); void * memmove(void *, const void *, size_t);
char * strcpy(char * restrict, const char * restrict);
char * strncpy(char * restrict, const char * restrict, size_t);
/* Concatenation Functions (ISO C Std. 7.24.3) */ /* Concatenation Functions (ISO C Std. 7.24.3) */
char * strcat(char * restrict, const char * restrict); char * strcat(char * restrict, const char * restrict);
char * strncat(char * restrict, const char * restrict, size_t);
/* Comparison Functions (ISO C Std. 7.24.4) */ /* Comparison Functions (ISO C Std. 7.24.4) */
int memcmp(const void *, const void *, size_t); int memcmp(const void *, const void *, size_t);
int strcmp(const char *, const char *); int strcmp(const char *, const char *);
int strncmp(const char *, const char *, size_t);
int strcoll(const char *, const char *);
size_t strxfrm(char * restrict, const char * restrict, size_t);
/* Search Functions (ISO C Std. 7.24.5) */ /* Search Functions (ISO C Std. 7.24.5) */
void * memchr(const void *, int, size_t);
char * strchr(const char *, int);
size_t strcspn(const char *, const char *); size_t strcspn(const char *, const char *);
char * strpbrk(const char *, const char *);
char * strrchr(const char *, int);
size_t strspn(const char *, const char *);
char * strstr(const char *, const char *);
char * strtok(char * restrict, char * restrict); char * strtok(char * restrict, char * restrict);
/* Miscellaneous Functions (ISO C Std. 7.24.6) */ /* Miscellaneous Functions (ISO C Std. 7.24.6) */
void * memset(void *, int, size_t); void * memset(void *, int, size_t);
char * strerror(int);
size_t strlen(const char *); size_t strlen(const char *);
#endif #endif