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-ult.h < prev    next >
C/C++ Source or Header  |  1998-10-08  |  5KB  |  178 lines

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