1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-17 20:04:05 +02:00

eeshow/misc/util.h (sign1): return sign of argument, return 1 for 0

This commit is contained in:
Werner Almesberger 2016-08-18 17:12:42 -03:00
parent 76f7f80c88
commit 64ddbc3c61

View File

@ -46,6 +46,7 @@
#define swap(a, b) \ #define swap(a, b) \
({ typeof(a) _tmp = (a); a = (b); b = _tmp; }) ({ typeof(a) _tmp = (a); a = (b); b = _tmp; })
#define sign1(x) ((x) < 0 ? -1 : 1)
#define unsupported(s) \ #define unsupported(s) \
fprintf(stderr, __FILE__ ":%d: unsupported: " s "\n", __LINE__) fprintf(stderr, __FILE__ ":%d: unsupported: " s "\n", __LINE__)