source: trunk/minix/commands/i386/asmconv/asmconv.h@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 710 bytes
Line 
1/* asmconv.h - shared functions Author: Kees J. Bot
2 * 19 Dec 1993
3 */
4
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)))
9
10void *allocate(void *mem, size_t size);
11void deallocate(void *mem);
12void fatal(char *label);
13char *copystr(const char *s);
14int isanumber(const char *s);
15
16extern int asm_mode32; /* In 32 bit mode if true. */
17
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))
22
23extern int err_code; /* Exit code. */
24#define set_error() ((void) (err_code= EXIT_FAILURE))
Note: See TracBrowser for help on using the repository browser.