aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 42b5df5..ce5f647 100644
--- a/src/util.h
+++ b/src/util.h
@@ -5,6 +5,8 @@
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define CLIP(A, B, C) ((B) < (A) ? (A) : (B) > (C) ? (C) : (B))
+#define STRLEN(STR) (sizeof(STR) - 1)
+#define INTSTRLEN(TYPE) ((sizeof(TYPE) == 1 ? 3 : (5 * sizeof(TYPE) / 2)) + (TYPE)-1 < 0)
#define USAGE(SYNOPSIS)\
static void usage(void)\