home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / pico / osdep / os-dos.h < prev    next >
C/C++ Source or Header  |  1998-10-07  |  5KB  |  196 lines

  1. #line 2 "osdep\os-dos.h"
  2. #ifndef _PICO_OS_INCLUDED
  3. #define _PICO_OS_INCLUDED
  4.  
  5.  
  6. /*----------------------------------------------------------------------
  7.  
  8.    OS dependencies, DOS version.  See also the os-dos.c file.
  9.    The following stuff may need to be changed for a new port, but once
  10.    the port is done, it won't change.  At the bottom of the file are a few
  11.    constants that you may want to configure differently than they
  12.    are configured, but probably not.
  13.  
  14.  ----*/
  15.  
  16.  
  17.  
  18. /*----------------- Are we ANSI? ---------------------------------------*/
  19. #define ANSI          /* this is an ANSI compiler */
  20.  
  21. /*------ If our compiler doesn't understand type void ------------------*/
  22. /* #define void char */  /* no void in compiler */
  23.  
  24. /*-------- Standard ANSI functions usually defined in stdlib.h ---------*/
  25. #include    <stdlib.h>
  26. #include    <string.h>
  27. #include    <dos.h>
  28. #include    <direct.h>
  29. #include    <search.h>
  30. #undef    CTRL
  31. #include    <sys/types.h>
  32. #include    <sys/stat.h>
  33.  
  34. #include <io.h>
  35. #include <sys/stat.h>
  36. #ifdef    PCTCP
  37. #include <4bsddefs.h>            /* PC/TCP Include Files */
  38. #include <netdb.h>
  39. #undef    signal                /* override their stupid def */
  40. #define    sleep    _sleep            /* use pico's sleep function */
  41. #undef    write                /* make way:c-client def's write */
  42. #undef    SIGCHLD
  43. #else
  44. #ifdef    LWP
  45. #include <sys/socket.h>            /* LanWorkplace Include Files */
  46. #include <netinet/in.h>
  47. #include <netdb.h>
  48. #else
  49. #ifdef    PCNFS
  50. #include <tklib.h>
  51. #include <netdb.h>
  52. #define    ENAMETOOLONG    0        /* unsupported errno value */
  53. #else
  54. #include <tcp.h>            /* WATTCP Include File */
  55. #define    ENAMETOOLONG    0        /* unsupported errno value */
  56. #define    word    p_word            /* compensate for bad args labels */
  57. #endif
  58. #endif
  59. #endif
  60. #include <dos.h>
  61. #include <direct.h>
  62. #include <memory.h>
  63. #include <fcntl.h>
  64. #include <sys/timeb.h>
  65.  
  66. #undef ERROR
  67.  
  68.  
  69.  
  70. /*----------------- locale.h -------------------------------------------*/
  71. /* #include <locale.h> */ /* To make matching and sorting work right */
  72. #define collator strucmp
  73.  
  74.  
  75.  
  76. /*----------------- time.h ---------------------------------------------*/
  77. #include <time.h>
  78. /* plain time.h isn't enough on some systems */
  79. /* #include <sys/time.h> */ /* For struct timeval usually in time.h */ 
  80.  
  81.  
  82.  
  83. /*--------------- signal.h ---------------------------------------------*/
  84. #include <signal.h>      /* sometimes both required, sometimes */
  85. /* #include <sys/signal.h> */ /* only one or the other */
  86.  
  87. #define SigType void     /* value returned by sig handlers is void */
  88. /* #define SigType int  */  /* value returned by sig handlers is int */
  89.  
  90. /* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
  91. /* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
  92.  
  93. #define    SIG_PROTO(args) args
  94.  
  95.  
  96.  
  97. /*-------------- A couple typedef's for integer sizes ------------------*/
  98. typedef unsigned long usign32_t;
  99. typedef unsigned short usign16_t;
  100.  
  101.  
  102.  
  103. /*-------------- qsort argument type -----------------------------------*/
  104. #define QSType void  /* qsort arg is of type void * */
  105. /* #define QSType char */
  106.  
  107.  
  108.  
  109. /*-------- Use terminfo database instead of termcap --------------------*/
  110. /* #define USE_TERMINFO */ /* use terminfo instead of termcap */
  111. /* #define USE_TERMCAP */ /* use termcap */
  112.  
  113.  
  114.  
  115. /*-------- Is window resizing available? -------------------------------*/
  116. /* #define RESIZING */ /* SIGWINCH and friends */
  117.     /* Actually, under windows it is, but RESIZING compiles in UNIX
  118.      * signals code for determining when the window resized.  Window's
  119.      * works differently. */
  120.  
  121.  
  122.  
  123. /*-------- If no vfork, use regular fork -------------------------------*/
  124. /* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
  125.  
  126.  
  127.  
  128. /*---- When no screen size can be discovered this is the size used -----*/
  129. #define DEFAULT_LINES_ON_TERMINAL    (25)
  130. #define DEFAULT_COLUMNS_ON_TERMINAL    (80)
  131. #define NROW    DEFAULT_LINES_ON_TERMINAL
  132. #define NCOL    DEFAULT_COLUMNS_ON_TERMINAL
  133.  
  134.  
  135. /*----------------------------------------------------------------------
  136.  
  137.    Pico OS dependencies.
  138.  
  139.  ----*/
  140.  
  141.  
  142. /*
  143.  * File name separator, as a char and string
  144.  */
  145. #define C_FILESEP    '\\'
  146. #define S_FILESEP    "\\"
  147.  
  148. /*
  149.  * What and where the tool that checks spelling is located.  If this is
  150.  * undefined, then the spelling checker is not compiled into pico.
  151.  */
  152. #undef SPELLER
  153.  
  154. /*
  155.  * Mode passed chmod() to make tmp files exclusively user read/write-able
  156.  */
  157. #define    MODE_READONLY    (S_IREAD | S_IWRITE)
  158.  
  159. #define IBMPC   1
  160.  
  161. #ifdef  PCTCP
  162. #define sleep   _sleep
  163. #define _O_RDONLY O_RDONLY
  164. #endif
  165.  
  166. /*
  167.  *  IBM PC ROM BIOS Services used
  168.  */
  169. #define BIOS_VIDEO      0x10
  170. #define BIOS_KEYBRD     0x16
  171. #define BIOS_MOUSE      0x33
  172. #define DOS_MULTIPLEX   0x2f
  173.  
  174. #ifdef  maindef
  175. /*      possible names and paths of help files under different OSs      */
  176.  
  177. char *pathname[] = {
  178.     "picorc",
  179.     "pico.hlp",
  180.     "\\usr\\local\\",
  181.     "\\usr\\lib\\",
  182.     ""
  183. };
  184.  
  185. #define NPNAMES (sizeof(pathname)/sizeof(char *))
  186.  
  187. /*
  188.  * Make sys_errlist visible
  189.  */
  190. extern char *sys_errlist[];
  191. extern int   sys_nerr;
  192.  
  193. jmp_buf got_hup;
  194.  
  195. #endif /* _PICO_OS_INCLUDED */
  196.