const-c.inc

filter: Statementstmt 5.6% 10 / 177 Branchbran 1.7% 1 / 58 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 4.6% 11 / 235 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Linux/Personality.pm ↑ Summary const-xs.inc »
1 #define PERL_constant_NOTFOUND 1
2 #define PERL_constant_NOTDEF 2
3 #define PERL_constant_ISIV 3
4 #define PERL_constant_ISNO 4
5 #define PERL_constant_ISNV 5
6 #define PERL_constant_ISPV 6
7 #define PERL_constant_ISPVN 7
8 #define PERL_constant_ISSV 8
9 #define PERL_constant_ISUNDEF 9
10 #define PERL_constant_ISUV 10
11 #define PERL_constant_ISYES 11
12  
13 #ifndef NVTYPE
14 typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
15 #endif
16 #ifndef aTHX_
17 #define aTHX_ /* 5.6 or later define this for threading support. */
18 #endif
19 #ifndef pTHX_
20 #define pTHX_ /* 5.6 or later define this for threading support. */
21 #endif
22  
23 static int
24 0 constant_8 (pTHX_ const char *name, IV *iv_return) {
25 /* When generated this function returned values for the list of names given
26 here. However, subsequent manual editing may have added or removed some.
27 PER_HPUX PER_MASK PER_OSF4 PER_OSR5 PER_SVR3 PER_SVR4 */
28 /* Offset 7 gives the best switch position. */
29 0 switch (name[7]) {
30 0 case '3':
31 0 ▶ if (memEQ(name, "PER_SVR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_SVR", 7)) { 0 0 0
32 /* 3 */
33 0 *iv_return = PER_SVR3;
34 0 return PERL_constant_ISIV;
35 }
36 0 break;
37 0 case '4':
38 0 ▶ if (memEQ(name, "PER_OSF", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_OSF", 7)) { 0 0 0
39 /* 4 */
40 0 *iv_return = PER_OSF4;
41 0 return PERL_constant_ISIV;
42 }
43 0 ▶ if (memEQ(name, "PER_SVR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_SVR", 7)) { 0 0 0
44 /* 4 */
45 0 *iv_return = PER_SVR4;
46 0 return PERL_constant_ISIV;
47 }
48 0 break;
49 0 case '5':
50 0 ▶ if (memEQ(name, "PER_OSR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_OSR", 7)) { 0 0 0
51 /* 5 */
52 0 *iv_return = PER_OSR5;
53 0 return PERL_constant_ISIV;
54 }
55 0 break;
56 0 case 'K':
57 0 ▶ if (memEQ(name, "PER_MAS", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_MAS", 7)) { 0 0 0
58 /* K */
59 0 *iv_return = PER_MASK;
60 0 return PERL_constant_ISIV;
61 }
62 0 break;
63 0 case 'X':
64 0 ▶ if (memEQ(name, "PER_HPU", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_HPU", 7)) { 0 0 0
65 /* X */
66 0 *iv_return = PER_HPUX;
67 0 return PERL_constant_ISIV;
68 }
69 0 break;
70 }
71 0 return PERL_constant_NOTFOUND;
72 }
73  
74 static int
75 0 constant_9 (pTHX_ const char *name, IV *iv_return) {
76 /* When generated this function returned values for the list of names given
77 here. However, subsequent manual editing may have added or removed some.
78 PER_ISCR4 PER_LINUX PER_SUNOS PER_XENIX */
79 /* Offset 7 gives the best switch position. */
80 0 switch (name[7]) {
81 0 case 'I':
82 0 ▶ if (memEQ(name, "PER_XENIX", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_XENIX", 9)) { 0 0 0
83 /* ^ */
84 0 *iv_return = PER_XENIX;
85 0 return PERL_constant_ISIV;
86 }
87 0 break;
88 0 case 'O':
89 0 ▶ if (memEQ(name, "PER_SUNOS", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_SUNOS", 9)) { 0 0 0
90 /* ^ */
91 0 *iv_return = PER_SUNOS;
92 0 return PERL_constant_ISIV;
93 }
94 0 break;
95 0 case 'R':
96 0 ▶ if (memEQ(name, "PER_ISCR4", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_ISCR4", 9)) { 0 0 0
97 /* ^ */
98 0 *iv_return = PER_ISCR4;
99 0 return PERL_constant_ISIV;
100 }
101 0 break;
102 0 case 'U':
103 0 ▶ if (memEQ(name, "PER_LINUX", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_LINUX", 9)) { 0 0 0
104 /* ^ */
105 0 *iv_return = PER_LINUX;
106 0 return PERL_constant_ISIV;
107 }
108 0 break;
109 }
110 0 return PERL_constant_NOTFOUND;
111 }
112  
113 static int
114 0 constant_10 (pTHX_ const char *name, IV *iv_return) {
115 /* When generated this function returned values for the list of names given
116 here. However, subsequent manual editing may have added or removed some.
117 PER_IRIX32 PER_IRIX64 PER_RISCOS */
118 /* Offset 8 gives the best switch position. */
119 0 switch (name[8]) {
120 0 case '3':
121 0 ▶ if (memEQ(name, "PER_IRIX32", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_IRIX32", 10)) { 0 0 0
122 /* ^ */
123 0 *iv_return = PER_IRIX32;
124 0 return PERL_constant_ISIV;
125 }
126 0 break;
127 0 case '6':
128 0 ▶ if (memEQ(name, "PER_IRIX64", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_IRIX64", 10)) { 0 0 0
129 /* ^ */
130 0 *iv_return = PER_IRIX64;
131 0 return PERL_constant_ISIV;
132 }
133 0 break;
134 0 case 'O':
135 0 ▶ if (memEQ(name, "PER_RISCOS", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_RISCOS", 10)) { 0 0 0
136 /* ^ */
137 0 *iv_return = PER_RISCOS;
138 0 return PERL_constant_ISIV;
139 }
140 0 break;
141 }
142 0 return PERL_constant_NOTFOUND;
143 }
144  
145 static int
146 1 constant_11 (pTHX_ const char *name, IV *iv_return) {
147 /* When generated this function returned values for the list of names given
148 here. However, subsequent manual editing may have added or removed some.
149 PER_IRIXN32 PER_LINUX32 PER_SCOSVR3 PER_SOLARIS SHORT_INODE */
150 /* Offset 8 gives the best switch position. */
151 1 switch (name[8]) {
152 0 case 'N':
153 0 ▶ if (memEQ(name, "PER_IRIXN32", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_IRIXN32", 11)) { 0 0 0
154 /* ^ */
155 0 *iv_return = PER_IRIXN32;
156 0 return PERL_constant_ISIV;
157 }
158 0 break;
159 0 case 'O':
160 0 ▶ if (memEQ(name, "SHORT_INODE", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHORT_INODE", 11)) { 0 0 0
161 /* ^ */
162 0 *iv_return = SHORT_INODE;
163 0 return PERL_constant_ISIV;
164 }
165 0 break;
166 0 case 'R':
167 0 ▶ if (memEQ(name, "PER_SOLARIS", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_SOLARIS", 11)) { 0 0 0
168 /* ^ */
169 0 *iv_return = PER_SOLARIS;
170 0 return PERL_constant_ISIV;
171 }
172 0 break;
173 0 case 'V':
174 0 ▶ if (memEQ(name, "PER_SCOSVR3", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_SCOSVR3", 11)) { 0 0 0
175 /* ^ */
176 0 *iv_return = PER_SCOSVR3;
177 0 return PERL_constant_ISIV;
178 }
179 0 break;
180 1 case 'X':
181 1 ▶ if (memEQ(name, "PER_LINUX32", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_LINUX32", 11)) { 1 0 1
182 /* ^ */
183 1 *iv_return = PER_LINUX32;
184 1 return PERL_constant_ISIV;
185 }
186 0 break;
187 }
188 0 return PERL_constant_NOTFOUND;
189 }
190  
191 static int
192 0 constant_15 (pTHX_ const char *name, IV *iv_return) {
193 /* When generated this function returned values for the list of names given
194 here. However, subsequent manual editing may have added or removed some.
195 PER_LINUX32_3GB PER_LINUX_32BIT STICKY_TIMEOUTS */
196 /* Offset 13 gives the best switch position. */
197 0 switch (name[13]) {
198 0 case 'G':
199 0 ▶ if (memEQ(name, "PER_LINUX32_3GB", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_LINUX32_3GB", 15)) { 0 0 0
200 /* ^ */
201 0 *iv_return = PER_LINUX32_3GB;
202 0 return PERL_constant_ISIV;
203 }
204 0 break;
205 0 case 'I':
206 0 ▶ if (memEQ(name, "PER_LINUX_32BIT", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "PER_LINUX_32BIT", 15)) { 0 0 0
207 /* ^ */
208 0 *iv_return = PER_LINUX_32BIT;
209 0 return PERL_constant_ISIV;
210 }
211 0 break;
212 0 case 'T':
213 0 ▶ if (memEQ(name, "STICKY_TIMEOUTS", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "STICKY_TIMEOUTS", 15)) { 0 0 0
214 /* ^ */
215 0 *iv_return = STICKY_TIMEOUTS;
216 0 return PERL_constant_ISIV;
217 }
218 0 break;
219 }
220 0 return PERL_constant_NOTFOUND;
221 }
222  
223 static int
224 1 constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
225 /* Initially switch on the length of the name. */
226 /* When generated this function returned values for the list of names given
227 in this section of perl code. Rather than manually editing these functions
228 to add or remove constants, which would result in this comment and section
229 of code becoming inaccurate, we recommend that you edit this section of
230 code, and use it to regenerate a new set of constant functions which you
231 then use to replace the originals.
232  
233 Regenerate these constant functions by feeding this entire source file to
234 perl -x
235  
236 #!/usr/local/bin/perl -w
237 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
238  
239 my $types = {map {($_, 1)} qw(IV)};
240 my @names = (qw(),
241 {name=>"ADDR_LIMIT_32BIT", type=>"IV", macro=>"1"},
242 {name=>"ADDR_LIMIT_3GB", type=>"IV", macro=>"1"},
243 {name=>"ADDR_NO_RANDOMIZE", type=>"IV", macro=>"1"},
244 {name=>"MMAP_PAGE_ZERO", type=>"IV", macro=>"1"},
245 {name=>"PER_BSD", type=>"IV", macro=>"1"},
246 {name=>"PER_HPUX", type=>"IV", macro=>"1"},
247 {name=>"PER_IRIX32", type=>"IV", macro=>"1"},
248 {name=>"PER_IRIX64", type=>"IV", macro=>"1"},
249 {name=>"PER_IRIXN32", type=>"IV", macro=>"1"},
250 {name=>"PER_ISCR4", type=>"IV", macro=>"1"},
251 {name=>"PER_LINUX", type=>"IV", macro=>"1"},
252 {name=>"PER_LINUX32", type=>"IV", macro=>"1"},
253 {name=>"PER_LINUX32_3GB", type=>"IV", macro=>"1"},
254 {name=>"PER_LINUX_32BIT", type=>"IV", macro=>"1"},
255 {name=>"PER_MASK", type=>"IV", macro=>"1"},
256 {name=>"PER_OSF4", type=>"IV", macro=>"1"},
257 {name=>"PER_OSR5", type=>"IV", macro=>"1"},
258 {name=>"PER_RISCOS", type=>"IV", macro=>"1"},
259 {name=>"PER_SCOSVR3", type=>"IV", macro=>"1"},
260 {name=>"PER_SOLARIS", type=>"IV", macro=>"1"},
261 {name=>"PER_SUNOS", type=>"IV", macro=>"1"},
262 {name=>"PER_SVR3", type=>"IV", macro=>"1"},
263 {name=>"PER_SVR4", type=>"IV", macro=>"1"},
264 {name=>"PER_UW7", type=>"IV", macro=>"1"},
265 {name=>"PER_WYSEV386", type=>"IV", macro=>"1"},
266 {name=>"PER_XENIX", type=>"IV", macro=>"1"},
267 {name=>"SHORT_INODE", type=>"IV", macro=>"1"},
268 {name=>"STICKY_TIMEOUTS", type=>"IV", macro=>"1"},
269 {name=>"WHOLE_SECONDS", type=>"IV", macro=>"1"});
270  
271 print constant_types(), "\n"; # macro defs
272 foreach (C_constant ("Linux::Personality", 'constant', 'IV', $types, undef, 3, @names) ) {
273 print $_, "\n"; # C constant subs
274 }
275 print "\n#### XS Section:\n";
276 print XS_constant ("Linux::Personality", $types);
277 __END__
« blib/lib/Linux/Personality.pm ↑ Summary const-xs.inc »