30#define _RWSTD_TEST_SRC
47_rw_disabled_types = 0;
54_rw_enable_type (
int bit,
int enable)
56 const int set_mask = 1 << bit;
59 _rw_enabled_types |= set_mask;
61 _rw_disabled_types |= set_mask;
67#define DEFINE_HANDLERS(T) \
68 static int _rw_no_ ## T (int, char *[]) { \
69 return _rw_enable_type (rw_ ## T, false); \
71 static int _rw_en_ ## T (int, char *[]) { \
72 return _rw_enable_type (rw_ ## T, true); \
74 typedef void unused_type
100 "|-no-bool |-no-char |-no-schar |-no-uchar "
101 "|-no-shrt |-no-ushrt "
102 "|-no-int |-no-uint "
103 "|-no-long |-no-ulong "
104 "|-no-llong |-no-ullong "
105 "|-no-flt |-no-dbl |-no-ldbl "
106 "|-no-wchar |-no-pvoid "
108 "|-enable-bool |-enable-char |-enable-schar |-enable-uchar "
109 "|-enable-shrt |-enable-ushrt "
110 "|-enable-int |-enable-uint "
111 "|-enable-long |-enable-ulong "
112 "|-enable-llong |-enable-ullong "
113 "|-enable-flt |-enable-dbl |-enable-ldbl "
114 "|-enable-wchar |-enable-pvoid",
116 _rw_no_bool, _rw_no_char, _rw_no_schar, _rw_no_uchar,
117 _rw_no_shrt, _rw_no_ushrt,
118 _rw_no_int, _rw_no_uint,
119 _rw_no_long, _rw_no_ulong,
120 _rw_no_llong, _rw_no_ullong,
121 _rw_no_flt, _rw_no_dbl, _rw_no_ldbl,
122 _rw_no_wchar, _rw_no_pvoid,
124 _rw_en_bool, _rw_en_char, _rw_en_schar, _rw_en_uchar,
125 _rw_en_shrt, _rw_en_ushrt,
126 _rw_en_int, _rw_en_uint,
127 _rw_en_long, _rw_en_ulong,
128 _rw_en_llong, _rw_en_ullong,
129 _rw_en_flt, _rw_en_dbl, _rw_en_ldbl,
130 _rw_en_wchar, _rw_en_pvoid);
142 static const struct {
193 for (
size_t i = 0;
i !=
sizeof types /
sizeof *types; ++
i) {
194 if (0 == strcmp (types [
i].
name,
name)) {
195 const int mask = 1 << types [
i].bit;
197 enabled = !(_rw_disabled_types & mask);
199 if (_rw_enabled_types)
200 enabled = enabled && (_rw_enabled_types & mask);
_TEST_EXPORT int rw_enabled(const char *name)
#define DEFINE_HANDLERS(T)
_TEST_EXPORT int rw_setopts(const char *optspec,...)