diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-10 09:16:08 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-10 09:16:08 -0800 |
commit | 25537c3d3b9b68af91573dec39d1f46c3d97f735 (patch) | |
tree | 3f2ea6207a28fe9610d767dd78fb24d17f858ce0 /src/base/utf | |
parent | f4aef385bdd41b02ef58b5366fa9318ecdc6e37e (diff) |
Checkin: small sprawling updates
Small touches to multiple locations in base.
Nothing major
Diffstat (limited to 'src/base/utf')
-rw-r--r-- | src/base/utf/printable.c | 8 | ||||
-rw-r--r-- | src/base/utf/rules.mk | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/base/utf/printable.c b/src/base/utf/printable.c new file mode 100644 index 0000000..6a8219b --- /dev/null +++ b/src/base/utf/printable.c @@ -0,0 +1,8 @@ +#include "internal.h" + +/* TODO: this is just ascii... */ +int +utf8·printable(rune r) +{ + return (unsigned)r-0x20 < 0x5f; +} diff --git a/src/base/utf/rules.mk b/src/base/utf/rules.mk index 0ed2f8b..934e376 100644 --- a/src/base/utf/rules.mk +++ b/src/base/utf/rules.mk @@ -8,6 +8,7 @@ SRCS_$(d)+=\ $(d)/utf/findlast.c\ $(d)/utf/canfit.c\ $(d)/utf/runelen.c\ + $(d)/utf/printable.c\ $(d)/utf/len.c\ $(d)/utf/runetype-$(UNICODE).c\ $(d)/utf/runewidth-$(UNICODE).c |