home *** CD-ROM | disk | FTP | other *** search
/ Computer Panoráma / computer_panorama_1997-12-hibas.iso / SHARE / GRAPH / PTC051.ZIP / SRC / NEAR.H < prev    next >
C/C++ Source or Header  |  1997-06-09  |  653b  |  60 lines

  1. //////////////////////////
  2. // near memory routines //
  3. //////////////////////////
  4.  
  5. #ifndef __NEAR_H
  6. #define __NEAR_H
  7.  
  8. #include "misc.h"
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. // prototypes
  17. inline void* AdjustNearPointer(void *pointer);
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. #if defined(__DJGPP__)
  27.  
  28. // djgpp implementation
  29. #include <sys/nearptr.h>
  30. #include <crt0.h>
  31. extern int _crt0_startup_flags;
  32.  
  33. inline void* AdjustNearPointer(void *pointer)
  34. {
  35.     return (void*)((uint)pointer+__djgpp_conventional_base);
  36. }
  37.  
  38.  
  39.  
  40. #else
  41.  
  42. // skeletal implementation
  43. inline void* AdjustNearPointer(void *pointer)
  44. {
  45.     // no change
  46.     return pointer;
  47. }
  48.  
  49. #endif
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. #endif