commit - 7182646cf1c65c009e04b742d2b28213ec38439e
commit + a3054746d2d2a6efa84f5a425c977ca47857273d
blob - fed3b01420269e986cbca65ee0afaf5676da98b8
blob + b2d692a8829abc7ab0d9265416fed802d4bcb868
--- minibuffer.c
+++ minibuffer.c
#include <sys/time.h>
+#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
int in_minibuffer;
+static int
+codepoint_isgraph(uint32_t cp)
+{
+ if (cp < INT8_MAX)
+ return isgraph((unsigned char)cp);
+ return 1;
+}
+
static inline int
matches(char **words, size_t len, struct line *l)
{
sensible_self_insert(void)
{
if (thiskey.meta ||
- (!unicode_isgraph(thiskey.key) && thiskey.key != ' ')) {
+ (!codepoint_isgraph(thiskey.key) && thiskey.key != ' ')) {
global_key_unbound();
return;
}
static void
read_self_insert(void)
{
- if (thiskey.meta || !unicode_isgraph(thiskey.cp)) {
+ if (thiskey.meta || !codepoint_isgraph(thiskey.cp)) {
global_key_unbound();
return;
}
blob - ce94e52a229ffaa4b001023f37856a15d1dadf58
blob + 09157b809cda3241b26d208a3b2931825936b622
--- utils.c
+++ utils.c
#include "compat.h"
-#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
return !strcmp(str + (l - s), sufx);
}
-int
-unicode_isgraph(uint32_t cp)
-{
- if (cp < INT8_MAX)
- return isgraph(cp);
- return 1;
-}
-
void *
hash_alloc(size_t len, void *d)
{
blob - 22aa162e6394184767edc64ea8aedf1398ecde81
blob + e66a396b66fe1bb863650d5375ba85eb900e37f5
--- utils.h
+++ utils.h
int mark_nonblock_cloexec(int);
int has_suffix(const char *, const char *);
-int unicode_isgraph(uint32_t);
void *hash_alloc(size_t, void *);
void *hash_calloc(size_t, size_t, void *);