From 18faf321613fcb5bd51a1822428e72aa7f3d68a3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 28 Jul 2006 15:37:42 +0000 Subject: [PATCH] Avoid defining a substitute for the same function twice. --- lib/mbchar.h | 12 ++++++++++++ lib/wcwidth.h | 1 + 2 files changed, 13 insertions(+) diff --git a/lib/mbchar.h b/lib/mbchar.h index e6e351d83..eff18ea77 100644 --- a/lib/mbchar.h +++ b/lib/mbchar.h @@ -167,6 +167,7 @@ iswalnum (wint_t wc) ? (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z') : 0); } +# define iswalnum iswalnum #endif #if !defined iswalpha && !HAVE_ISWCNTRL ststic inline int @@ -176,6 +177,7 @@ iswalpha (wint_t wc) ? (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z' : 0); } +# define iswalpha iswalpha #endif #if !defined iswblank && !HAVE_ISWCNTRL ststic inline int @@ -185,6 +187,7 @@ iswblank (wint_t wc) ? wc == ' ' || wc == '\t' : 0); } +# define iswblank iswblank #endif #if !defined iswcntrl && !HAVE_ISWCNTRL ststic inline int @@ -194,6 +197,7 @@ iswcntrl (wint_t wc) ? (wc & ~0x1f) == 0 || wc == 0x7f : 0); } +# define iswcntrl iswcntrl #endif #if !defined iswdigit && !HAVE_ISWCNTRL ststic inline int @@ -201,6 +205,7 @@ iswdigit (wint_t wc) { return (wc >= '0' && wc <= '9'); } +# define iswdigit iswdigit #endif #if !defined iswgraph && !HAVE_ISWCNTRL ststic inline int @@ -210,6 +215,7 @@ iswgraph (wint_t wc) ? wc >= '!' && wc <= '~' : 1); } +# define iswgraph iswgraph #endif #if !defined iswlower && !HAVE_ISWCNTRL ststic inline int @@ -219,6 +225,7 @@ iswlower (wint_t wc) ? wc >= 'a' && wc <= 'z' : 0); } +# define iswlower iswlower #endif #if !defined iswprint && !HAVE_ISWCNTRL ststic inline int @@ -228,6 +235,7 @@ iswprint (wint_t wc) ? wc >= ' ' && wc <= '~' : 1); } +# define iswprint iswprint #endif #if !defined iswpunct && !HAVE_ISWCNTRL ststic inline int @@ -239,6 +247,7 @@ iswpunct (wint_t wc) || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')) : 1); } +# define iswpunct iswpunct #endif #if !defined iswspace && !HAVE_ISWCNTRL ststic inline int @@ -249,6 +258,7 @@ iswspace (wint_t wc) || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r' : 0); } +# define iswspace iswspace #endif #if !defined iswupper && !HAVE_ISWCNTRL ststic inline int @@ -258,6 +268,7 @@ iswupper (wint_t wc) ? wc >= 'A' && wc <= 'Z' : 0); } +# define iswupper iswupper #endif #if !defined iswxdigit && !HAVE_ISWCNTRL ststic inline int @@ -265,6 +276,7 @@ iswxdigit (wint_t wc) { return (wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'); } +# define iswxdigit iswxdigit #endif #include "wcwidth.h" diff --git a/lib/wcwidth.h b/lib/wcwidth.h index 1c95d0e11..886561723 100644 --- a/lib/wcwidth.h +++ b/lib/wcwidth.h @@ -43,6 +43,7 @@ iswprint (wint_t wc) ? wc >= ' ' && wc <= '~' : 1); } +# define iswprint iswprint # endif # ifndef HAVE_DECL_WCWIDTH -- 2.11.0