summaryrefslogtreecommitdiffstats
path: root/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.c')
-rw-r--r--helpers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers.c b/helpers.c
index 8e3be13..163cd2e 100644
--- a/helpers.c
+++ b/helpers.c
@@ -11,6 +11,12 @@ void *xmalloc(size_t size) {
return ptr;
}
+unsigned long strict_strtoul(const char *nptr, int base) {
+ char *endptr;
+ unsigned long ret = strtoul(nptr, &endptr, base);
+ return (*endptr ? 0 : ret);
+}
+
void cursinit(void) {
setlocale(LC_ALL, "");
initscr();