home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 38.ddi / root.3 / usr / include / stand.h / stand.h
Encoding:
C/C++ Source or Header  |  1990-10-02  |  2.7 KB  |  180 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1988 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ident    "@(#)/usr/include/stand.h.sl 1.2 5.0 08/27/90 37903 AT&T-USO 1.3"
  11.  
  12. #ifndef _STAND_H
  13. #define _STAND_H
  14.  
  15. /*
  16.  * Header file for standalone package
  17.  */
  18.  
  19. #if defined(__STDC__)
  20.  
  21. #if #machine(vax)
  22. #define    FsTYPE    2
  23. #else
  24. #define    FsTYPE    1
  25. #endif
  26.  
  27. #else
  28. #ifdef vax
  29. #define    FsTYPE    2
  30. #else
  31. #define    FsTYPE    1
  32. #endif
  33.  
  34. #endif     /* __STDC__ */
  35.  
  36. #ifndef _ERRNO_H
  37. #include "errno.h"
  38. #endif
  39.  
  40. #ifndef _SYS_PARAM_H
  41. #include "sys/param.h"
  42. #endif
  43. #ifndef _SYS_TYPES_H
  44. #include "sys/types.h"
  45. #endif
  46. #ifndef _SYS_INODE_H
  47. #include "sys/inode.h"
  48. #endif
  49.  
  50. /*
  51.  * I/O block flags
  52.  */
  53.  
  54. #define F_READ    01
  55. #define F_WRITE    02
  56. #define F_ALLOC    04
  57. #define F_FILE    010
  58.  
  59. /*
  60.  * Request codes -- must be
  61.  * the same as an F_XXX above
  62.  */
  63.  
  64. #define    READ    1
  65. #define    WRITE    2
  66.  
  67. /*
  68.  * Buffer sizes
  69.  */
  70.  
  71. #if FsTYPE == 2
  72. #define BLKSIZ    1024
  73. #else
  74. #define BLKSIZ    512
  75. #endif
  76. #define NAMSIZ    60
  77.  
  78. /*
  79.  * devsw table --
  80.  * initialized in conf.c
  81.  */
  82.  
  83. struct devsw {
  84.     int    (*dv_strategy)();
  85.     int    (*dv_open)();
  86.     int    (*dv_close)();
  87. };
  88. extern struct devsw _devsw[];
  89.  
  90. /*
  91.  * dtab table -- entries
  92.  * are created by MKNOD
  93.  */
  94.  
  95. #define NDEV    16
  96.  
  97. struct dtab {
  98.     char        *dt_name;
  99.     struct devsw    *dt_devp;
  100.     int        dt_unit;
  101.     daddr_t        dt_boff;
  102. };
  103. extern struct dtab _dtab[];
  104.  
  105. /*
  106.  * mtab table -- entries
  107.  * are created by mount
  108.  */
  109.  
  110. #define NMOUNT    8
  111.  
  112. struct mtab {
  113.     char        *mt_name;
  114.     struct dtab    *mt_dp;
  115. };
  116. extern struct mtab _mtab[];
  117.  
  118. /*
  119.  * I/O block: includes an inode,
  120.  * cells for the use of seek, etc,
  121.  * and a buffer.
  122.  */
  123.  
  124. #define NFILES    6
  125.  
  126. struct iob {
  127.     char        i_flgs;
  128.     struct inode    i_ino;
  129.     time_t        i_atime;
  130.     time_t        i_mtime;
  131.     time_t        i_ctime;
  132.     struct dtab    *i_dp;
  133.     off_t        i_offset;
  134.     daddr_t        i_bn;        /* disk block number (physical) */
  135.     char        *i_ma;
  136.     int        i_cc;        /* character count */
  137.     char        i_buf[BLKSIZ];
  138. };
  139. extern struct iob _iobuf[];
  140.  
  141. #if defined(__STDC__)
  142.  
  143. #if #machine(pdp11)
  144. /*
  145.  * Set to which 32Kw segment the code is physically running in.
  146.  * Must be set by the user's main (or thereabouts).
  147.  */
  148.  
  149. int    segflag;
  150. #endif
  151.  
  152. #else
  153. #ifdef pdp11
  154.  
  155. int    segflag;
  156. #endif
  157.  
  158. #endif    /* __STDC__ */
  159.  
  160. /*
  161.  * Set to the error type of the routine that
  162.  * last returned an error -- may be read by perror.
  163.  */
  164.  
  165. #define    RAW    040
  166. #define    LCASE    04
  167. #define    XTABS    02
  168. #define    ECHO    010
  169. #define    CRMOD    020
  170. #define B300    7
  171. struct sgttyb {
  172.     char    sg_ispeed;        /* input speed */
  173.     char    sg_ospeed;        /* output speed */
  174.     char    sg_erase;        /* erase character */
  175.     char    sg_kill;        /* kill character */
  176.     int    sg_flags;        /* mode flags */
  177. };
  178.  
  179. #endif     /* _STAND_H */
  180.