scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 1604bfd6b0da8e6757d423f5cf3dc528348cd4cb
parent 3f29c8c38c7c5eeb50eef5b20010955ef812bd86
Author: Quentin Rameau <quinq@fifth.space>
Date:   Wed, 22 Feb 2017 21:48:55 +0100

[libc] Sync src definitions to headers declarations

Diffstat:
Mlibc/src/memcpy.c | 2+-
Mlibc/src/strcat.c | 2+-
Mlibc/src/strcpy.c | 2+-
Mlibc/src/strncat.c | 2+-
Mlibc/src/strncpy.c | 2+-
Mlibc/src/strtok.c | 4++--
Mlibc/src/strxfrm.c | 2+-
7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libc/src/memcpy.c b/libc/src/memcpy.c @@ -3,7 +3,7 @@ #include <string.h> void * -memcpy(void *dst, const void *src, size_t n) +memcpy(void * restrict dst, const void * restrict src, size_t n) { char *s1 = dst; const char *s2 = src; diff --git a/libc/src/strcat.c b/libc/src/strcat.c @@ -3,7 +3,7 @@ #include <string.h> char * -strcat(char *dst, const char *src) +strcat(char * restrict dst, const char * restrict src) { char *ret = dst; diff --git a/libc/src/strcpy.c b/libc/src/strcpy.c @@ -3,7 +3,7 @@ #include <string.h> char * -strcpy(char *dst, const char *src) +strcpy(char * restrict dst, const char * restrict src) { char *ret = dst; diff --git a/libc/src/strncat.c b/libc/src/strncat.c @@ -3,7 +3,7 @@ #include <string.h> char * -strncat(char *dst, const char *src, size_t n) +strncat(char * restrict dst, const char * restrict src, size_t n) { char *ret = dst; diff --git a/libc/src/strncpy.c b/libc/src/strncpy.c @@ -3,7 +3,7 @@ #include <string.h> char * -strncpy(char *dst, const char *src, size_t n) +strncpy(char * restrict dst, const char * restrict src, size_t n) { char *ret = dst; diff --git a/libc/src/strtok.c b/libc/src/strtok.c @@ -3,11 +3,11 @@ #include <string.h> char * -strtok(const char *s, const char *delim) +strtok(char * restrict s, const char * restrict delim) { static char *line; - if (s) + if (s) line = s; if (!s && !line) return NULL; diff --git a/libc/src/strxfrm.c b/libc/src/strxfrm.c @@ -3,7 +3,7 @@ #include <string.h> size_t -strxfrm(char *dst, const char *src, size_t n) +strxfrm(char * restrict dst, const char * restrict src, size_t n) { size_t len = strlen(src);