home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
SNPD9404.ZIP
/
PORTABLE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-03
|
2KB
|
66 lines
.I 6 4
__TURBOC__ Borland Turbo C, Turbo C++, and Borland C++
__BORLANDC__ Borland C++
__ZTC__ Zortech C++ and Symantec C++
__SC__ Symantec C++
.D 7 2
.I 9 10
__POWERC Mix Power C
Revised:
09/14/93 Fred Cole Moved MK_FP() macro to end of file to avoid
redefinition error when dos.h gets included
at the in/outport definitions for __TURBOC__
09/15/93 Thad Smith Add conditional code for TC 2.01
Fix findfirst/findnext support for ZTC 3.0
10/15/93 Bob Stout Revise find first/next support
04/03/94 Bob Stout Add Power C support, FAR
.I 17 8
/*
** Correct far pointer syntax
*/
#if defined(__POWERC) || (defined(__TURBOC__) && !defined(__BORLANDC__))
#define FAR far
#else
#define FAR _far
.D 18 8
.I 41 1
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
.D 42 1
.I 62 1
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
.D 63 1
.I 79 3
#define FIND_FIRST(spec,attr,buf) _dos_findfirst(spec,attr,\
(struct find_t *)buf)
#define FIND_NEXT(buf) _dos_findnext((struct find_t *)buf)
.D 80 3
.I 118 1
extern union REGS CPURegs;
.D 119 1
.I 125 8
#define _AH CPURegs.h.ah
#define _AL CPURegs.h.al
#define _BH CPURegs.h.bh
#define _BL CPURegs.h.bl
#define _CH CPURegs.h.ch
#define _CL CPURegs.h.cl
#define _DH CPURegs.h.dh
#define _DL CPURegs.h.dl
.D 126 8
.I 142 12
/*----------------------------------------------------------------------------
Pointer-related macros
MK_FP creates a far pointer from segment and offset values
----------------------------------------------------------------------------*/
#if !defined(MK_FP)
#define MK_FP(seg,off) ((void FAR *)(((long)(seg) << 16)|(unsigned)(off)))
#endif
#endif
.D 143 1