From: Jens Staal <staal1978@gmail.com>
To: 9front@9front.org
Subject: [patch] add isblank to ape/ctype.h
Date: Fri, 24 Jul 2020 06:37:50 +0200 [thread overview]
Message-ID: <4397179.G8QHhdnbYj@hugin> (raw)
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
For some reason isblank was not included in ctype.h despite _ISblank being
defined.
The isblank function is part of standard ctype.h
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/ctype.h.html
I noticed this when I made a shim wctype.h in my "libwtf" attempt to provide
wchar dependencies.
[-- Attachment #2: ape_isblank.diff --]
[-- Type: text/x-patch, Size: 1068 bytes --]
# HG changeset patch
# User Jens Staal <staal1978@gmail.com>
# Date 1595564874 -7200
# Fri Jul 24 06:27:54 2020 +0200
# Node ID e8dfabb75c221d6e354e6a349b154180d172cf56
# Parent 639ad985a75b382b9053812c6943900ef8dd1e91
add isblank to ape/ctype.h
diff -r 639ad985a75b -r e8dfabb75c22 sys/include/ape/ctype.h
--- a/sys/include/ape/ctype.h Mon Jul 20 18:58:52 2020 -0700
+++ b/sys/include/ape/ctype.h Fri Jul 24 06:27:54 2020 +0200
@@ -8,6 +8,7 @@
extern int isalnum(int);
extern int isalpha(int);
+extern int isblank(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
@@ -38,6 +39,7 @@
extern unsigned char _ctype[];
#define isalnum(c) (_ctype[(unsigned char)(c)]&(_ISupper|_ISlower|_ISdigit))
#define isalpha(c) (_ctype[(unsigned char)(c)]&(_ISupper|_ISlower))
+#define isblank(c) (_ctype[(unsigned char)(c)]&_ISblank)
#define iscntrl(c) (_ctype[(unsigned char)(c)]&_IScntrl)
#define isdigit(c) (_ctype[(unsigned char)(c)]&_ISdigit)
#define isgraph(c) (_ctype[(unsigned char)(c)]&(_ISpunct|_ISupper|_ISlower|_ISdigit))
next reply other threads:[~2020-07-24 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 4:37 Jens Staal [this message]
2020-07-24 5:02 ` [9front] " ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4397179.G8QHhdnbYj@hugin \
--to=staal1978@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).