Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: fusl/src/ctype/iswalpha.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/ctype/iswalnum.c ('k') | fusl/src/ctype/iswblank.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/ctype/iswalpha.c
diff --git a/fusl/src/ctype/iswalpha.c b/fusl/src/ctype/iswalpha.c
new file mode 100644
index 0000000000000000000000000000000000000000..00f9d81f5a7899d4748d35457928e5d2a342d5c8
--- /dev/null
+++ b/fusl/src/ctype/iswalpha.c
@@ -0,0 +1,22 @@
+#include <wctype.h>
+#include "libc.h"
+
+static const unsigned char table[] = {
+#include "alpha.h"
+};
+
+int iswalpha(wint_t wc)
+{
+ if (wc<0x20000U)
+ return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
+ if (wc<0x2fffeU)
+ return 1;
+ return 0;
+}
+
+int __iswalpha_l(wint_t c, locale_t l)
+{
+ return iswalpha(c);
+}
+
+weak_alias(__iswalpha_l, iswalpha_l);
« no previous file with comments | « fusl/src/ctype/iswalnum.c ('k') | fusl/src/ctype/iswblank.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698