summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-18 20:12:42 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-08-18 20:12:42 (GMT)
commit9ce1707dff36162fc91a030befdcf8a3c2b6852d (patch)
tree5c5ea7bc0eafc04366c7c568a8b5045eb7d1c75a /misc
parenta4b71eeb0c59b95ea82d4501f690b5c76998df3f (diff)
downloadeeshow-9ce1707dff36162fc91a030befdcf8a3c2b6852d.zip
eeshow-9ce1707dff36162fc91a030befdcf8a3c2b6852d.tar.gz
eeshow-9ce1707dff36162fc91a030befdcf8a3c2b6852d.tar.bz2
eeshow/misc/util.h (sign1): return sign of argument, return 1 for 0
Diffstat (limited to 'misc')
-rw-r--r--misc/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/util.h b/misc/util.h
index d0c5610..657c6d0 100644
--- a/misc/util.h
+++ b/misc/util.h
@@ -46,6 +46,7 @@
#define swap(a, b) \
({ typeof(a) _tmp = (a); a = (b); b = _tmp; })
+#define sign1(x) ((x) < 0 ? -1 : 1)
#define unsupported(s) \
fprintf(stderr, __FILE__ ":%d: unsupported: " s "\n", __LINE__)