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
constant_11(pTHX_ const char * name,IV * iv_return)24 constant_11 (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      LZMA_FINISH LZMA_MF_BT2 LZMA_MF_BT3 LZMA_MF_BT4 LZMA_MF_HC3 LZMA_MF_HC4
28      LZMA_PB_MAX LZMA_PB_MIN */
29   /* Offset 10 gives the best switch position.  */
30   switch (name[10]) {
31   case '2':
32     if (memEQ(name, "LZMA_MF_BT", 10)) {
33     /*                         2      */
34 #if 1
35       *iv_return = LZMA_MF_BT2;
36       return PERL_constant_ISIV;
37 #else
38       return PERL_constant_NOTDEF;
39 #endif
40     }
41     break;
42   case '3':
43     if (memEQ(name, "LZMA_MF_BT", 10)) {
44     /*                         3      */
45 #if 1
46       *iv_return = LZMA_MF_BT3;
47       return PERL_constant_ISIV;
48 #else
49       return PERL_constant_NOTDEF;
50 #endif
51     }
52     if (memEQ(name, "LZMA_MF_HC", 10)) {
53     /*                         3      */
54 #if 1
55       *iv_return = LZMA_MF_HC3;
56       return PERL_constant_ISIV;
57 #else
58       return PERL_constant_NOTDEF;
59 #endif
60     }
61     break;
62   case '4':
63     if (memEQ(name, "LZMA_MF_BT", 10)) {
64     /*                         4      */
65 #if 1
66       *iv_return = LZMA_MF_BT4;
67       return PERL_constant_ISIV;
68 #else
69       return PERL_constant_NOTDEF;
70 #endif
71     }
72     if (memEQ(name, "LZMA_MF_HC", 10)) {
73     /*                         4      */
74 #if 1
75       *iv_return = LZMA_MF_HC4;
76       return PERL_constant_ISIV;
77 #else
78       return PERL_constant_NOTDEF;
79 #endif
80     }
81     break;
82   case 'H':
83     if (memEQ(name, "LZMA_FINIS", 10)) {
84     /*                         H      */
85 #if 1
86       *iv_return = LZMA_FINISH;
87       return PERL_constant_ISIV;
88 #else
89       return PERL_constant_NOTDEF;
90 #endif
91     }
92     break;
93   case 'N':
94     if (memEQ(name, "LZMA_PB_MI", 10)) {
95     /*                         N      */
96 #ifdef LZMA_PB_MIN
97       *iv_return = LZMA_PB_MIN;
98       return PERL_constant_ISIV;
99 #else
100       return PERL_constant_NOTDEF;
101 #endif
102     }
103     break;
104   case 'X':
105     if (memEQ(name, "LZMA_PB_MA", 10)) {
106     /*                         X      */
107 #ifdef LZMA_PB_MAX
108       *iv_return = LZMA_PB_MAX;
109       return PERL_constant_ISIV;
110 #else
111       return PERL_constant_NOTDEF;
112 #endif
113     }
114     break;
115   }
116   return PERL_constant_NOTFOUND;
117 }
118 
119 static int
constant_13(pTHX_ const char * name,IV * iv_return)120 constant_13 (pTHX_ const char *name, IV *iv_return) {
121   /* When generated this function returned values for the list of names given
122      here.  However, subsequent manual editing may have added or removed some.
123      LZMA_LCLP_MAX LZMA_LCLP_MIN LZMA_NO_CHECK */
124   /* Offset 11 gives the best switch position.  */
125   switch (name[11]) {
126   case 'A':
127     if (memEQ(name, "LZMA_LCLP_MAX", 13)) {
128     /*                          ^        */
129 #ifdef LZMA_LCLP_MAX
130       *iv_return = LZMA_LCLP_MAX;
131       return PERL_constant_ISIV;
132 #else
133       return PERL_constant_NOTDEF;
134 #endif
135     }
136     break;
137   case 'C':
138     if (memEQ(name, "LZMA_NO_CHECK", 13)) {
139     /*                          ^        */
140 #if 1
141       *iv_return = LZMA_NO_CHECK;
142       return PERL_constant_ISIV;
143 #else
144       return PERL_constant_NOTDEF;
145 #endif
146     }
147     break;
148   case 'I':
149     if (memEQ(name, "LZMA_LCLP_MIN", 13)) {
150     /*                          ^        */
151 #ifdef LZMA_LCLP_MIN
152       *iv_return = LZMA_LCLP_MIN;
153       return PERL_constant_ISIV;
154 #else
155       return PERL_constant_NOTDEF;
156 #endif
157     }
158     break;
159   }
160   return PERL_constant_NOTFOUND;
161 }
162 
163 static int
constant_14(pTHX_ const char * name,IV * iv_return)164 constant_14 (pTHX_ const char *name, IV *iv_return) {
165   /* When generated this function returned values for the list of names given
166      here.  However, subsequent manual editing may have added or removed some.
167      LZMA_BUF_ERROR LZMA_GET_CHECK LZMA_MEM_ERROR LZMA_MODE_FAST */
168   /* Offset 7 gives the best switch position.  */
169   switch (name[7]) {
170   case 'D':
171     if (memEQ(name, "LZMA_MODE_FAST", 14)) {
172     /*                      ^             */
173 #if 1
174       *iv_return = LZMA_MODE_FAST;
175       return PERL_constant_ISIV;
176 #else
177       return PERL_constant_NOTDEF;
178 #endif
179     }
180     break;
181   case 'F':
182     if (memEQ(name, "LZMA_BUF_ERROR", 14)) {
183     /*                      ^             */
184 #if 1
185       *iv_return = LZMA_BUF_ERROR;
186       return PERL_constant_ISIV;
187 #else
188       return PERL_constant_NOTDEF;
189 #endif
190     }
191     break;
192   case 'M':
193     if (memEQ(name, "LZMA_MEM_ERROR", 14)) {
194     /*                      ^             */
195 #if 1
196       *iv_return = LZMA_MEM_ERROR;
197       return PERL_constant_ISIV;
198 #else
199       return PERL_constant_NOTDEF;
200 #endif
201     }
202     break;
203   case 'T':
204     if (memEQ(name, "LZMA_GET_CHECK", 14)) {
205     /*                      ^             */
206 #if 1
207       *iv_return = LZMA_GET_CHECK;
208       return PERL_constant_ISIV;
209 #else
210       return PERL_constant_NOTDEF;
211 #endif
212     }
213     break;
214   }
215   return PERL_constant_NOTFOUND;
216 }
217 
218 static int
constant_15(pTHX_ const char * name,IV * iv_return)219 constant_15 (pTHX_ const char *name, IV *iv_return) {
220   /* When generated this function returned values for the list of names given
221      here.  However, subsequent manual editing may have added or removed some.
222      LZMA_CHECK_NONE LZMA_DATA_ERROR LZMA_FILTER_ARM LZMA_FILTER_X86
223      LZMA_FULL_FLUSH LZMA_LC_DEFAULT LZMA_LP_DEFAULT LZMA_PB_DEFAULT
224      LZMA_PROG_ERROR LZMA_STREAM_END LZMA_SYNC_FLUSH */
225   /* Offset 6 gives the best switch position.  */
226   switch (name[6]) {
227   case 'A':
228     if (memEQ(name, "LZMA_DATA_ERROR", 15)) {
229     /*                     ^               */
230 #if 1
231       *iv_return = LZMA_DATA_ERROR;
232       return PERL_constant_ISIV;
233 #else
234       return PERL_constant_NOTDEF;
235 #endif
236     }
237     break;
238   case 'B':
239     if (memEQ(name, "LZMA_PB_DEFAULT", 15)) {
240     /*                     ^               */
241 #ifdef LZMA_PB_DEFAULT
242       *iv_return = LZMA_PB_DEFAULT;
243       return PERL_constant_ISIV;
244 #else
245       return PERL_constant_NOTDEF;
246 #endif
247     }
248     break;
249   case 'C':
250     if (memEQ(name, "LZMA_LC_DEFAULT", 15)) {
251     /*                     ^               */
252 #ifdef LZMA_LC_DEFAULT
253       *iv_return = LZMA_LC_DEFAULT;
254       return PERL_constant_ISIV;
255 #else
256       return PERL_constant_NOTDEF;
257 #endif
258     }
259     break;
260   case 'H':
261     if (memEQ(name, "LZMA_CHECK_NONE", 15)) {
262     /*                     ^               */
263 #if 1
264       *iv_return = LZMA_CHECK_NONE;
265       return PERL_constant_ISIV;
266 #else
267       return PERL_constant_NOTDEF;
268 #endif
269     }
270     break;
271   case 'I':
272     if (memEQ(name, "LZMA_FILTER_ARM", 15)) {
273     /*                     ^               */
274 #ifdef LZMA_FILTER_ARM
275       *iv_return = LZMA_FILTER_ARM;
276       return PERL_constant_ISIV;
277 #else
278       return PERL_constant_NOTDEF;
279 #endif
280     }
281     if (memEQ(name, "LZMA_FILTER_X86", 15)) {
282     /*                     ^               */
283 #ifdef LZMA_FILTER_X86
284       *iv_return = LZMA_FILTER_X86;
285       return PERL_constant_ISIV;
286 #else
287       return PERL_constant_NOTDEF;
288 #endif
289     }
290     break;
291   case 'P':
292     if (memEQ(name, "LZMA_LP_DEFAULT", 15)) {
293     /*                     ^               */
294 #ifdef LZMA_LP_DEFAULT
295       *iv_return = LZMA_LP_DEFAULT;
296       return PERL_constant_ISIV;
297 #else
298       return PERL_constant_NOTDEF;
299 #endif
300     }
301     break;
302   case 'R':
303     if (memEQ(name, "LZMA_PROG_ERROR", 15)) {
304     /*                     ^               */
305 #if 1
306       *iv_return = LZMA_PROG_ERROR;
307       return PERL_constant_ISIV;
308 #else
309       return PERL_constant_NOTDEF;
310 #endif
311     }
312     break;
313   case 'T':
314     if (memEQ(name, "LZMA_STREAM_END", 15)) {
315     /*                     ^               */
316 #if 1
317       *iv_return = LZMA_STREAM_END;
318       return PERL_constant_ISIV;
319 #else
320       return PERL_constant_NOTDEF;
321 #endif
322     }
323     break;
324   case 'U':
325     if (memEQ(name, "LZMA_FULL_FLUSH", 15)) {
326     /*                     ^               */
327 #if 1
328       *iv_return = LZMA_FULL_FLUSH;
329       return PERL_constant_ISIV;
330 #else
331       return PERL_constant_NOTDEF;
332 #endif
333     }
334     break;
335   case 'Y':
336     if (memEQ(name, "LZMA_SYNC_FLUSH", 15)) {
337     /*                     ^               */
338 #if 1
339       *iv_return = LZMA_SYNC_FLUSH;
340       return PERL_constant_ISIV;
341 #else
342       return PERL_constant_NOTDEF;
343 #endif
344     }
345     break;
346   }
347   return PERL_constant_NOTFOUND;
348 }
349 
350 static int
constant_16(pTHX_ const char * name,IV * iv_return)351 constant_16 (pTHX_ const char *name, IV *iv_return) {
352   /* When generated this function returned values for the list of names given
353      here.  However, subsequent manual editing may have added or removed some.
354      LZMA_CHECK_CRC32 LZMA_CHECK_CRC64 LZMA_FILTERS_MAX LZMA_FILTER_IA64
355      LZMA_MODE_NORMAL */
356   /* Offset 11 gives the best switch position.  */
357   switch (name[11]) {
358   case 'C':
359     if (memEQ(name, "LZMA_CHECK_CRC32", 16)) {
360     /*                          ^           */
361 #if 1
362       *iv_return = LZMA_CHECK_CRC32;
363       return PERL_constant_ISIV;
364 #else
365       return PERL_constant_NOTDEF;
366 #endif
367     }
368     if (memEQ(name, "LZMA_CHECK_CRC64", 16)) {
369     /*                          ^           */
370 #if 1
371       *iv_return = LZMA_CHECK_CRC64;
372       return PERL_constant_ISIV;
373 #else
374       return PERL_constant_NOTDEF;
375 #endif
376     }
377     break;
378   case 'O':
379     if (memEQ(name, "LZMA_MODE_NORMAL", 16)) {
380     /*                          ^           */
381 #if 1
382       *iv_return = LZMA_MODE_NORMAL;
383       return PERL_constant_ISIV;
384 #else
385       return PERL_constant_NOTDEF;
386 #endif
387     }
388     break;
389   case 'S':
390     if (memEQ(name, "LZMA_FILTERS_MAX", 16)) {
391     /*                          ^           */
392 #ifdef LZMA_FILTERS_MAX
393       *iv_return = LZMA_FILTERS_MAX;
394       return PERL_constant_ISIV;
395 #else
396       return PERL_constant_NOTDEF;
397 #endif
398     }
399     break;
400   case '_':
401     if (memEQ(name, "LZMA_FILTER_IA64", 16)) {
402     /*                          ^           */
403 #ifdef LZMA_FILTER_IA64
404       *iv_return = LZMA_FILTER_IA64;
405       return PERL_constant_ISIV;
406 #else
407       return PERL_constant_NOTDEF;
408 #endif
409     }
410     break;
411   }
412   return PERL_constant_NOTFOUND;
413 }
414 
415 static int
constant_17(pTHX_ const char * name,IV * iv_return)416 constant_17 (pTHX_ const char *name, IV *iv_return) {
417   /* When generated this function returned values for the list of names given
418      here.  However, subsequent manual editing may have added or removed some.
419      LZMA_CHECK_ID_MAX LZMA_CHECK_SHA256 LZMA_CONCATENATED LZMA_FILTER_DELTA
420      LZMA_FILTER_LZMA2 LZMA_FILTER_SPARC LZMA_FORMAT_ERROR */
421   /* Offset 16 gives the best switch position.  */
422   switch (name[16]) {
423   case '2':
424     if (memEQ(name, "LZMA_FILTER_LZMA", 16)) {
425     /*                               2      */
426 #ifdef LZMA_FILTER_LZMA2
427       *iv_return = LZMA_FILTER_LZMA2;
428       return PERL_constant_ISIV;
429 #else
430       return PERL_constant_NOTDEF;
431 #endif
432     }
433     break;
434   case '6':
435     if (memEQ(name, "LZMA_CHECK_SHA25", 16)) {
436     /*                               6      */
437 #if 1
438       *iv_return = LZMA_CHECK_SHA256;
439       return PERL_constant_ISIV;
440 #else
441       return PERL_constant_NOTDEF;
442 #endif
443     }
444     break;
445   case 'A':
446     if (memEQ(name, "LZMA_FILTER_DELT", 16)) {
447     /*                               A      */
448 #ifdef LZMA_FILTER_DELTA
449       *iv_return = LZMA_FILTER_DELTA;
450       return PERL_constant_ISIV;
451 #else
452       return PERL_constant_NOTDEF;
453 #endif
454     }
455     break;
456   case 'C':
457     if (memEQ(name, "LZMA_FILTER_SPAR", 16)) {
458     /*                               C      */
459 #ifdef LZMA_FILTER_SPARC
460       *iv_return = LZMA_FILTER_SPARC;
461       return PERL_constant_ISIV;
462 #else
463       return PERL_constant_NOTDEF;
464 #endif
465     }
466     break;
467   case 'D':
468     if (memEQ(name, "LZMA_CONCATENATE", 16)) {
469     /*                               D      */
470 #ifdef LZMA_CONCATENATED
471       *iv_return = LZMA_CONCATENATED;
472       return PERL_constant_ISIV;
473 #else
474       return PERL_constant_NOTDEF;
475 #endif
476     }
477     break;
478   case 'R':
479     if (memEQ(name, "LZMA_FORMAT_ERRO", 16)) {
480     /*                               R      */
481 #if 1
482       *iv_return = LZMA_FORMAT_ERROR;
483       return PERL_constant_ISIV;
484 #else
485       return PERL_constant_NOTDEF;
486 #endif
487     }
488     break;
489   case 'X':
490     if (memEQ(name, "LZMA_CHECK_ID_MA", 16)) {
491     /*                               X      */
492 #ifdef LZMA_CHECK_ID_MAX
493       *iv_return = LZMA_CHECK_ID_MAX;
494       return PERL_constant_ISIV;
495 #else
496       return PERL_constant_NOTDEF;
497 #endif
498     }
499     break;
500   }
501   return PERL_constant_NOTFOUND;
502 }
503 
504 static int
constant_18(pTHX_ const char * name,IV * iv_return)505 constant_18 (pTHX_ const char *name, IV *iv_return) {
506   /* When generated this function returned values for the list of names given
507      here.  However, subsequent manual editing may have added or removed some.
508      LZMA_DICT_SIZE_MIN LZMA_OPTIONS_ERROR LZMA_TELL_NO_CHECK
509      LZMA_VERSION_MAJOR LZMA_VERSION_MINOR LZMA_VERSION_PATCH */
510   /* Offset 15 gives the best switch position.  */
511   switch (name[15]) {
512   case 'E':
513     if (memEQ(name, "LZMA_TELL_NO_CHECK", 18)) {
514     /*                              ^         */
515 #ifdef LZMA_TELL_NO_CHECK
516       *iv_return = LZMA_TELL_NO_CHECK;
517       return PERL_constant_ISIV;
518 #else
519       return PERL_constant_NOTDEF;
520 #endif
521     }
522     break;
523   case 'J':
524     if (memEQ(name, "LZMA_VERSION_MAJOR", 18)) {
525     /*                              ^         */
526 #ifdef LZMA_VERSION_MAJOR
527       *iv_return = LZMA_VERSION_MAJOR;
528       return PERL_constant_ISIV;
529 #else
530       return PERL_constant_NOTDEF;
531 #endif
532     }
533     break;
534   case 'M':
535     if (memEQ(name, "LZMA_DICT_SIZE_MIN", 18)) {
536     /*                              ^         */
537 #ifdef LZMA_DICT_SIZE_MIN
538       *iv_return = LZMA_DICT_SIZE_MIN;
539       return PERL_constant_ISIV;
540 #else
541       return PERL_constant_NOTDEF;
542 #endif
543     }
544     break;
545   case 'N':
546     if (memEQ(name, "LZMA_VERSION_MINOR", 18)) {
547     /*                              ^         */
548 #ifdef LZMA_VERSION_MINOR
549       *iv_return = LZMA_VERSION_MINOR;
550       return PERL_constant_ISIV;
551 #else
552       return PERL_constant_NOTDEF;
553 #endif
554     }
555     break;
556   case 'R':
557     if (memEQ(name, "LZMA_OPTIONS_ERROR", 18)) {
558     /*                              ^         */
559 #if 1
560       *iv_return = LZMA_OPTIONS_ERROR;
561       return PERL_constant_ISIV;
562 #else
563       return PERL_constant_NOTDEF;
564 #endif
565     }
566     break;
567   case 'T':
568     if (memEQ(name, "LZMA_VERSION_PATCH", 18)) {
569     /*                              ^         */
570 #ifdef LZMA_VERSION_PATCH
571       *iv_return = LZMA_VERSION_PATCH;
572       return PERL_constant_ISIV;
573 #else
574       return PERL_constant_NOTDEF;
575 #endif
576     }
577     break;
578   }
579   return PERL_constant_NOTFOUND;
580 }
581 
582 static int
constant_19(pTHX_ const char * name,IV * iv_return,const char ** pv_return)583 constant_19 (pTHX_ const char *name, IV *iv_return, const char **pv_return) {
584   /* When generated this function returned values for the list of names given
585      here.  However, subsequent manual editing may have added or removed some.
586      LZMA_CHECK_SIZE_MAX LZMA_DELTA_DIST_MAX LZMA_DELTA_DIST_MIN
587      LZMA_FILTER_POWERPC LZMA_MEMLIMIT_ERROR LZMA_PRESET_DEFAULT
588      LZMA_PRESET_EXTREME LZMA_TELL_ANY_CHECK LZMA_VERSION_STRING */
589   /* Offset 17 gives the best switch position.  */
590   switch (name[17]) {
591   case 'A':
592     if (memEQ(name, "LZMA_CHECK_SIZE_MAX", 19)) {
593     /*                                ^        */
594 #ifdef LZMA_CHECK_SIZE_MAX
595       *iv_return = LZMA_CHECK_SIZE_MAX;
596       return PERL_constant_ISIV;
597 #else
598       return PERL_constant_NOTDEF;
599 #endif
600     }
601     if (memEQ(name, "LZMA_DELTA_DIST_MAX", 19)) {
602     /*                                ^        */
603 #ifdef LZMA_DELTA_DIST_MAX
604       *iv_return = LZMA_DELTA_DIST_MAX;
605       return PERL_constant_ISIV;
606 #else
607       return PERL_constant_NOTDEF;
608 #endif
609     }
610     break;
611   case 'C':
612     if (memEQ(name, "LZMA_TELL_ANY_CHECK", 19)) {
613     /*                                ^        */
614 #ifdef LZMA_TELL_ANY_CHECK
615       *iv_return = LZMA_TELL_ANY_CHECK;
616       return PERL_constant_ISIV;
617 #else
618       return PERL_constant_NOTDEF;
619 #endif
620     }
621     break;
622   case 'I':
623     if (memEQ(name, "LZMA_DELTA_DIST_MIN", 19)) {
624     /*                                ^        */
625 #ifdef LZMA_DELTA_DIST_MIN
626       *iv_return = LZMA_DELTA_DIST_MIN;
627       return PERL_constant_ISIV;
628 #else
629       return PERL_constant_NOTDEF;
630 #endif
631     }
632     break;
633   case 'L':
634     if (memEQ(name, "LZMA_PRESET_DEFAULT", 19)) {
635     /*                                ^        */
636 #ifdef LZMA_PRESET_DEFAULT
637       *iv_return = LZMA_PRESET_DEFAULT;
638       return PERL_constant_ISIV;
639 #else
640       return PERL_constant_NOTDEF;
641 #endif
642     }
643     break;
644   case 'M':
645     if (memEQ(name, "LZMA_PRESET_EXTREME", 19)) {
646     /*                                ^        */
647 #ifdef LZMA_PRESET_EXTREME
648       *iv_return = LZMA_PRESET_EXTREME;
649       return PERL_constant_ISIV;
650 #else
651       return PERL_constant_NOTDEF;
652 #endif
653     }
654     break;
655   case 'N':
656     if (memEQ(name, "LZMA_VERSION_STRING", 19)) {
657     /*                                ^        */
658 #ifdef LZMA_VERSION_STRING
659       *pv_return = LZMA_VERSION_STRING;
660       return PERL_constant_ISPV;
661 #else
662       return PERL_constant_NOTDEF;
663 #endif
664     }
665     break;
666   case 'O':
667     if (memEQ(name, "LZMA_MEMLIMIT_ERROR", 19)) {
668     /*                                ^        */
669 #if 1
670       *iv_return = LZMA_MEMLIMIT_ERROR;
671       return PERL_constant_ISIV;
672 #else
673       return PERL_constant_NOTDEF;
674 #endif
675     }
676     break;
677   case 'P':
678     if (memEQ(name, "LZMA_FILTER_POWERPC", 19)) {
679     /*                                ^        */
680 #ifdef LZMA_FILTER_POWERPC
681       *iv_return = LZMA_FILTER_POWERPC;
682       return PERL_constant_ISIV;
683 #else
684       return PERL_constant_NOTDEF;
685 #endif
686     }
687     break;
688   }
689   return PERL_constant_NOTFOUND;
690 }
691 
692 static int
constant_22(pTHX_ const char * name,IV * iv_return)693 constant_22 (pTHX_ const char *name, IV *iv_return) {
694   /* When generated this function returned values for the list of names given
695      here.  However, subsequent manual editing may have added or removed some.
696      LZMA_BACKWARD_SIZE_MIN LZMA_DICT_SIZE_DEFAULT LZMA_PRESET_LEVEL_MASK
697      LZMA_UNSUPPORTED_CHECK LZMA_VERSION_STABILITY */
698   /* Offset 6 gives the best switch position.  */
699   switch (name[6]) {
700   case 'A':
701     if (memEQ(name, "LZMA_BACKWARD_SIZE_MIN", 22)) {
702     /*                     ^                      */
703 #ifdef LZMA_BACKWARD_SIZE_MIN
704       *iv_return = LZMA_BACKWARD_SIZE_MIN;
705       return PERL_constant_ISIV;
706 #else
707       return PERL_constant_NOTDEF;
708 #endif
709     }
710     break;
711   case 'E':
712     if (memEQ(name, "LZMA_VERSION_STABILITY", 22)) {
713     /*                     ^                      */
714 #ifdef LZMA_VERSION_STABILITY
715       *iv_return = LZMA_VERSION_STABILITY;
716       return PERL_constant_ISIV;
717 #else
718       return PERL_constant_NOTDEF;
719 #endif
720     }
721     break;
722   case 'I':
723     if (memEQ(name, "LZMA_DICT_SIZE_DEFAULT", 22)) {
724     /*                     ^                      */
725 #ifdef LZMA_DICT_SIZE_DEFAULT
726       *iv_return = LZMA_DICT_SIZE_DEFAULT;
727       return PERL_constant_ISIV;
728 #else
729       return PERL_constant_NOTDEF;
730 #endif
731     }
732     break;
733   case 'N':
734     if (memEQ(name, "LZMA_UNSUPPORTED_CHECK", 22)) {
735     /*                     ^                      */
736 #if 1
737       *iv_return = LZMA_UNSUPPORTED_CHECK;
738       return PERL_constant_ISIV;
739 #else
740       return PERL_constant_NOTDEF;
741 #endif
742     }
743     break;
744   case 'R':
745     if (memEQ(name, "LZMA_PRESET_LEVEL_MASK", 22)) {
746     /*                     ^                      */
747 #ifdef LZMA_PRESET_LEVEL_MASK
748       *iv_return = LZMA_PRESET_LEVEL_MASK;
749       return PERL_constant_ISIV;
750 #else
751       return PERL_constant_NOTDEF;
752 #endif
753     }
754     break;
755   }
756   return PERL_constant_NOTFOUND;
757 }
758 
759 static int
constant(pTHX_ const char * name,STRLEN len,IV * iv_return,const char ** pv_return)760 constant (pTHX_ const char *name, STRLEN len, IV *iv_return, const char **pv_return) {
761   /* Initially switch on the length of the name.  */
762   /* When generated this function returned values for the list of names given
763      in this section of perl code.  Rather than manually editing these functions
764      to add or remove constants, which would result in this comment and section
765      of code becoming inaccurate, we recommend that you edit this section of
766      code, and use it to regenerate a new set of constant functions which you
767      then use to replace the originals.
768 
769      Regenerate these constant functions by feeding this entire source file to
770      perl -x
771 
772 #!/linux-shared/base/perl/install/bin/perl -w
773 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
774 
775 my $types = {map {($_, 1)} qw(IV PV)};
776 my @names = (qw(LZMA_BACKWARD_SIZE_MIN LZMA_BLOCK_HEADER_SIZE_MAX
777 	       LZMA_BLOCK_HEADER_SIZE_MIN LZMA_CHECK_ID_MAX LZMA_CHECK_SIZE_MAX
778 	       LZMA_CONCATENATED LZMA_DELTA_DIST_MAX LZMA_DELTA_DIST_MIN
779 	       LZMA_DICT_SIZE_DEFAULT LZMA_DICT_SIZE_MIN LZMA_FILTERS_MAX
780 	       LZMA_FILTER_ARM LZMA_FILTER_ARMTHUMB LZMA_FILTER_DELTA
781 	       LZMA_FILTER_IA64 LZMA_FILTER_LZMA2 LZMA_FILTER_POWERPC
782 	       LZMA_FILTER_SPARC LZMA_FILTER_X86 LZMA_LCLP_MAX LZMA_LCLP_MIN
783 	       LZMA_LC_DEFAULT LZMA_LP_DEFAULT LZMA_PB_DEFAULT LZMA_PB_MAX
784 	       LZMA_PB_MIN LZMA_PRESET_DEFAULT LZMA_PRESET_EXTREME
785 	       LZMA_PRESET_LEVEL_MASK LZMA_STREAM_HEADER_SIZE
786 	       LZMA_TELL_ANY_CHECK LZMA_TELL_NO_CHECK
787 	       LZMA_TELL_UNSUPPORTED_CHECK LZMA_VERSION LZMA_VERSION_MAJOR
788 	       LZMA_VERSION_MINOR LZMA_VERSION_PATCH LZMA_VERSION_STABILITY),
789             {name=>"LZMA_BUF_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
790             {name=>"LZMA_CHECK_CRC32", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
791             {name=>"LZMA_CHECK_CRC64", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
792             {name=>"LZMA_CHECK_NONE", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
793             {name=>"LZMA_CHECK_SHA256", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
794             {name=>"LZMA_DATA_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
795             {name=>"LZMA_DELTA_TYPE_BYTE", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
796             {name=>"LZMA_FINISH", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
797             {name=>"LZMA_FORMAT_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
798             {name=>"LZMA_FULL_FLUSH", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
799             {name=>"LZMA_GET_CHECK", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
800             {name=>"LZMA_MEMLIMIT_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
801             {name=>"LZMA_MEM_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
802             {name=>"LZMA_MF_BT2", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
803             {name=>"LZMA_MF_BT3", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
804             {name=>"LZMA_MF_BT4", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
805             {name=>"LZMA_MF_HC3", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
806             {name=>"LZMA_MF_HC4", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
807             {name=>"LZMA_MODE_FAST", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
808             {name=>"LZMA_MODE_NORMAL", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
809             {name=>"LZMA_NO_CHECK", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
810             {name=>"LZMA_OK", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
811             {name=>"LZMA_OPTIONS_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
812             {name=>"LZMA_PROG_ERROR", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
813             {name=>"LZMA_RUN", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
814             {name=>"LZMA_STREAM_END", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
815             {name=>"LZMA_SYNC_FLUSH", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
816             {name=>"LZMA_UNSUPPORTED_CHECK", type=>"IV", macro=>["#if 1\n", "#endif\n"]},
817             {name=>"LZMA_VERSION_STABILITY_STRING", type=>"PV", macro=>["#ifdef LZMA_VERSION_STABILITY_STRING \n", "#endif\n"]},
818             {name=>"LZMA_VERSION_STRING", type=>"PV", macro=>["#ifdef LZMA_VERSION_STRING \n", "#endif\n"]});
819 
820 print constant_types(), "\n"; # macro defs
821 foreach (C_constant ("Lzma", 'constant', 'IV', $types, undef, 3, @names) ) {
822     print $_, "\n"; # C constant subs
823 }
824 print "\n#### XS Section:\n";
825 print XS_constant ("Lzma", $types);
826 __END__
827    */
828 
829   switch (len) {
830   case 7:
831     if (memEQ(name, "LZMA_OK", 7)) {
832 #if 1
833       *iv_return = LZMA_OK;
834       return PERL_constant_ISIV;
835 #else
836       return PERL_constant_NOTDEF;
837 #endif
838     }
839     break;
840   case 8:
841     if (memEQ(name, "LZMA_RUN", 8)) {
842 #if 1
843       *iv_return = LZMA_RUN;
844       return PERL_constant_ISIV;
845 #else
846       return PERL_constant_NOTDEF;
847 #endif
848     }
849     break;
850   case 11:
851     return constant_11 (aTHX_ name, iv_return);
852     break;
853   case 12:
854     if (memEQ(name, "LZMA_VERSION", 12)) {
855 #ifdef LZMA_VERSION
856       *iv_return = LZMA_VERSION;
857       return PERL_constant_ISIV;
858 #else
859       return PERL_constant_NOTDEF;
860 #endif
861     }
862     break;
863   case 13:
864     return constant_13 (aTHX_ name, iv_return);
865     break;
866   case 14:
867     return constant_14 (aTHX_ name, iv_return);
868     break;
869   case 15:
870     return constant_15 (aTHX_ name, iv_return);
871     break;
872   case 16:
873     return constant_16 (aTHX_ name, iv_return);
874     break;
875   case 17:
876     return constant_17 (aTHX_ name, iv_return);
877     break;
878   case 18:
879     return constant_18 (aTHX_ name, iv_return);
880     break;
881   case 19:
882     return constant_19 (aTHX_ name, iv_return, pv_return);
883     break;
884   case 20:
885     /* Names all of length 20.  */
886     /* LZMA_DELTA_TYPE_BYTE LZMA_FILTER_ARMTHUMB */
887     /* Offset 5 gives the best switch position.  */
888     switch (name[5]) {
889     case 'D':
890       if (memEQ(name, "LZMA_DELTA_TYPE_BYTE", 20)) {
891       /*                    ^                     */
892 #if 1
893         *iv_return = LZMA_DELTA_TYPE_BYTE;
894         return PERL_constant_ISIV;
895 #else
896         return PERL_constant_NOTDEF;
897 #endif
898       }
899       break;
900     case 'F':
901       if (memEQ(name, "LZMA_FILTER_ARMTHUMB", 20)) {
902       /*                    ^                     */
903 #ifdef LZMA_FILTER_ARMTHUMB
904         *iv_return = LZMA_FILTER_ARMTHUMB;
905         return PERL_constant_ISIV;
906 #else
907         return PERL_constant_NOTDEF;
908 #endif
909       }
910       break;
911     }
912     break;
913   case 22:
914     return constant_22 (aTHX_ name, iv_return);
915     break;
916   case 23:
917     if (memEQ(name, "LZMA_STREAM_HEADER_SIZE", 23)) {
918 #ifdef LZMA_STREAM_HEADER_SIZE
919       *iv_return = LZMA_STREAM_HEADER_SIZE;
920       return PERL_constant_ISIV;
921 #else
922       return PERL_constant_NOTDEF;
923 #endif
924     }
925     break;
926   case 26:
927     /* Names all of length 26.  */
928     /* LZMA_BLOCK_HEADER_SIZE_MAX LZMA_BLOCK_HEADER_SIZE_MIN */
929     /* Offset 24 gives the best switch position.  */
930     switch (name[24]) {
931     case 'A':
932       if (memEQ(name, "LZMA_BLOCK_HEADER_SIZE_MAX", 26)) {
933       /*                                       ^        */
934 #ifdef LZMA_BLOCK_HEADER_SIZE_MAX
935         *iv_return = LZMA_BLOCK_HEADER_SIZE_MAX;
936         return PERL_constant_ISIV;
937 #else
938         return PERL_constant_NOTDEF;
939 #endif
940       }
941       break;
942     case 'I':
943       if (memEQ(name, "LZMA_BLOCK_HEADER_SIZE_MIN", 26)) {
944       /*                                       ^        */
945 #ifdef LZMA_BLOCK_HEADER_SIZE_MIN
946         *iv_return = LZMA_BLOCK_HEADER_SIZE_MIN;
947         return PERL_constant_ISIV;
948 #else
949         return PERL_constant_NOTDEF;
950 #endif
951       }
952       break;
953     }
954     break;
955   case 27:
956     if (memEQ(name, "LZMA_TELL_UNSUPPORTED_CHECK", 27)) {
957 #ifdef LZMA_TELL_UNSUPPORTED_CHECK
958       *iv_return = LZMA_TELL_UNSUPPORTED_CHECK;
959       return PERL_constant_ISIV;
960 #else
961       return PERL_constant_NOTDEF;
962 #endif
963     }
964     break;
965   case 29:
966     if (memEQ(name, "LZMA_VERSION_STABILITY_STRING", 29)) {
967 #ifdef LZMA_VERSION_STABILITY_STRING
968       *pv_return = LZMA_VERSION_STABILITY_STRING;
969       return PERL_constant_ISPV;
970 #else
971       return PERL_constant_NOTDEF;
972 #endif
973     }
974     break;
975   }
976   return PERL_constant_NOTFOUND;
977 }
978