home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GRIPS 2: Government Rast…rocessing Software & Data
/
GRIPS_2.cdr
/
dos
/
imcomp
/
mk_crefs.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-29
|
2KB
|
108 lines
#include <ctype.h>
/*
* Microsoft C Compiler
*
* MOVMEM(A,B,size)
* Move size bytes from A into b. A and B must be arrays
* in the programs working memory space.
*
* this corresponds to the movmem function in lattice and C86
*/
#define MOVMEM(a,b,s) memcpy(b,a,s)
/*
* MOVEDATA(sourceOffset,sourceSegment,
* destOffset, destSegment, length)
*
* (Only for intra TARGA moving)
*/
#define MOVEDATA(a,b,c,d,e) movedata(b,a, d,c, e)
/*
* OUTPORTB
*
* C-86 outportb -- output one byte to an io port
*
* outportb(port,byteValue)
*
* Same as Lattice's outp;
*/
#define OUTPORTB(a,b) outp(a,b)
/*
* OUTPORTW
*
* C-86 outportw -- output a word to io port
*
* outportw(port,wordValue);
*
* Lattice: {outp(port,wordValue); outp(port+1,(wordValue>>8));}
*/
#define OUTPORTW(a,b) {outp(a,b);outp(a+1,b>>8);}
/*
* INPORTB
*
* C-86 inportb -- read one byte from IO port
*
* btyeValue = inportb(port)
*/
#define INPORTB(a) inp(a)
#include <dos.h>
/*
* PEEK -- Generic Peek routine patterned after Lattice
*
* Usage: PEEK(SourceOffset,SourceSegment, &buffer[0], size);
*
*/
#define PEEK(a,b,c,d) memcpy(c, a,b, d)
/*
* POKE -- Generic Poke routine patterned after Lattice (sort of)
*
* Usage: Poke(DestOff,DestSegment, &buffer[0], size);
*
*/
#define POKE(a,b,c,d) memcpy(a,b, c, d )
#include "types.h"
#include "stat.h"
#include <fcntl.h>
/*
* BINARY_READ ----
*
* This is the argument for Open that instucts it to open a file
* as a binary, read only file
*
* C86 --- BREAD (Defined in STDIO.H)
*/
#define BINARY_READ O_RDONLY|O_BINARY
/*
* BINARY_WRITE ----
*
* This is the argument or open that instructs it to open, create,
* a binary writable file.
*
* C86 -- BWRITE (Defined in STDIO.H)
*/
#define BINARY_WRITE O_WRONLY|O_BINARY|O_CREAT|O_TRUNC,S_IWRITE
/*
* GETENV ---- Get an environmental string from DOS
*
* Usage: char *ret;
* ret = GETENV(string);
* where:
* char string[];
* ret == -1 if invalid return.
*/
#define GETENV(a) getenv(a)
/*
* FREE- Free environmental string gotten in C86
*
* Usage: FREE(string);
* where: char *string; String address returned by
* GETENV
*/
#define FREE(a)