| 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_5 (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 |
|
| Audio EE_OK Start */ |
| 28 |
|
| /* Offset 2 gives the best switch position. */ |
| 29 |
0 |
| switch (name[2]) { |
| 30 |
0 |
| case '_': |
| 31 |
0 |
▶ | if (memEQ(name, "EE_OK", 5)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "EE_OK", 5)) { |
0 |
0 |
0 |
|
| 32 |
|
| /* ^ */ |
| 33 |
|
| #ifdef EE_OK |
| 34 |
|
| *iv_return = EE_OK; |
| 35 |
|
| return PERL_constant_ISIV; |
| 36 |
|
| #else |
| 37 |
0 |
| return PERL_constant_NOTDEF; |
| 38 |
|
| #endif |
| 39 |
|
| } |
| 40 |
0 |
| break; |
| 41 |
0 |
| case 'a': |
| 42 |
0 |
▶ | if (memEQ(name, "Start", 5)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "Start", 5)) { |
0 |
0 |
0 |
|
| 43 |
|
| /* ^ */ |
| 44 |
|
| #ifdef Start |
| 45 |
|
| *iv_return = Start; |
| 46 |
|
| return PERL_constant_ISIV; |
| 47 |
|
| #else |
| 48 |
0 |
| return PERL_constant_NOTDEF; |
| 49 |
|
| #endif |
| 50 |
|
| } |
| 51 |
0 |
| break; |
| 52 |
0 |
| case 'd': |
| 53 |
0 |
▶ | if (memEQ(name, "Audio", 5)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "Audio", 5)) { |
0 |
0 |
0 |
|
| 54 |
|
| /* ^ */ |
| 55 |
|
| #ifdef Audio |
| 56 |
|
| *iv_return = Audio; |
| 57 |
|
| return PERL_constant_ISIV; |
| 58 |
|
| #else |
| 59 |
0 |
| return PERL_constant_NOTDEF; |
| 60 |
|
| #endif |
| 61 |
|
| } |
| 62 |
0 |
| break; |
| 63 |
|
| } |
| 64 |
0 |
| return PERL_constant_NOTFOUND; |
| 65 |
|
| } |
| 66 |
|
| |
| 67 |
|
| static int |
| 68 |
0 |
| constant_14 (pTHX_ const char *name, IV *iv_return) { |
| 69 |
|
| /* When generated this function returned values for the list of names given |
| 70 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 71 |
|
| EE_BUFFER_FULL N_SPEECH_PARAM espeakCAPITALS espeakEMPHASIS espeakENDPAUSE |
| 72 |
|
| espeakPHONEMES */ |
| 73 |
|
| /* Offset 7 gives the best switch position. */ |
| 74 |
0 |
| switch (name[7]) { |
| 75 |
0 |
| case 'A': |
| 76 |
0 |
▶ | if (memEQ(name, "espeakCAPITALS", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakCAPITALS", 14)) { |
0 |
0 |
0 |
|
| 77 |
|
| /* ^ */ |
| 78 |
|
| #ifdef espeakCAPITALS |
| 79 |
|
| *iv_return = espeakCAPITALS; |
| 80 |
|
| return PERL_constant_ISIV; |
| 81 |
|
| #else |
| 82 |
0 |
| return PERL_constant_NOTDEF; |
| 83 |
|
| #endif |
| 84 |
|
| } |
| 85 |
0 |
| break; |
| 86 |
0 |
| case 'E': |
| 87 |
0 |
▶ | if (memEQ(name, "EE_BUFFER_FULL", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "EE_BUFFER_FULL", 14)) { |
0 |
0 |
0 |
|
| 88 |
|
| /* ^ */ |
| 89 |
|
| #ifdef EE_BUFFER_FULL |
| 90 |
|
| *iv_return = EE_BUFFER_FULL; |
| 91 |
|
| return PERL_constant_ISIV; |
| 92 |
|
| #else |
| 93 |
0 |
| return PERL_constant_NOTDEF; |
| 94 |
|
| #endif |
| 95 |
|
| } |
| 96 |
0 |
| break; |
| 97 |
0 |
| case 'H': |
| 98 |
0 |
▶ | if (memEQ(name, "N_SPEECH_PARAM", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "N_SPEECH_PARAM", 14)) { |
0 |
0 |
0 |
|
| 99 |
|
| /* ^ */ |
| 100 |
|
| #ifdef N_SPEECH_PARAM |
| 101 |
|
| *iv_return = N_SPEECH_PARAM; |
| 102 |
|
| return PERL_constant_ISIV; |
| 103 |
|
| #else |
| 104 |
0 |
| return PERL_constant_NOTDEF; |
| 105 |
|
| #endif |
| 106 |
|
| } |
| 107 |
0 |
▶ | if (memEQ(name, "espeakPHONEMES", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakPHONEMES", 14)) { |
0 |
0 |
0 |
|
| 108 |
|
| /* ^ */ |
| 109 |
|
| #ifdef espeakPHONEMES |
| 110 |
0 |
| *iv_return = espeakPHONEMES; |
| 111 |
0 |
| return PERL_constant_ISIV; |
| 112 |
|
| #else |
| 113 |
|
| return PERL_constant_NOTDEF; |
| 114 |
|
| #endif |
| 115 |
|
| } |
| 116 |
0 |
| break; |
| 117 |
0 |
| case 'M': |
| 118 |
0 |
▶ | if (memEQ(name, "espeakEMPHASIS", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakEMPHASIS", 14)) { |
0 |
0 |
0 |
|
| 119 |
|
| /* ^ */ |
| 120 |
|
| #ifdef espeakEMPHASIS |
| 121 |
|
| *iv_return = espeakEMPHASIS; |
| 122 |
|
| return PERL_constant_ISIV; |
| 123 |
|
| #else |
| 124 |
0 |
| return PERL_constant_NOTDEF; |
| 125 |
|
| #endif |
| 126 |
|
| } |
| 127 |
0 |
| break; |
| 128 |
0 |
| case 'N': |
| 129 |
0 |
▶ | if (memEQ(name, "espeakENDPAUSE", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakENDPAUSE", 14)) { |
0 |
0 |
0 |
|
| 130 |
|
| /* ^ */ |
| 131 |
|
| #ifdef espeakENDPAUSE |
| 132 |
0 |
| *iv_return = espeakENDPAUSE; |
| 133 |
0 |
| return PERL_constant_ISIV; |
| 134 |
|
| #else |
| 135 |
|
| return PERL_constant_NOTDEF; |
| 136 |
|
| #endif |
| 137 |
|
| } |
| 138 |
0 |
| break; |
| 139 |
|
| } |
| 140 |
0 |
| return PERL_constant_NOTFOUND; |
| 141 |
|
| } |
| 142 |
|
| |
| 143 |
|
| static int |
| 144 |
0 |
| constant_16 (pTHX_ const char *name, IV *iv_return) { |
| 145 |
|
| /* When generated this function returned values for the list of names given |
| 146 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 147 |
|
| espeakCHARS_8BIT espeakCHARS_AUTO espeakCHARS_UTF8 espeakLINELENGTH |
| 148 |
|
| espeakPUNCT_NONE espeakPUNCT_SOME */ |
| 149 |
|
| /* Offset 14 gives the best switch position. */ |
| 150 |
0 |
| switch (name[14]) { |
| 151 |
0 |
| case 'F': |
| 152 |
0 |
▶ | if (memEQ(name, "espeakCHARS_UTF8", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakCHARS_UTF8", 16)) { |
0 |
0 |
0 |
|
| 153 |
|
| /* ^ */ |
| 154 |
|
| #ifdef espeakCHARS_UTF8 |
| 155 |
0 |
| *iv_return = espeakCHARS_UTF8; |
| 156 |
0 |
| return PERL_constant_ISIV; |
| 157 |
|
| #else |
| 158 |
|
| return PERL_constant_NOTDEF; |
| 159 |
|
| #endif |
| 160 |
|
| } |
| 161 |
0 |
| break; |
| 162 |
0 |
| case 'I': |
| 163 |
0 |
▶ | if (memEQ(name, "espeakCHARS_8BIT", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakCHARS_8BIT", 16)) { |
0 |
0 |
0 |
|
| 164 |
|
| /* ^ */ |
| 165 |
|
| #ifdef espeakCHARS_8BIT |
| 166 |
0 |
| *iv_return = espeakCHARS_8BIT; |
| 167 |
0 |
| return PERL_constant_ISIV; |
| 168 |
|
| #else |
| 169 |
|
| return PERL_constant_NOTDEF; |
| 170 |
|
| #endif |
| 171 |
|
| } |
| 172 |
0 |
| break; |
| 173 |
0 |
| case 'M': |
| 174 |
0 |
▶ | if (memEQ(name, "espeakPUNCT_SOME", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakPUNCT_SOME", 16)) { |
0 |
0 |
0 |
|
| 175 |
|
| /* ^ */ |
| 176 |
|
| #ifdef espeakPUNCT_SOME |
| 177 |
|
| *iv_return = espeakPUNCT_SOME; |
| 178 |
|
| return PERL_constant_ISIV; |
| 179 |
|
| #else |
| 180 |
0 |
| return PERL_constant_NOTDEF; |
| 181 |
|
| #endif |
| 182 |
|
| } |
| 183 |
0 |
| break; |
| 184 |
0 |
| case 'N': |
| 185 |
0 |
▶ | if (memEQ(name, "espeakPUNCT_NONE", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakPUNCT_NONE", 16)) { |
0 |
0 |
0 |
|
| 186 |
|
| /* ^ */ |
| 187 |
|
| #ifdef espeakPUNCT_NONE |
| 188 |
|
| *iv_return = espeakPUNCT_NONE; |
| 189 |
|
| return PERL_constant_ISIV; |
| 190 |
|
| #else |
| 191 |
0 |
| return PERL_constant_NOTDEF; |
| 192 |
|
| #endif |
| 193 |
|
| } |
| 194 |
0 |
| break; |
| 195 |
0 |
| case 'T': |
| 196 |
0 |
▶ | if (memEQ(name, "espeakCHARS_AUTO", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakCHARS_AUTO", 16)) { |
0 |
0 |
0 |
|
| 197 |
|
| /* ^ */ |
| 198 |
|
| #ifdef espeakCHARS_AUTO |
| 199 |
0 |
| *iv_return = espeakCHARS_AUTO; |
| 200 |
0 |
| return PERL_constant_ISIV; |
| 201 |
|
| #else |
| 202 |
|
| return PERL_constant_NOTDEF; |
| 203 |
|
| #endif |
| 204 |
|
| } |
| 205 |
0 |
▶ | if (memEQ(name, "espeakLINELENGTH", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakLINELENGTH", 16)) { |
0 |
0 |
0 |
|
| 206 |
|
| /* ^ */ |
| 207 |
|
| #ifdef espeakLINELENGTH |
| 208 |
|
| *iv_return = espeakLINELENGTH; |
| 209 |
|
| return PERL_constant_ISIV; |
| 210 |
|
| #else |
| 211 |
0 |
| return PERL_constant_NOTDEF; |
| 212 |
|
| #endif |
| 213 |
|
| } |
| 214 |
0 |
| break; |
| 215 |
|
| } |
| 216 |
0 |
| return PERL_constant_NOTFOUND; |
| 217 |
|
| } |
| 218 |
|
| |
| 219 |
|
| static int |
| 220 |
0 |
| constant_17 (pTHX_ const char *name, IV *iv_return) { |
| 221 |
|
| /* When generated this function returned values for the list of names given |
| 222 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 223 |
|
| EE_INTERNAL_ERROR espeakCHARS_WCHAR espeakPUNCTUATION */ |
| 224 |
|
| /* Offset 10 gives the best switch position. */ |
| 225 |
0 |
| switch (name[10]) { |
| 226 |
0 |
| case 'L': |
| 227 |
0 |
▶ | if (memEQ(name, "EE_INTERNAL_ERROR", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "EE_INTERNAL_ERROR", 17)) { |
0 |
0 |
0 |
|
| 228 |
|
| /* ^ */ |
| 229 |
|
| #ifdef EE_INTERNAL_ERROR |
| 230 |
|
| *iv_return = EE_INTERNAL_ERROR; |
| 231 |
|
| return PERL_constant_ISIV; |
| 232 |
|
| #else |
| 233 |
0 |
| return PERL_constant_NOTDEF; |
| 234 |
|
| #endif |
| 235 |
|
| } |
| 236 |
0 |
| break; |
| 237 |
0 |
| case 'S': |
| 238 |
0 |
▶ | if (memEQ(name, "espeakCHARS_WCHAR", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakCHARS_WCHAR", 17)) { |
0 |
0 |
0 |
|
| 239 |
|
| /* ^ */ |
| 240 |
|
| #ifdef espeakCHARS_WCHAR |
| 241 |
0 |
| *iv_return = espeakCHARS_WCHAR; |
| 242 |
0 |
| return PERL_constant_ISIV; |
| 243 |
|
| #else |
| 244 |
|
| return PERL_constant_NOTDEF; |
| 245 |
|
| #endif |
| 246 |
|
| } |
| 247 |
0 |
| break; |
| 248 |
0 |
| case 'T': |
| 249 |
0 |
▶ | if (memEQ(name, "espeakPUNCTUATION", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "espeakPUNCTUATION", 17)) { |
0 |
0 |
0 |
|
| 250 |
|
| /* ^ */ |
| 251 |
|
| #ifdef espeakPUNCTUATION |
| 252 |
|
| *iv_return = espeakPUNCTUATION; |
| 253 |
|
| return PERL_constant_ISIV; |
| 254 |
|
| #else |
| 255 |
0 |
| return PERL_constant_NOTDEF; |
| 256 |
|
| #endif |
| 257 |
|
| } |
| 258 |
0 |
| break; |
| 259 |
|
| } |
| 260 |
0 |
| return PERL_constant_NOTFOUND; |
| 261 |
|
| } |
| 262 |
|
| |
| 263 |
|
| static int |
| 264 |
0 |
| constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { |
| 265 |
|
| /* Initially switch on the length of the name. */ |
| 266 |
|
| /* When generated this function returned values for the list of names given |
| 267 |
|
| in this section of perl code. Rather than manually editing these functions |
| 268 |
|
| to add or remove constants, which would result in this comment and section |
| 269 |
|
| of code becoming inaccurate, we recommend that you edit this section of |
| 270 |
|
| code, and use it to regenerate a new set of constant functions which you |
| 271 |
|
| then use to replace the originals. |
| 272 |
|
| |
| 273 |
|
| Regenerate these constant functions by feeding this entire source file to |
| 274 |
|
| perl -x |
| 275 |
|
| |
| 276 |
|
| #!/usr/local/bin/perl -w |
| 277 |
|
| use ExtUtils::Constant qw (constant_types C_constant XS_constant); |
| 278 |
|
| |
| 279 |
|
| my $types = {map {($_, 1)} qw(IV)}; |
| 280 |
|
| my @names = (qw(AUDIO_OUTPUT_PLAYBACK AUDIO_OUTPUT_RETRIEVAL |
| 281 |
|
| AUDIO_OUTPUT_SYNCHRONOUS Audio EE_BUFFER_FULL EE_INTERNAL_ERROR |
| 282 |
|
| EE_OK End Mark N_SPEECH_PARAM POS_CHARACTER POS_SENTENCE |
| 283 |
|
| POS_WORD Retrieval Start espeakCAPITALS espeakCHARS_8BIT |
| 284 |
|
| espeakCHARS_AUTO espeakCHARS_UTF8 espeakCHARS_WCHAR |
| 285 |
|
| espeakEMPHASIS espeakENDPAUSE espeakEVENT_LIST_TERMINATED |
| 286 |
|
| espeakKEEP_NAMEDATA espeakLINELENGTH espeakPHONEMES espeakPITCH |
| 287 |
|
| espeakPUNCTUATION espeakPUNCT_ALL espeakPUNCT_NONE |
| 288 |
|
| espeakPUNCT_SOME espeakRANGE espeakRATE espeakSILENCE espeakSSML |
| 289 |
|
| espeakVOLUME)); |
| 290 |
|
| |
| 291 |
|
| print constant_types(), "\n"; # macro defs |
| 292 |
|
| foreach (C_constant ("Speech::eSpeak", 'constant', 'IV', $types, undef, 3, @names) ) { |
| 293 |
|
| print $_, "\n"; # C constant subs |
| 294 |
|
| } |
| 295 |
|
| print "\n#### XS Section:\n"; |
| 296 |
|
| print XS_constant ("Speech::eSpeak", $types); |
| 297 |
|
| __END__ |