summaryrefslogtreecommitdiff
path: root/src/ctype/toascii.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctype/toascii.c')
-rw-r--r--src/ctype/toascii.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ctype/toascii.c b/src/ctype/toascii.c
new file mode 100644
index 00000000..80b599df
--- /dev/null
+++ b/src/ctype/toascii.c
@@ -0,0 +1,24 @@
+#include <ctype.h>
+
+/** convert a character to 7-bit ASCII **/
+int toascii(int c)
+{
+ return (c & 0x7f);
+}
+
+#endif
+
+/***
+The fn(toascii) function converts arg(c) to 7-bit ASCII.
+***/
+
+/* RETURN: arg(c) & 0x7f */
+
+/* UNDEFINED: - */
+/* UNSPECIFIED: - */
+/* IMPLEMENTATION: - */
+/* LOCALE: - */
+
+/*
+XOPEN(4)
+*/