home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
filutl
/
chksum2.arc
/
GEN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-16
|
3KB
|
111 lines
/* /usr/include/stub/gen.h 890123 NHA */
/* This is the version for use with public sharing of my sources */
/* The intent is to neutralize initdebug() and printd() so that */
/* any compiler will swallow them without complaint */
#ifndef __GEN__
#define __GEN__
#include <stdio.h>
#include <fcntl.h>
#include <ctype.h>
/** #include "config.h" **/
#include <debug.h>
#define import extern
#define local static
#define export
/** This will not work with prototypes in version 4.10a **/
/** typedef char bool; **/
typedef int bool;
#define NULLFP ((int (*)())0) /* NULL Function Pointer */
#define YES 1
#define NO 0
#define NOBREAK /* used for a switch case which flows into next */
#define CRLF 037 /* Unit Separator sometimes replaces \n\r pair */
/*** NOTE that this include must follow the definition of bool ***/
/** #include <window.h> **/ /* Norman's direct windows */
/** import WINDOW *wopen(char *dev); **/
/* macros */
#define abs(x) ((x < 0) ? (-(x)) : (x))
#define max(x,y) (((x) < (y)) ? (y) : (x))
#define min(x,y) (((x) < (y)) ? (x) : (y))
/* for use with Aztec farcall(), sysint(), and segreg() functions */
struct regs { int ax, bx, cx, dx, si, di, ds, es; };
struct segregs { unsigned cs, ss, ds, es; };
/* use this to fiddle with longs and pointers and such */
union u_long {
unsigned long lunsigned;
long lsigned;
void *ptr;
struct {
unsigned lo;
unsigned hi;
} half;
struct {
unsigned char b0; /* Least Significant byte */
unsigned char b1;
unsigned char b2;
unsigned char b3; /* Most Significant byte */
} byte;
};
#define BIT0 0x0001
#define BIT1 0x0002
#define BIT2 0x0004
#define BIT3 0x0008
#define BIT4 0x0010
#define BIT5 0x0020
#define BIT6 0x0040
#define BIT7 0x0080
#define BIT8 0x0100
#define BIT9 0x0200
#define BIT10 0x0400
#define BIT11 0x0800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
#define BIT0L 0x00000001
#define BIT1L 0x00000002
#define BIT2L 0x00000004
#define BIT3L 0x00000008
#define BIT4L 0x00000010
#define BIT5L 0x00000020
#define BIT6L 0x00000040
#define BIT7L 0x00000080
#define BIT8L 0x00000100
#define BIT9L 0x00000200
#define BIT10L 0x00000400
#define BIT11L 0x00000800
#define BIT12L 0x00001000
#define BIT13L 0x00002000
#define BIT14L 0x00004000
#define BIT15L 0x00008000
#define BIT16L 0x00010000
#define BIT17L 0x00020000
#define BIT18L 0x00040000
#define BIT19L 0x00080000
#define BIT20L 0x00100000
#define BIT21L 0x00200000
#define BIT22L 0x00400000
#define BIT23L 0x00800000
#define BIT24L 0x01000000
#define BIT25L 0x02000000
#define BIT26L 0x04000000
#define BIT27L 0x08000000
#define BIT28L 0x10000000
#define BIT29L 0x20000000
#define BIT30L 0x40000000
#define BIT31L 0x80000000
#endif __GEN__