ref: c48e71febf29a4600bc77c3e49390961bb718123
parent: 148abca828d1f6d5c4cb8753405c398082f77208
parent: ed0f4a4a51ad8c14419c98c43411bbdffb0346c6
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Apr 29 08:07:17 EDT 2020
Merge remote-tracking branch 'origin/master' into HEAD
--- /dev/null
+++ b/include/iso646.h
@@ -1,0 +1,16 @@
+#ifndef _ISO646_H
+#define _ISO646_H
+
+#define and &&
+#define and_eq &=
+#define bitand &
+#define bitor |
+#define compl ~
+#define not !
+#define not_eq !=
+#define or ||
+#define or_eq |=
+#define xor ^
+#define xor_eq ^=
+
+#endif
--- a/include/string.h
+++ b/include/string.h
@@ -29,6 +29,5 @@
extern void *memset(void *s, int c, size_t n);
extern char *strerror(int errnum);
extern size_t strlen(const char *s);
-extern size_t strnlen(const char *s, size_t maxlen);
#endif
--- a/src/libc/string/Makefile
+++ b/src/libc/string/Makefile
@@ -15,7 +15,6 @@
strncat.$O\
strncmp.$O\
strncpy.$O\
- strnlen.$O\
strpbrk.$O\
strrchr.$O\
strspn.$O\
--- a/src/libc/string/strnlen.c
+++ /dev/null
@@ -1,13 +1,0 @@
-#include <string.h>
-
-#undef strnlen
-
-size_t
-strnlen(const char *s, size_t maxlen)
-{
- size_t n;
-
- for (n = 0; n < maxlen && *s++; ++n)
- ;
- return n;
-}