home *** CD-ROM | disk | FTP | other *** search
- /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
- | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
- | All Rights Reserved.
- |
- | This Library is part of IDC's TesSeRact Development Tools product
- | line. For information about other IDC products, call 1-215-443-9705.
- *-V--------------------------------------------------------------------*
- | $Header: tcxlfar.h 552.0 17 Mar 1991 18:26:36 $
- |
- | $Log: tcxlfar.h $
- *-D--------------------------------------------------------------------*
- | <TCXLfar.h> : Definitions and prototypes for handling explicit, typed
- | far-pointers as used internally in TCXL 5.5.
- *-N-----------------------[ Notes and Caveats ]------------------------*
- | 1) The _XxxFar() aliases take full far pointers and the _FarXxx()
- | functions take separate segments and offsets.
- | 2) The MK_FP() and MK_FPT() macros override system definitions and
- | provide compiler-independence.
- | 3) MK_FPT() is VERY useful in C++, where void pointers are not usually
- | allowed without bizarre casts.
- *======================================================================*/
- #ifndef _TCXLfar_
- # define _TCXLfar_ 1 /* only once! */
- # ifndef _TCXLdef_
- # include <TCXLdef.h> /* standard definitions */
- # endif
- #ifdef MK_FP /* use local definitions */
- # undef MK_FP
- #endif /* anonymous far-pointer */
- #define MK_FP(s,o) ((AnyFP) (((DwdT)(s) << 16) | (WrdT)(o)))
- #ifdef MK_FPT
- # undef MK_FPT
- #endif /* typed far-pointer */
- #define MK_FPT(t,s,o) ((t FAR *) (((DwdT)(s) << 16) | (WrdT)(o)))
-
- /*------------------------[ Function prototypes ]-----------------------*/
-
- #ifdef __cplusplus /* no mangling, please */
- extern "C" {
- #endif
- VOID PAS _FarCpy(WrdT st, WrdT ot, /* Copy between far pointers */
- WrdT sf, WrdT of, WrdT n);
- VOID PAS _CpyFar(BytFP t, BytFP f, WrdT n); /* alias */
- VOID PAS _FarGet(BytP p, WrdT s, /* Copy far to near pointer */
- WrdT o, WrdT n);
- VOID PAS _GetFar(BytP t, BytFP f, WrdT n); /* alias */
- VOID PAS _FarPut(WrdT s, WrdT o, /* Copy near to far pointer */
- BytP p, WrdT n);
- VOID PAS _PutFar(BytFP t, BytP f, WrdT n); /* alias */
- #ifdef __cplusplus
- }
- #endif
- #endif /*- _TCXLfar_ -- End of TCXLfar.h -----------------------------*/