home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / SNPD9404.ZIP / PORTABLE.H < prev    next >
C/C++ Source or Header  |  1994-04-03  |  2KB  |  66 lines

  1. .I 6 4
  2.     __TURBOC__      Borland Turbo C, Turbo C++, and Borland C++
  3.     __BORLANDC__    Borland C++
  4.     __ZTC__         Zortech C++ and Symantec C++
  5.     __SC__          Symantec C++
  6. .D 7 2
  7. .I 9 10
  8.     __POWERC        Mix Power C
  9.  
  10.     Revised:
  11.     09/14/93  Fred Cole  Moved MK_FP() macro to end of file to avoid
  12.                          redefinition error when dos.h gets included
  13.                          at the in/outport definitions for __TURBOC__
  14.     09/15/93  Thad Smith Add conditional code for TC 2.01
  15.                          Fix findfirst/findnext support for ZTC 3.0
  16.     10/15/93  Bob Stout  Revise find first/next support
  17.     04/03/94  Bob Stout  Add Power C support, FAR
  18. .I 17 8
  19. /*
  20. **  Correct far pointer syntax
  21. */
  22.  
  23. #if defined(__POWERC) || (defined(__TURBOC__) && !defined(__BORLANDC__))
  24.  #define FAR far
  25. #else
  26.  #define FAR _far
  27. .D 18 8
  28. .I 41 1
  29. #elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
  30. .D 42 1
  31. .I 62 1
  32. #elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
  33. .D 63 1
  34. .I 79 3
  35.  #define FIND_FIRST(spec,attr,buf) _dos_findfirst(spec,attr,\
  36.        (struct find_t *)buf)
  37.  #define FIND_NEXT(buf) _dos_findnext((struct find_t *)buf)
  38. .D 80 3
  39. .I 118 1
  40.  extern union REGS CPURegs;
  41. .D 119 1
  42. .I 125 8
  43.  #define _AH CPURegs.h.ah
  44.  #define _AL CPURegs.h.al
  45.  #define _BH CPURegs.h.bh
  46.  #define _BL CPURegs.h.bl
  47.  #define _CH CPURegs.h.ch
  48.  #define _CL CPURegs.h.cl
  49.  #define _DH CPURegs.h.dh
  50.  #define _DL CPURegs.h.dl
  51. .D 126 8
  52. .I 142 12
  53.  
  54. /*----------------------------------------------------------------------------
  55.     Pointer-related macros
  56.  
  57.     MK_FP   creates a far pointer from segment and offset values
  58. ----------------------------------------------------------------------------*/
  59.  
  60. #if !defined(MK_FP)
  61.     #define MK_FP(seg,off) ((void FAR *)(((long)(seg) << 16)|(unsigned)(off)))
  62. #endif
  63.  
  64. #endif
  65. .D 143 1
  66.