1/*
2------------------------------------------------------------------------------
3Standard definitions and types, Bob Jenkins
4------------------------------------------------------------------------------
5*/
6#ifndef STANDARD
7#define STANDARD
8
9#include <stdio.h>
10#include <stddef.h>
11#include <stdlib.h>
12typedef  unsigned long  int  ub4;   /* unsigned 4-byte quantities */
13#define UB4BITS 32
14typedef  unsigned short int  ub2;
15#define UB2MAXVAL 0xffff
16typedef  unsigned       char ub1;
17#define UB1MAXVAL 0xff
18typedef                 int  word;  /* fastest type available */
19
20#define bis(target,mask)  ((target) |=  (mask))
21#define bic(target,mask)  ((target) &= ~(mask))
22#define bit(target,mask)  ((target) &   (mask))
23#ifndef align
24# define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1)))
25#endif /* align */
26
27#ifndef FALSE
28#define FALSE 0
29#endif
30
31#ifndef TRUE
32#define TRUE 1
33#endif
34
35#endif /* STANDARD */
36