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

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