home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / txcl552 / inc / tcxlfar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-15  |  2.6 KB  |  54 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
  3.  | All Rights Reserved.
  4.  |
  5.  | This Library is part of IDC's TesSeRact Development Tools product
  6.  | line. For information about other IDC products, call  1-215-443-9705.
  7.  *-V--------------------------------------------------------------------*
  8.  | $Header:   tcxlfar.h     552.0   17 Mar 1991 18:26:36  $
  9.  |
  10.  | $Log:   tcxlfar.h    $
  11.  *-D--------------------------------------------------------------------*
  12.  | <TCXLfar.h> : Definitions and prototypes for handling explicit, typed
  13.  | far-pointers as used internally in TCXL 5.5.
  14.  *-N-----------------------[ Notes and Caveats ]------------------------*
  15.  | 1) The _XxxFar() aliases take full far pointers and the _FarXxx()
  16.  |    functions take separate segments and offsets.
  17.  | 2) The MK_FP() and MK_FPT() macros override system definitions and
  18.  |    provide compiler-independence.
  19.  | 3) MK_FPT() is VERY useful in C++, where void pointers are not usually
  20.  |    allowed without bizarre casts.
  21.  *======================================================================*/
  22. #ifndef  _TCXLfar_
  23. #  define   _TCXLfar_ 1                /* only once!                    */
  24. #  ifndef   _TCXLdef_
  25. #     include  <TCXLdef.h>             /* standard definitions          */
  26. #  endif
  27. #ifdef   MK_FP                         /* use local definitions         */
  28. #  undef    MK_FP
  29. #endif                                 /* anonymous far-pointer         */
  30. #define  MK_FP(s,o)     ((AnyFP) (((DwdT)(s) << 16) | (WrdT)(o)))
  31. #ifdef   MK_FPT
  32. #  undef    MK_FPT
  33. #endif                                 /* typed far-pointer             */
  34. #define  MK_FPT(t,s,o)  ((t FAR *) (((DwdT)(s) << 16) | (WrdT)(o)))
  35.  
  36. /*------------------------[ Function prototypes ]-----------------------*/
  37.  
  38. #ifdef   __cplusplus                   /* no mangling, please           */
  39.    extern   "C"   {
  40. #endif
  41. VOID  PAS   _FarCpy(WrdT st, WrdT ot,  /* Copy between far pointers     */
  42.    WrdT sf, WrdT of, WrdT n);
  43. VOID  PAS   _CpyFar(BytFP t, BytFP f, WrdT n);              /* alias    */
  44. VOID  PAS   _FarGet(BytP p, WrdT s,    /* Copy far to near pointer      */
  45.    WrdT o, WrdT n);
  46. VOID  PAS   _GetFar(BytP t, BytFP f, WrdT n);               /* alias    */
  47. VOID  PAS   _FarPut(WrdT s, WrdT o,    /* Copy near to far pointer      */
  48.    BytP p, WrdT n);
  49. VOID  PAS   _PutFar(BytFP t, BytP f, WrdT n);               /* alias    */
  50. #ifdef   __cplusplus
  51.    }
  52. #endif
  53. #endif   /*- _TCXLfar_ -- End of TCXLfar.h -----------------------------*/
  54.