1 /* source: xioopen.h */
2 /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __xioopen_h_included
6 #define __xioopen_h_included 1
8 #include "compat.h" /* F_pid */
30 /* xioinitialize performs asserts on these records */
31 extern const struct optdesc opt_crdly
;
32 extern const struct optdesc opt_tabdly
;
33 extern const struct optdesc opt_csize
;
38 const struct addrdesc
*desc
;
41 extern const char *ddirection
[];
42 extern const char *filetypenames
[];
43 extern const struct addrname addressnames
[];
44 extern const struct optname optionnames
[];
46 extern int xioopen_makedual(xiofile_t
*file
);
49 extern int xio_syntax(const char *addr
, int expectnum
, int isnum
, const char *syntax
);
51 #define xio_syntax(a,e,i,s) Error3("%s: wrong number of parameters (%d instead of %d)", a, i, e);
54 #define retropt_2bytes(o,c,r) retropt_ushort(o,c,r)
56 /* mode_t might be unsigned short or unsigned int or what else? */
57 #if HAVE_BASIC_MODE_T==1
58 # define retropt_modet(x,y,z) retropt_short(x,y,z)
59 #elif HAVE_BASIC_MODE_T==2
60 # define retropt_modet(x,y,z) retropt_ushort(x,y,z)
61 #elif HAVE_BASIC_MODE_T==3
62 # define retropt_modet(x,y,z) retropt_int(x,y,z)
63 #elif HAVE_BASIC_MODE_T==4
64 # define retropt_modet(x,y,z) retropt_uint(x,y,z)
65 #elif HAVE_BASIC_MODE_T==5
66 # define retropt_modet(x,y,z) retropt_long(x,y,z)
67 #elif HAVE_BASIC_MODE_T==6
68 # define retropt_modet(x,y,z) retropt_ulong(x,y,z)
71 #if HAVE_BASIC_UID_T==1
72 # define retropt_uidt(x,y,z) retropt_short(x,y,z)
73 #elif HAVE_BASIC_UID_T==2
74 # define retropt_uidt(x,y,z) retropt_ushort(x,y,z)
75 #elif HAVE_BASIC_UID_T==3
76 # define retropt_uidt(x,y,z) retropt_int(x,y,z)
77 #elif HAVE_BASIC_UID_T==4
78 # define retropt_uidt(x,y,z) retropt_uint(x,y,z)
79 #elif HAVE_BASIC_UID_T==5
80 # define retropt_uidt(x,y,z) retropt_long(x,y,z)
81 #elif HAVE_BASIC_UID_T==6
82 # define retropt_uidt(x,y,z) retropt_ulong(x,y,z)
85 #if HAVE_BASIC_GID_T==1
86 # define retropt_gidt(x,y,z) retropt_short(x,y,z)
87 #elif HAVE_BASIC_GID_T==2
88 # define retropt_gidt(x,y,z) retropt_ushort(x,y,z)
89 #elif HAVE_BASIC_GID_T==3
90 # define retropt_gidt(x,y,z) retropt_int(x,y,z)
91 #elif HAVE_BASIC_GID_T==4
92 # define retropt_gidt(x,y,z) retropt_uint(x,y,z)
93 #elif HAVE_BASIC_GID_T==5
94 # define retropt_gidt(x,y,z) retropt_long(x,y,z)
95 #elif HAVE_BASIC_GID_T==6
96 # define retropt_gidt(x,y,z) retropt_ulong(x,y,z)
100 #endif /* !defined(__xioopen_h_included) */