home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / DJDEV203.ZIP / include / go32.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-15  |  2.0 KB  |  74 lines

  1. /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
  2. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  3. #ifndef __dj_include_go32_h_
  4. #define __dj_include_go32_h_
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  11.  
  12. #ifndef __STRICT_ANSI__
  13.  
  14. #ifndef _POSIX_SOURCE
  15.  
  16. #include <sys/version.h>
  17. #include <sys/djtypes.h>
  18.  
  19. __DJ_size_t
  20. #undef __DJ_size_t
  21. #define __DJ_size_t
  22.  
  23. typedef struct {
  24.   unsigned long  size_of_this_structure_in_bytes;
  25.   unsigned long  linear_address_of_primary_screen;
  26.   unsigned long  linear_address_of_secondary_screen;
  27.   unsigned long  linear_address_of_transfer_buffer;
  28.   unsigned long  size_of_transfer_buffer; /* >= 4k */
  29.   unsigned long  pid;
  30.   unsigned char  master_interrupt_controller_base;
  31.   unsigned char  slave_interrupt_controller_base;
  32.   unsigned short selector_for_linear_memory;
  33.   unsigned long  linear_address_of_stub_info_structure;
  34.   unsigned long  linear_address_of_original_psp;
  35.   unsigned short run_mode;
  36.   unsigned short run_mode_info;
  37. } __Go32_Info_Block;
  38.  
  39. extern __Go32_Info_Block _go32_info_block;
  40.  
  41. #define _GO32_RUN_MODE_UNDEF    0
  42. #define _GO32_RUN_MODE_RAW    1
  43. #define _GO32_RUN_MODE_XMS    2
  44. #define _GO32_RUN_MODE_VCPI    3
  45. #define _GO32_RUN_MODE_DPMI    4
  46.  
  47. #include <sys/movedata.h>
  48. #include <sys/segments.h>
  49.  
  50. #define _go32_my_cs _my_cs
  51. #define _go32_my_ds _my_ds
  52. #define _go32_my_ss _my_ss
  53. #define _go32_conventional_mem_selector() _go32_info_block.selector_for_linear_memory
  54. #define _dos_ds _go32_info_block.selector_for_linear_memory
  55.  
  56. #define __tb _go32_info_block.linear_address_of_transfer_buffer
  57.  
  58. /* returns number of times hit since last call. (zero first time) */
  59. unsigned _go32_was_ctrl_break_hit(void);
  60. void     _go32_want_ctrl_break(int yes); /* auto-yes if call above function */
  61.  
  62. #endif /* !_POSIX_SOURCE */
  63. #endif /* !__STRICT_ANSI__ */
  64. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  65.  
  66. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  67. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif /* !__dj_include_go32_h_ */
  74.