From cf5617e3378fc4c6089195c83fac0f8a7acb84fe Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Wed, 3 Dec 2008 19:31:03 +0000 Subject: more work on updating online help pages --- src/io.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/io.c') diff --git a/src/io.c b/src/io.c index 84787c9..9be3d9b 100755 --- a/src/io.c +++ b/src/io.c @@ -1,4 +1,4 @@ -/* $calcurse: io.c,v 1.43 2008/11/25 20:48:58 culot Exp $ */ +/* $calcurse: io.c,v 1.44 2008/12/03 19:31:03 culot Exp $ */ /* * Calcurse - text-based organizer @@ -31,7 +31,6 @@ #include #include #include -#include #include "i18n.h" #include "utils.h" @@ -1219,6 +1218,16 @@ load_keys_ht_compare (struct ht_keybindings_s *data1, return 1; } +/* + * isblank(3) is protected by the __BSD_VISIBLE macro and this fails to be + * visible in some specific cases. Thus replace it by the following is_blank() + * function. + */ +static int is_blank (int c) +{ + return c == ' ' || c == '\t'; +} + /* * Load user-definable keys from file. * A hash table is used to speed up loading process in avoiding string @@ -1253,7 +1262,7 @@ io_load_keys (void) struct ht_keybindings_s *ht_elm, ht_entry; const int AWAITED = 1; - for (p = buf; isblank ((int)*p); p++) + for (p = buf; is_blank ((int)*p); p++) ; if (p != buf) memmove (buf, p, strlen (p)); -- cgit v1.2.3-54-g00ecf