145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org/*
245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org------------------------------------------------------------------------------
345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgStandard definitions and types, Bob Jenkins
445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org------------------------------------------------------------------------------
545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org*/
645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef STANDARD
745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define STANDARD
845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#include <stdio.h>
1045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#include <stddef.h>
1145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#include <stdlib.h>
1245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef  unsigned long  int  ub4;   /* unsigned 4-byte quantities */
1345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define UB4BITS 32
1445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef  unsigned short int  ub2;
1545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define UB2MAXVAL 0xffff
1645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef  unsigned       char ub1;
1745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define UB1MAXVAL 0xff
1845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgtypedef                 int  word;  /* fastest type available */
1945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
2045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define bis(target,mask)  ((target) |=  (mask))
2145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define bic(target,mask)  ((target) &= ~(mask))
2245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define bit(target,mask)  ((target) &   (mask))
2345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef align
2445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1)))
2545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif /* align */
2645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
2745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef FALSE
2845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define FALSE 0
2945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif
3045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
3145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#ifndef TRUE
3245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#define TRUE 1
3345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif
3445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org
3545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#endif /* STANDARD */
36