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

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