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-dpx.h < prev    next >
C/C++ Source or Header  |  1998-10-07  |  5KB  |  188 lines

  1. #ifndef _PICO_OS_INCLUDED
  2. #define _PICO_OS_INCLUDED
  3.  
  4.  
  5. /*----------------------------------------------------------------------
  6.  
  7.    OS dependencies, Bull DPX/2 B.O.S. version.  See also the os-dpx.c file.
  8.    The following stuff may need to be changed for a new port, but once
  9.    the port is done, it won't change.  At the bottom of the file are a few
  10.    constants that you may want to configure differently than they
  11.    are configured, but probably not.
  12.  
  13.  ----*/
  14.  
  15.  
  16.  
  17. /*----------------- Are we ANSI? ---------------------------------------*/
  18. /* #define ANSI  */      /* this is an ANSI compiler */
  19.  
  20. /*------ If our compiler doesn't understand type void ------------------*/
  21. /* #define void char */  /* no void in compiler */
  22.  
  23.  
  24. FILE *tmpfile();
  25. #include <string.h>
  26. #include <sys/types.h>
  27. #include <stdlib.h>
  28.  
  29. #define  USE_DIRENT
  30. #include <dirent.h>
  31.  
  32.  
  33. /*------- Some more includes that should usually be correct ------------*/
  34. #include <pwd.h>
  35. #include <sys/wait.h>
  36. #include <sys/stat.h>
  37. #include <fcntl.h>
  38. #include <netdb.h>
  39.  
  40.  
  41.  
  42. /*----------------- locale.h -------------------------------------------*/
  43. /* #include <locale.h> */ /* To make matching and sorting work right */
  44. #define collator strucmp
  45.  
  46.  
  47.  
  48. /*----------------- time.h ---------------------------------------------*/
  49. #include <time.h>
  50. /* plain time.h isn't enough on some systems */
  51. #include <sys/time.h>  /* For struct timeval usually in time.h */ 
  52.  
  53.  
  54.  
  55. /*--------------- signal.h ---------------------------------------------*/
  56. #include <signal.h>      /* sometimes both required, sometimes */
  57. /* #include <sys/signal.h> */ /* only one or the other */
  58.  
  59. #define SigType void     /* value returned by sig handlers is void */
  60. /* #define SigType int  */  /* value returned by sig handlers is int */
  61.  
  62. /* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
  63. #define SYSV_SIGNALS    /* use System-V signal semantics (ttyin.c) */
  64.  
  65. #define    SIG_PROTO(args) ()
  66.  
  67.  
  68.  
  69. /*-------------- A couple typedef's for integer sizes ------------------*/
  70. typedef unsigned int usign32_t;
  71. typedef unsigned short usign16_t;
  72.  
  73.  
  74.  
  75. /*-------------- qsort argument type -----------------------------------*/
  76. /* #define QSType void */
  77. #define QSType char  /* qsort arg is of type char * */
  78.  
  79.  
  80.  
  81. /*-------------- fcntl flag to set non-blocking IO ---------------------*/
  82. #define    NON_BLOCKING_IO    O_NONBLOCK        /* POSIX style */
  83. /*#define    NON_BLOCKING_IO    FNDELAY */    /* good ol' bsd style  */
  84.  
  85.  
  86.  
  87. /*
  88.  * Choose one of the following three terminal drivers
  89.  */
  90.  
  91. /*--------- Good 'ol BSD -----------------------------------------------*/
  92. /* #include <sgtty.h>  */  /* BSD-based systems */
  93.  
  94. /*--------- System V terminal driver -----------------------------------*/
  95. /* #define HAVE_TERMIO  */ /* this is for pure System V */
  96. /* #include <termio.h>  */ /* Sys V */
  97.  
  98. /*--------- POSIX terminal driver --------------------------------------*/
  99. #define HAVE_TERMIOS    /* this is an alternative */
  100. #include <termios.h>    /* POSIX */
  101.  
  102.  
  103.  
  104. /* Don't need to define this but do need to use either read.sel or read.pol
  105.  * in osdep. */
  106. /*-------- Use poll system call instead of select ----------------------*/
  107. /* #define USE_POLL */     /* use the poll() system call instead of select() */
  108.  
  109.  
  110.  
  111. /*-------- Use terminfo database instead of termcap --------------------*/
  112. /* #define USE_TERMINFO */ /* use terminfo instead of termcap */
  113. #define USE_TERMCAP    /* use termcap */
  114.  
  115.  
  116.  
  117. /*------------ DPX needs this for types passed select() ------------*/
  118. #include <sys/select.h>
  119.  
  120.  
  121.  
  122. /*-- What argument does wait(2) take? Define this if it is a union -----*/
  123. /* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
  124.  
  125.  
  126.  
  127. /*-------- Is window resizing available? -------------------------------*/
  128. #if defined(TIOCGWINSZ) && defined(SIGWINCH)
  129. #define RESIZING  /* SIGWINCH and friends */
  130. #endif
  131.  
  132.  
  133.  
  134. /*-------- If no vfork, use regular fork -------------------------------*/
  135. #define vfork fork  /* vfork is just a lightweight fork, so can use fork */
  136.  
  137.  
  138.  
  139. /*---- When no screen size can be discovered this is the size used -----*/
  140. #define DEFAULT_LINES_ON_TERMINAL    (24)
  141. #define DEFAULT_COLUMNS_ON_TERMINAL    (80)
  142. #define NROW    DEFAULT_LINES_ON_TERMINAL
  143. #define NCOL    DEFAULT_COLUMNS_ON_TERMINAL
  144.  
  145.  
  146. /*----------------------------------------------------------------------
  147.  
  148.    Pico OS dependencies.
  149.  
  150.  ----*/
  151.  
  152.  
  153. /*
  154.  * File name separator, as a char and string
  155.  */
  156. #define C_FILESEP    '/'
  157. #define S_FILESEP    "/"
  158.  
  159. /*
  160.  * Place where mail gets delivered (for pico's new mail checking)
  161.  */
  162. #define MAILDIR        "/usr/spool/mail"
  163.  
  164. /*
  165.  * What and where the tool that checks spelling is located.  If this is
  166.  * undefined, then the spelling checker is not compiled into pico.
  167.  */
  168. #define SPELLER        "/usr/bin/spell"
  169.  
  170. #ifdef    MOUSE
  171. #define    XTERM_MOUSE_ON    "\033[?1000h"    /* DECSET with parm 1000 */
  172. #define    XTERM_MOUSE_OFF    "\033[?1000l"    /* DECRST with parm 1000  */
  173. #endif
  174.  
  175. /*
  176.  * Mode passed chmod() to make tmp files exclusively user read/write-able
  177.  */
  178. #define    MODE_READONLY    (0600)
  179.  
  180. /*
  181.  * Make sys_errlist visible
  182.  */
  183. extern char *sys_errlist[];
  184. extern int   sys_nerr;
  185.  
  186.  
  187. #endif /* _PICO_OS_INCLUDED */
  188.