aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-12-03 19:31:03 +0000
committerFrederic Culot <calcurse@culot.org>2008-12-03 19:31:03 +0000
commitcf5617e3378fc4c6089195c83fac0f8a7acb84fe (patch)
tree61ea187c3d25949637d26bac08532881429c3421 /src/io.c
parent86d1a3b2dbbf5aa8a8b0f9e70bc1766df3c1ccc8 (diff)
downloadcalcurse-cf5617e3378fc4c6089195c83fac0f8a7acb84fe.tar.gz
calcurse-cf5617e3378fc4c6089195c83fac0f8a7acb84fe.zip
more work on updating online help pages
Diffstat (limited to 'src/io.c')
-rwxr-xr-xsrc/io.c15
1 files changed, 12 insertions, 3 deletions
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 <math.h>
#include <unistd.h>
#include <errno.h>
-#include <ctype.h>
#include "i18n.h"
#include "utils.h"
@@ -1220,6 +1219,16 @@ load_keys_ht_compare (struct ht_keybindings_s *data1,
}
/*
+ * 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
* comparisons.
@@ -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));