const-c.inc

filter: Statementstmt 30.7% 32 / 104 Branchbran 16.6% 6 / 36 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 27.1% 38 / 140 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« buffer.c ↑ Summary html_smartypants.c »
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_17 (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 MKDA_NOT_AUTOLINK MKD_TABLE_ALIGN_L MKD_TABLE_ALIGN_R UPSKIRT_VER_MAJOR
28 UPSKIRT_VER_MINOR */
29 /* Offset 13 gives the best switch position. */
30 0 switch (name[13]) {
31 0 case 'A':
32 0 ▶ if (memEQ(name, "UPSKIRT_VER_MAJOR", 17)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "UPSKIRT_VER_MAJOR", 17)) { 0 0 0
33 /* ^ */
34 #ifdef UPSKIRT_VER_MAJOR
35 0 *iv_return = UPSKIRT_VER_MAJOR;
36 0 return PERL_constant_ISIV;
37 #else
38 return PERL_constant_NOTDEF;
39 #endif
40 }
41 0 break;
42 0 case 'G':
43 0 ▶ if (memEQ(name, "MKD_TABLE_ALIGN_L", 17)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MKD_TABLE_ALIGN_L", 17)) { 0 0 0
44 /* ^ */
45 #ifdef MKD_TABLE_ALIGN_L
46 0 *iv_return = MKD_TABLE_ALIGN_L;
47 0 return PERL_constant_ISIV;
48 #else
49 return PERL_constant_NOTDEF;
50 #endif
51 }
52 0 ▶ if (memEQ(name, "MKD_TABLE_ALIGN_R", 17)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MKD_TABLE_ALIGN_R", 17)) { 0 0 0
53 /* ^ */
54 #ifdef MKD_TABLE_ALIGN_R
55 0 *iv_return = MKD_TABLE_ALIGN_R;
56 0 return PERL_constant_ISIV;
57 #else
58 return PERL_constant_NOTDEF;
59 #endif
60 }
61 0 break;
62 0 case 'I':
63 0 ▶ if (memEQ(name, "UPSKIRT_VER_MINOR", 17)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "UPSKIRT_VER_MINOR", 17)) { 0 0 0
64 /* ^ */
65 #ifdef UPSKIRT_VER_MINOR
66 0 *iv_return = UPSKIRT_VER_MINOR;
67 0 return PERL_constant_ISIV;
68 #else
69 return PERL_constant_NOTDEF;
70 #endif
71 }
72 0 break;
73 0 case 'L':
74 0 ▶ if (memEQ(name, "MKDA_NOT_AUTOLINK", 17)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MKDA_NOT_AUTOLINK", 17)) { 0 0 0
75 /* ^ */
76 0 *iv_return = MKDA_NOT_AUTOLINK;
77 0 return PERL_constant_ISIV;
78 }
79 0 break;
80 }
81 0 return PERL_constant_NOTFOUND;
82 }
83  
84 static int
85 2 constant_20 (pTHX_ const char *name, IV *iv_return) {
86 /* When generated this function returned values for the list of names given
87 here. However, subsequent manual editing may have added or removed some.
88 MKDEXT_SPACE_HEADERS MKDEXT_STRIKETHROUGH UPSKIRT_VER_REVISION */
89 /* Offset 8 gives the best switch position. */
90 2 switch (name[8]) {
91 1 case 'P':
92 1 ▶ if (memEQ(name, "MKDEXT_SPACE_HEADERS", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MKDEXT_SPACE_HEADERS", 20)) { 1 0 1
93 /* ^ */
94 1 *iv_return = MKDEXT_SPACE_HEADERS;
95 1 return PERL_constant_ISIV;
96 }
97 0 break;
98 1 case 'T':
99 1 ▶ if (memEQ(name, "MKDEXT_STRIKETHROUGH", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MKDEXT_STRIKETHROUGH", 20)) { 1 0 1
100 /* ^ */
101 1 *iv_return = MKDEXT_STRIKETHROUGH;
102 1 return PERL_constant_ISIV;
103 }
104 0 break;
105 0 case 'V':
106 0 ▶ if (memEQ(name, "UPSKIRT_VER_REVISION", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "UPSKIRT_VER_REVISION", 20)) { 0 0 0
107 /* ^ */
108 #ifdef UPSKIRT_VER_REVISION
109 0 *iv_return = UPSKIRT_VER_REVISION;
110 0 return PERL_constant_ISIV;
111 #else
112 return PERL_constant_NOTDEF;
113 #endif
114 }
115 0 break;
116 }
117 0 return PERL_constant_NOTFOUND;
118 }
119  
120 static int
121 6 constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
122 /* Initially switch on the length of the name. */
123 /* When generated this function returned values for the list of names given
124 in this section of perl code. Rather than manually editing these functions
125 to add or remove constants, which would result in this comment and section
126 of code becoming inaccurate, we recommend that you edit this section of
127 code, and use it to regenerate a new set of constant functions which you
128 then use to replace the originals.
129  
130 Regenerate these constant functions by feeding this entire source file to
131 perl -x
132  
133 #!/usr/bin/perl5.12.3 -w
134 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
135  
136 my $types = {map {($_, 1)} qw(IV)};
137 my @names = (qw(MKD_LIST_ORDERED MKD_LI_BLOCK MKD_TABLE_ALIGN_CENTER
138 MKD_TABLE_ALIGN_L MKD_TABLE_ALIGN_R UPSKIRT_VER_MAJOR
139 UPSKIRT_VER_MINOR UPSKIRT_VER_REVISION),
140 {name=>"MKDA_EMAIL", type=>"IV", macro=>"1"},
141 {name=>"MKDA_NORMAL", type=>"IV", macro=>"1"},
142 {name=>"MKDA_NOT_AUTOLINK", type=>"IV", macro=>"1"},
143 {name=>"MKDEXT_AUTOLINK", type=>"IV", macro=>"1"},
144 {name=>"MKDEXT_FENCED_CODE", type=>"IV", macro=>"1"},
145 {name=>"MKDEXT_LAX_HTML_BLOCKS", type=>"IV", macro=>"1"},
146 {name=>"MKDEXT_NO_INTRA_EMPHASIS", type=>"IV", macro=>"1"},
147 {name=>"MKDEXT_SPACE_HEADERS", type=>"IV", macro=>"1"},
148 {name=>"MKDEXT_STRIKETHROUGH", type=>"IV", macro=>"1"},
149 {name=>"MKDEXT_TABLES", type=>"IV", macro=>"1"});
150  
151 print constant_types(), "\n"; # macro defs
152 foreach (C_constant ("Text::Upskirt::Markdown", 'constant', 'IV', $types, undef, 3, @names) ) {
153 print $_, "\n"; # C constant subs
154 }
155 print "\n#### XS Section:\n";
156 print XS_constant ("Text::Upskirt::Markdown", $types);
157 __END__
« buffer.c ↑ Summary html_smartypants.c »