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

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