From ac9dc1ab69cdc2885bc80845b525963cecb825f8 Mon Sep 17 00:00:00 2001
From: Thomas Voss <mail@thomasvoss.com>
Date: Tue, 9 Apr 2024 23:41:07 +0200
Subject: Remove usages of __MLIB_NO_MACRO_WRAPPER

---
 include/mbstring.h    | 8 +++-----
 lib/mbstring/u8chk.c  | 3 +--
 lib/mbstring/u8chr.c  | 3 +--
 lib/mbstring/u8rchr.c | 3 +--
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/include/mbstring.h b/include/mbstring.h
index 0bf4685..277586e 100644
--- a/include/mbstring.h
+++ b/include/mbstring.h
@@ -53,10 +53,8 @@ int u8prev(rune *, const char8_t **, const char8_t *);
 
 [[__nodiscard__]] size_t u8len(const char8_t *, size_t);
 
-#if !__MLIB_NO_MACRO_WRAPPER
-#	define u8chk(s, n)      __MLIB_Q_PTR(char8_t, u8chk, (s), (s), (n))
-#	define u8chr(s, n, ch)  __MLIB_Q_PTR(char8_t, u8chr, (s), (s), (n), (ch))
-#	define u8rchr(s, n, ch) __MLIB_Q_PTR(char8_t, u8rchr, (s), (s), (n), (ch))
-#endif
+#define u8chk(s, n)      __MLIB_Q_PTR(char8_t, u8chk, (s), (s), (n))
+#define u8chr(s, n, ch)  __MLIB_Q_PTR(char8_t, u8chr, (s), (s), (n), (ch))
+#define u8rchr(s, n, ch) __MLIB_Q_PTR(char8_t, u8rchr, (s), (s), (n), (ch))
 
 #endif /* !MLIB_MBSTRING_H */
diff --git a/lib/mbstring/u8chk.c b/lib/mbstring/u8chk.c
index d635e3d..2566bac 100644
--- a/lib/mbstring/u8chk.c
+++ b/lib/mbstring/u8chk.c
@@ -1,9 +1,8 @@
 #include "rune.h"
-#define __MLIB_NO_MACRO_WRAPPER 1
 #include "mbstring.h"
 
 char8_t *
-u8chk(const char8_t *s, size_t n)
+(u8chk)(const char8_t *s, size_t n)
 {
 	while (n) {
 		rune ch;
diff --git a/lib/mbstring/u8chr.c b/lib/mbstring/u8chr.c
index 2ce4e11..395a328 100644
--- a/lib/mbstring/u8chr.c
+++ b/lib/mbstring/u8chr.c
@@ -2,7 +2,6 @@
 #include <stdint.h>
 #include <string.h>
 
-#define __MLIB_NO_MACRO_WRAPPER 1
 #include "mbstring.h"
 
 /* NOTE: The memmem*() functions were taken directly from the memmem()
@@ -75,7 +74,7 @@ memmem4(const char8_t *h, size_t k, const char8_t *n)
 }
 
 char8_t *
-u8chr(const char8_t *s, size_t n, rune ch)
+(u8chr)(const char8_t *s, size_t n, rune ch)
 {
 	char8_t buf[U8_LEN_MAX];
 	int m = rtou8(buf, sizeof(buf), ch);
diff --git a/lib/mbstring/u8rchr.c b/lib/mbstring/u8rchr.c
index df6be06..09aa111 100644
--- a/lib/mbstring/u8rchr.c
+++ b/lib/mbstring/u8rchr.c
@@ -1,7 +1,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#define __MLIB_NO_MACRO_WRAPPER 1
 #include "mbstring.h"
 
 static char8_t *
@@ -65,7 +64,7 @@ memrchr4(const char8_t *h, size_t k, const char8_t *n)
 }
 
 char8_t *
-u8rchr(const char8_t *s, size_t n, rune ch)
+(u8rchr)(const char8_t *s, size_t n, rune ch)
 {
 	char8_t buf[U8_LEN_MAX];
 	int m = rtou8(buf, ch, sizeof(buf));
-- 
cgit v1.2.3