aboutsummaryrefslogtreecommitdiff
path: root/src/string
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-01-04 20:36:02 -0300
committerEuAndreh <eu@euandre.org>2024-01-05 05:47:09 -0300
commit8492f115890d56c98c1da24b9fdf26bb1b714c05 (patch)
tree7d90469d2aff11c2e4c8e99e7b46aa8e8eb43008 /src/string
parentFix the build system. (diff)
downloadgrovel-8492f115890d56c98c1da24b9fdf26bb1b714c05.tar.gz
grovel-8492f115890d56c98c1da24b9fdf26bb1b714c05.tar.xz
Setup stub unit test infrastructure
Diffstat (limited to 'src/string')
-rw-r--r--src/string/bcmp.c8
-rw-r--r--src/string/bcopy.c8
-rw-r--r--src/string/bzero.c8
-rw-r--r--src/string/explicit_bzero.c8
-rw-r--r--src/string/index.c8
-rw-r--r--src/string/memccpy.c8
-rw-r--r--src/string/memchr.c8
-rw-r--r--src/string/memcmp.c8
-rw-r--r--src/string/memmem.c8
-rw-r--r--src/string/mempcpy.c8
-rw-r--r--src/string/memrchr.c8
-rw-r--r--src/string/rindex.c8
-rw-r--r--src/string/stpcpy.c8
-rw-r--r--src/string/stpncpy.c8
-rw-r--r--src/string/strcasecmp.c8
-rw-r--r--src/string/strcasestr.c8
-rw-r--r--src/string/strcat.c8
-rw-r--r--src/string/strchr.c8
-rw-r--r--src/string/strchrnul.c8
-rw-r--r--src/string/strcmp.c8
-rw-r--r--src/string/strcpy.c8
-rw-r--r--src/string/strcspn.c8
-rw-r--r--src/string/strdup.c8
-rw-r--r--src/string/strerror_r.c8
-rw-r--r--src/string/strlcat.c8
-rw-r--r--src/string/strlcpy.c8
-rw-r--r--src/string/strlen.c8
-rw-r--r--src/string/strncasecmp.c8
-rw-r--r--src/string/strncat.c8
-rw-r--r--src/string/strncmp.c8
-rw-r--r--src/string/strncpy.c8
-rw-r--r--src/string/strndup.c8
-rw-r--r--src/string/strnlen.c8
-rw-r--r--src/string/strpbrk.c8
-rw-r--r--src/string/strrchr.c8
-rw-r--r--src/string/strsep.c8
-rw-r--r--src/string/strsignal.c8
-rw-r--r--src/string/strspn.c8
-rw-r--r--src/string/strstr.c8
-rw-r--r--src/string/strtok.c8
-rw-r--r--src/string/strtok_r.c8
-rw-r--r--src/string/strverscmp.c8
-rw-r--r--src/string/swab.c8
-rw-r--r--src/string/wcpcpy.c8
-rw-r--r--src/string/wcpncpy.c8
-rw-r--r--src/string/wcscasecmp.c8
-rw-r--r--src/string/wcscasecmp_l.c8
-rw-r--r--src/string/wcscat.c8
-rw-r--r--src/string/wcschr.c8
-rw-r--r--src/string/wcscmp.c8
-rw-r--r--src/string/wcscpy.c8
-rw-r--r--src/string/wcscspn.c8
-rw-r--r--src/string/wcsdup.c8
-rw-r--r--src/string/wcslen.c8
-rw-r--r--src/string/wcsncasecmp.c8
-rw-r--r--src/string/wcsncasecmp_l.c8
-rw-r--r--src/string/wcsncat.c8
-rw-r--r--src/string/wcsncmp.c8
-rw-r--r--src/string/wcsncpy.c8
-rw-r--r--src/string/wcsnlen.c8
-rw-r--r--src/string/wcspbrk.c8
-rw-r--r--src/string/wcsrchr.c8
-rw-r--r--src/string/wcsspn.c8
-rw-r--r--src/string/wcsstr.c8
-rw-r--r--src/string/wcstok.c8
-rw-r--r--src/string/wcswcs.c8
-rw-r--r--src/string/wmemchr.c8
-rw-r--r--src/string/wmemcmp.c8
-rw-r--r--src/string/wmemcpy.c8
-rw-r--r--src/string/wmemmove.c8
-rw-r--r--src/string/wmemset.c8
71 files changed, 568 insertions, 0 deletions
diff --git a/src/string/bcmp.c b/src/string/bcmp.c
index 87c6007e..013b1f41 100644
--- a/src/string/bcmp.c
+++ b/src/string/bcmp.c
@@ -6,3 +6,11 @@ int bcmp(const void *s1, const void *s2, size_t n)
{
return memcmp(s1, s2, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/bcopy.c b/src/string/bcopy.c
index a07129f5..7340f66d 100644
--- a/src/string/bcopy.c
+++ b/src/string/bcopy.c
@@ -6,3 +6,11 @@ void bcopy(const void *s1, void *s2, size_t n)
{
memmove(s2, s1, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/bzero.c b/src/string/bzero.c
index ba536b07..fbc0eb1b 100644
--- a/src/string/bzero.c
+++ b/src/string/bzero.c
@@ -6,3 +6,11 @@ void bzero(void *s, size_t n)
{
memset(s, 0, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/explicit_bzero.c b/src/string/explicit_bzero.c
index f2e12f23..43894b2d 100644
--- a/src/string/explicit_bzero.c
+++ b/src/string/explicit_bzero.c
@@ -6,3 +6,11 @@ void explicit_bzero(void *d, size_t n)
d = memset(d, 0, n);
__asm__ __volatile__ ("" : : "r"(d) : "memory");
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/index.c b/src/string/index.c
index 252948f9..2060e37b 100644
--- a/src/string/index.c
+++ b/src/string/index.c
@@ -6,3 +6,11 @@ char *index(const char *s, int c)
{
return strchr(s, c);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/memccpy.c b/src/string/memccpy.c
index 3b0a3700..8e88aeb0 100644
--- a/src/string/memccpy.c
+++ b/src/string/memccpy.c
@@ -32,3 +32,11 @@ tail:
if (n) return d+1;
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/memchr.c b/src/string/memchr.c
index 65f0d789..1db4be7c 100644
--- a/src/string/memchr.c
+++ b/src/string/memchr.c
@@ -25,3 +25,11 @@ void *memchr(const void *src, int c, size_t n)
for (; n && *s != c; s++, n--);
return n ? (void *)s : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/memcmp.c b/src/string/memcmp.c
index bdbce9f0..3f2c9e06 100644
--- a/src/string/memcmp.c
+++ b/src/string/memcmp.c
@@ -6,3 +6,11 @@ int memcmp(const void *vl, const void *vr, size_t n)
for (; n && *l == *r; n--, l++, r++);
return n ? *l-*r : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/memmem.c b/src/string/memmem.c
index 11eff86e..d1db1aaa 100644
--- a/src/string/memmem.c
+++ b/src/string/memmem.c
@@ -147,3 +147,11 @@ void *memmem(const void *h0, size_t k, const void *n0, size_t l)
return twoway_memmem(h, h+k, n, l);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/mempcpy.c b/src/string/mempcpy.c
index a297985e..10577abf 100644
--- a/src/string/mempcpy.c
+++ b/src/string/mempcpy.c
@@ -5,3 +5,11 @@ void *mempcpy(void *dest, const void *src, size_t n)
{
return (char *)memcpy(dest, src, n) + n;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/memrchr.c b/src/string/memrchr.c
index e51748b8..944f6ee8 100644
--- a/src/string/memrchr.c
+++ b/src/string/memrchr.c
@@ -9,3 +9,11 @@ void *__memrchr(const void *m, int c, size_t n)
}
weak_alias(__memrchr, memrchr);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/rindex.c b/src/string/rindex.c
index 693c750b..8dd88590 100644
--- a/src/string/rindex.c
+++ b/src/string/rindex.c
@@ -6,3 +6,11 @@ char *rindex(const char *s, int c)
{
return strrchr(s, c);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/stpcpy.c b/src/string/stpcpy.c
index 4db46a9e..013d5baa 100644
--- a/src/string/stpcpy.c
+++ b/src/string/stpcpy.c
@@ -27,3 +27,11 @@ char *__stpcpy(char *restrict d, const char *restrict s)
}
weak_alias(__stpcpy, stpcpy);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/stpncpy.c b/src/string/stpncpy.c
index f57fa6b7..16717f9e 100644
--- a/src/string/stpncpy.c
+++ b/src/string/stpncpy.c
@@ -30,3 +30,11 @@ tail:
weak_alias(__stpncpy, stpncpy);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcasecmp.c b/src/string/strcasecmp.c
index 002c6aa1..4973ebea 100644
--- a/src/string/strcasecmp.c
+++ b/src/string/strcasecmp.c
@@ -14,3 +14,11 @@ int __strcasecmp_l(const char *l, const char *r, locale_t loc)
}
weak_alias(__strcasecmp_l, strcasecmp_l);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcasestr.c b/src/string/strcasestr.c
index af109f36..c5eb6f08 100644
--- a/src/string/strcasestr.c
+++ b/src/string/strcasestr.c
@@ -7,3 +7,11 @@ char *strcasestr(const char *h, const char *n)
for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h;
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcat.c b/src/string/strcat.c
index 33f749b1..79834243 100644
--- a/src/string/strcat.c
+++ b/src/string/strcat.c
@@ -5,3 +5,11 @@ char *strcat(char *restrict dest, const char *restrict src)
strcpy(dest + strlen(dest), src);
return dest;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strchr.c b/src/string/strchr.c
index 3cbc828b..a8d3fad9 100644
--- a/src/string/strchr.c
+++ b/src/string/strchr.c
@@ -5,3 +5,11 @@ char *strchr(const char *s, int c)
char *r = __strchrnul(s, c);
return *(unsigned char *)r == (unsigned char)c ? r : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strchrnul.c b/src/string/strchrnul.c
index 39e2635b..8cc84e63 100644
--- a/src/string/strchrnul.c
+++ b/src/string/strchrnul.c
@@ -26,3 +26,11 @@ char *__strchrnul(const char *s, int c)
}
weak_alias(__strchrnul, strchrnul);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcmp.c b/src/string/strcmp.c
index 808bd837..ae71867e 100644
--- a/src/string/strcmp.c
+++ b/src/string/strcmp.c
@@ -5,3 +5,11 @@ int strcmp(const char *l, const char *r)
for (; *l==*r && *l; l++, r++);
return *(unsigned char *)l - *(unsigned char *)r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcpy.c b/src/string/strcpy.c
index 6668a129..5f6e78a9 100644
--- a/src/string/strcpy.c
+++ b/src/string/strcpy.c
@@ -5,3 +5,11 @@ char *strcpy(char *restrict dest, const char *restrict src)
__stpcpy(dest, src);
return dest;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strcspn.c b/src/string/strcspn.c
index a0c617bd..6eb4bf87 100644
--- a/src/string/strcspn.c
+++ b/src/string/strcspn.c
@@ -15,3 +15,11 @@ size_t strcspn(const char *s, const char *c)
for (; *s && !BITOP(byteset, *(unsigned char *)s, &); s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strdup.c b/src/string/strdup.c
index d4c27449..afc85a6f 100644
--- a/src/string/strdup.c
+++ b/src/string/strdup.c
@@ -8,3 +8,11 @@ char *strdup(const char *s)
if (!d) return NULL;
return memcpy(d, s, l+1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strerror_r.c b/src/string/strerror_r.c
index 1dc88bb1..8d2e3bda 100644
--- a/src/string/strerror_r.c
+++ b/src/string/strerror_r.c
@@ -17,3 +17,11 @@ int strerror_r(int err, char *buf, size_t buflen)
}
weak_alias(strerror_r, __xpg_strerror_r);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strlcat.c b/src/string/strlcat.c
index ef81209e..ffb2ed65 100644
--- a/src/string/strlcat.c
+++ b/src/string/strlcat.c
@@ -7,3 +7,11 @@ size_t strlcat(char *d, const char *s, size_t n)
if (l == n) return l + strlen(s);
return l + strlcpy(d+l, s, n-l);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strlcpy.c b/src/string/strlcpy.c
index ffa0b0b0..177d2857 100644
--- a/src/string/strlcpy.c
+++ b/src/string/strlcpy.c
@@ -32,3 +32,11 @@ size_t strlcpy(char *d, const char *s, size_t n)
finish:
return d-d0 + strlen(s);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strlen.c b/src/string/strlen.c
index 309990f0..8564046c 100644
--- a/src/string/strlen.c
+++ b/src/string/strlen.c
@@ -20,3 +20,11 @@ size_t strlen(const char *s)
for (; *s; s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strncasecmp.c b/src/string/strncasecmp.c
index e0ef93c2..3faafdbf 100644
--- a/src/string/strncasecmp.c
+++ b/src/string/strncasecmp.c
@@ -15,3 +15,11 @@ int __strncasecmp_l(const char *l, const char *r, size_t n, locale_t loc)
}
weak_alias(__strncasecmp_l, strncasecmp_l);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strncat.c b/src/string/strncat.c
index 01ca2a23..9f8f8ad6 100644
--- a/src/string/strncat.c
+++ b/src/string/strncat.c
@@ -8,3 +8,11 @@ char *strncat(char *restrict d, const char *restrict s, size_t n)
*d++ = 0;
return a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strncmp.c b/src/string/strncmp.c
index e228843f..1a0264f5 100644
--- a/src/string/strncmp.c
+++ b/src/string/strncmp.c
@@ -7,3 +7,11 @@ int strncmp(const char *_l, const char *_r, size_t n)
for (; *l && *r && n && *l == *r ; l++, r++, n--);
return *l - *r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strncpy.c b/src/string/strncpy.c
index 545892e6..5056eb83 100644
--- a/src/string/strncpy.c
+++ b/src/string/strncpy.c
@@ -5,3 +5,11 @@ char *strncpy(char *restrict d, const char *restrict s, size_t n)
__stpncpy(d, s, n);
return d;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strndup.c b/src/string/strndup.c
index 617d27ba..ac9c5ea3 100644
--- a/src/string/strndup.c
+++ b/src/string/strndup.c
@@ -10,3 +10,11 @@ char *strndup(const char *s, size_t n)
d[l] = 0;
return d;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strnlen.c b/src/string/strnlen.c
index 6442eb79..ecfeefa1 100644
--- a/src/string/strnlen.c
+++ b/src/string/strnlen.c
@@ -5,3 +5,11 @@ size_t strnlen(const char *s, size_t n)
const char *p = memchr(s, 0, n);
return p ? p-s : n;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strpbrk.c b/src/string/strpbrk.c
index 55947c64..144deb03 100644
--- a/src/string/strpbrk.c
+++ b/src/string/strpbrk.c
@@ -5,3 +5,11 @@ char *strpbrk(const char *s, const char *b)
s += strcspn(s, b);
return *s ? (char *)s : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strrchr.c b/src/string/strrchr.c
index 98ad1b04..b5530515 100644
--- a/src/string/strrchr.c
+++ b/src/string/strrchr.c
@@ -4,3 +4,11 @@ char *strrchr(const char *s, int c)
{
return __memrchr(s, c, strlen(s) + 1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strsep.c b/src/string/strsep.c
index cb37c32e..c5e853d9 100644
--- a/src/string/strsep.c
+++ b/src/string/strsep.c
@@ -11,3 +11,11 @@ char *strsep(char **str, const char *sep)
*str = end;
return s;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strsignal.c b/src/string/strsignal.c
index 5156366e..48083b36 100644
--- a/src/string/strsignal.c
+++ b/src/string/strsignal.c
@@ -124,3 +124,11 @@ char *strsignal(int signum)
return (char *)LCTRANS_CUR(s);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strspn.c b/src/string/strspn.c
index 9543dad0..ca5a65a5 100644
--- a/src/string/strspn.c
+++ b/src/string/strspn.c
@@ -18,3 +18,11 @@ size_t strspn(const char *s, const char *c)
for (; *s && BITOP(byteset, *(unsigned char *)s, &); s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strstr.c b/src/string/strstr.c
index 96657bc2..53e6d46a 100644
--- a/src/string/strstr.c
+++ b/src/string/strstr.c
@@ -152,3 +152,11 @@ char *strstr(const char *h, const char *n)
return twoway_strstr((void *)h, (void *)n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strtok.c b/src/string/strtok.c
index 35087902..0d0f149f 100644
--- a/src/string/strtok.c
+++ b/src/string/strtok.c
@@ -11,3 +11,11 @@ char *strtok(char *restrict s, const char *restrict sep)
else p = 0;
return s;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strtok_r.c b/src/string/strtok_r.c
index 862d4fe4..80193135 100644
--- a/src/string/strtok_r.c
+++ b/src/string/strtok_r.c
@@ -10,3 +10,11 @@ char *strtok_r(char *restrict s, const char *restrict sep, char **restrict p)
else *p = 0;
return s;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
index 16c1da22..0b214b0f 100644
--- a/src/string/strverscmp.c
+++ b/src/string/strverscmp.c
@@ -32,3 +32,11 @@ int strverscmp(const char *l0, const char *r0)
return l[i] - r[i];
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/swab.c b/src/string/swab.c
index ace0f466..d6d3ac28 100644
--- a/src/string/swab.c
+++ b/src/string/swab.c
@@ -11,3 +11,11 @@ void swab(const void *restrict _src, void *restrict _dest, ssize_t n)
src += 2;
}
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcpcpy.c b/src/string/wcpcpy.c
index ef401343..02d21961 100644
--- a/src/string/wcpcpy.c
+++ b/src/string/wcpcpy.c
@@ -4,3 +4,11 @@ wchar_t *wcpcpy(wchar_t *restrict d, const wchar_t *restrict s)
{
return wcscpy(d, s) + wcslen(s);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcpncpy.c b/src/string/wcpncpy.c
index b667f6d6..56610702 100644
--- a/src/string/wcpncpy.c
+++ b/src/string/wcpncpy.c
@@ -4,3 +4,11 @@ wchar_t *wcpncpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
{
return wcsncpy(d, s, n) + wcsnlen(s, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscasecmp.c b/src/string/wcscasecmp.c
index 3edeec7d..af2fa304 100644
--- a/src/string/wcscasecmp.c
+++ b/src/string/wcscasecmp.c
@@ -5,3 +5,11 @@ int wcscasecmp(const wchar_t *l, const wchar_t *r)
{
return wcsncasecmp(l, r, -1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscasecmp_l.c b/src/string/wcscasecmp_l.c
index 065dd0aa..1d2811b3 100644
--- a/src/string/wcscasecmp_l.c
+++ b/src/string/wcscasecmp_l.c
@@ -4,3 +4,11 @@ int wcscasecmp_l(const wchar_t *l, const wchar_t *r, locale_t locale)
{
return wcscasecmp(l, r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscat.c b/src/string/wcscat.c
index d4f00ebd..fc822df0 100644
--- a/src/string/wcscat.c
+++ b/src/string/wcscat.c
@@ -5,3 +5,11 @@ wchar_t *wcscat(wchar_t *restrict dest, const wchar_t *restrict src)
wcscpy(dest + wcslen(dest), src);
return dest;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcschr.c b/src/string/wcschr.c
index 8dfc2f31..c860d46e 100644
--- a/src/string/wcschr.c
+++ b/src/string/wcschr.c
@@ -6,3 +6,11 @@ wchar_t *wcschr(const wchar_t *s, wchar_t c)
for (; *s && *s != c; s++);
return *s ? (wchar_t *)s : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscmp.c b/src/string/wcscmp.c
index 286ec3ea..65f51fe5 100644
--- a/src/string/wcscmp.c
+++ b/src/string/wcscmp.c
@@ -5,3 +5,11 @@ int wcscmp(const wchar_t *l, const wchar_t *r)
for (; *l==*r && *l && *r; l++, r++);
return *l < *r ? -1 : *l > *r;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscpy.c b/src/string/wcscpy.c
index 625bf53d..2774fb7f 100644
--- a/src/string/wcscpy.c
+++ b/src/string/wcscpy.c
@@ -6,3 +6,11 @@ wchar_t *wcscpy(wchar_t *restrict d, const wchar_t *restrict s)
while ((*d++ = *s++));
return a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcscspn.c b/src/string/wcscspn.c
index c4e52722..5621f9f3 100644
--- a/src/string/wcscspn.c
+++ b/src/string/wcscspn.c
@@ -8,3 +8,11 @@ size_t wcscspn(const wchar_t *s, const wchar_t *c)
for (a=s; *s && !wcschr(c, *s); s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsdup.c b/src/string/wcsdup.c
index f398e809..e1d2b197 100644
--- a/src/string/wcsdup.c
+++ b/src/string/wcsdup.c
@@ -8,3 +8,11 @@ wchar_t *wcsdup(const wchar_t *s)
if (!d) return NULL;
return wmemcpy(d, s, l+1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcslen.c b/src/string/wcslen.c
index 1b7b6655..18237223 100644
--- a/src/string/wcslen.c
+++ b/src/string/wcslen.c
@@ -6,3 +6,11 @@ size_t wcslen(const wchar_t *s)
for (a=s; *s; s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsncasecmp.c b/src/string/wcsncasecmp.c
index 8fefe799..c0948e86 100644
--- a/src/string/wcsncasecmp.c
+++ b/src/string/wcsncasecmp.c
@@ -7,3 +7,11 @@ int wcsncasecmp(const wchar_t *l, const wchar_t *r, size_t n)
for (; *l && *r && n && (*l == *r || towlower(*l) == towlower(*r)); l++, r++, n--);
return towlower(*l) - towlower(*r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsncasecmp_l.c b/src/string/wcsncasecmp_l.c
index 63872481..6f6a30e5 100644
--- a/src/string/wcsncasecmp_l.c
+++ b/src/string/wcsncasecmp_l.c
@@ -4,3 +4,11 @@ int wcsncasecmp_l(const wchar_t *l, const wchar_t *r, size_t n, locale_t locale)
{
return wcsncasecmp(l, r, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsncat.c b/src/string/wcsncat.c
index 8563f1a2..3641d51e 100644
--- a/src/string/wcsncat.c
+++ b/src/string/wcsncat.c
@@ -8,3 +8,11 @@ wchar_t *wcsncat(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
*d++ = 0;
return a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsncmp.c b/src/string/wcsncmp.c
index 2b3558bf..90fe1250 100644
--- a/src/string/wcsncmp.c
+++ b/src/string/wcsncmp.c
@@ -5,3 +5,11 @@ int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n)
for (; n && *l==*r && *l && *r; n--, l++, r++);
return n ? (*l < *r ? -1 : *l > *r) : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsncpy.c b/src/string/wcsncpy.c
index 4bede04d..35d6093a 100644
--- a/src/string/wcsncpy.c
+++ b/src/string/wcsncpy.c
@@ -7,3 +7,11 @@ wchar_t *wcsncpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
wmemset(d, 0, n);
return a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsnlen.c b/src/string/wcsnlen.c
index a7763373..0ed2d4a2 100644
--- a/src/string/wcsnlen.c
+++ b/src/string/wcsnlen.c
@@ -6,3 +6,11 @@ size_t wcsnlen(const wchar_t *s, size_t n)
if (z) n = z-s;
return n;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcspbrk.c b/src/string/wcspbrk.c
index 0c72c197..3567e052 100644
--- a/src/string/wcspbrk.c
+++ b/src/string/wcspbrk.c
@@ -5,3 +5,11 @@ wchar_t *wcspbrk(const wchar_t *s, const wchar_t *b)
s += wcscspn(s, b);
return *s ? (wchar_t *)s : NULL;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsrchr.c b/src/string/wcsrchr.c
index 8961b9e2..d6fe1da3 100644
--- a/src/string/wcsrchr.c
+++ b/src/string/wcsrchr.c
@@ -6,3 +6,11 @@ wchar_t *wcsrchr(const wchar_t *s, wchar_t c)
for (p=s+wcslen(s); p>=s && *p!=c; p--);
return p>=s ? (wchar_t *)p : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsspn.c b/src/string/wcsspn.c
index 4320d8f6..3820734a 100644
--- a/src/string/wcsspn.c
+++ b/src/string/wcsspn.c
@@ -6,3 +6,11 @@ size_t wcsspn(const wchar_t *s, const wchar_t *c)
for (a=s; *s && wcschr(c, *s); s++);
return s-a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcsstr.c b/src/string/wcsstr.c
index 4caaef3c..c372c1b4 100644
--- a/src/string/wcsstr.c
+++ b/src/string/wcsstr.c
@@ -103,3 +103,11 @@ wchar_t *wcsstr(const wchar_t *restrict h, const wchar_t *restrict n)
return twoway_wcsstr(h, n);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcstok.c b/src/string/wcstok.c
index ecc80331..cf25258a 100644
--- a/src/string/wcstok.c
+++ b/src/string/wcstok.c
@@ -10,3 +10,11 @@ wchar_t *wcstok(wchar_t *restrict s, const wchar_t *restrict sep, wchar_t **rest
else *p = 0;
return s;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wcswcs.c b/src/string/wcswcs.c
index 9cfe4ac4..2da34cb1 100644
--- a/src/string/wcswcs.c
+++ b/src/string/wcswcs.c
@@ -4,3 +4,11 @@ wchar_t *wcswcs(const wchar_t *haystack, const wchar_t *needle)
{
return wcsstr(haystack, needle);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wmemchr.c b/src/string/wmemchr.c
index 2bc2c270..01962497 100644
--- a/src/string/wmemchr.c
+++ b/src/string/wmemchr.c
@@ -5,3 +5,11 @@ wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
for (; n && *s != c; n--, s++);
return n ? (wchar_t *)s : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wmemcmp.c b/src/string/wmemcmp.c
index 717d77b1..ce364981 100644
--- a/src/string/wmemcmp.c
+++ b/src/string/wmemcmp.c
@@ -5,3 +5,11 @@ int wmemcmp(const wchar_t *l, const wchar_t *r, size_t n)
for (; n && *l==*r; n--, l++, r++);
return n ? (*l < *r ? -1 : *l > *r) : 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wmemcpy.c b/src/string/wmemcpy.c
index 52e6e6e0..80483fee 100644
--- a/src/string/wmemcpy.c
+++ b/src/string/wmemcpy.c
@@ -6,3 +6,11 @@ wchar_t *wmemcpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
while (n--) *d++ = *s++;
return a;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c
index 964c9032..be5d5639 100644
--- a/src/string/wmemmove.c
+++ b/src/string/wmemmove.c
@@ -11,3 +11,11 @@ wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n)
while (n--) *d++ = *s++;
return d0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/string/wmemset.c b/src/string/wmemset.c
index 07a037a0..87374585 100644
--- a/src/string/wmemset.c
+++ b/src/string/wmemset.c
@@ -6,3 +6,11 @@ wchar_t *wmemset(wchar_t *d, wchar_t c, size_t n)
while (n--) *d++ = c;
return ret;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif