1 /* asmconv.h - shared functions Author: Kees J. Bot
5 #define arraysize(a) (sizeof(a)/sizeof((a)[0]))
6 #define arraylimit(a) ((a) + arraysize(a))
7 #define between(a, c, z) \
8 ((unsigned)((c) - (a)) <= (unsigned)((z) - (a)))
10 void *allocate(void *mem
, size_t size
);
11 void deallocate(void *mem
);
12 void fatal(char *label
);
13 char *copystr(const char *s
);
14 int isanumber(const char *s
);
16 extern int asm_mode32
; /* In 32 bit mode if true. */
18 #define use16() (!asm_mode32)
19 #define use32() ((int) asm_mode32)
20 #define set_use16() ((void) (asm_mode32= 0))
21 #define set_use32() ((void) (asm_mode32= 1))
23 extern int err_code
; /* Exit code. */
24 #define set_error() ((void) (err_code= EXIT_FAILURE))