File: | obj/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/Zlib.c |
Warning: | line 3161, column 6 Value stored to 'out' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* |
2 | * This file was generated automatically by ExtUtils::ParseXS version 3.40 from the |
3 | * contents of Zlib.xs. Do not edit this file, edit Zlib.xs instead. |
4 | * |
5 | * ANY CHANGES MADE HERE WILL BE LOST! |
6 | * |
7 | */ |
8 | |
9 | #line 1 "Zlib.xs" |
10 | /* Filename: Zlib.xs |
11 | * Author : Paul Marquess, <pmqs@cpan.org> |
12 | * Created : 22nd January 1996 |
13 | * Version : 2.000 |
14 | * |
15 | * Copyright (c) 1995-2013 Paul Marquess. All rights reserved. |
16 | * This program is free software; you can redistribute it and/or |
17 | * modify it under the same terms as Perl itself. |
18 | * |
19 | */ |
20 | |
21 | /* Parts of this code are based on the files gzio.c and gzappend.c from |
22 | * the standard zlib source distribution. Below are the copyright statements |
23 | * from each. |
24 | */ |
25 | |
26 | /* gzio.c -- IO on .gz files |
27 | * Copyright (C) 1995 Jean-loup Gailly. |
28 | * For conditions of distribution and use, see copyright notice in zlib.h |
29 | */ |
30 | |
31 | /* gzappend -- command to append to a gzip file |
32 | |
33 | Copyright (C) 2003 Mark Adler, all rights reserved |
34 | version 1.1, 4 Nov 2003 |
35 | */ |
36 | |
37 | |
38 | #define PERL_NO_GET_CONTEXT |
39 | #include "EXTERN.h" |
40 | #include "perl.h" |
41 | #include "XSUB.h" |
42 | |
43 | #include "zlib.h" |
44 | |
45 | /* zlib prior to 1.06 doesn't know about z_off_t */ |
46 | #ifndef z_off_tlong |
47 | # define z_off_tlong long |
48 | #endif |
49 | |
50 | #if ! defined(ZLIB_VERNUM0x12b0) || ZLIB_VERNUM0x12b0 < 0x1200 |
51 | # define NEED_DUMMY_BYTE_AT_END |
52 | #endif |
53 | |
54 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1210 |
55 | # define MAGIC_APPEND |
56 | # define AT_LEAST_ZLIB_1_2_1 |
57 | #endif |
58 | |
59 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1221 |
60 | # define AT_LEAST_ZLIB_1_2_2_1 |
61 | #endif |
62 | |
63 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1222 |
64 | # define AT_LEAST_ZLIB_1_2_2_2 |
65 | #endif |
66 | |
67 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1223 |
68 | # define AT_LEAST_ZLIB_1_2_2_3 |
69 | #endif |
70 | |
71 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1230 |
72 | # define AT_LEAST_ZLIB_1_2_3 |
73 | #endif |
74 | |
75 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1252 |
76 | /* |
77 | Use Z_SOLO to build source means need own malloc/free |
78 | */ |
79 | # define AT_LEAST_ZLIB_1_2_5_2 |
80 | #endif |
81 | |
82 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1280 |
83 | # define AT_LEAST_ZLIB_1_2_8 |
84 | #endif |
85 | |
86 | #if defined(ZLIB_VERNUM0x12b0) && ZLIB_VERNUM0x12b0 >= 0x1290 |
87 | # define AT_LEAST_ZLIB_1_2_9 |
88 | #endif |
89 | |
90 | #ifdef USE_PPPORT_H |
91 | # define NEED_sv_2pvbyte |
92 | # define NEED_sv_2pv_nolen |
93 | # define NEED_sv_pvn_force_flags |
94 | # include "ppport.h" |
95 | #endif |
96 | |
97 | #if PERL_REVISION5 == 5 && PERL_VERSION32 == 9 |
98 | /* For Andreas */ |
99 | # define sv_pvbyte_force(sv,lp) sv_pvbyten_force(sv,lp)Perl_sv_pvbyten_force( sv,lp) |
100 | #endif |
101 | |
102 | #if PERL_REVISION5 == 5 && (PERL_VERSION32 < 8 || (PERL_VERSION32 == 8 && PERL_SUBVERSION1 < 4 )) |
103 | |
104 | # ifdef SvPVbyte_force |
105 | # undef SvPVbyte_force |
106 | # endif |
107 | |
108 | # define SvPVbyte_force(sv,lp)((((sv)->sv_flags & (0x00000400|0x20000000|0x00000100| 0x00000200|0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400 ) ? ((lp = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->sv_u .svu_pv)) : Perl_sv_pvbyten_force( sv,&lp)) SvPV_force(sv,lp)((((sv)->sv_flags & (0x00000400|0x00000100|0x00000200| 0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((lp = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->sv_u.svu_pv )) : Perl_sv_pvn_force_flags( sv,&lp,2)) |
109 | |
110 | #endif |
111 | |
112 | #ifndef SvPVbyte_nolen |
113 | # define SvPVbyte_nolen SvPV_nolen |
114 | #endif |
115 | |
116 | |
117 | |
118 | #if 0 |
119 | # ifndef SvPVbyte_nolen |
120 | # define SvPVbyte_nolen SvPV_nolen |
121 | # endif |
122 | |
123 | # ifndef SvPVbyte_force |
124 | # define SvPVbyte_force(sv,lp)((((sv)->sv_flags & (0x00000400|0x20000000|0x00000100| 0x00000200|0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400 ) ? ((lp = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->sv_u .svu_pv)) : Perl_sv_pvbyten_force( sv,&lp)) SvPV_force(sv,lp)((((sv)->sv_flags & (0x00000400|0x00000100|0x00000200| 0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((lp = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->sv_u.svu_pv )) : Perl_sv_pvn_force_flags( sv,&lp,2)) |
125 | # endif |
126 | #endif |
127 | |
128 | #if PERL_REVISION5 == 5 && (PERL_VERSION32 >= 8 || (PERL_VERSION32 == 8 && PERL_SUBVERSION1 < 4 )) |
129 | # define UTF8_AVAILABLE |
130 | #endif |
131 | |
132 | typedef int DualType ; |
133 | typedef int int_undef ; |
134 | |
135 | typedef struct di_stream { |
136 | int flags ; |
137 | #define FLAG_APPEND1 1 |
138 | #define FLAG_CRC322 2 |
139 | #define FLAG_ADLER324 4 |
140 | #define FLAG_CONSUME_INPUT8 8 |
141 | #define FLAG_LIMIT_OUTPUT16 16 |
142 | uLong crc32 ; |
143 | uLong adler32 ; |
144 | z_stream stream; |
145 | uLong bufsize; |
146 | SV * dictionary ; |
147 | uLong dict_adler ; |
148 | int last_error ; |
149 | bool_Bool zip_mode ; |
150 | /* #define SETP_BYTE */ |
151 | #ifdef SETP_BYTE |
152 | /* SETP_BYTE only works with zlib up to 1.2.8 */ |
153 | bool_Bool deflateParams_out_valid ; |
154 | Bytef deflateParams_out_byte; |
155 | #else |
156 | #define deflateParams_BUFFER_SIZE0x40000 0x40000 |
157 | uLong deflateParams_out_length; |
158 | Bytef* deflateParams_out_buffer; |
159 | #endif |
160 | int Level; |
161 | int Method; |
162 | int WindowBits; |
163 | int MemLevel; |
164 | int Strategy; |
165 | uLong bytesInflated ; |
166 | uLong compressedBytes ; |
167 | uLong uncompressedBytes ; |
168 | #ifdef MAGIC_APPEND |
169 | |
170 | #define WINDOW_SIZE32768U 32768U |
171 | |
172 | bool_Bool matchedEndBlock; |
173 | Bytef* window ; |
174 | int window_lastbit, window_left, window_full; |
175 | unsigned window_have; |
176 | off_t window_lastoff, window_end; |
177 | off_t window_endOffset; |
178 | |
179 | uLong lastBlockOffset ; |
180 | unsigned char window_lastByte ; |
181 | |
182 | |
183 | #endif |
184 | } di_stream; |
185 | |
186 | typedef di_stream * deflateStream ; |
187 | typedef di_stream * Compress__Raw__Zlib__deflateStream ; |
188 | typedef di_stream * inflateStream ; |
189 | typedef di_stream * Compress__Raw__Zlib__inflateStream ; |
190 | typedef di_stream * Compress__Raw__Zlib__inflateScanStream ; |
191 | |
192 | #define ZMALLOC(to, typ)(to = (typ *)Perl_safesyscalloc(sizeof(typ), 1)) (to = (typ *)safecallocPerl_safesyscalloc(sizeof(typ), 1)) |
193 | |
194 | /* Figure out the Operating System */ |
195 | #ifdef MSDOS |
196 | # define OS_CODE0x03 0x00 |
197 | #endif |
198 | |
199 | #if defined(AMIGA) || defined(AMIGAOS) || defined(__amigaos4__) |
200 | # define OS_CODE0x03 0x01 |
201 | #endif |
202 | |
203 | #if defined(VAXC) || defined(VMS) |
204 | # define OS_CODE0x03 0x02 |
205 | #endif |
206 | |
207 | #if 0 /* VM/CMS */ |
208 | # define OS_CODE0x03 0x04 |
209 | #endif |
210 | |
211 | #if defined(ATARI) || defined(atarist) |
212 | # define OS_CODE0x03 0x05 |
213 | #endif |
214 | |
215 | #ifdef OS2 |
216 | # define OS_CODE0x03 0x06 |
217 | #endif |
218 | |
219 | #if defined(MACOS) || defined(TARGET_OS_MAC) |
220 | # define OS_CODE0x03 0x07 |
221 | #endif |
222 | |
223 | #if 0 /* Z-System */ |
224 | # define OS_CODE0x03 0x08 |
225 | #endif |
226 | |
227 | #if 0 /* CP/M */ |
228 | # define OS_CODE0x03 0x09 |
229 | #endif |
230 | |
231 | #ifdef TOPS20 |
232 | # define OS_CODE0x03 0x0a |
233 | #endif |
234 | |
235 | #ifdef WIN32 /* Window 95 & Windows NT */ |
236 | # define OS_CODE0x03 0x0b |
237 | #endif |
238 | |
239 | #if 0 /* QDOS */ |
240 | # define OS_CODE0x03 0x0c |
241 | #endif |
242 | |
243 | #if 0 /* Acorn RISCOS */ |
244 | # define OS_CODE0x03 0x0d |
245 | #endif |
246 | |
247 | #if 0 /* ??? */ |
248 | # define OS_CODE0x03 0x0e |
249 | #endif |
250 | |
251 | #ifdef __50SERIES /* Prime/PRIMOS */ |
252 | # define OS_CODE0x03 0x0F |
253 | #endif |
254 | |
255 | /* Default to UNIX */ |
256 | #ifndef OS_CODE0x03 |
257 | # define OS_CODE0x03 0x03 /* assume Unix */ |
258 | #endif |
259 | |
260 | #ifndef GZIP_OS_CODE3 |
261 | # define GZIP_OS_CODE3 OS_CODE0x03 |
262 | #endif |
263 | |
264 | #define adlerInitialadler32(0L, 0, 0) adler32(0L, Z_NULL0, 0) |
265 | #define crcInitialcrc32(0L, 0, 0) crc32(0L, Z_NULL0, 0) |
266 | |
267 | /* static const char * const my_z_errmsg[] = { */ |
268 | static const char my_z_errmsg[][32] = { |
269 | "need dictionary", /* Z_NEED_DICT 2 */ |
270 | "stream end", /* Z_STREAM_END 1 */ |
271 | "", /* Z_OK 0 */ |
272 | "file error", /* Z_ERRNO (-1) */ |
273 | "stream error", /* Z_STREAM_ERROR (-2) */ |
274 | "data error", /* Z_DATA_ERROR (-3) */ |
275 | "insufficient memory", /* Z_MEM_ERROR (-4) */ |
276 | "buffer error", /* Z_BUF_ERROR (-5) */ |
277 | "incompatible version",/* Z_VERSION_ERROR(-6) */ |
278 | ""}; |
279 | |
280 | #define setDUALstatus(var, err)Perl_sv_setnv( var,(double)err) ; Perl_sv_setpv( var,((err) ? GetErrorString(err) : "")) ; ( (var)->sv_flags |= (0x00000200 |0x00002000)); \ |
281 | sv_setnv(var, (double)err)Perl_sv_setnv( var,(double)err) ; \ |
282 | sv_setpv(var, ((err) ? GetErrorString(err) : ""))Perl_sv_setpv( var,((err) ? GetErrorString(err) : "")) ; \ |
283 | SvNOK_on(var)( (var)->sv_flags |= (0x00000200|0x00002000)); |
284 | |
285 | |
286 | #if defined(__SYMBIAN32__) |
287 | # define NO_WRITEABLE_DATA |
288 | #endif |
289 | |
290 | /* Set TRACE_DEFAULT to a non-zero value to enable tracing */ |
291 | #define TRACE_DEFAULT0 0 |
292 | |
293 | #if defined(NO_WRITEABLE_DATA) || TRACE_DEFAULT0 == 0 |
294 | # define trace0 TRACE_DEFAULT0 |
295 | #else |
296 | static int trace0 = TRACE_DEFAULT0 ; |
297 | #endif |
298 | |
299 | /* Dodge PerlIO hiding of these functions. */ |
300 | #undef printf |
301 | |
302 | static char * |
303 | #ifdef CAN_PROTOTYPE |
304 | GetErrorString(int error_no) |
305 | #else |
306 | GetErrorString(error_no) |
307 | int error_no ; |
308 | #endif |
309 | { |
310 | dTHXstruct Perl___notused_struct; |
311 | char * errstr ; |
312 | |
313 | if (error_no == Z_ERRNO(-1)) { |
314 | errstr = Strerror(errno)strerror((*__errno())) ; |
315 | } |
316 | else |
317 | /* errstr = gzerror(fil, &error_no) ; */ |
318 | errstr = (char*) my_z_errmsg[2 - error_no]; |
319 | |
320 | return errstr ; |
321 | } |
322 | |
323 | |
324 | #ifdef MAGIC_APPEND |
325 | |
326 | /* |
327 | The following two functions are taken almost directly from |
328 | examples/gzappend.c. Only cosmetic changes have been made to conform to |
329 | the coding style of the rest of the code in this file. |
330 | */ |
331 | |
332 | |
333 | /* return the greatest common divisor of a and b using Euclid's algorithm, |
334 | modified to be fast when one argument much greater than the other, and |
335 | coded to avoid unnecessary swapping */ |
336 | static unsigned |
337 | #ifdef CAN_PROTOTYPE |
338 | gcd(unsigned a, unsigned b) |
339 | #else |
340 | gcd(a, b) |
341 | unsigned a; |
342 | unsigned b; |
343 | #endif |
344 | { |
345 | unsigned c; |
346 | |
347 | while (a && b) |
348 | if (a > b) { |
349 | c = b; |
350 | while (a - c >= c) |
351 | c <<= 1; |
352 | a -= c; |
353 | } |
354 | else { |
355 | c = a; |
356 | while (b - c >= c) |
357 | c <<= 1; |
358 | b -= c; |
359 | } |
360 | return a + b; |
361 | } |
362 | |
363 | /* rotate list[0..len-1] left by rot positions, in place */ |
364 | static void |
365 | #ifdef CAN_PROTOTYPE |
366 | rotate(unsigned char *list, unsigned len, unsigned rot) |
367 | #else |
368 | rotate(list, len, rot) |
369 | unsigned char *list; |
370 | unsigned len ; |
371 | unsigned rot; |
372 | #endif |
373 | { |
374 | unsigned char tmp; |
375 | unsigned cycles; |
376 | unsigned char *start, *last, *to, *from; |
377 | |
378 | /* normalize rot and handle degenerate cases */ |
379 | if (len < 2) return; |
380 | if (rot >= len) rot %= len; |
381 | if (rot == 0) return; |
382 | |
383 | /* pointer to last entry in list */ |
384 | last = list + (len - 1); |
385 | |
386 | /* do simple left shift by one */ |
387 | if (rot == 1) { |
388 | tmp = *list; |
389 | memmove(list, list + 1, len - 1); |
390 | *last = tmp; |
391 | return; |
392 | } |
393 | |
394 | /* do simple right shift by one */ |
395 | if (rot == len - 1) { |
396 | tmp = *last; |
397 | memmove(list + 1, list, len - 1); |
398 | *list = tmp; |
399 | return; |
400 | } |
401 | |
402 | /* otherwise do rotate as a set of cycles in place */ |
403 | cycles = gcd(len, rot); /* number of cycles */ |
404 | do { |
405 | start = from = list + cycles; /* start index is arbitrary */ |
406 | tmp = *from; /* save entry to be overwritten */ |
407 | for (;;) { |
408 | to = from; /* next step in cycle */ |
409 | from += rot; /* go right rot positions */ |
410 | if (from > last) from -= len; /* (pointer better not wrap) */ |
411 | if (from == start) break; /* all but one shifted */ |
412 | *to = *from; /* shift left */ |
413 | } |
414 | *to = tmp; /* complete the circle */ |
415 | } while (--cycles); |
416 | } |
417 | |
418 | #endif /* MAGIC_APPEND */ |
419 | |
420 | static void |
421 | #ifdef CAN_PROTOTYPE |
422 | DispHex(void * ptr, int length) |
423 | #else |
424 | DispHex(ptr, length) |
425 | void * ptr; |
426 | int length; |
427 | #endif |
428 | { |
429 | char * p = (char*)ptr; |
430 | int i; |
431 | for (i = 0; i < length; ++i) { |
432 | printf(" %02x", 0xFF & *(p+i)); |
433 | } |
434 | } |
435 | |
436 | |
437 | static void |
438 | #ifdef CAN_PROTOTYPE |
439 | DispStream(di_stream * s, const char * message) |
440 | #else |
441 | DispStream(s, message) |
442 | di_stream * s; |
443 | const char * message; |
444 | #endif |
445 | { |
446 | |
447 | #if 0 |
448 | if (! trace0) |
449 | return ; |
450 | #endif |
451 | |
452 | #define EnDis(f)(s->flags & f ? "Enabled" : "Disabled") (s->flags & f ? "Enabled" : "Disabled") |
453 | |
454 | printf("DispStream %p", s) ; |
455 | if (message) |
456 | printf("- %s \n", message) ; |
457 | printf("\n") ; |
458 | |
459 | if (!s) { |
460 | printf(" stream pointer is NULL\n"); |
461 | } |
462 | else { |
463 | printf(" stream %p\n", &(s->stream)); |
464 | printf(" zalloc %p\n", s->stream.zalloc); |
465 | printf(" zfree %p\n", s->stream.zfree); |
466 | printf(" opaque %p\n", s->stream.opaque); |
467 | printf(" state %p\n", s->stream.state); |
468 | if (s->stream.msg) |
469 | printf(" msg %s\n", s->stream.msg); |
470 | else |
471 | printf(" msg \n"); |
472 | printf(" next_in %p", s->stream.next_in); |
473 | if (s->stream.next_in){ |
474 | printf(" =>"); |
475 | DispHex(s->stream.next_in, 4); |
476 | } |
477 | printf("\n"); |
478 | |
479 | printf(" next_out %p", s->stream.next_out); |
480 | if (s->stream.next_out){ |
481 | printf(" =>"); |
482 | DispHex(s->stream.next_out, 4); |
483 | } |
484 | printf("\n"); |
485 | |
486 | printf(" avail_in %lu\n", (unsigned long)s->stream.avail_in); |
487 | printf(" avail_out %lu\n", (unsigned long)s->stream.avail_out); |
488 | printf(" total_in %ld\n", s->stream.total_in); |
489 | printf(" total_out %ld\n", s->stream.total_out); |
490 | printf(" adler %ld\n", s->stream.adler ); |
491 | printf(" bufsize %ld\n", s->bufsize); |
492 | printf(" dictionary %p\n", s->dictionary); |
493 | printf(" dict_adler 0x%ld\n",s->dict_adler); |
494 | printf(" zip_mode %d\n", s->zip_mode); |
495 | printf(" crc32 0x%x\n", (unsigned)s->crc32); |
496 | printf(" adler32 0x%x\n", (unsigned)s->adler32); |
497 | printf(" flags 0x%x\n", s->flags); |
498 | printf(" APPEND %s\n", EnDis(FLAG_APPEND)(s->flags & 1 ? "Enabled" : "Disabled")); |
499 | printf(" CRC32 %s\n", EnDis(FLAG_CRC32)(s->flags & 2 ? "Enabled" : "Disabled")); |
500 | printf(" ADLER32 %s\n", EnDis(FLAG_ADLER32)(s->flags & 4 ? "Enabled" : "Disabled")); |
501 | printf(" CONSUME %s\n", EnDis(FLAG_CONSUME_INPUT)(s->flags & 8 ? "Enabled" : "Disabled")); |
502 | printf(" LIMIT %s\n", EnDis(FLAG_LIMIT_OUTPUT)(s->flags & 16 ? "Enabled" : "Disabled")); |
503 | |
504 | |
505 | #ifdef MAGIC_APPEND |
506 | printf(" window %p\n", s->window); |
507 | #endif |
508 | printf("\n"); |
509 | |
510 | } |
511 | } |
512 | |
513 | #ifdef AT_LEAST_ZLIB_1_2_5_2 |
514 | voidpf my_zcalloc (voidpf opaque, unsigned items, unsigned size) |
515 | { |
516 | PERL_UNUSED_VAR(opaque)((void)sizeof(opaque)); |
517 | /* TODO - put back to calloc */ |
518 | /* return safecalloc(items, size); */ |
519 | return safemallocPerl_safesysmalloc(items* size); |
520 | } |
521 | |
522 | |
523 | void my_zcfree (voidpf opaque, voidpf ptr) |
524 | { |
525 | PERL_UNUSED_VAR(opaque)((void)sizeof(opaque)); |
526 | safefreePerl_safesysfree(ptr); |
527 | return; |
528 | } |
529 | |
530 | #endif |
531 | |
532 | static di_stream * |
533 | #ifdef CAN_PROTOTYPE |
534 | InitStream(void) |
535 | #else |
536 | InitStream() |
537 | #endif |
538 | { |
539 | di_stream *s ; |
540 | |
541 | ZMALLOC(s, di_stream)(s = (di_stream *)Perl_safesyscalloc(sizeof(di_stream), 1)) ; |
542 | |
543 | #ifdef AT_LEAST_ZLIB_1_2_5_2 |
544 | s->stream.zalloc = my_zcalloc; |
545 | s->stream.zfree = my_zcfree; |
546 | #endif |
547 | |
548 | return s ; |
549 | } |
550 | |
551 | static void |
552 | #ifdef CAN_PROTOTYPE |
553 | PostInitStream(di_stream * s, int flags, int bufsize, int windowBits) |
554 | #else |
555 | PostInitStream(s, flags, bufsize, windowBits) |
556 | di_stream *s ; |
557 | int flags ; |
558 | int bufsize ; |
559 | int windowBits ; |
560 | #endif |
561 | { |
562 | s->bufsize = bufsize ; |
563 | s->compressedBytes = |
564 | s->uncompressedBytes = |
565 | s->last_error = 0 ; |
566 | s->flags = flags ; |
567 | s->zip_mode = (windowBits < 0) ; |
568 | if (flags & FLAG_CRC322) |
569 | s->crc32 = crcInitialcrc32(0L, 0, 0) ; |
570 | if (flags & FLAG_ADLER324) |
571 | s->adler32 = adlerInitialadler32(0L, 0, 0) ; |
572 | } |
573 | |
574 | |
575 | static SV* |
576 | #ifdef CAN_PROTOTYPE |
577 | deRef(SV * sv, const char * string) |
578 | #else |
579 | deRef(sv, string) |
580 | SV * sv ; |
581 | char * string; |
582 | #endif |
583 | { |
584 | dTHXstruct Perl___notused_struct; |
585 | SvGETMAGIC(sv)((void)(__builtin_expect(((((sv)->sv_flags & 0x00200000 )) ? (_Bool)1 : (_Bool)0),(0)) && Perl_mg_get( sv))); |
586 | |
587 | if (SvROK(sv)((sv)->sv_flags & 0x00000800)) { |
588 | sv = SvRV(sv)((sv)->sv_u.svu_rv) ; |
589 | SvGETMAGIC(sv)((void)(__builtin_expect(((((sv)->sv_flags & 0x00200000 )) ? (_Bool)1 : (_Bool)0),(0)) && Perl_mg_get( sv))); |
590 | switch(SvTYPE(sv)((svtype)((sv)->sv_flags & 0xff))) { |
591 | case SVt_PVAV: |
592 | case SVt_PVHV: |
593 | case SVt_PVCV: |
594 | croakPerl_croak("%s: buffer parameter is not a SCALAR reference", string); |
595 | default: |
596 | break; |
597 | } |
598 | if (SvROK(sv)((sv)->sv_flags & 0x00000800)) |
599 | croakPerl_croak("%s: buffer parameter is a reference to a reference", string) ; |
600 | } |
601 | |
602 | if (!SvOK(sv)((sv)->sv_flags & (0x00000100|0x00000200|0x00000400|0x00000800 | 0x00001000|0x00002000|0x00004000|0x00008000))) |
603 | sv = sv_2mortal(newSVpv("", 0))Perl_sv_2mortal( Perl_newSVpv( "",0)); |
604 | |
605 | return sv ; |
606 | } |
607 | |
608 | static SV* |
609 | #ifdef CAN_PROTOTYPE |
610 | deRef_l(SV * sv, const char * string) |
611 | #else |
612 | deRef_l(sv, string) |
613 | SV * sv ; |
614 | char * string ; |
615 | #endif |
616 | { |
617 | dTHXstruct Perl___notused_struct; |
618 | bool_Bool wipe = 0 ; |
619 | STRLEN na; |
620 | |
621 | SvGETMAGIC(sv)((void)(__builtin_expect(((((sv)->sv_flags & 0x00200000 )) ? (_Bool)1 : (_Bool)0),(0)) && Perl_mg_get( sv))); |
622 | wipe = ! SvOK(sv)((sv)->sv_flags & (0x00000100|0x00000200|0x00000400|0x00000800 | 0x00001000|0x00002000|0x00004000|0x00008000)) ; |
623 | |
624 | if (SvROK(sv)((sv)->sv_flags & 0x00000800)) { |
625 | sv = SvRV(sv)((sv)->sv_u.svu_rv) ; |
626 | SvGETMAGIC(sv)((void)(__builtin_expect(((((sv)->sv_flags & 0x00200000 )) ? (_Bool)1 : (_Bool)0),(0)) && Perl_mg_get( sv))); |
627 | wipe = ! SvOK(sv)((sv)->sv_flags & (0x00000100|0x00000200|0x00000400|0x00000800 | 0x00001000|0x00002000|0x00004000|0x00008000)) ; |
628 | |
629 | switch(SvTYPE(sv)((svtype)((sv)->sv_flags & 0xff))) { |
630 | case SVt_PVAV: |
631 | case SVt_PVHV: |
632 | case SVt_PVCV: |
633 | croakPerl_croak("%s: buffer parameter is not a SCALAR reference", string); |
634 | default: |
635 | break; |
636 | } |
637 | if (SvROK(sv)((sv)->sv_flags & 0x00000800)) |
638 | croakPerl_croak("%s: buffer parameter is a reference to a reference", string) ; |
639 | } |
640 | |
641 | if (SvREADONLY(sv)((sv)->sv_flags & (0x08000000|0x00010000)) && PL_curcop != &PL_compiling) |
642 | croakPerl_croak("%s: buffer parameter is read-only", string); |
643 | |
644 | SvUPGRADE(sv, SVt_PV)((void)(((svtype)((sv)->sv_flags & 0xff)) >= (SVt_PV ) || (Perl_sv_upgrade( sv,SVt_PV),1))); |
645 | |
646 | if (wipe) |
647 | sv_setpv(sv, "")Perl_sv_setpv( sv,"") ; |
648 | else |
649 | (void)SvPVbyte_force(sv, na)((((sv)->sv_flags & (0x00000400|0x20000000|0x00000100| 0x00000200|0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400 ) ? ((na = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->sv_u .svu_pv)) : Perl_sv_pvbyten_force( sv,&na)) ; |
650 | |
651 | return sv ; |
652 | } |
653 | |
654 | #if 0 |
655 | int |
656 | flushToBuffer(di_stream* s, int flush) |
657 | { |
658 | dTHXstruct Perl___notused_struct; |
659 | int ret ; |
660 | z_stream * strm = &s->stream; |
661 | |
662 | Bytef* output = s->deflateParams_out_buffer ; |
663 | |
664 | strm->next_in = NULL((void*)0); |
665 | strm->avail_in = 0; |
666 | |
667 | uLong total_output = 0; |
668 | uLong have = 0; |
669 | |
670 | do |
671 | { |
672 | if (output) |
673 | output = (unsigned char *)safereallocPerl_safesysrealloc(output, total_output + s->bufsize); |
674 | else |
675 | output = (unsigned char *)safemallocPerl_safesysmalloc(s->bufsize); |
676 | |
677 | strm->next_out = output + total_output; |
678 | strm->avail_out = s->bufsize; |
679 | |
680 | ret = deflate(strm, flush); /* no bad return value */ |
681 | //assert(ret != Z_STREAM_ERROR); /* state not clobbered */ |
682 | if(ret == Z_STREAM_ERROR(-2)) |
683 | { |
684 | safefreePerl_safesysfree(output); |
685 | return ret; |
686 | } |
687 | have = s->bufsize - strm->avail_out; |
688 | total_output += have; |
689 | |
690 | //fprintf(stderr, "FLUSH %s %d, return %d\n", flush_flags[flush], have, ret); |
691 | |
692 | } while (strm->avail_out == 0); |
693 | |
694 | s->deflateParams_out_buffer = output; |
695 | s->deflateParams_out_length = total_output; |
696 | |
697 | return Z_OK0; |
698 | } |
699 | #endif |
700 | |
701 | #ifndef SETP_BYTE |
702 | int |
703 | flushParams(di_stream* s) |
704 | { |
705 | dTHXstruct Perl___notused_struct; |
706 | int ret ; |
707 | z_stream * strm = &s->stream; |
708 | |
709 | Bytef* output = s->deflateParams_out_buffer ; |
710 | uLong total_output = s->deflateParams_out_length; |
711 | uLong have = 0; |
712 | |
713 | strm->next_in = NULL((void*)0); |
714 | strm->avail_in = 0; |
715 | |
716 | |
717 | do |
718 | { |
719 | if (output) |
720 | output = (unsigned char *)safereallocPerl_safesysrealloc(output, total_output + s->bufsize); |
721 | else |
722 | output = (unsigned char *)safemallocPerl_safesysmalloc(s->bufsize); |
723 | |
724 | strm->next_out = output + total_output; |
725 | strm->avail_out = s->bufsize; |
726 | |
727 | ret = deflateParams(&(s->stream), s->Level, s->Strategy); |
728 | /* fprintf(stderr, "deflateParams %d %s %lu\n", ret, |
729 | GetErrorString(ret), s->bufsize - strm->avail_out); */ |
730 | |
731 | if (ret == Z_STREAM_ERROR(-2)) |
732 | break; |
733 | |
734 | have = s->bufsize - strm->avail_out; |
735 | total_output += have; |
736 | |
737 | |
738 | } while (ret == Z_BUF_ERROR(-5)) ; |
739 | |
740 | if(ret == Z_STREAM_ERROR(-2)) |
741 | safefreePerl_safesysfree(output); |
742 | else |
743 | { |
744 | s->deflateParams_out_buffer = output; |
745 | s->deflateParams_out_length = total_output; |
746 | } |
747 | |
748 | return ret; |
749 | } |
750 | #endif /* ! SETP_BYTE */ |
751 | |
752 | #include "constants.h" |
753 | |
754 | #line 755 "Zlib.c" |
755 | #ifndef PERL_UNUSED_VAR |
756 | # define PERL_UNUSED_VAR(var)((void)sizeof(var)) if (0) var = var |
757 | #endif |
758 | |
759 | #ifndef dVARstruct Perl___notused_struct |
760 | # define dVARstruct Perl___notused_struct dNOOPstruct Perl___notused_struct |
761 | #endif |
762 | |
763 | |
764 | /* This stuff is not part of the API! You have been warned. */ |
765 | #ifndef PERL_VERSION_DECIMAL |
766 | # define PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s) (r*1000000 + v*1000 + s) |
767 | #endif |
768 | #ifndef PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) |
769 | # define PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) \ |
770 | PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)(5*1000000 + 32*1000 + 1) |
771 | #endif |
772 | #ifndef PERL_VERSION_GE |
773 | # define PERL_VERSION_GE(r,v,s)((5*1000000 + 32*1000 + 1) >= (r*1000000 + v*1000 + s)) \ |
774 | (PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) >= PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s)) |
775 | #endif |
776 | #ifndef PERL_VERSION_LE |
777 | # define PERL_VERSION_LE(r,v,s)((5*1000000 + 32*1000 + 1) <= (r*1000000 + v*1000 + s)) \ |
778 | (PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) <= PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s)) |
779 | #endif |
780 | |
781 | /* XS_INTERNAL is the explicit static-linkage variant of the default |
782 | * XS macro. |
783 | * |
784 | * XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
785 | * "STATIC", ie. it exports XSUB symbols. You probably don't want that |
786 | * for anything but the BOOT XSUB. |
787 | * |
788 | * See XSUB.h in core! |
789 | */ |
790 | |
791 | |
792 | /* TODO: This might be compatible further back than 5.10.0. */ |
793 | #if PERL_VERSION_GE(5, 10, 0)((5*1000000 + 32*1000 + 1) >= (5*1000000 + 10*1000 + 0)) && PERL_VERSION_LE(5, 15, 1)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 15*1000 + 1)) |
794 | # undef XS_EXTERNAL |
795 | # undef XS_INTERNAL |
796 | # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
797 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) __declspec(dllexport) XSPROTO(name)void name( CV* cv __attribute__((unused))) |
798 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused))) |
799 | # endif |
800 | # if defined(__SYMBIAN32__) |
801 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) EXPORT_C XSPROTO(name)void name( CV* cv __attribute__((unused))) |
802 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) EXPORT_C STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused))) |
803 | # endif |
804 | # ifndef XS_EXTERNAL |
805 | # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
806 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) void name(pTHX_ CV* cv __attribute__unused____attribute__((unused))) |
807 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic void name(pTHX_ CV* cv __attribute__unused____attribute__((unused))) |
808 | # else |
809 | # ifdef __cplusplus |
810 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) extern "C" XSPROTO(name)void name( CV* cv __attribute__((unused))) |
811 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) static XSPROTO(name)void name( CV* cv __attribute__((unused))) |
812 | # else |
813 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) XSPROTO(name)void name( CV* cv __attribute__((unused))) |
814 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused))) |
815 | # endif |
816 | # endif |
817 | # endif |
818 | #endif |
819 | |
820 | /* perl >= 5.10.0 && perl <= 5.15.1 */ |
821 | |
822 | |
823 | /* The XS_EXTERNAL macro is used for functions that must not be static |
824 | * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
825 | * macro defined, the best we can do is assume XS is the same. |
826 | * Dito for XS_INTERNAL. |
827 | */ |
828 | #ifndef XS_EXTERNAL |
829 | # define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) XS(name)void name( CV* cv __attribute__((unused))) |
830 | #endif |
831 | #ifndef XS_INTERNAL |
832 | # define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) XS(name)void name( CV* cv __attribute__((unused))) |
833 | #endif |
834 | |
835 | /* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
836 | * internal macro that we're free to redefine for varying linkage due |
837 | * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
838 | * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
839 | */ |
840 | |
841 | #undef XS_EUPXS |
842 | #if defined(PERL_EUPXS_ALWAYS_EXPORT) |
843 | # define XS_EUPXS(name)static void name( CV* cv __attribute__((unused))) XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) |
844 | #else |
845 | /* default to internal */ |
846 | # define XS_EUPXS(name)static void name( CV* cv __attribute__((unused))) XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) |
847 | #endif |
848 | |
849 | #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0) |
850 | #define PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0) assert(cv)((void)0); assert(params)((void)0) |
851 | |
852 | /* prototype to pass -Wmissing-prototypes */ |
853 | STATICstatic void |
854 | S_croak_xs_usage(const CV *const cv, const char *const params); |
855 | |
856 | STATICstatic void |
857 | S_croak_xs_usage(const CV *const cv, const char *const params) |
858 | { |
859 | const GV *const gv = CvGV(cv)Perl_CvGV( (CV *)(cv)); |
860 | |
861 | PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0); |
862 | |
863 | if (gv) { |
864 | const char *const gvname = GvNAME(gv)((((XPVGV*)(gv)->sv_any)->xiv_u.xivu_namehek))->hek_key; |
865 | const HV *const stash = GvSTASH(gv)(((XPVGV*)(gv)->sv_any)->xnv_u.xgv_stash); |
866 | const char *const hvname = stash ? HvNAME(stash)((((stash)->sv_flags & 0x02000000) && ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV*) (stash )->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name && ( ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV *) (stash)->sv_any)->xhv_max+1]))->xhv_name_count ? * ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV *) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_names : ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV *) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name )) ? (( ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash )[((XPVHV*) (stash)->sv_any)->xhv_max+1]))->xhv_name_count ? *((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV *) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_names : ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV *) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name ))->hek_key : ((void*)0)) : NULL((void*)0); |
867 | |
868 | if (hvname) |
869 | Perl_croak_nocontextPerl_croak("Usage: %s::%s(%s)", hvname, gvname, params); |
870 | else |
871 | Perl_croak_nocontextPerl_croak("Usage: %s(%s)", gvname, params); |
872 | } else { |
873 | /* Pants. I don't think that it should be possible to get here. */ |
874 | Perl_croak_nocontextPerl_croak("Usage: CODE(0x%" UVxf"lx" ")(%s)", PTR2UV(cv)(UV)(cv), params); |
875 | } |
876 | } |
877 | #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0) |
878 | |
879 | #define croak_xs_usagePerl_croak_xs_usage S_croak_xs_usage |
880 | |
881 | #endif |
882 | |
883 | /* NOTE: the prototype of newXSproto() is different in versions of perls, |
884 | * so we define a portable version of newXSproto() |
885 | */ |
886 | #ifdef newXS_flags |
887 | #define newXSproto_portable(name, c_impl, file, proto)Perl_newXS_flags( name,c_impl,file,proto,0) newXS_flags(name, c_impl, file, proto, 0)Perl_newXS_flags( name,c_impl,file,proto,0) |
888 | #else |
889 | #define newXSproto_portable(name, c_impl, file, proto)Perl_newXS_flags( name,c_impl,file,proto,0) (PL_Sv=(SV*)newXS(name, c_impl, file)Perl_newXS( name,c_impl,file), sv_setpv(PL_Sv, proto)Perl_sv_setpv( PL_Sv,proto), (CV*)PL_Sv) |
890 | #endif /* !defined(newXS_flags) */ |
891 | |
892 | #if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5)) |
893 | # define newXS_deffile(a,b)Perl_newXS_deffile( a,b) Perl_newXS(aTHX_ a,b,file) |
894 | #else |
895 | # define newXS_deffile(a,b)Perl_newXS_deffile( a,b) Perl_newXS_deffile(aTHX_ a,b) |
896 | #endif |
897 | |
898 | #line 899 "Zlib.c" |
899 | |
900 | /* INCLUDE: Including 'constants.xs' from 'Zlib.xs' */ |
901 | |
902 | |
903 | XS_EUPXS(XS_Compress__Raw__Zlib_constant)static void XS_Compress__Raw__Zlib_constant( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
904 | XS_EUPXS(XS_Compress__Raw__Zlib_constant)static void XS_Compress__Raw__Zlib_constant( CV* cv __attribute__ ((unused))) |
905 | { |
906 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
907 | if (items != 1) |
908 | croak_xs_usagePerl_croak_xs_usage(cv, "sv"); |
909 | PERL_UNUSED_VAR(ax)((void)sizeof(ax)); /* -Wall */ |
910 | SPsp -= items; |
911 | { |
912 | #line 4 "./constants.xs" |
913 | #ifdef dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()) |
914 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); /* Faster if we have it. */ |
915 | #else |
916 | dTARGETSV * targ = (PL_curpad[PL_op->op_targ]); |
917 | #endif |
918 | STRLEN len; |
919 | int type; |
920 | IV iv = 0; /* avoid uninit var warning */ |
921 | /* NV nv; Uncomment this if you need to return NVs */ |
922 | const char *pv = NULL((void*)0); /* avoid uninit var warning */ |
923 | #line 924 "Zlib.c" |
924 | SV * sv = ST(0)PL_stack_base[ax + (0)] |
925 | ; |
926 | const char * s = SvPV(sv, len)((((sv)->sv_flags & (0x00000400|0x00200000)) == 0x00000400 ) ? ((len = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)-> sv_u.svu_pv)) : Perl_sv_2pv_flags( sv,&len,2)); |
927 | #line 18 "./constants.xs" |
928 | /* Change this to constant(aTHX_ s, len, &iv, &nv); |
929 | if you need to return both NVs and IVs */ |
930 | type = constant(aTHX_ s, len, &iv, &pv); |
931 | /* Return 1 or 2 items. First is error message, or undef if no error. |
932 | Second, if present, is found value */ |
933 | switch (type) { |
934 | case PERL_constant_NOTFOUND1: |
935 | sv = |
936 | sv_2mortal(newSVpvf("%s is not a valid Zlib macro", s))Perl_sv_2mortal( Perl_newSVpvf("%s is not a valid Zlib macro" , s)); |
937 | PUSHs(sv)(*++sp = (sv)); |
938 | break; |
939 | case PERL_constant_NOTDEF2: |
940 | sv = sv_2mortal(newSVpvf(Perl_sv_2mortal( Perl_newSVpvf( "Your vendor has not defined Zlib macro %s, used" , s)) |
941 | "Your vendor has not defined Zlib macro %s, used",Perl_sv_2mortal( Perl_newSVpvf( "Your vendor has not defined Zlib macro %s, used" , s)) |
942 | s))Perl_sv_2mortal( Perl_newSVpvf( "Your vendor has not defined Zlib macro %s, used" , s)); |
943 | PUSHs(sv)(*++sp = (sv)); |
944 | break; |
945 | case PERL_constant_ISIV3: |
946 | EXTEND(SP, 2)do { (void)0; if (__builtin_expect(((((2) < 0 || PL_stack_max - (sp) < (2))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(2) > sizeof(ssize_t) && ((ssize_t) (2) != (2)) ? -1 : (2))); ((void)sizeof(sp)); } } while (0); |
947 | PUSHs(&PL_sv_undef)(*++sp = (&(PL_sv_immortals[1]))); |
948 | PUSHi(iv)do { do { IV TARGi_iv = iv; if (__builtin_expect((((((targ)-> sv_flags & (0xff|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? ! (((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool)0),(0)) ) ? (_Bool)1 : (_Bool)0)) : 1)) ? (_Bool)1 : (_Bool)0),(1))) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000); targ ->sv_u.svu_iv = TARGi_iv; } else Perl_sv_setiv_mg( targ,TARGi_iv ); } while (0); (*++sp = (targ)); } while (0); |
949 | break; |
950 | /* Uncomment this if you need to return NOs |
951 | case PERL_constant_ISNO: |
952 | EXTEND(SP, 2); |
953 | PUSHs(&PL_sv_undef); |
954 | PUSHs(&PL_sv_no); |
955 | break; */ |
956 | /* Uncomment this if you need to return NVs |
957 | case PERL_constant_ISNV: |
958 | EXTEND(SP, 2); |
959 | PUSHs(&PL_sv_undef); |
960 | PUSHn(nv); |
961 | break; */ |
962 | case PERL_constant_ISPV6: |
963 | EXTEND(SP, 2)do { (void)0; if (__builtin_expect(((((2) < 0 || PL_stack_max - (sp) < (2))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(2) > sizeof(ssize_t) && ((ssize_t) (2) != (2)) ? -1 : (2))); ((void)sizeof(sp)); } } while (0); |
964 | PUSHs(&PL_sv_undef)(*++sp = (&(PL_sv_immortals[1]))); |
965 | PUSHp(pv, strlen(pv))do { Perl_sv_setpvn( targ,(pv),(strlen(pv))); do { do { if (__builtin_expect (((((targ)->sv_flags & 0x00400000)) ? (_Bool)1 : (_Bool )0),(0))) Perl_mg_set( targ); } while (0); (*++sp = (targ)); } while (0); } while (0); |
966 | break; |
967 | /* Uncomment this if you need to return PVNs |
968 | case PERL_constant_ISPVN: |
969 | EXTEND(SP, 2); |
970 | PUSHs(&PL_sv_undef); |
971 | PUSHp(pv, iv); |
972 | break; */ |
973 | /* Uncomment this if you need to return SVs |
974 | case PERL_constant_ISSV: |
975 | EXTEND(SP, 2); |
976 | PUSHs(&PL_sv_undef); |
977 | PUSHs(sv); |
978 | break; */ |
979 | /* Uncomment this if you need to return UNDEFs |
980 | case PERL_constant_ISUNDEF: |
981 | break; */ |
982 | /* Uncomment this if you need to return UVs |
983 | case PERL_constant_ISUV: |
984 | EXTEND(SP, 2); |
985 | PUSHs(&PL_sv_undef); |
986 | PUSHu((UV)iv); |
987 | break; */ |
988 | /* Uncomment this if you need to return YESs |
989 | case PERL_constant_ISYES: |
990 | EXTEND(SP, 2); |
991 | PUSHs(&PL_sv_undef); |
992 | PUSHs(&PL_sv_yes); |
993 | break; */ |
994 | default: |
995 | sv = sv_2mortal(newSVpvf(Perl_sv_2mortal( Perl_newSVpvf( "Unexpected return type %d while processing Zlib macro %s, used" , type, s)) |
996 | "Unexpected return type %d while processing Zlib macro %s, used",Perl_sv_2mortal( Perl_newSVpvf( "Unexpected return type %d while processing Zlib macro %s, used" , type, s)) |
997 | type, s))Perl_sv_2mortal( Perl_newSVpvf( "Unexpected return type %d while processing Zlib macro %s, used" , type, s)); |
998 | PUSHs(sv)(*++sp = (sv)); |
999 | } |
1000 | #line 1001 "Zlib.c" |
1001 | PUTBACKPL_stack_sp = sp; |
1002 | return; |
1003 | } |
1004 | } |
1005 | |
1006 | |
1007 | /* INCLUDE: Returning to 'Zlib.xs' from 'constants.xs' */ |
1008 | |
1009 | #define Zip_zlib_version()(const char*)zlibVersion() (const char*)zlib_versionzlibVersion() |
1010 | |
1011 | XS_EUPXS(XS_Compress__Raw__Zlib_zlib_version)static void XS_Compress__Raw__Zlib_zlib_version( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1012 | XS_EUPXS(XS_Compress__Raw__Zlib_zlib_version)static void XS_Compress__Raw__Zlib_zlib_version( CV* cv __attribute__ ((unused))) |
1013 | { |
1014 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1015 | if (items != 0) |
1016 | croak_xs_usagePerl_croak_xs_usage(cv, ""); |
1017 | { |
1018 | const char * RETVAL; |
1019 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1020 | |
1021 | RETVAL = Zip_zlib_version()(const char*)zlibVersion(); |
1022 | sv_setpv(TARG, RETVAL)Perl_sv_setpv( targ,RETVAL); XSprePUSH(sp = PL_stack_base + ax - 1); PUSHTARGdo { do { if (__builtin_expect(((((targ)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( targ); } while ( 0); (*++sp = (targ)); } while (0); |
1023 | } |
1024 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1025 | } |
1026 | |
1027 | |
1028 | XS_EUPXS(XS_Compress__Raw__Zlib_ZLIB_VERNUM)static void XS_Compress__Raw__Zlib_ZLIB_VERNUM( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1029 | XS_EUPXS(XS_Compress__Raw__Zlib_ZLIB_VERNUM)static void XS_Compress__Raw__Zlib_ZLIB_VERNUM( CV* cv __attribute__ ((unused))) |
1030 | { |
1031 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1032 | if (items != 0) |
1033 | croak_xs_usagePerl_croak_xs_usage(cv, ""); |
1034 | { |
1035 | unsigned RETVAL; |
1036 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1037 | #line 771 "Zlib.xs" |
1038 | #ifdef ZLIB_VERNUM0x12b0 |
1039 | RETVAL = ZLIB_VERNUM0x12b0 ; |
1040 | #else |
1041 | /* 1.1.4 => 0x1140 */ |
1042 | RETVAL = (ZLIB_VERSION"1.2.11"[0] - '0') << 12 ; |
1043 | RETVAL += (ZLIB_VERSION"1.2.11"[2] - '0') << 8 ; |
1044 | RETVAL += (ZLIB_VERSION"1.2.11"[4] - '0') << 4 ; |
1045 | if (strlen(ZLIB_VERSION"1.2.11") > 5) |
1046 | RETVAL += (ZLIB_VERSION"1.2.11"[6] - '0') ; |
1047 | #endif |
1048 | #line 1049 "Zlib.c" |
1049 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1050 | } |
1051 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1052 | } |
1053 | |
1054 | #ifndef AT_LEAST_ZLIB_1_2_1 |
1055 | #define zlibCompileFlags() 0 |
1056 | #endif |
1057 | |
1058 | XS_EUPXS(XS_Compress__Raw__Zlib_zlibCompileFlags)static void XS_Compress__Raw__Zlib_zlibCompileFlags( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1059 | XS_EUPXS(XS_Compress__Raw__Zlib_zlibCompileFlags)static void XS_Compress__Raw__Zlib_zlibCompileFlags( CV* cv __attribute__ ((unused))) |
1060 | { |
1061 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1062 | if (items != 0) |
1063 | croak_xs_usagePerl_croak_xs_usage(cv, ""); |
1064 | { |
1065 | uLong RETVAL; |
1066 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1067 | |
1068 | RETVAL = zlibCompileFlags(); |
1069 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1070 | } |
1071 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1072 | } |
1073 | |
1074 | #define Zip_adler32(buf, adler)adler32(adler, buf, (uInt)len) adler32(adler, buf, (uInt)len) |
1075 | |
1076 | XS_EUPXS(XS_Compress__Raw__Zlib_adler32)static void XS_Compress__Raw__Zlib_adler32( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1077 | XS_EUPXS(XS_Compress__Raw__Zlib_adler32)static void XS_Compress__Raw__Zlib_adler32( CV* cv __attribute__ ((unused))) |
1078 | { |
1079 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1080 | if (items < 1 || items > 2) |
1081 | croak_xs_usagePerl_croak_xs_usage(cv, "buf, adler=adlerInitial"); |
1082 | { |
1083 | uLong adler; |
1084 | STRLEN len; |
1085 | Bytef * buf; |
1086 | SV * sv = ST(0)PL_stack_base[ax + (0)] ; |
1087 | uLong RETVAL; |
1088 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1089 | #line 802 "Zlib.xs" |
1090 | /* If the buffer is a reference, dereference it */ |
1091 | sv = deRef(sv, "adler32") ; |
1092 | #ifdef UTF8_AVAILABLE |
1093 | if (DO_UTF8(sv)(((sv)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(sv, 1)Perl_sv_utf8_downgrade_flags( sv,1,2)) |
1094 | croakPerl_croak("Wide character in Compress::Raw::Zlib::adler32"); |
1095 | #endif |
1096 | buf = (Byte*)SvPVbyte(sv, len)((((sv)->sv_flags & (0x00000400|0x20000000|0x00200000) ) == 0x00000400) ? ((len = ((XPV*) (sv)->sv_any)->xpv_cur ), ((sv)->sv_u.svu_pv)) : Perl_sv_2pvbyte_flags( sv,&len ,2)) ; |
1097 | |
1098 | if (items < 2) |
1099 | adler = adlerInitialadler32(0L, 0, 0); |
1100 | else if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
1101 | adler = SvUV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (1)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (1)],2)) ; |
1102 | else |
1103 | adler = adlerInitialadler32(0L, 0, 0); |
1104 | #line 1105 "Zlib.c" |
1105 | |
1106 | RETVAL = Zip_adler32(buf, adler)adler32(adler, buf, (uInt)len); |
1107 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1108 | } |
1109 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1110 | } |
1111 | |
1112 | #define Zip_crc32(buf, crc, offset)crc32(crc, buf+offset, (uInt)len-offset) crc32(crc, buf+offset, (uInt)len-offset) |
1113 | |
1114 | XS_EUPXS(XS_Compress__Raw__Zlib_crc32)static void XS_Compress__Raw__Zlib_crc32( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1115 | XS_EUPXS(XS_Compress__Raw__Zlib_crc32)static void XS_Compress__Raw__Zlib_crc32( CV* cv __attribute__ ((unused))) |
1116 | { |
1117 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1118 | if (items < 1 || items > 3) |
1119 | croak_xs_usagePerl_croak_xs_usage(cv, "buf, crc=crcInitial, offset=0"); |
1120 | { |
1121 | uLong crc; |
1122 | STRLEN len; |
1123 | Bytef * buf; |
1124 | STRLEN offset; |
1125 | SV * sv = ST(0)PL_stack_base[ax + (0)] ; |
1126 | uLong RETVAL; |
1127 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1128 | |
1129 | if (items < 3) |
1130 | offset = 0; |
1131 | else { |
1132 | offset = (unsigned long)SvUV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (2)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (2)],2)) |
1133 | ; |
1134 | } |
1135 | #line 829 "Zlib.xs" |
1136 | /* If the buffer is a reference, dereference it */ |
1137 | sv = deRef(sv, "crc32") ; |
1138 | #ifdef UTF8_AVAILABLE |
1139 | if (DO_UTF8(sv)(((sv)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(sv, 1)Perl_sv_utf8_downgrade_flags( sv,1,2)) |
1140 | croakPerl_croak("Wide character in Compress::Raw::Zlib::crc32"); |
1141 | #endif |
1142 | buf = (Byte*)SvPVbyte(sv, len)((((sv)->sv_flags & (0x00000400|0x20000000|0x00200000) ) == 0x00000400) ? ((len = ((XPV*) (sv)->sv_any)->xpv_cur ), ((sv)->sv_u.svu_pv)) : Perl_sv_2pvbyte_flags( sv,&len ,2)) ; |
1143 | |
1144 | if (offset > len) |
1145 | croakPerl_croak("Offset out of range in Compress::Raw::Zlib::crc32"); |
1146 | |
1147 | if (items < 2) |
1148 | crc = crcInitialcrc32(0L, 0, 0); |
1149 | else if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
1150 | crc = SvUV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (1)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (1)],2)) ; |
1151 | else |
1152 | crc = crcInitialcrc32(0L, 0, 0); |
1153 | #line 1154 "Zlib.c" |
1154 | |
1155 | RETVAL = Zip_crc32(buf, crc, offset)crc32(crc, buf+offset, (uInt)len-offset); |
1156 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1157 | } |
1158 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1159 | } |
1160 | |
1161 | |
1162 | XS_EUPXS(XS_Compress__Raw__Zlib_crc32_combine)static void XS_Compress__Raw__Zlib_crc32_combine( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1163 | XS_EUPXS(XS_Compress__Raw__Zlib_crc32_combine)static void XS_Compress__Raw__Zlib_crc32_combine( CV* cv __attribute__ ((unused))) |
1164 | { |
1165 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1166 | if (items != 3) |
1167 | croak_xs_usagePerl_croak_xs_usage(cv, "crc1, crc2, len2"); |
1168 | { |
1169 | uLong crc1 = (unsigned long)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (0)],2)) |
1170 | ; |
1171 | uLong crc2 = (unsigned long)SvUV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (1)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (1)],2)) |
1172 | ; |
1173 | z_off_tlong len2 = (unsigned long)SvUV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (2)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (2)],2)) |
1174 | ; |
1175 | uLong RETVAL; |
1176 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1177 | #line 853 "Zlib.xs" |
1178 | #ifndef AT_LEAST_ZLIB_1_2_2_1 |
1179 | crc1 = crc1; crc2 = crc2 ; len2 = len2; /* Silence -Wall */ |
1180 | croakPerl_croak("crc32_combine needs zlib 1.2.3 or better"); |
1181 | #else |
1182 | RETVAL = crc32_combine(crc1, crc2, len2); |
1183 | #endif |
1184 | #line 1185 "Zlib.c" |
1185 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1186 | } |
1187 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1188 | } |
1189 | |
1190 | |
1191 | XS_EUPXS(XS_Compress__Raw__Zlib_adler32_combine)static void XS_Compress__Raw__Zlib_adler32_combine( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1192 | XS_EUPXS(XS_Compress__Raw__Zlib_adler32_combine)static void XS_Compress__Raw__Zlib_adler32_combine( CV* cv __attribute__ ((unused))) |
1193 | { |
1194 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1195 | if (items != 3) |
1196 | croak_xs_usagePerl_croak_xs_usage(cv, "adler1, adler2, len2"); |
1197 | { |
1198 | uLong adler1 = (unsigned long)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (0)],2)) |
1199 | ; |
1200 | uLong adler2 = (unsigned long)SvUV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (1)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (1)],2)) |
1201 | ; |
1202 | z_off_tlong len2 = (unsigned long)SvUV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (2)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (2)],2)) |
1203 | ; |
1204 | uLong RETVAL; |
1205 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1206 | #line 869 "Zlib.xs" |
1207 | #ifndef AT_LEAST_ZLIB_1_2_2_1 |
1208 | adler1 = adler1; adler2 = adler2 ; len2 = len2; /* Silence -Wall */ |
1209 | croakPerl_croak("adler32_combine needs zlib 1.2.3 or better"); |
1210 | #else |
1211 | RETVAL = adler32_combine(adler1, adler2, len2); |
1212 | #endif |
1213 | #line 1214 "Zlib.c" |
1214 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1215 | } |
1216 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1217 | } |
1218 | |
1219 | |
1220 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateInit)static void XS_Compress__Raw__Zlib__deflateInit( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1221 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateInit)static void XS_Compress__Raw__Zlib__deflateInit( CV* cv __attribute__ ((unused))) |
1222 | { |
1223 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1224 | if (items != 8) |
1225 | croak_xs_usagePerl_croak_xs_usage(cv, "flags, level, method, windowBits, memLevel, strategy, bufsize, dictionary"); |
1226 | PERL_UNUSED_VAR(ax)((void)sizeof(ax)); /* -Wall */ |
1227 | SPsp -= items; |
1228 | { |
1229 | int flags = (int)SvIV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (0)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 0)],2)) |
1230 | ; |
1231 | int level = (int)SvIV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (1)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 1)],2)) |
1232 | ; |
1233 | int method = (int)SvIV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (2)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 2)],2)) |
1234 | ; |
1235 | int windowBits = (int)SvIV(ST(3))((((PL_stack_base[ax + (3)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (3)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 3)],2)) |
1236 | ; |
1237 | int memLevel = (int)SvIV(ST(4))((((PL_stack_base[ax + (4)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (4)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 4)],2)) |
1238 | ; |
1239 | int strategy = (int)SvIV(ST(5))((((PL_stack_base[ax + (5)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (5)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 5)],2)) |
1240 | ; |
1241 | uLong bufsize = (unsigned long)SvUV(ST(6))((((PL_stack_base[ax + (6)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (6)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (6)],2)) |
1242 | ; |
1243 | SV* dictionary = ST(7)PL_stack_base[ax + (7)] |
1244 | ; |
1245 | #line 892 "Zlib.xs" |
1246 | int err ; |
1247 | deflateStream s ; |
1248 | |
1249 | if (trace0) |
1250 | warnPerl_warn("in _deflateInit(level=%d, method=%d, windowBits=%d, memLevel=%d, strategy=%d, bufsize=%ld dictionary=%p)\n", |
1251 | level, method, windowBits, memLevel, strategy, bufsize, dictionary) ; |
1252 | if ((s = InitStream() )) { |
1253 | |
1254 | s->Level = level; |
1255 | s->Method = method; |
1256 | s->WindowBits = windowBits; |
1257 | s->MemLevel = memLevel; |
1258 | s->Strategy = strategy; |
1259 | |
1260 | err = deflateInit2(&(s->stream), level,deflateInit2_((&(s->stream)),(level),(method),(windowBits ),(memLevel), (strategy), "1.2.11", (int)sizeof(z_stream)) |
1261 | method, windowBits, memLevel, strategy)deflateInit2_((&(s->stream)),(level),(method),(windowBits ),(memLevel), (strategy), "1.2.11", (int)sizeof(z_stream)); |
1262 | |
1263 | if (trace0) { |
1264 | warnPerl_warn(" _deflateInit2 returned %d (state %p)\n", err, s); |
1265 | DispStream(s, "INIT"); |
1266 | } |
1267 | |
1268 | /* Check if a dictionary has been specified */ |
1269 | SvGETMAGIC(dictionary)((void)(__builtin_expect(((((dictionary)->sv_flags & 0x00200000 )) ? (_Bool)1 : (_Bool)0),(0)) && Perl_mg_get( dictionary ))); |
1270 | if (err == Z_OK0 && SvPOK(dictionary)((dictionary)->sv_flags & 0x00000400) && SvCUR(dictionary)((XPV*) (dictionary)->sv_any)->xpv_cur) { |
1271 | #ifdef UTF8_AVAILABLE |
1272 | if (DO_UTF8(dictionary)(((dictionary)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(dictionary, 1)Perl_sv_utf8_downgrade_flags( dictionary,1,2)) |
1273 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Deflate::new dicrionary parameter"); |
1274 | #endif |
1275 | err = deflateSetDictionary(&(s->stream), (const Bytef*) SvPVX(dictionary)((dictionary)->sv_u.svu_pv), SvCUR(dictionary)((XPV*) (dictionary)->sv_any)->xpv_cur) ; |
1276 | if (trace0) |
1277 | warnPerl_warn("deflateSetDictionary returned %d\n", err); |
1278 | s->dict_adler = s->stream.adler ; |
1279 | } |
1280 | |
1281 | if (err != Z_OK0) { |
1282 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
1283 | s = NULL((void*)0) ; |
1284 | } |
1285 | else |
1286 | PostInitStream(s, flags, bufsize, windowBits) ; |
1287 | |
1288 | } |
1289 | else |
1290 | err = Z_MEM_ERROR(-4) ; |
1291 | |
1292 | { |
1293 | SV* obj = sv_setref_pv(sv_newmortal(),Perl_sv_setref_pv( Perl_sv_newmortal(),"Compress::Raw::Zlib::deflateStream" ,(void*)s) |
1294 | "Compress::Raw::Zlib::deflateStream", (void*)s)Perl_sv_setref_pv( Perl_sv_newmortal(),"Compress::Raw::Zlib::deflateStream" ,(void*)s); |
1295 | XPUSHs(obj)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (obj); } while (0); |
1296 | } |
1297 | if (GIMME(PL_op->op_flags & 3 ? ((PL_op->op_flags & 3) == 3 ? 3 : 2) : Perl_dowantarray()) == G_ARRAY3) { |
1298 | SV * sv = sv_2mortal(newSViv(err))Perl_sv_2mortal( Perl_newSViv( err)) ; |
1299 | setDUALstatus(sv, err)Perl_sv_setnv( sv,(double)err) ; Perl_sv_setpv( sv,((err) ? GetErrorString (err) : "")) ; ( (sv)->sv_flags |= (0x00000200|0x00002000) );; |
1300 | XPUSHs(sv)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (sv); } while (0) ; |
1301 | } |
1302 | #line 1303 "Zlib.c" |
1303 | PUTBACKPL_stack_sp = sp; |
1304 | return; |
1305 | } |
1306 | } |
1307 | |
1308 | |
1309 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateInit)static void XS_Compress__Raw__Zlib__inflateInit( CV* cv __attribute__ ((unused))); /* prototype to pass -Wmissing-prototypes */ |
1310 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateInit)static void XS_Compress__Raw__Zlib__inflateInit( CV* cv __attribute__ ((unused))) |
1311 | { |
1312 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1313 | dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))-> xcv_start_u.xcv_xsubany.any_i32; |
1314 | if (items != 4) |
1315 | croak_xs_usagePerl_croak_xs_usage(cv, "flags, windowBits, bufsize, dictionary"); |
1316 | PERL_UNUSED_VAR(ax)((void)sizeof(ax)); /* -Wall */ |
1317 | SPsp -= items; |
1318 | { |
1319 | int flags = (int)SvIV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (0)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 0)],2)) |
1320 | ; |
1321 | int windowBits = (int)SvIV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (1)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 1)],2)) |
1322 | ; |
1323 | uLong bufsize = (unsigned long)SvUV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (2)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (2)],2)) |
1324 | ; |
1325 | SV * dictionary = ST(3)PL_stack_base[ax + (3)] |
1326 | ; |
1327 | #line 959 "Zlib.xs" |
1328 | int err = Z_OK0 ; |
1329 | inflateStream s ; |
1330 | #ifndef MAGIC_APPEND |
1331 | if (ix == 1) |
1332 | croakPerl_croak("inflateScanInit needs zlib 1.2.1 or better"); |
1333 | #endif |
1334 | if (trace0) |
1335 | warnPerl_warn("in _inflateInit(windowBits=%d, bufsize=%lu, dictionary=%lu\n", |
1336 | windowBits, bufsize, (unsigned long)SvCUR(dictionary)((XPV*) (dictionary)->sv_any)->xpv_cur) ; |
1337 | if ((s = InitStream() )) { |
1338 | |
1339 | s->WindowBits = windowBits; |
1340 | |
1341 | err = inflateInit2(&(s->stream), windowBits)inflateInit2_((&(s->stream)), (windowBits), "1.2.11", ( int)sizeof(z_stream)); |
1342 | if (err != Z_OK0) { |
1343 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
1344 | s = NULL((void*)0) ; |
1345 | } |
1346 | else if (sv_len(dictionary)Perl_sv_len( dictionary)) { |
1347 | #ifdef AT_LEAST_ZLIB_1_2_2_1 |
1348 | /* Zlib 1.2.2.1 or better allows a dictionary with raw inflate */ |
1349 | if (s->WindowBits < 0) { |
1350 | STRLEN dlen; |
1351 | const Bytef* b = (const Bytef*)SvPVbyte(dictionary, dlen)((((dictionary)->sv_flags & (0x00000400|0x20000000|0x00200000 )) == 0x00000400) ? ((dlen = ((XPV*) (dictionary)->sv_any) ->xpv_cur), ((dictionary)->sv_u.svu_pv)) : Perl_sv_2pvbyte_flags ( dictionary,&dlen,2)); |
1352 | err = inflateSetDictionary(&(s->stream), |
1353 | b, dlen); |
1354 | if (err != Z_OK0) { |
1355 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
1356 | s = NULL((void*)0) ; |
1357 | } |
1358 | } |
1359 | else |
1360 | #endif |
1361 | /* Dictionary specified - take a copy for use in inflate */ |
1362 | s->dictionary = newSVsv(dictionary)Perl_newSVsv_flags( (dictionary),2|16) ; |
1363 | } |
1364 | if (s) { |
1365 | PostInitStream(s, flags, bufsize, windowBits) ; |
1366 | #ifdef MAGIC_APPEND |
1367 | if (ix == 1) |
1368 | { |
1369 | s->window = (unsigned char *)safemallocPerl_safesysmalloc(WINDOW_SIZE32768U); |
1370 | } |
1371 | #endif |
1372 | } |
1373 | } |
1374 | else |
1375 | err = Z_MEM_ERROR(-4) ; |
1376 | |
1377 | { |
1378 | SV* obj = sv_setref_pv(sv_newmortal(),Perl_sv_setref_pv( Perl_sv_newmortal(),ix == 1 ? "Compress::Raw::Zlib::inflateScanStream" : "Compress::Raw::Zlib::inflateStream",(void*)s) |
1379 | ix == 1Perl_sv_setref_pv( Perl_sv_newmortal(),ix == 1 ? "Compress::Raw::Zlib::inflateScanStream" : "Compress::Raw::Zlib::inflateStream",(void*)s) |
1380 | ? "Compress::Raw::Zlib::inflateScanStream"Perl_sv_setref_pv( Perl_sv_newmortal(),ix == 1 ? "Compress::Raw::Zlib::inflateScanStream" : "Compress::Raw::Zlib::inflateStream",(void*)s) |
1381 | : "Compress::Raw::Zlib::inflateStream",Perl_sv_setref_pv( Perl_sv_newmortal(),ix == 1 ? "Compress::Raw::Zlib::inflateScanStream" : "Compress::Raw::Zlib::inflateStream",(void*)s) |
1382 | (void*)s)Perl_sv_setref_pv( Perl_sv_newmortal(),ix == 1 ? "Compress::Raw::Zlib::inflateScanStream" : "Compress::Raw::Zlib::inflateStream",(void*)s); |
1383 | XPUSHs(obj)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (obj); } while (0); |
1384 | } |
1385 | if (GIMME(PL_op->op_flags & 3 ? ((PL_op->op_flags & 3) == 3 ? 3 : 2) : Perl_dowantarray()) == G_ARRAY3) { |
1386 | SV * sv = sv_2mortal(newSViv(err))Perl_sv_2mortal( Perl_newSViv( err)) ; |
1387 | setDUALstatus(sv, err)Perl_sv_setnv( sv,(double)err) ; Perl_sv_setpv( sv,((err) ? GetErrorString (err) : "")) ; ( (sv)->sv_flags |= (0x00000200|0x00002000) );; |
1388 | XPUSHs(sv)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (sv); } while (0) ; |
1389 | } |
1390 | #line 1391 "Zlib.c" |
1391 | PUTBACKPL_stack_sp = sp; |
1392 | return; |
1393 | } |
1394 | } |
1395 | |
1396 | |
1397 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_DispStream)static void XS_Compress__Raw__Zlib__deflateStream_DispStream( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1398 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_DispStream)static void XS_Compress__Raw__Zlib__deflateStream_DispStream( CV* cv __attribute__((unused))) |
1399 | { |
1400 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1401 | if (items < 1 || items > 2) |
1402 | croak_xs_usagePerl_croak_xs_usage(cv, "s, message=NULL"); |
1403 | { |
1404 | Compress__Raw__Zlib__deflateStream s; |
1405 | const char * message; |
1406 | |
1407 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1408 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1409 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1410 | } |
1411 | else |
1412 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1413 | "Compress::Raw::Zlib::deflateStream::DispStream", |
1414 | "s", "Compress::Raw::Zlib::deflateStream") |
1415 | ; |
1416 | |
1417 | if (items < 2) |
1418 | message = NULL((void*)0); |
1419 | else { |
1420 | if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
1421 | message = (const char *)SvPVbyte_nolen(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000400|0x20000000 |0x00200000)) == 0x00000400) ? ((PL_stack_base[ax + (1)])-> sv_u.svu_pv) : Perl_sv_2pvbyte_flags( PL_stack_base[ax + (1)] ,0,2)); |
1422 | else |
1423 | message = NULL((void*)0) |
1424 | ; |
1425 | } |
1426 | |
1427 | DispStream(s, message); |
1428 | } |
1429 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
1430 | } |
1431 | |
1432 | |
1433 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflateReset)static void XS_Compress__Raw__Zlib__deflateStream_deflateReset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1434 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflateReset)static void XS_Compress__Raw__Zlib__deflateStream_deflateReset ( CV* cv __attribute__((unused))) |
1435 | { |
1436 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1437 | if (items != 1) |
1438 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1439 | { |
1440 | Compress__Raw__Zlib__deflateStream s; |
1441 | DualType RETVAL; |
1442 | |
1443 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1444 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1445 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1446 | } |
1447 | else |
1448 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1449 | "Compress::Raw::Zlib::deflateStream::deflateReset", |
1450 | "s", "Compress::Raw::Zlib::deflateStream") |
1451 | ; |
1452 | #line 1035 "Zlib.xs" |
1453 | RETVAL = deflateReset(&(s->stream)) ; |
1454 | if (RETVAL == Z_OK0) { |
1455 | PostInitStream(s, s->flags, s->bufsize, s->WindowBits) ; |
1456 | } |
1457 | #line 1458 "Zlib.c" |
1458 | { |
1459 | SV * RETVALSV; |
1460 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
1461 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
1462 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
1463 | } |
1464 | } |
1465 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1466 | } |
1467 | |
1468 | |
1469 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflate)static void XS_Compress__Raw__Zlib__deflateStream_deflate( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1470 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflate)static void XS_Compress__Raw__Zlib__deflateStream_deflate( CV * cv __attribute__((unused))) |
1471 | { |
1472 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1473 | if (items != 3) |
1474 | croak_xs_usagePerl_croak_xs_usage(cv, "s, buf, output"); |
1475 | { |
1476 | Compress__Raw__Zlib__deflateStream s; |
1477 | SV * buf = ST(1)PL_stack_base[ax + (1)] |
1478 | ; |
1479 | SV * output = ST(2)PL_stack_base[ax + (2)] |
1480 | ; |
1481 | uInt cur_length; |
1482 | uInt increment; |
1483 | uInt prefix; |
1484 | int RETVAL = 0; |
1485 | uLong bufinc; |
1486 | STRLEN origlen; |
1487 | |
1488 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1489 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1490 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1491 | } |
1492 | else |
1493 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1494 | "Compress::Raw::Zlib::deflateStream::deflate", |
1495 | "s", "Compress::Raw::Zlib::deflateStream") |
1496 | ; |
1497 | #line 1054 "Zlib.xs" |
1498 | bufinc = s->bufsize; |
1499 | |
1500 | /* If the input buffer is a reference, dereference it */ |
1501 | buf = deRef(buf, "deflate") ; |
1502 | |
1503 | /* initialise the input buffer */ |
1504 | #ifdef UTF8_AVAILABLE |
1505 | if (DO_UTF8(buf)(((buf)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(buf, 1)Perl_sv_utf8_downgrade_flags( buf,1,2)) |
1506 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Deflate::deflate input parameter"); |
1507 | #endif |
1508 | s->stream.next_in = (Bytef*)SvPV_nomg(buf, origlen)((((buf)->sv_flags & (0x00000400|0x00200000)) == 0x00000400 ) ? ((origlen = ((XPV*) (buf)->sv_any)->xpv_cur), ((buf )->sv_u.svu_pv)) : Perl_sv_2pv_flags( buf,&origlen,0)) ; |
1509 | s->stream.avail_in = origlen; |
1510 | |
1511 | if (s->flags & FLAG_CRC322) |
1512 | s->crc32 = crc32(s->crc32, s->stream.next_in, s->stream.avail_in) ; |
1513 | |
1514 | if (s->flags & FLAG_ADLER324) |
1515 | s->adler32 = adler32(s->adler32, s->stream.next_in, s->stream.avail_in) ; |
1516 | |
1517 | /* and retrieve the output buffer */ |
1518 | output = deRef_l(output, "deflate") ; |
1519 | #ifdef UTF8_AVAILABLE |
1520 | if (DO_UTF8(output)(((output)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(output, 1)Perl_sv_utf8_downgrade_flags( output,1,2)) |
1521 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Deflate::deflate output parameter"); |
1522 | #endif |
1523 | |
1524 | if((s->flags & FLAG_APPEND1) != FLAG_APPEND1) { |
1525 | SvCUR_set(output, 0)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (0)); } while (0); |
1526 | /* sv_setpvn(output, "", 0); */ |
1527 | } |
1528 | prefix = cur_length = SvCUR(output)((XPV*) (output)->sv_any)->xpv_cur ; |
1529 | s->stream.next_out = (Bytef*) SvPVX(output)((output)->sv_u.svu_pv) + cur_length; |
1530 | increment = SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length; |
1531 | s->stream.avail_out = increment; |
1532 | #ifdef SETP_BYTE |
1533 | /* Check for saved output from deflateParams */ |
1534 | if (s->deflateParams_out_valid) { |
1535 | *(s->stream.next_out) = s->deflateParams_out_byte; |
1536 | ++ s->stream.next_out; |
1537 | -- s->stream.avail_out ; |
1538 | s->deflateParams_out_valid = FALSE(0); |
1539 | } |
1540 | #else |
1541 | /* Check for saved output from deflateParams */ |
1542 | if (s->deflateParams_out_length) { |
1543 | uLong plen = s->deflateParams_out_length ; |
1544 | /* printf("Copy %lu bytes saved data\n", plen); */ |
1545 | if (s->stream.avail_out < plen) { |
1546 | /* printf("GROW from %d to %lu\n", s->stream.avail_out, |
1547 | SvLEN(output) + plen - s->stream.avail_out); */ |
1548 | s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + plen - s->stream.avail_out) ; |
1549 | s->stream.next_out += cur_length; |
1550 | } |
1551 | |
1552 | Copy(s->deflateParams_out_buffer, s->stream.next_out, plen, Bytef)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(plen ) || sizeof(Bytef) > ((size_t)1 << 8*(sizeof(size_t) - sizeof(plen)))) ? (size_t)(plen) : ((size_t)-1)/sizeof(Bytef )) > ((size_t)-1)/sizeof(Bytef))) ? (_Bool)1 : (_Bool)0),( 0)) && (Perl_croak_memory_wrap(),0)), ((void)0), ((void )0), (void)memcpy((char*)(s->stream.next_out),(const char* )(s->deflateParams_out_buffer), (plen) * sizeof(Bytef))) ; |
1553 | cur_length += plen; |
1554 | SvCUR_set(output, cur_length)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (cur_length)); } while (0); |
1555 | s->stream.next_out += plen ; |
1556 | s->stream.avail_out = SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length ; |
1557 | increment = s->stream.avail_out; |
1558 | |
1559 | s->deflateParams_out_length = 0; |
1560 | Safefree(s->deflateParams_out_buffer)Perl_safesysfree(((void *)(s->deflateParams_out_buffer))); |
1561 | s->deflateParams_out_buffer = NULL((void*)0); |
1562 | } |
1563 | #endif |
1564 | RETVAL = Z_OK0 ; |
1565 | while (s->stream.avail_in != 0) { |
1566 | |
1567 | if (s->stream.avail_out == 0) { |
1568 | /* out of space in the output buffer so make it bigger */ |
1569 | s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + bufinc)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + bufinc) ; |
1570 | cur_length += increment ; |
1571 | s->stream.next_out += cur_length ; |
1572 | increment = bufinc ; |
1573 | s->stream.avail_out = increment; |
1574 | bufinc *= 2 ; |
1575 | } |
1576 | |
1577 | if (trace0) { |
1578 | printf("DEFLATE Avail In %d, Out %d\n", s->stream.avail_in, s->stream.avail_out); |
1579 | DispStream(s, "BEFORE"); |
1580 | /* Perl_sv_dump(output); */ |
1581 | } |
1582 | |
1583 | RETVAL = deflate(&(s->stream), Z_NO_FLUSH0); |
1584 | /* |
1585 | if (RETVAL != Z_STREAM_ERROR) { |
1586 | int done = increment - s->stream.avail_out ; |
1587 | printf("std DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, |
1588 | GetErrorString(RETVAL), s->stream.avail_in, |
1589 | s->stream.avail_out, done); |
1590 | } |
1591 | */ |
1592 | |
1593 | if (trace0) { |
1594 | printf("DEFLATE returned %d %s, avail in %d, out %d\n", RETVAL, |
1595 | GetErrorString(RETVAL), s->stream.avail_in, s->stream.avail_out); |
1596 | DispStream(s, "AFTER"); |
1597 | } |
1598 | |
1599 | if (RETVAL != Z_OK0) |
1600 | break; |
1601 | } |
1602 | |
1603 | s->compressedBytes += cur_length + increment - prefix - s->stream.avail_out ; |
1604 | s->uncompressedBytes += origlen - s->stream.avail_in ; |
1605 | |
1606 | s->last_error = RETVAL ; |
1607 | if (RETVAL == Z_OK0) { |
1608 | SvPOK_only(output)( (output)->sv_flags &= ~((0x00000100|0x00000200|0x00000400 |0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000)| 0x80000000 |0x20000000), (output)->sv_flags |= (0x00000400|0x00004000 )); |
1609 | SvCUR_set(output, cur_length + increment - s->stream.avail_out)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (cur_length + increment - s->stream.avail_out )); } while (0) ; |
1610 | SvSETMAGIC(output)do { if (__builtin_expect(((((output)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( output); } while (0); |
1611 | } |
1612 | #line 1613 "Zlib.c" |
1613 | { |
1614 | SV * RETVALSV; |
1615 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
1616 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
1617 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
1618 | } |
1619 | } |
1620 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1621 | } |
1622 | |
1623 | |
1624 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_DESTROY)static void XS_Compress__Raw__Zlib__deflateStream_DESTROY( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1625 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_DESTROY)static void XS_Compress__Raw__Zlib__deflateStream_DESTROY( CV * cv __attribute__((unused))) |
1626 | { |
1627 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1628 | if (items != 1) |
1629 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1630 | { |
1631 | Compress__Raw__Zlib__deflateStream s; |
1632 | |
1633 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800)) { |
1634 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1635 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1636 | } |
1637 | else |
1638 | Perl_croak_nocontextPerl_croak("%s: %s is not a reference", |
1639 | "Compress::Raw::Zlib::deflateStream::DESTROY", |
1640 | "s") |
1641 | ; |
1642 | #line 1176 "Zlib.xs" |
1643 | if (trace0) |
1644 | printf("Compress::Raw::Zlib::deflateStream::DESTROY %p\n", s); |
1645 | deflateEnd(&s->stream) ; |
1646 | if (s->dictionary) |
1647 | SvREFCNT_dec(s->dictionary)Perl_SvREFCNT_dec( ((SV *)({ void *_p = (s->dictionary); _p ; }))) ; |
1648 | #ifndef SETP_BYTE |
1649 | if (s->deflateParams_out_buffer) |
1650 | Safefree(s->deflateParams_out_buffer)Perl_safesysfree(((void *)(s->deflateParams_out_buffer))); |
1651 | #endif |
1652 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
1653 | #line 1654 "Zlib.c" |
1654 | } |
1655 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
1656 | } |
1657 | |
1658 | |
1659 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_flush)static void XS_Compress__Raw__Zlib__deflateStream_flush( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1660 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_flush)static void XS_Compress__Raw__Zlib__deflateStream_flush( CV* cv __attribute__((unused))) |
1661 | { |
1662 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1663 | if (items < 2 || items > 3) |
1664 | croak_xs_usagePerl_croak_xs_usage(cv, "s, output, f=Z_FINISH"); |
1665 | { |
1666 | Compress__Raw__Zlib__deflateStream s; |
1667 | SV * output = ST(1)PL_stack_base[ax + (1)] |
1668 | ; |
1669 | int f; |
1670 | uInt cur_length; |
1671 | uInt increment; |
1672 | uInt prefix; |
1673 | uLong bufinc; |
1674 | uLong availableout; |
1675 | DualType RETVAL; |
1676 | |
1677 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1678 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1679 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1680 | } |
1681 | else |
1682 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1683 | "Compress::Raw::Zlib::deflateStream::flush", |
1684 | "s", "Compress::Raw::Zlib::deflateStream") |
1685 | ; |
1686 | |
1687 | if (items < 3) |
1688 | f = Z_FINISH4; |
1689 | else { |
1690 | f = (int)SvIV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (2)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 2)],2)) |
1691 | ; |
1692 | } |
1693 | #line 1199 "Zlib.xs" |
1694 | bufinc = s->bufsize; |
1695 | |
1696 | |
1697 | |
1698 | /* retrieve the output buffer */ |
1699 | output = deRef_l(output, "flush") ; |
1700 | #ifdef UTF8_AVAILABLE |
1701 | if (DO_UTF8(output)(((output)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(output, 1)Perl_sv_utf8_downgrade_flags( output,1,2)) |
1702 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Deflate::flush input parameter"); |
1703 | #endif |
1704 | if((s->flags & FLAG_APPEND1) != FLAG_APPEND1) { |
1705 | SvCUR_set(output, 0)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (0)); } while (0); |
1706 | /* sv_setpvn(output, "", 0); */ |
1707 | } |
1708 | prefix = cur_length = SvCUR(output)((XPV*) (output)->sv_any)->xpv_cur ; |
1709 | s->stream.next_out = (Bytef*) SvPVX(output)((output)->sv_u.svu_pv) + cur_length; |
1710 | increment = SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length; |
1711 | s->stream.avail_out = increment; |
1712 | #ifdef SETP_BYTE |
1713 | /* Check for saved output from deflateParams */ |
1714 | if (s->deflateParams_out_valid) { |
1715 | *(s->stream.next_out) = s->deflateParams_out_byte; |
1716 | ++ s->stream.next_out; |
1717 | -- s->stream.avail_out ; |
1718 | s->deflateParams_out_valid = FALSE(0); |
1719 | } |
1720 | #else |
1721 | /* Check for saved output from deflateParams */ |
1722 | if (s->deflateParams_out_length) { |
1723 | uLong plen = s->deflateParams_out_length ; |
1724 | /* printf("Copy %lu bytes saved data\n", plen); */ |
1725 | if (s->stream.avail_out < plen) { |
1726 | /* printf("GROW from %d to %lu\n", s->stream.avail_out, |
1727 | SvLEN(output) + plen - s->stream.avail_out); */ |
1728 | s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + plen - s->stream.avail_out)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + plen - s->stream.avail_out) ; |
1729 | s->stream.next_out += cur_length; |
1730 | } |
1731 | |
1732 | Copy(s->deflateParams_out_buffer, s->stream.next_out, plen, Bytef)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(plen ) || sizeof(Bytef) > ((size_t)1 << 8*(sizeof(size_t) - sizeof(plen)))) ? (size_t)(plen) : ((size_t)-1)/sizeof(Bytef )) > ((size_t)-1)/sizeof(Bytef))) ? (_Bool)1 : (_Bool)0),( 0)) && (Perl_croak_memory_wrap(),0)), ((void)0), ((void )0), (void)memcpy((char*)(s->stream.next_out),(const char* )(s->deflateParams_out_buffer), (plen) * sizeof(Bytef))) ; |
1733 | cur_length += plen; |
1734 | SvCUR_set(output, cur_length)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (cur_length)); } while (0); |
1735 | s->stream.next_out += plen ; |
1736 | s->stream.avail_out = SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length ; |
1737 | increment = s->stream.avail_out; |
1738 | |
1739 | s->deflateParams_out_length = 0; |
1740 | Safefree(s->deflateParams_out_buffer)Perl_safesysfree(((void *)(s->deflateParams_out_buffer))); |
1741 | s->deflateParams_out_buffer = NULL((void*)0); |
1742 | } |
1743 | #endif |
1744 | |
1745 | for (;;) { |
1746 | if (s->stream.avail_out == 0) { |
1747 | /* consumed all the available output, so extend it */ |
1748 | s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + bufinc)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + bufinc) ; |
1749 | cur_length += increment ; |
1750 | s->stream.next_out += cur_length ; |
1751 | increment = bufinc ; |
1752 | s->stream.avail_out = increment; |
1753 | bufinc *= 2 ; |
1754 | } |
1755 | |
1756 | availableout = s->stream.avail_out ; |
1757 | |
1758 | if (trace0) { |
1759 | printf("flush (%d) DEFLATE Avail In %d, Out %d\n", f, s->stream.avail_in, s->stream.avail_out); |
1760 | DispStream(s, "BEFORE"); |
1761 | /* Perl_sv_dump(output); */ |
1762 | } |
1763 | |
1764 | RETVAL = deflate(&(s->stream), f); |
1765 | /* |
1766 | if (RETVAL != Z_STREAM_ERROR) { |
1767 | int done = availableout - s->stream.avail_out ; |
1768 | printf("flush DEFLATEr returned %d '%s' avail in %d, out %d wrote %d\n", RETVAL, |
1769 | GetErrorString(RETVAL), s->stream.avail_in, |
1770 | s->stream.avail_out, done); |
1771 | } |
1772 | */ |
1773 | |
1774 | if (trace0) { |
1775 | printf("flush DEFLATE returned %d '%s', avail in %d, out %d\n", RETVAL, |
1776 | GetErrorString(RETVAL), s->stream.avail_in, s->stream.avail_out); |
1777 | DispStream(s, "AFTER"); |
1778 | } |
1779 | |
1780 | /* Ignore the second of two consecutive flushes: */ |
1781 | if (availableout == s->stream.avail_out && RETVAL == Z_BUF_ERROR(-5)) |
1782 | RETVAL = Z_OK0; |
1783 | |
1784 | /* deflate has finished flushing only when it hasn't used up |
1785 | * all the available space in the output buffer: |
1786 | */ |
1787 | if (s->stream.avail_out != 0 || RETVAL != Z_OK0 ) |
1788 | break; |
1789 | } |
1790 | |
1791 | RETVAL = (RETVAL == Z_STREAM_END1 ? Z_OK0 : RETVAL) ; |
1792 | s->last_error = RETVAL ; |
1793 | |
1794 | s->compressedBytes += cur_length + increment - prefix - s->stream.avail_out ; |
1795 | |
1796 | if (RETVAL == Z_OK0) { |
1797 | SvPOK_only(output)( (output)->sv_flags &= ~((0x00000100|0x00000200|0x00000400 |0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000)| 0x80000000 |0x20000000), (output)->sv_flags |= (0x00000400|0x00004000 )); |
1798 | SvCUR_set(output, cur_length + increment - s->stream.avail_out)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (cur_length + increment - s->stream.avail_out )); } while (0) ; |
1799 | SvSETMAGIC(output)do { if (__builtin_expect(((((output)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( output); } while (0); |
1800 | } |
1801 | #line 1802 "Zlib.c" |
1802 | { |
1803 | SV * RETVALSV; |
1804 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
1805 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
1806 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
1807 | } |
1808 | } |
1809 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1810 | } |
1811 | |
1812 | |
1813 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream__deflateParams)static void XS_Compress__Raw__Zlib__deflateStream__deflateParams ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1814 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream__deflateParams)static void XS_Compress__Raw__Zlib__deflateStream__deflateParams ( CV* cv __attribute__((unused))) |
1815 | { |
1816 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1817 | if (items != 5) |
1818 | croak_xs_usagePerl_croak_xs_usage(cv, "s, flags, level, strategy, bufsize"); |
1819 | { |
1820 | Compress__Raw__Zlib__deflateStream s; |
1821 | int flags = (int)SvIV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (1)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 1)],2)) |
1822 | ; |
1823 | int level = (int)SvIV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (2)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 2)],2)) |
1824 | ; |
1825 | int strategy = (int)SvIV(ST(3))((((PL_stack_base[ax + (3)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (3)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 3)],2)) |
1826 | ; |
1827 | uLong bufsize = (unsigned long)SvUV(ST(4))((((PL_stack_base[ax + (4)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (4)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (4)],2)) |
1828 | ; |
1829 | bool_Bool changed = FALSE(0); |
1830 | DualType RETVAL; |
1831 | |
1832 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1833 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1834 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1835 | } |
1836 | else |
1837 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1838 | "Compress::Raw::Zlib::deflateStream::_deflateParams", |
1839 | "s", "Compress::Raw::Zlib::deflateStream") |
1840 | ; |
1841 | #line 1319 "Zlib.xs" |
1842 | /* printf("_deflateParams(Flags %d Level %d Strategy %d Bufsize %d)\n", flags, level, strategy, bufsize); |
1843 | printf("Before -- Level %d, Strategy %d, Bufsize %d\n", s->Level, s->Strategy, s->bufsize); */ |
1844 | if (flags & 1 && level != s->Level) { |
1845 | s->Level = level ; |
1846 | changed = TRUE(1); |
1847 | } |
1848 | if (flags & 2 && strategy != s->Strategy) { |
1849 | s->Strategy = strategy ; |
1850 | changed = TRUE(1); |
1851 | } |
1852 | if (flags & 4) |
1853 | s->bufsize = bufsize; |
1854 | if (changed) { |
1855 | #ifdef SETP_BYTE |
1856 | s->stream.avail_in = 0; |
1857 | s->stream.next_out = &(s->deflateParams_out_byte) ; |
1858 | s->stream.avail_out = 1; |
1859 | RETVAL = deflateParams(&(s->stream), s->Level, s->Strategy); |
1860 | s->deflateParams_out_valid = |
1861 | (RETVAL == Z_OK0 && s->stream.avail_out == 0) ; |
1862 | #else |
1863 | /* printf("Level %d Strategy %d, Prev Len %d\n", |
1864 | s->Level, s->Strategy, s->deflateParams_out_length); */ |
1865 | RETVAL = flushParams(s); |
1866 | #endif |
1867 | } |
1868 | else |
1869 | RETVAL = Z_OK0; |
1870 | #line 1871 "Zlib.c" |
1871 | { |
1872 | SV * RETVALSV; |
1873 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
1874 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
1875 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
1876 | } |
1877 | } |
1878 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1879 | } |
1880 | |
1881 | |
1882 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Level)static void XS_Compress__Raw__Zlib__deflateStream_get_Level( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1883 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Level)static void XS_Compress__Raw__Zlib__deflateStream_get_Level( CV * cv __attribute__((unused))) |
1884 | { |
1885 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1886 | if (items != 1) |
1887 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1888 | { |
1889 | Compress__Raw__Zlib__deflateStream s; |
1890 | int RETVAL; |
1891 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1892 | |
1893 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1894 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1895 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1896 | } |
1897 | else |
1898 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1899 | "Compress::Raw::Zlib::deflateStream::get_Level", |
1900 | "s", "Compress::Raw::Zlib::deflateStream") |
1901 | ; |
1902 | #line 1355 "Zlib.xs" |
1903 | RETVAL = s->Level ; |
1904 | #line 1905 "Zlib.c" |
1905 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHi((IV)RETVAL)do { do { IV TARGi_iv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1)) ? (_Bool)1 : (_Bool)0) ,(1))) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000 ); targ->sv_u.svu_iv = TARGi_iv; } else Perl_sv_setiv_mg( targ ,TARGi_iv); } while (0); (*++sp = (targ)); } while (0); |
1906 | } |
1907 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1908 | } |
1909 | |
1910 | |
1911 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Strategy)static void XS_Compress__Raw__Zlib__deflateStream_get_Strategy ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1912 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Strategy)static void XS_Compress__Raw__Zlib__deflateStream_get_Strategy ( CV* cv __attribute__((unused))) |
1913 | { |
1914 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1915 | if (items != 1) |
1916 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1917 | { |
1918 | Compress__Raw__Zlib__deflateStream s; |
1919 | int RETVAL; |
1920 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1921 | |
1922 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1923 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1924 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1925 | } |
1926 | else |
1927 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1928 | "Compress::Raw::Zlib::deflateStream::get_Strategy", |
1929 | "s", "Compress::Raw::Zlib::deflateStream") |
1930 | ; |
1931 | #line 1363 "Zlib.xs" |
1932 | RETVAL = s->Strategy ; |
1933 | #line 1934 "Zlib.c" |
1934 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHi((IV)RETVAL)do { do { IV TARGi_iv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1)) ? (_Bool)1 : (_Bool)0) ,(1))) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000 ); targ->sv_u.svu_iv = TARGi_iv; } else Perl_sv_setiv_mg( targ ,TARGi_iv); } while (0); (*++sp = (targ)); } while (0); |
1935 | } |
1936 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1937 | } |
1938 | |
1939 | |
1940 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Bufsize)static void XS_Compress__Raw__Zlib__deflateStream_get_Bufsize ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1941 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_get_Bufsize)static void XS_Compress__Raw__Zlib__deflateStream_get_Bufsize ( CV* cv __attribute__((unused))) |
1942 | { |
1943 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1944 | if (items != 1) |
1945 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1946 | { |
1947 | Compress__Raw__Zlib__deflateStream s; |
1948 | uLong RETVAL; |
1949 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1950 | |
1951 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1952 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1953 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1954 | } |
1955 | else |
1956 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1957 | "Compress::Raw::Zlib::deflateStream::get_Bufsize", |
1958 | "s", "Compress::Raw::Zlib::deflateStream") |
1959 | ; |
1960 | #line 1372 "Zlib.xs" |
1961 | RETVAL = s->bufsize ; |
1962 | #line 1963 "Zlib.c" |
1963 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
1964 | } |
1965 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1966 | } |
1967 | |
1968 | |
1969 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_status)static void XS_Compress__Raw__Zlib__deflateStream_status( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1970 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_status)static void XS_Compress__Raw__Zlib__deflateStream_status( CV* cv __attribute__((unused))) |
1971 | { |
1972 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
1973 | if (items != 1) |
1974 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
1975 | { |
1976 | Compress__Raw__Zlib__deflateStream s; |
1977 | int RETVAL; |
1978 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
1979 | |
1980 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
1981 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
1982 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
1983 | } |
1984 | else |
1985 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
1986 | "Compress::Raw::Zlib::deflateStream::status", |
1987 | "s", "Compress::Raw::Zlib::deflateStream") |
1988 | ; |
1989 | #line 1381 "Zlib.xs" |
1990 | RETVAL = s->last_error ; |
1991 | #line 1992 "Zlib.c" |
1992 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHi((IV)RETVAL)do { do { IV TARGi_iv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1)) ? (_Bool)1 : (_Bool)0) ,(1))) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000 ); targ->sv_u.svu_iv = TARGi_iv; } else Perl_sv_setiv_mg( targ ,TARGi_iv); } while (0); (*++sp = (targ)); } while (0); |
1993 | } |
1994 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
1995 | } |
1996 | |
1997 | |
1998 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_crc32)static void XS_Compress__Raw__Zlib__deflateStream_crc32( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
1999 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_crc32)static void XS_Compress__Raw__Zlib__deflateStream_crc32( CV* cv __attribute__((unused))) |
2000 | { |
2001 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2002 | if (items != 1) |
2003 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2004 | { |
2005 | Compress__Raw__Zlib__deflateStream s; |
2006 | uLong RETVAL; |
2007 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2008 | |
2009 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2010 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2011 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2012 | } |
2013 | else |
2014 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2015 | "Compress::Raw::Zlib::deflateStream::crc32", |
2016 | "s", "Compress::Raw::Zlib::deflateStream") |
2017 | ; |
2018 | #line 1389 "Zlib.xs" |
2019 | RETVAL = s->crc32 ; |
2020 | #line 2021 "Zlib.c" |
2021 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2022 | } |
2023 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2024 | } |
2025 | |
2026 | |
2027 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_dict_adler)static void XS_Compress__Raw__Zlib__deflateStream_dict_adler( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2028 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_dict_adler)static void XS_Compress__Raw__Zlib__deflateStream_dict_adler( CV* cv __attribute__((unused))) |
2029 | { |
2030 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2031 | if (items != 1) |
2032 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2033 | { |
2034 | Compress__Raw__Zlib__deflateStream s; |
2035 | uLong RETVAL; |
2036 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2037 | |
2038 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2039 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2040 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2041 | } |
2042 | else |
2043 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2044 | "Compress::Raw::Zlib::deflateStream::dict_adler", |
2045 | "s", "Compress::Raw::Zlib::deflateStream") |
2046 | ; |
2047 | #line 1397 "Zlib.xs" |
2048 | RETVAL = s->dict_adler ; |
2049 | #line 2050 "Zlib.c" |
2050 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2051 | } |
2052 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2053 | } |
2054 | |
2055 | |
2056 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_adler32)static void XS_Compress__Raw__Zlib__deflateStream_adler32( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2057 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_adler32)static void XS_Compress__Raw__Zlib__deflateStream_adler32( CV * cv __attribute__((unused))) |
2058 | { |
2059 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2060 | if (items != 1) |
2061 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2062 | { |
2063 | Compress__Raw__Zlib__deflateStream s; |
2064 | uLong RETVAL; |
2065 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2066 | |
2067 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2068 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2069 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2070 | } |
2071 | else |
2072 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2073 | "Compress::Raw::Zlib::deflateStream::adler32", |
2074 | "s", "Compress::Raw::Zlib::deflateStream") |
2075 | ; |
2076 | #line 1405 "Zlib.xs" |
2077 | RETVAL = s->adler32 ; |
2078 | #line 2079 "Zlib.c" |
2079 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2080 | } |
2081 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2082 | } |
2083 | |
2084 | |
2085 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_compressedBytes)static void XS_Compress__Raw__Zlib__deflateStream_compressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2086 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_compressedBytes)static void XS_Compress__Raw__Zlib__deflateStream_compressedBytes ( CV* cv __attribute__((unused))) |
2087 | { |
2088 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2089 | if (items != 1) |
2090 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2091 | { |
2092 | Compress__Raw__Zlib__deflateStream s; |
2093 | uLong RETVAL; |
2094 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2095 | |
2096 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2097 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2098 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2099 | } |
2100 | else |
2101 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2102 | "Compress::Raw::Zlib::deflateStream::compressedBytes", |
2103 | "s", "Compress::Raw::Zlib::deflateStream") |
2104 | ; |
2105 | #line 1413 "Zlib.xs" |
2106 | RETVAL = s->compressedBytes; |
2107 | #line 2108 "Zlib.c" |
2108 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2109 | } |
2110 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2111 | } |
2112 | |
2113 | |
2114 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2115 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes ( CV* cv __attribute__((unused))) |
2116 | { |
2117 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2118 | if (items != 1) |
2119 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2120 | { |
2121 | Compress__Raw__Zlib__deflateStream s; |
2122 | uLong RETVAL; |
2123 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2124 | |
2125 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2126 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2127 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2128 | } |
2129 | else |
2130 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2131 | "Compress::Raw::Zlib::deflateStream::uncompressedBytes", |
2132 | "s", "Compress::Raw::Zlib::deflateStream") |
2133 | ; |
2134 | #line 1421 "Zlib.xs" |
2135 | RETVAL = s->uncompressedBytes; |
2136 | #line 2137 "Zlib.c" |
2137 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2138 | } |
2139 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2140 | } |
2141 | |
2142 | |
2143 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_total_in)static void XS_Compress__Raw__Zlib__deflateStream_total_in( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2144 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_total_in)static void XS_Compress__Raw__Zlib__deflateStream_total_in( CV * cv __attribute__((unused))) |
2145 | { |
2146 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2147 | if (items != 1) |
2148 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2149 | { |
2150 | Compress__Raw__Zlib__deflateStream s; |
2151 | uLong RETVAL; |
2152 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2153 | |
2154 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2155 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2156 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2157 | } |
2158 | else |
2159 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2160 | "Compress::Raw::Zlib::deflateStream::total_in", |
2161 | "s", "Compress::Raw::Zlib::deflateStream") |
2162 | ; |
2163 | #line 1429 "Zlib.xs" |
2164 | RETVAL = s->stream.total_in ; |
2165 | #line 2166 "Zlib.c" |
2166 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2167 | } |
2168 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2169 | } |
2170 | |
2171 | |
2172 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_total_out)static void XS_Compress__Raw__Zlib__deflateStream_total_out( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2173 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_total_out)static void XS_Compress__Raw__Zlib__deflateStream_total_out( CV * cv __attribute__((unused))) |
2174 | { |
2175 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2176 | if (items != 1) |
2177 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2178 | { |
2179 | Compress__Raw__Zlib__deflateStream s; |
2180 | uLong RETVAL; |
2181 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2182 | |
2183 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2184 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2185 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2186 | } |
2187 | else |
2188 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2189 | "Compress::Raw::Zlib::deflateStream::total_out", |
2190 | "s", "Compress::Raw::Zlib::deflateStream") |
2191 | ; |
2192 | #line 1437 "Zlib.xs" |
2193 | RETVAL = s->stream.total_out ; |
2194 | #line 2195 "Zlib.c" |
2195 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2196 | } |
2197 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2198 | } |
2199 | |
2200 | |
2201 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_msg)static void XS_Compress__Raw__Zlib__deflateStream_msg( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2202 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_msg)static void XS_Compress__Raw__Zlib__deflateStream_msg( CV* cv __attribute__((unused))) |
2203 | { |
2204 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2205 | if (items != 1) |
2206 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2207 | { |
2208 | Compress__Raw__Zlib__deflateStream s; |
2209 | char * RETVAL; |
2210 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2211 | |
2212 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2213 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2214 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2215 | } |
2216 | else |
2217 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2218 | "Compress::Raw::Zlib::deflateStream::msg", |
2219 | "s", "Compress::Raw::Zlib::deflateStream") |
2220 | ; |
2221 | #line 1445 "Zlib.xs" |
2222 | RETVAL = s->stream.msg; |
2223 | #line 2224 "Zlib.c" |
2224 | sv_setpv(TARG, RETVAL)Perl_sv_setpv( targ,RETVAL); XSprePUSH(sp = PL_stack_base + ax - 1); PUSHTARGdo { do { if (__builtin_expect(((((targ)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( targ); } while ( 0); (*++sp = (targ)); } while (0); |
2225 | } |
2226 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2227 | } |
2228 | |
2229 | |
2230 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflateTune)static void XS_Compress__Raw__Zlib__deflateStream_deflateTune ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2231 | XS_EUPXS(XS_Compress__Raw__Zlib__deflateStream_deflateTune)static void XS_Compress__Raw__Zlib__deflateStream_deflateTune ( CV* cv __attribute__((unused))) |
2232 | { |
2233 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2234 | if (items != 5) |
2235 | croak_xs_usagePerl_croak_xs_usage(cv, "s, good_length, max_lazy, nice_length, max_chain"); |
2236 | { |
2237 | Compress__Raw__Zlib__deflateStream s; |
2238 | int good_length = (int)SvIV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (1)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 1)],2)) |
2239 | ; |
2240 | int max_lazy = (int)SvIV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (2)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 2)],2)) |
2241 | ; |
2242 | int nice_length = (int)SvIV(ST(3))((((PL_stack_base[ax + (3)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (3)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 3)],2)) |
2243 | ; |
2244 | int max_chain = (int)SvIV(ST(4))((((PL_stack_base[ax + (4)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (4)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 4)],2)) |
2245 | ; |
2246 | int RETVAL; |
2247 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2248 | |
2249 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::deflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::deflateStream" )) { |
2250 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2251 | s = INT2PTR(Compress__Raw__Zlib__deflateStream,tmp)(Compress__Raw__Zlib__deflateStream)(tmp); |
2252 | } |
2253 | else |
2254 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2255 | "Compress::Raw::Zlib::deflateStream::deflateTune", |
2256 | "s", "Compress::Raw::Zlib::deflateStream") |
2257 | ; |
2258 | #line 1457 "Zlib.xs" |
2259 | #ifndef AT_LEAST_ZLIB_1_2_2_3 |
2260 | good_length = good_length; max_lazy = max_lazy ; /* Silence -Wall */ |
2261 | nice_length = nice_length; max_chain = max_chain; /* Silence -Wall */ |
2262 | croakPerl_croak("deflateTune needs zlib 1.2.2.3 or better"); |
2263 | #else |
2264 | RETVAL = deflateTune(&(s->stream), good_length, max_lazy, nice_length, max_chain); |
2265 | #endif |
2266 | #line 2267 "Zlib.c" |
2267 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHi((IV)RETVAL)do { do { IV TARGi_iv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1)) ? (_Bool)1 : (_Bool)0) ,(1))) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000 ); targ->sv_u.svu_iv = TARGi_iv; } else Perl_sv_setiv_mg( targ ,TARGi_iv); } while (0); (*++sp = (targ)); } while (0); |
2268 | } |
2269 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2270 | } |
2271 | |
2272 | |
2273 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_DispStream)static void XS_Compress__Raw__Zlib__inflateStream_DispStream( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2274 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_DispStream)static void XS_Compress__Raw__Zlib__inflateStream_DispStream( CV* cv __attribute__((unused))) |
2275 | { |
2276 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2277 | if (items < 1 || items > 2) |
2278 | croak_xs_usagePerl_croak_xs_usage(cv, "s, message=NULL"); |
2279 | { |
2280 | Compress__Raw__Zlib__inflateStream s; |
2281 | const char * message; |
2282 | |
2283 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2284 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2285 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2286 | } |
2287 | else |
2288 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2289 | "Compress::Raw::Zlib::inflateStream::DispStream", |
2290 | "s", "Compress::Raw::Zlib::inflateStream") |
2291 | ; |
2292 | |
2293 | if (items < 2) |
2294 | message = NULL((void*)0); |
2295 | else { |
2296 | if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
2297 | message = (const char *)SvPVbyte_nolen(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000400|0x20000000 |0x00200000)) == 0x00000400) ? ((PL_stack_base[ax + (1)])-> sv_u.svu_pv) : Perl_sv_2pvbyte_flags( PL_stack_base[ax + (1)] ,0,2)); |
2298 | else |
2299 | message = NULL((void*)0) |
2300 | ; |
2301 | } |
2302 | |
2303 | DispStream(s, message); |
2304 | } |
2305 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
2306 | } |
2307 | |
2308 | |
2309 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateReset)static void XS_Compress__Raw__Zlib__inflateStream_inflateReset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2310 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateReset)static void XS_Compress__Raw__Zlib__inflateStream_inflateReset ( CV* cv __attribute__((unused))) |
2311 | { |
2312 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2313 | if (items != 1) |
2314 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2315 | { |
2316 | Compress__Raw__Zlib__inflateStream s; |
2317 | DualType RETVAL; |
2318 | |
2319 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2320 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2321 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2322 | } |
2323 | else |
2324 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2325 | "Compress::Raw::Zlib::inflateStream::inflateReset", |
2326 | "s", "Compress::Raw::Zlib::inflateStream") |
2327 | ; |
2328 | #line 1479 "Zlib.xs" |
2329 | RETVAL = inflateReset(&(s->stream)) ; |
2330 | if (RETVAL == Z_OK0) { |
2331 | PostInitStream(s, s->flags, s->bufsize, s->WindowBits) ; |
2332 | } |
2333 | #line 2334 "Zlib.c" |
2334 | { |
2335 | SV * RETVALSV; |
2336 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
2337 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
2338 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
2339 | } |
2340 | } |
2341 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2342 | } |
2343 | |
2344 | |
2345 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflate)static void XS_Compress__Raw__Zlib__inflateStream_inflate( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2346 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflate)static void XS_Compress__Raw__Zlib__inflateStream_inflate( CV * cv __attribute__((unused))) |
2347 | { |
2348 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2349 | if (items < 3 || items > 4) |
2350 | croak_xs_usagePerl_croak_xs_usage(cv, "s, buf, output, eof=FALSE"); |
2351 | { |
2352 | Compress__Raw__Zlib__inflateStream s; |
2353 | SV * buf = ST(1)PL_stack_base[ax + (1)] |
2354 | ; |
2355 | SV * output = ST(2)PL_stack_base[ax + (2)] |
2356 | ; |
2357 | bool_Bool eof; |
2358 | uInt cur_length = 0; |
2359 | uInt prefix_length = 0; |
2360 | int increment = 0; |
2361 | uLong bufinc; |
2362 | STRLEN na; |
2363 | #line 1498 "Zlib.xs" |
2364 | #ifdef UTF8_AVAILABLE |
2365 | bool_Bool out_utf8 = FALSE(0); |
2366 | #endif |
2367 | STRLEN origlen; |
2368 | #line 2369 "Zlib.c" |
2369 | DualType RETVAL; |
2370 | |
2371 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2372 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2373 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2374 | } |
2375 | else |
2376 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2377 | "Compress::Raw::Zlib::inflateStream::inflate", |
2378 | "s", "Compress::Raw::Zlib::inflateStream") |
2379 | ; |
2380 | |
2381 | if (items < 4) |
2382 | eof = FALSE(0); |
2383 | else { |
2384 | eof = (bool_Bool)SvTRUE(ST(3))Perl_SvTRUE( PL_stack_base[ax + (3)]) |
2385 | ; |
2386 | } |
2387 | #line 1503 "Zlib.xs" |
2388 | bufinc = s->bufsize; |
2389 | /* If the buffer is a reference, dereference it */ |
2390 | buf = deRef(buf, "inflate") ; |
2391 | |
2392 | if (s->flags & FLAG_CONSUME_INPUT8) { |
2393 | if (SvREADONLY(buf)((buf)->sv_flags & (0x08000000|0x00010000))) |
2394 | croakPerl_croak("Compress::Raw::Zlib::Inflate::inflate input parameter cannot be read-only when ConsumeInput is specified"); |
2395 | SvPV_force(buf, na)((((buf)->sv_flags & (0x00000400|0x00000100|0x00000200 |0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((na = ((XPV*) (buf)->sv_any)->xpv_cur), ((buf)->sv_u.svu_pv )) : Perl_sv_pvn_force_flags( buf,&na,2)); |
2396 | } |
2397 | #ifdef UTF8_AVAILABLE |
2398 | if (DO_UTF8(buf)(((buf)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(buf, 1)Perl_sv_utf8_downgrade_flags( buf,1,2)) |
2399 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Inflate::inflate input parameter"); |
2400 | #endif |
2401 | |
2402 | /* initialise the input buffer */ |
2403 | s->stream.next_in = (Bytef*)SvPV_nomg(buf, origlen)((((buf)->sv_flags & (0x00000400|0x00200000)) == 0x00000400 ) ? ((origlen = ((XPV*) (buf)->sv_any)->xpv_cur), ((buf )->sv_u.svu_pv)) : Perl_sv_2pv_flags( buf,&origlen,0)) ; |
2404 | s->stream.avail_in = origlen ; |
2405 | |
2406 | /* and retrieve the output buffer */ |
2407 | output = deRef_l(output, "inflate") ; |
2408 | #ifdef UTF8_AVAILABLE |
2409 | if (DO_UTF8(output)(((output)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0)))) |
2410 | out_utf8 = TRUE(1) ; |
2411 | if (DO_UTF8(output)(((output)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(output, 1)Perl_sv_utf8_downgrade_flags( output,1,2)) |
2412 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Inflate::inflate output parameter"); |
2413 | #endif |
2414 | if((s->flags & FLAG_APPEND1) != FLAG_APPEND1) { |
2415 | SvCUR_set(output, 0)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (0)); } while (0); |
2416 | } |
2417 | |
2418 | /* Assume no output buffer - the code below will update if there is any available */ |
2419 | s->stream.avail_out = 0; |
2420 | |
2421 | |
2422 | if (SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len) { |
2423 | prefix_length = cur_length = SvCUR(output)((XPV*) (output)->sv_any)->xpv_cur ; |
2424 | |
2425 | if (s->flags & FLAG_LIMIT_OUTPUT16 && SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length - 1 < bufinc) |
2426 | { |
2427 | Sv_Grow(output, bufinc + cur_length + 1)Perl_sv_grow( output,bufinc + cur_length + 1) ; |
2428 | } |
2429 | |
2430 | /* Only setup the stream output pointers if there is spare |
2431 | capacity in the outout SV |
2432 | */ |
2433 | if (SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len > cur_length + 1) |
2434 | { |
2435 | s->stream.next_out = (Bytef*) SvPV_nomg_nolen(output)((((output)->sv_flags & (0x00000400|0x00200000)) == 0x00000400 ) ? ((output)->sv_u.svu_pv) : Perl_sv_2pv_flags( output,0, 0)) + cur_length; |
2436 | increment = SvLEN(output)((XPV*) (output)->sv_any)->xpv_len_u.xpvlenu_len - cur_length - 1; |
2437 | s->stream.avail_out = increment; |
2438 | } |
2439 | } |
2440 | |
2441 | |
2442 | s->bytesInflated = 0; |
2443 | |
2444 | RETVAL = Z_OK0; |
2445 | |
2446 | while (RETVAL == Z_OK0) { |
2447 | if (s->stream.avail_out == 0) { |
2448 | /* out of space in the output buffer so make it bigger */ |
2449 | s->stream.next_out = (Bytef*) Sv_Grow(output, SvLEN(output) + bufinc +1)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + bufinc +1) ; |
2450 | cur_length += increment ; |
2451 | s->stream.next_out += cur_length ; |
2452 | increment = bufinc ; |
2453 | s->stream.avail_out = increment; |
2454 | bufinc *= 2 ; |
2455 | } |
2456 | |
2457 | /* printf("INFLATE Availl In %d, Out %d\n", s->stream.avail_in, |
2458 | s->stream.avail_out); |
2459 | DispStream(s, "BEFORE"); |
2460 | Perl_sv_dump(output); */ |
2461 | RETVAL = inflate(&(s->stream), Z_SYNC_FLUSH2); |
2462 | /* printf("INFLATE returned %d %s, avail in %d, out %d\n", RETVAL, |
2463 | GetErrorString(RETVAL), s->stream.avail_in, s->stream.avail_out); */ |
2464 | |
2465 | |
2466 | if (RETVAL == Z_NEED_DICT2 && s->dictionary) { |
2467 | STRLEN dlen; |
2468 | const Bytef* b = (const Bytef*)SvPV(s->dictionary, dlen)((((s->dictionary)->sv_flags & (0x00000400|0x00200000 )) == 0x00000400) ? ((dlen = ((XPV*) (s->dictionary)->sv_any )->xpv_cur), ((s->dictionary)->sv_u.svu_pv)) : Perl_sv_2pv_flags ( s->dictionary,&dlen,2)) ; |
2469 | s->dict_adler = s->stream.adler ; |
2470 | RETVAL = inflateSetDictionary(&(s->stream), |
2471 | b, dlen); |
2472 | if (RETVAL == Z_OK0) |
2473 | continue; |
2474 | } |
2475 | |
2476 | if (s->flags & FLAG_LIMIT_OUTPUT16 && |
2477 | (RETVAL == Z_OK0 || RETVAL == Z_BUF_ERROR(-5) )) { |
2478 | if (s->stream.avail_out == 0) |
2479 | RETVAL = Z_BUF_ERROR(-5); |
2480 | break; |
2481 | } |
2482 | if (s->flags & FLAG_LIMIT_OUTPUT16 && |
2483 | (RETVAL == Z_OK0 || RETVAL == Z_BUF_ERROR(-5) )) |
2484 | break; |
2485 | |
2486 | if (RETVAL == Z_STREAM_ERROR(-2) || RETVAL == Z_MEM_ERROR(-4) || |
2487 | RETVAL == Z_DATA_ERROR(-3) || RETVAL == Z_STREAM_END1 ) |
2488 | break ; |
2489 | |
2490 | if (RETVAL == Z_BUF_ERROR(-5)) { |
2491 | if (s->stream.avail_out == 0) |
2492 | continue ; |
2493 | if (s->stream.avail_in == 0) { |
2494 | RETVAL = Z_OK0 ; |
2495 | break ; |
2496 | } |
2497 | } |
2498 | } |
2499 | #ifdef NEED_DUMMY_BYTE_AT_END |
2500 | if (eof && RETVAL == Z_OK0 && s->flags & FLAG_LIMIT_OUTPUT16 == 0) { |
2501 | Bytef* nextIn = s->stream.next_in; |
2502 | uInt availIn = s->stream.avail_in; |
2503 | s->stream.next_in = (Bytef*) " "; |
2504 | s->stream.avail_in = 1; |
2505 | if (s->stream.avail_out == 0) { |
2506 | /* out of space in the output buffer so make it bigger */ |
2507 | s->stream.next_out = Sv_Grow(output, SvLEN(output) + bufinc)Perl_sv_grow( output,((XPV*) (output)->sv_any)->xpv_len_u .xpvlenu_len + bufinc) ; |
2508 | cur_length += increment ; |
2509 | s->stream.next_out += cur_length ; |
2510 | increment = bufinc ; |
2511 | s->stream.avail_out = increment; |
2512 | bufinc *= 2 ; |
2513 | } |
2514 | RETVAL = inflate(&(s->stream), Z_SYNC_FLUSH2); |
2515 | s->stream.next_in = nextIn ; |
2516 | s->stream.avail_in = availIn ; |
2517 | } |
2518 | #else |
2519 | PERL_UNUSED_VAR(eof)((void)sizeof(eof)); |
2520 | #endif |
2521 | |
2522 | s->last_error = RETVAL ; |
2523 | if (RETVAL == Z_OK0 || RETVAL == Z_STREAM_END1 || RETVAL == Z_BUF_ERROR(-5) || RETVAL == Z_DATA_ERROR(-3)) { |
2524 | unsigned in ; |
2525 | |
2526 | s->bytesInflated = cur_length + increment - s->stream.avail_out - prefix_length; |
2527 | s->uncompressedBytes += s->bytesInflated ; |
2528 | s->compressedBytes += origlen - s->stream.avail_in ; |
2529 | |
2530 | SvPOK_only(output)( (output)->sv_flags &= ~((0x00000100|0x00000200|0x00000400 |0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000)| 0x80000000 |0x20000000), (output)->sv_flags |= (0x00000400|0x00004000 )); |
2531 | SvCUR_set(output, prefix_length + s->bytesInflated)do { ((void)0); ((void)0); ((void)0); (((XPV*) (output)->sv_any )->xpv_cur = (prefix_length + s->bytesInflated)); } while (0) ; |
2532 | *SvEND(output)((output)->sv_u.svu_pv + ((XPV*)(output)->sv_any)->xpv_cur ) = '\0'; |
2533 | #ifdef UTF8_AVAILABLE |
2534 | if (out_utf8) |
2535 | sv_utf8_upgrade(output)Perl_sv_utf8_upgrade_flags_grow( output,2,0); |
2536 | #endif |
2537 | SvSETMAGIC(output)do { if (__builtin_expect(((((output)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( output); } while (0); |
2538 | |
2539 | if (s->flags & FLAG_CRC322 ) |
2540 | s->crc32 = crc32(s->crc32, |
2541 | (const Bytef*)SvPVX(output)((output)->sv_u.svu_pv)+prefix_length, |
2542 | SvCUR(output)((XPV*) (output)->sv_any)->xpv_cur-prefix_length) ; |
2543 | |
2544 | if (s->flags & FLAG_ADLER324) |
2545 | s->adler32 = adler32(s->adler32, |
2546 | (const Bytef*)SvPVX(output)((output)->sv_u.svu_pv)+prefix_length, |
2547 | SvCUR(output)((XPV*) (output)->sv_any)->xpv_cur-prefix_length) ; |
2548 | |
2549 | /* fix the input buffer */ |
2550 | if (s->flags & FLAG_CONSUME_INPUT8 || s->flags & FLAG_LIMIT_OUTPUT16) { |
2551 | in = s->stream.avail_in ; |
2552 | SvCUR_set(buf, in)do { ((void)0); ((void)0); ((void)0); (((XPV*) (buf)->sv_any )->xpv_cur = (in)); } while (0) ; |
2553 | if (in) |
2554 | Move(s->stream.next_in, SvPVX(buf), in, char)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(in) || sizeof(char) > ((size_t)1 << 8*(sizeof(size_t) - sizeof(in)))) ? (size_t)(in) : ((size_t)-1)/sizeof(char)) > ((size_t)-1)/sizeof(char))) ? (_Bool)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), ((void)0), ((void)0), (void)memmove ((char*)(((buf)->sv_u.svu_pv)),(const char*)(s->stream. next_in), (in) * sizeof(char))) ; |
2555 | *SvEND(buf)((buf)->sv_u.svu_pv + ((XPV*)(buf)->sv_any)->xpv_cur ) = '\0'; |
2556 | SvSETMAGIC(buf)do { if (__builtin_expect(((((buf)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( buf); } while (0 ); |
2557 | } |
2558 | |
2559 | } |
2560 | #line 2561 "Zlib.c" |
2561 | { |
2562 | SV * RETVALSV; |
2563 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
2564 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
2565 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
2566 | } |
2567 | } |
2568 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2569 | } |
2570 | |
2571 | |
2572 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateCount)static void XS_Compress__Raw__Zlib__inflateStream_inflateCount ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2573 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateCount)static void XS_Compress__Raw__Zlib__inflateStream_inflateCount ( CV* cv __attribute__((unused))) |
2574 | { |
2575 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2576 | if (items != 1) |
2577 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2578 | { |
2579 | Compress__Raw__Zlib__inflateStream s; |
2580 | uLong RETVAL; |
2581 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2582 | |
2583 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2584 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2585 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2586 | } |
2587 | else |
2588 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2589 | "Compress::Raw::Zlib::inflateStream::inflateCount", |
2590 | "s", "Compress::Raw::Zlib::inflateStream") |
2591 | ; |
2592 | #line 1682 "Zlib.xs" |
2593 | RETVAL = s->bytesInflated; |
2594 | #line 2595 "Zlib.c" |
2595 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2596 | } |
2597 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2598 | } |
2599 | |
2600 | |
2601 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_compressedBytes)static void XS_Compress__Raw__Zlib__inflateStream_compressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2602 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_compressedBytes)static void XS_Compress__Raw__Zlib__inflateStream_compressedBytes ( CV* cv __attribute__((unused))) |
2603 | { |
2604 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2605 | if (items != 1) |
2606 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2607 | { |
2608 | Compress__Raw__Zlib__inflateStream s; |
2609 | uLong RETVAL; |
2610 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2611 | |
2612 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2613 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2614 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2615 | } |
2616 | else |
2617 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2618 | "Compress::Raw::Zlib::inflateStream::compressedBytes", |
2619 | "s", "Compress::Raw::Zlib::inflateStream") |
2620 | ; |
2621 | #line 1690 "Zlib.xs" |
2622 | RETVAL = s->compressedBytes; |
2623 | #line 2624 "Zlib.c" |
2624 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2625 | } |
2626 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2627 | } |
2628 | |
2629 | |
2630 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2631 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes ( CV* cv __attribute__((unused))) |
2632 | { |
2633 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2634 | if (items != 1) |
2635 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2636 | { |
2637 | Compress__Raw__Zlib__inflateStream s; |
2638 | uLong RETVAL; |
2639 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2640 | |
2641 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2642 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2643 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2644 | } |
2645 | else |
2646 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2647 | "Compress::Raw::Zlib::inflateStream::uncompressedBytes", |
2648 | "s", "Compress::Raw::Zlib::inflateStream") |
2649 | ; |
2650 | #line 1698 "Zlib.xs" |
2651 | RETVAL = s->uncompressedBytes; |
2652 | #line 2653 "Zlib.c" |
2653 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2654 | } |
2655 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2656 | } |
2657 | |
2658 | |
2659 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateSync)static void XS_Compress__Raw__Zlib__inflateStream_inflateSync ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2660 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_inflateSync)static void XS_Compress__Raw__Zlib__inflateStream_inflateSync ( CV* cv __attribute__((unused))) |
2661 | { |
2662 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2663 | if (items != 2) |
2664 | croak_xs_usagePerl_croak_xs_usage(cv, "s, buf"); |
2665 | { |
2666 | Compress__Raw__Zlib__inflateStream s; |
2667 | SV * buf = ST(1)PL_stack_base[ax + (1)] |
2668 | ; |
2669 | DualType RETVAL; |
2670 | |
2671 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2672 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2673 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2674 | } |
2675 | else |
2676 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2677 | "Compress::Raw::Zlib::inflateStream::inflateSync", |
2678 | "s", "Compress::Raw::Zlib::inflateStream") |
2679 | ; |
2680 | #line 1709 "Zlib.xs" |
2681 | /* If the buffer is a reference, dereference it */ |
2682 | buf = deRef(buf, "inflateSync") ; |
2683 | #ifdef UTF8_AVAILABLE |
2684 | if (DO_UTF8(buf)(((buf)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(buf, 1)Perl_sv_utf8_downgrade_flags( buf,1,2)) |
2685 | croakPerl_croak("Wide character in Compress::Raw::Zlib::Inflate::inflateSync"); |
2686 | #endif |
2687 | |
2688 | /* initialise the input buffer */ |
2689 | s->stream.next_in = (Bytef*)SvPV_force_nomg_nolen(buf)((((buf)->sv_flags & (0x00000400|0x00000100|0x00000200 |0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((buf) ->sv_u.svu_pv) : Perl_sv_pvn_force_flags( buf,0,0)) ; |
2690 | s->stream.avail_in = SvCUR(buf)((XPV*) (buf)->sv_any)->xpv_cur ; |
2691 | |
2692 | /* inflateSync doesn't create any output */ |
2693 | s->stream.next_out = (Bytef*) NULL((void*)0); |
2694 | s->stream.avail_out = 0; |
2695 | |
2696 | RETVAL = inflateSync(&(s->stream)); |
2697 | s->last_error = RETVAL ; |
2698 | |
2699 | /* fix the input buffer */ |
2700 | { |
2701 | unsigned in = s->stream.avail_in ; |
2702 | SvCUR_set(buf, in)do { ((void)0); ((void)0); ((void)0); (((XPV*) (buf)->sv_any )->xpv_cur = (in)); } while (0) ; |
2703 | if (in) |
2704 | Move(s->stream.next_in, SvPVX(buf), in, char)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(in) || sizeof(char) > ((size_t)1 << 8*(sizeof(size_t) - sizeof(in)))) ? (size_t)(in) : ((size_t)-1)/sizeof(char)) > ((size_t)-1)/sizeof(char))) ? (_Bool)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), ((void)0), ((void)0), (void)memmove ((char*)(((buf)->sv_u.svu_pv)),(const char*)(s->stream. next_in), (in) * sizeof(char))) ; |
2705 | *SvEND(buf)((buf)->sv_u.svu_pv + ((XPV*)(buf)->sv_any)->xpv_cur ) = '\0'; |
2706 | SvSETMAGIC(buf)do { if (__builtin_expect(((((buf)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( buf); } while (0 ); |
2707 | } |
2708 | #line 2709 "Zlib.c" |
2709 | { |
2710 | SV * RETVALSV; |
2711 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
2712 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
2713 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
2714 | } |
2715 | } |
2716 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2717 | } |
2718 | |
2719 | |
2720 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_DESTROY)static void XS_Compress__Raw__Zlib__inflateStream_DESTROY( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2721 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_DESTROY)static void XS_Compress__Raw__Zlib__inflateStream_DESTROY( CV * cv __attribute__((unused))) |
2722 | { |
2723 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2724 | if (items != 1) |
2725 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2726 | { |
2727 | Compress__Raw__Zlib__inflateStream s; |
2728 | |
2729 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800)) { |
2730 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2731 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2732 | } |
2733 | else |
2734 | Perl_croak_nocontextPerl_croak("%s: %s is not a reference", |
2735 | "Compress::Raw::Zlib::inflateStream::DESTROY", |
2736 | "s") |
2737 | ; |
2738 | #line 1743 "Zlib.xs" |
2739 | inflateEnd(&s->stream) ; |
2740 | if (s->dictionary) |
2741 | SvREFCNT_dec(s->dictionary)Perl_SvREFCNT_dec( ((SV *)({ void *_p = (s->dictionary); _p ; }))) ; |
2742 | #ifndef SETP_BYTE |
2743 | if (s->deflateParams_out_buffer) |
2744 | Safefree(s->deflateParams_out_buffer)Perl_safesysfree(((void *)(s->deflateParams_out_buffer))); |
2745 | #endif |
2746 | #ifdef MAGIC_APPEND |
2747 | if (s->window) |
2748 | Safefree(s->window)Perl_safesysfree(((void *)(s->window))); |
2749 | #endif |
2750 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
2751 | #line 2752 "Zlib.c" |
2752 | } |
2753 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
2754 | } |
2755 | |
2756 | |
2757 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_status)static void XS_Compress__Raw__Zlib__inflateStream_status( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2758 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_status)static void XS_Compress__Raw__Zlib__inflateStream_status( CV* cv __attribute__((unused))) |
2759 | { |
2760 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2761 | if (items != 1) |
2762 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2763 | { |
2764 | Compress__Raw__Zlib__inflateStream s; |
2765 | uLong RETVAL; |
2766 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2767 | |
2768 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2769 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2770 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2771 | } |
2772 | else |
2773 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2774 | "Compress::Raw::Zlib::inflateStream::status", |
2775 | "s", "Compress::Raw::Zlib::inflateStream") |
2776 | ; |
2777 | #line 1761 "Zlib.xs" |
2778 | RETVAL = s->last_error ; |
2779 | #line 2780 "Zlib.c" |
2780 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2781 | } |
2782 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2783 | } |
2784 | |
2785 | |
2786 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_crc32)static void XS_Compress__Raw__Zlib__inflateStream_crc32( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2787 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_crc32)static void XS_Compress__Raw__Zlib__inflateStream_crc32( CV* cv __attribute__((unused))) |
2788 | { |
2789 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2790 | if (items != 1) |
2791 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2792 | { |
2793 | Compress__Raw__Zlib__inflateStream s; |
2794 | uLong RETVAL; |
2795 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2796 | |
2797 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2798 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2799 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2800 | } |
2801 | else |
2802 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2803 | "Compress::Raw::Zlib::inflateStream::crc32", |
2804 | "s", "Compress::Raw::Zlib::inflateStream") |
2805 | ; |
2806 | #line 1769 "Zlib.xs" |
2807 | RETVAL = s->crc32 ; |
2808 | #line 2809 "Zlib.c" |
2809 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2810 | } |
2811 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2812 | } |
2813 | |
2814 | |
2815 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_dict_adler)static void XS_Compress__Raw__Zlib__inflateStream_dict_adler( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2816 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_dict_adler)static void XS_Compress__Raw__Zlib__inflateStream_dict_adler( CV* cv __attribute__((unused))) |
2817 | { |
2818 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2819 | if (items != 1) |
2820 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2821 | { |
2822 | Compress__Raw__Zlib__inflateStream s; |
2823 | uLong RETVAL; |
2824 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2825 | |
2826 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2827 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2828 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2829 | } |
2830 | else |
2831 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2832 | "Compress::Raw::Zlib::inflateStream::dict_adler", |
2833 | "s", "Compress::Raw::Zlib::inflateStream") |
2834 | ; |
2835 | #line 1777 "Zlib.xs" |
2836 | RETVAL = s->dict_adler ; |
2837 | #line 2838 "Zlib.c" |
2838 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2839 | } |
2840 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2841 | } |
2842 | |
2843 | |
2844 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_total_in)static void XS_Compress__Raw__Zlib__inflateStream_total_in( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2845 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_total_in)static void XS_Compress__Raw__Zlib__inflateStream_total_in( CV * cv __attribute__((unused))) |
2846 | { |
2847 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2848 | if (items != 1) |
2849 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2850 | { |
2851 | Compress__Raw__Zlib__inflateStream s; |
2852 | uLong RETVAL; |
2853 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2854 | |
2855 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2856 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2857 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2858 | } |
2859 | else |
2860 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2861 | "Compress::Raw::Zlib::inflateStream::total_in", |
2862 | "s", "Compress::Raw::Zlib::inflateStream") |
2863 | ; |
2864 | #line 1785 "Zlib.xs" |
2865 | RETVAL = s->stream.total_in ; |
2866 | #line 2867 "Zlib.c" |
2867 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2868 | } |
2869 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2870 | } |
2871 | |
2872 | |
2873 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_adler32)static void XS_Compress__Raw__Zlib__inflateStream_adler32( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2874 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_adler32)static void XS_Compress__Raw__Zlib__inflateStream_adler32( CV * cv __attribute__((unused))) |
2875 | { |
2876 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2877 | if (items != 1) |
2878 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2879 | { |
2880 | Compress__Raw__Zlib__inflateStream s; |
2881 | uLong RETVAL; |
2882 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2883 | |
2884 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2885 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2886 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2887 | } |
2888 | else |
2889 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2890 | "Compress::Raw::Zlib::inflateStream::adler32", |
2891 | "s", "Compress::Raw::Zlib::inflateStream") |
2892 | ; |
2893 | #line 1793 "Zlib.xs" |
2894 | RETVAL = s->adler32 ; |
2895 | #line 2896 "Zlib.c" |
2896 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2897 | } |
2898 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2899 | } |
2900 | |
2901 | |
2902 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_total_out)static void XS_Compress__Raw__Zlib__inflateStream_total_out( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2903 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_total_out)static void XS_Compress__Raw__Zlib__inflateStream_total_out( CV * cv __attribute__((unused))) |
2904 | { |
2905 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2906 | if (items != 1) |
2907 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2908 | { |
2909 | Compress__Raw__Zlib__inflateStream s; |
2910 | uLong RETVAL; |
2911 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2912 | |
2913 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2914 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2915 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2916 | } |
2917 | else |
2918 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2919 | "Compress::Raw::Zlib::inflateStream::total_out", |
2920 | "s", "Compress::Raw::Zlib::inflateStream") |
2921 | ; |
2922 | #line 1801 "Zlib.xs" |
2923 | RETVAL = s->stream.total_out ; |
2924 | #line 2925 "Zlib.c" |
2925 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2926 | } |
2927 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2928 | } |
2929 | |
2930 | |
2931 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_msg)static void XS_Compress__Raw__Zlib__inflateStream_msg( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2932 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_msg)static void XS_Compress__Raw__Zlib__inflateStream_msg( CV* cv __attribute__((unused))) |
2933 | { |
2934 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2935 | if (items != 1) |
2936 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2937 | { |
2938 | Compress__Raw__Zlib__inflateStream s; |
2939 | char * RETVAL; |
2940 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2941 | |
2942 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2943 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2944 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2945 | } |
2946 | else |
2947 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2948 | "Compress::Raw::Zlib::inflateStream::msg", |
2949 | "s", "Compress::Raw::Zlib::inflateStream") |
2950 | ; |
2951 | #line 1809 "Zlib.xs" |
2952 | RETVAL = s->stream.msg; |
2953 | #line 2954 "Zlib.c" |
2954 | sv_setpv(TARG, RETVAL)Perl_sv_setpv( targ,RETVAL); XSprePUSH(sp = PL_stack_base + ax - 1); PUSHTARGdo { do { if (__builtin_expect(((((targ)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( targ); } while ( 0); (*++sp = (targ)); } while (0); |
2955 | } |
2956 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2957 | } |
2958 | |
2959 | |
2960 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_get_Bufsize)static void XS_Compress__Raw__Zlib__inflateStream_get_Bufsize ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2961 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_get_Bufsize)static void XS_Compress__Raw__Zlib__inflateStream_get_Bufsize ( CV* cv __attribute__((unused))) |
2962 | { |
2963 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2964 | if (items != 1) |
2965 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
2966 | { |
2967 | Compress__Raw__Zlib__inflateStream s; |
2968 | uLong RETVAL; |
2969 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
2970 | |
2971 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
2972 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
2973 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
2974 | } |
2975 | else |
2976 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
2977 | "Compress::Raw::Zlib::inflateStream::get_Bufsize", |
2978 | "s", "Compress::Raw::Zlib::inflateStream") |
2979 | ; |
2980 | #line 1818 "Zlib.xs" |
2981 | RETVAL = s->bufsize ; |
2982 | #line 2983 "Zlib.c" |
2983 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
2984 | } |
2985 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
2986 | } |
2987 | |
2988 | |
2989 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_set_Append)static void XS_Compress__Raw__Zlib__inflateStream_set_Append( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
2990 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateStream_set_Append)static void XS_Compress__Raw__Zlib__inflateStream_set_Append( CV* cv __attribute__((unused))) |
2991 | { |
2992 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
2993 | if (items != 2) |
2994 | croak_xs_usagePerl_croak_xs_usage(cv, "s, mode"); |
2995 | { |
2996 | Compress__Raw__Zlib__inflateStream s; |
2997 | bool_Bool mode = (bool_Bool)SvTRUE(ST(1))Perl_SvTRUE( PL_stack_base[ax + (1)]) |
2998 | ; |
2999 | bool_Bool RETVAL; |
3000 | |
3001 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateStream" )) { |
3002 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3003 | s = INT2PTR(Compress__Raw__Zlib__inflateStream,tmp)(Compress__Raw__Zlib__inflateStream)(tmp); |
3004 | } |
3005 | else |
3006 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3007 | "Compress::Raw::Zlib::inflateStream::set_Append", |
3008 | "s", "Compress::Raw::Zlib::inflateStream") |
3009 | ; |
3010 | #line 1827 "Zlib.xs" |
3011 | RETVAL = ((s->flags & FLAG_APPEND1) == FLAG_APPEND1); |
3012 | if (mode) |
3013 | s->flags |= FLAG_APPEND1 ; |
3014 | else |
3015 | s->flags &= ~FLAG_APPEND1 ; |
3016 | #line 3017 "Zlib.c" |
3017 | ST(0)PL_stack_base[ax + (0)] = boolSV(RETVAL)((RETVAL) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals [2])); |
3018 | } |
3019 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3020 | } |
3021 | |
3022 | |
3023 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_DESTROY)static void XS_Compress__Raw__Zlib__inflateScanStream_DESTROY ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3024 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_DESTROY)static void XS_Compress__Raw__Zlib__inflateScanStream_DESTROY ( CV* cv __attribute__((unused))) |
3025 | { |
3026 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3027 | if (items != 1) |
3028 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3029 | { |
3030 | Compress__Raw__Zlib__inflateScanStream s; |
3031 | |
3032 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800)) { |
3033 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3034 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3035 | } |
3036 | else |
3037 | Perl_croak_nocontextPerl_croak("%s: %s is not a reference", |
3038 | "Compress::Raw::Zlib::inflateScanStream::DESTROY", |
3039 | "s") |
3040 | ; |
3041 | #line 1841 "Zlib.xs" |
3042 | inflateEnd(&s->stream) ; |
3043 | if (s->dictionary) |
3044 | SvREFCNT_dec(s->dictionary)Perl_SvREFCNT_dec( ((SV *)({ void *_p = (s->dictionary); _p ; }))) ; |
3045 | #ifndef SETP_BYTE |
3046 | if (s->deflateParams_out_buffer) |
3047 | Safefree(s->deflateParams_out_buffer)Perl_safesysfree(((void *)(s->deflateParams_out_buffer))); |
3048 | #endif |
3049 | #ifdef MAGIC_APPEND |
3050 | if (s->window) |
3051 | Safefree(s->window)Perl_safesysfree(((void *)(s->window))); |
3052 | #endif |
3053 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
3054 | #line 3055 "Zlib.c" |
3055 | } |
3056 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
3057 | } |
3058 | |
3059 | |
3060 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_DispStream)static void XS_Compress__Raw__Zlib__inflateScanStream_DispStream ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3061 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_DispStream)static void XS_Compress__Raw__Zlib__inflateScanStream_DispStream ( CV* cv __attribute__((unused))) |
3062 | { |
3063 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3064 | if (items < 1 || items > 2) |
3065 | croak_xs_usagePerl_croak_xs_usage(cv, "s, message=NULL"); |
3066 | { |
3067 | Compress__Raw__Zlib__inflateScanStream s; |
3068 | const char * message; |
3069 | |
3070 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3071 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3072 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3073 | } |
3074 | else |
3075 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3076 | "Compress::Raw::Zlib::inflateScanStream::DispStream", |
3077 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3078 | ; |
3079 | |
3080 | if (items < 2) |
3081 | message = NULL((void*)0); |
3082 | else { |
3083 | if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
3084 | message = (const char *)SvPVbyte_nolen(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000400|0x20000000 |0x00200000)) == 0x00000400) ? ((PL_stack_base[ax + (1)])-> sv_u.svu_pv) : Perl_sv_2pvbyte_flags( PL_stack_base[ax + (1)] ,0,2)); |
3085 | else |
3086 | message = NULL((void*)0) |
3087 | ; |
3088 | } |
3089 | |
3090 | DispStream(s, message); |
3091 | } |
3092 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
3093 | } |
3094 | |
3095 | |
3096 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_inflateReset)static void XS_Compress__Raw__Zlib__inflateScanStream_inflateReset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3097 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_inflateReset)static void XS_Compress__Raw__Zlib__inflateScanStream_inflateReset ( CV* cv __attribute__((unused))) |
3098 | { |
3099 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3100 | if (items != 1) |
3101 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3102 | { |
3103 | Compress__Raw__Zlib__inflateScanStream s; |
3104 | DualType RETVAL; |
3105 | |
3106 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3107 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3108 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3109 | } |
3110 | else |
3111 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3112 | "Compress::Raw::Zlib::inflateScanStream::inflateReset", |
3113 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3114 | ; |
3115 | #line 1863 "Zlib.xs" |
3116 | RETVAL = inflateReset(&(s->stream)) ; |
3117 | if (RETVAL == Z_OK0) { |
3118 | PostInitStream(s, s->flags, s->bufsize, s->WindowBits) ; |
3119 | } |
3120 | #line 3121 "Zlib.c" |
3121 | { |
3122 | SV * RETVALSV; |
3123 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
3124 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
3125 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
3126 | } |
3127 | } |
3128 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3129 | } |
3130 | |
3131 | |
3132 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_scan)static void XS_Compress__Raw__Zlib__inflateScanStream_scan( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3133 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_scan)static void XS_Compress__Raw__Zlib__inflateScanStream_scan( CV * cv __attribute__((unused))) |
3134 | { |
3135 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3136 | if (items < 2 || items > 4) |
3137 | croak_xs_usagePerl_croak_xs_usage(cv, "s, buf, out=NULL, eof=FALSE"); |
3138 | { |
3139 | Compress__Raw__Zlib__inflateScanStream s; |
3140 | SV * buf = ST(1)PL_stack_base[ax + (1)] |
3141 | ; |
3142 | SV * out; |
3143 | bool_Bool eof; |
3144 | bool_Bool eof_mode = FALSE(0); |
3145 | int start_len; |
3146 | DualType RETVAL; |
3147 | |
3148 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3149 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3150 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3151 | } |
3152 | else |
3153 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3154 | "Compress::Raw::Zlib::inflateScanStream::scan", |
3155 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3156 | ; |
3157 | |
3158 | if (items < 3) |
3159 | out = NULL((void*)0); |
3160 | else { |
3161 | out = ST(2)PL_stack_base[ax + (2)] |
Value stored to 'out' is never read | |
3162 | ; |
3163 | } |
3164 | |
3165 | if (items < 4) |
3166 | eof = FALSE(0); |
3167 | else { |
3168 | eof = (bool_Bool)SvTRUE(ST(3))Perl_SvTRUE( PL_stack_base[ax + (3)]) |
3169 | ; |
3170 | } |
3171 | #line 1879 "Zlib.xs" |
3172 | PERL_UNUSED_VAR(out)((void)sizeof(out)); |
3173 | PERL_UNUSED_VAR(eof)((void)sizeof(eof)); |
3174 | /* If the input buffer is a reference, dereference it */ |
3175 | #ifndef MAGIC_APPEND |
3176 | buf = buf; |
3177 | croakPerl_croak("scan needs zlib 1.2.1 or better"); |
3178 | #else |
3179 | buf = deRef(buf, "inflateScan") ; |
3180 | #ifdef UTF8_AVAILABLE |
3181 | if (DO_UTF8(buf)(((buf)->sv_flags & 0x20000000) && !__builtin_expect (((((PL_curcop)->cop_hints + 0) & 0x00000008) ? (_Bool )1 : (_Bool)0),(0))) && !sv_utf8_downgrade(buf, 1)Perl_sv_utf8_downgrade_flags( buf,1,2)) |
3182 | croakPerl_croak("Wide character in Compress::Raw::Zlib::InflateScan::scan input parameter"); |
3183 | #endif |
3184 | /* initialise the input buffer */ |
3185 | s->stream.next_in = (Bytef*)SvPV_force_nomg_nolen(buf)((((buf)->sv_flags & (0x00000400|0x00000100|0x00000200 |0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000 |0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((buf) ->sv_u.svu_pv) : Perl_sv_pvn_force_flags( buf,0,0)) ; |
3186 | s->stream.avail_in = SvCUR(buf)((XPV*) (buf)->sv_any)->xpv_cur ; |
3187 | start_len = s->stream.avail_in ; |
3188 | s->bytesInflated = 0 ; |
3189 | do |
3190 | { |
3191 | if (s->stream.avail_in == 0) { |
3192 | RETVAL = Z_OK0 ; |
3193 | break ; |
3194 | } |
3195 | |
3196 | /* set up output to next available section of sliding window */ |
3197 | s->stream.avail_out = WINDOW_SIZE32768U - s->window_have; |
3198 | s->stream.next_out = s->window + s->window_have; |
3199 | |
3200 | /* DispStream(s, "before inflate\n"); */ |
3201 | |
3202 | /* inflate and check for errors */ |
3203 | RETVAL = inflate(&(s->stream), Z_BLOCK5); |
3204 | |
3205 | if (start_len > 1 && ! eof_mode) |
3206 | s->window_lastByte = *(s->stream.next_in - 1 ) ; |
3207 | |
3208 | if (RETVAL == Z_STREAM_ERROR(-2) || RETVAL == Z_MEM_ERROR(-4) || |
3209 | RETVAL == Z_DATA_ERROR(-3) ) |
3210 | break ; |
3211 | |
3212 | if (s->flags & FLAG_CRC322 ) |
3213 | s->crc32 = crc32(s->crc32, s->window + s->window_have, |
3214 | WINDOW_SIZE32768U - s->window_have - s->stream.avail_out); |
3215 | |
3216 | if (s->flags & FLAG_ADLER324) |
3217 | s->adler32 = adler32(s->adler32, s->window + s->window_have, |
3218 | WINDOW_SIZE32768U - s->window_have - s->stream.avail_out); |
3219 | |
3220 | s->uncompressedBytes = |
3221 | s->bytesInflated += WINDOW_SIZE32768U - s->window_have - s->stream.avail_out; |
3222 | |
3223 | if (s->stream.avail_out) |
3224 | s->window_have = WINDOW_SIZE32768U - s->stream.avail_out; |
3225 | else { |
3226 | s->window_have = 0; |
3227 | s->window_full = 1; |
3228 | } |
3229 | |
3230 | /* process end of block */ |
3231 | if (s->stream.data_type & 128) { |
3232 | if (s->stream.data_type & 64) { |
3233 | s->window_left = s->stream.data_type & 0x1f; |
3234 | } |
3235 | else { |
3236 | s->window_lastbit = s->stream.data_type & 0x1f; |
3237 | s->lastBlockOffset = s->stream.total_in; |
3238 | } |
3239 | } |
3240 | |
3241 | } while (RETVAL != Z_STREAM_END1); |
3242 | |
3243 | s->last_error = RETVAL ; |
3244 | s->window_lastoff = s->stream.total_in ; |
3245 | s->compressedBytes += SvCUR(buf)((XPV*) (buf)->sv_any)->xpv_cur - s->stream.avail_in ; |
3246 | |
3247 | if (RETVAL == Z_STREAM_END1) |
3248 | { |
3249 | s->matchedEndBlock = 1 ; |
3250 | |
3251 | /* save the location of the end of the compressed data */ |
3252 | s->window_end = SvCUR(buf)((XPV*) (buf)->sv_any)->xpv_cur - s->stream.avail_in - 1 ; |
3253 | s->window_endOffset = s->stream.total_in ; |
3254 | if (s->window_left) |
3255 | { |
3256 | -- s->window_endOffset ; |
3257 | } |
3258 | |
3259 | /* if window wrapped, build dictionary from window by rotating */ |
3260 | if (s->window_full) { |
3261 | rotate(s->window, WINDOW_SIZE32768U, s->window_have); |
3262 | s->window_have = WINDOW_SIZE32768U; |
3263 | } |
3264 | |
3265 | /* if (s->flags & FLAG_CONSUME_INPUT) { */ |
3266 | if (1) { |
3267 | unsigned in = s->stream.avail_in ; |
3268 | SvCUR_set(buf, in)do { ((void)0); ((void)0); ((void)0); (((XPV*) (buf)->sv_any )->xpv_cur = (in)); } while (0) ; |
3269 | if (in) |
3270 | Move(s->stream.next_in, SvPVX(buf), in, char)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(in) || sizeof(char) > ((size_t)1 << 8*(sizeof(size_t) - sizeof(in)))) ? (size_t)(in) : ((size_t)-1)/sizeof(char)) > ((size_t)-1)/sizeof(char))) ? (_Bool)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), ((void)0), ((void)0), (void)memmove ((char*)(((buf)->sv_u.svu_pv)),(const char*)(s->stream. next_in), (in) * sizeof(char))) ; |
3271 | *SvEND(buf)((buf)->sv_u.svu_pv + ((XPV*)(buf)->sv_any)->xpv_cur ) = '\0'; |
3272 | SvSETMAGIC(buf)do { if (__builtin_expect(((((buf)->sv_flags & 0x00400000 )) ? (_Bool)1 : (_Bool)0),(0))) Perl_mg_set( buf); } while (0 ); |
3273 | } |
3274 | } |
3275 | #endif |
3276 | #line 3277 "Zlib.c" |
3277 | { |
3278 | SV * RETVALSV; |
3279 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
3280 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
3281 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
3282 | } |
3283 | } |
3284 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3285 | } |
3286 | |
3287 | |
3288 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3289 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset ( CV* cv __attribute__((unused))) |
3290 | { |
3291 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3292 | if (items != 1) |
3293 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3294 | { |
3295 | Compress__Raw__Zlib__inflateScanStream s; |
3296 | uLong RETVAL; |
3297 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3298 | |
3299 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3300 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3301 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3302 | } |
3303 | else |
3304 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3305 | "Compress::Raw::Zlib::inflateScanStream::getEndOffset", |
3306 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3307 | ; |
3308 | #line 1991 "Zlib.xs" |
3309 | #ifndef MAGIC_APPEND |
3310 | croakPerl_croak("getEndOffset needs zlib 1.2.1 or better"); |
3311 | #else |
3312 | RETVAL = s->window_endOffset; |
3313 | #endif |
3314 | #line 3315 "Zlib.c" |
3315 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3316 | } |
3317 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3318 | } |
3319 | |
3320 | |
3321 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_inflateCount)static void XS_Compress__Raw__Zlib__inflateScanStream_inflateCount ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3322 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_inflateCount)static void XS_Compress__Raw__Zlib__inflateScanStream_inflateCount ( CV* cv __attribute__((unused))) |
3323 | { |
3324 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3325 | if (items != 1) |
3326 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3327 | { |
3328 | Compress__Raw__Zlib__inflateScanStream s; |
3329 | uLong RETVAL; |
3330 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3331 | |
3332 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3333 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3334 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3335 | } |
3336 | else |
3337 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3338 | "Compress::Raw::Zlib::inflateScanStream::inflateCount", |
3339 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3340 | ; |
3341 | #line 2003 "Zlib.xs" |
3342 | #ifndef MAGIC_APPEND |
3343 | croakPerl_croak("inflateCount needs zlib 1.2.1 or better"); |
3344 | #else |
3345 | RETVAL = s->bytesInflated; |
3346 | #endif |
3347 | #line 3348 "Zlib.c" |
3348 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3349 | } |
3350 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3351 | } |
3352 | |
3353 | |
3354 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes)static void XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3355 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes)static void XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes ( CV* cv __attribute__((unused))) |
3356 | { |
3357 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3358 | if (items != 1) |
3359 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3360 | { |
3361 | Compress__Raw__Zlib__inflateScanStream s; |
3362 | uLong RETVAL; |
3363 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3364 | |
3365 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3366 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3367 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3368 | } |
3369 | else |
3370 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3371 | "Compress::Raw::Zlib::inflateScanStream::compressedBytes", |
3372 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3373 | ; |
3374 | #line 2015 "Zlib.xs" |
3375 | RETVAL = s->compressedBytes; |
3376 | #line 3377 "Zlib.c" |
3377 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3378 | } |
3379 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3380 | } |
3381 | |
3382 | |
3383 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3384 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes)static void XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes ( CV* cv __attribute__((unused))) |
3385 | { |
3386 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3387 | if (items != 1) |
3388 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3389 | { |
3390 | Compress__Raw__Zlib__inflateScanStream s; |
3391 | uLong RETVAL; |
3392 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3393 | |
3394 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3395 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3396 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3397 | } |
3398 | else |
3399 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3400 | "Compress::Raw::Zlib::inflateScanStream::uncompressedBytes", |
3401 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3402 | ; |
3403 | #line 2023 "Zlib.xs" |
3404 | RETVAL = s->uncompressedBytes; |
3405 | #line 3406 "Zlib.c" |
3406 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3407 | } |
3408 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3409 | } |
3410 | |
3411 | |
3412 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3413 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset ( CV* cv __attribute__((unused))) |
3414 | { |
3415 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3416 | if (items != 1) |
3417 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3418 | { |
3419 | Compress__Raw__Zlib__inflateScanStream s; |
3420 | uLong RETVAL; |
3421 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3422 | |
3423 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3424 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3425 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3426 | } |
3427 | else |
3428 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3429 | "Compress::Raw::Zlib::inflateScanStream::getLastBlockOffset", |
3430 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3431 | ; |
3432 | #line 2032 "Zlib.xs" |
3433 | #ifndef MAGIC_APPEND |
3434 | croakPerl_croak("getLastBlockOffset needs zlib 1.2.1 or better"); |
3435 | #else |
3436 | RETVAL = s->lastBlockOffset - (s->window_lastbit != 0); |
3437 | #endif |
3438 | #line 3439 "Zlib.c" |
3439 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3440 | } |
3441 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3442 | } |
3443 | |
3444 | |
3445 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3446 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset)static void XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset ( CV* cv __attribute__((unused))) |
3447 | { |
3448 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3449 | if (items != 1) |
3450 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3451 | { |
3452 | Compress__Raw__Zlib__inflateScanStream s; |
3453 | uLong RETVAL; |
3454 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3455 | |
3456 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3457 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3458 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3459 | } |
3460 | else |
3461 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3462 | "Compress::Raw::Zlib::inflateScanStream::getLastBufferOffset", |
3463 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3464 | ; |
3465 | #line 2044 "Zlib.xs" |
3466 | #ifndef MAGIC_APPEND |
3467 | croakPerl_croak("getLastBufferOffset needs zlib 1.2.1 or better"); |
3468 | #else |
3469 | RETVAL = s->window_lastoff; |
3470 | #endif |
3471 | #line 3472 "Zlib.c" |
3472 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3473 | } |
3474 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3475 | } |
3476 | |
3477 | |
3478 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte)static void XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3479 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte)static void XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte ( CV* cv __attribute__((unused))) |
3480 | { |
3481 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3482 | if (items != 2) |
3483 | croak_xs_usagePerl_croak_xs_usage(cv, "s, byte"); |
3484 | { |
3485 | Compress__Raw__Zlib__inflateScanStream s; |
3486 | unsigned char* byte; |
3487 | |
3488 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3489 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3490 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3491 | } |
3492 | else |
3493 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3494 | "Compress::Raw::Zlib::inflateScanStream::resetLastBlockByte", |
3495 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3496 | ; |
3497 | |
3498 | if (SvOK(ST(1))((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00000200 |0x00000400|0x00000800| 0x00001000|0x00002000|0x00004000|0x00008000 ))) |
3499 | byte = (unsigned char *)SvPVbyte_nolen(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000400|0x20000000 |0x00200000)) == 0x00000400) ? ((PL_stack_base[ax + (1)])-> sv_u.svu_pv) : Perl_sv_2pvbyte_flags( PL_stack_base[ax + (1)] ,0,2)); |
3500 | else |
3501 | byte = NULL((void*)0) |
3502 | ; |
3503 | #line 2057 "Zlib.xs" |
3504 | #ifndef MAGIC_APPEND |
3505 | croakPerl_croak("resetLastBlockByte needs zlib 1.2.1 or better"); |
3506 | #else |
3507 | if (byte != NULL((void*)0)) |
3508 | *byte = *byte ^ (1 << ((8 - s->window_lastbit) & 7)); |
3509 | #endif |
3510 | #line 3511 "Zlib.c" |
3511 | } |
3512 | XSRETURN_EMPTYdo { do { const IV tmpXSoff = (0); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
3513 | } |
3514 | |
3515 | |
3516 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream)static void XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3517 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream)static void XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream ( CV* cv __attribute__((unused))) |
3518 | { |
3519 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3520 | if (items != 8) |
3521 | croak_xs_usagePerl_croak_xs_usage(cv, "inf_s, flags, level, method, windowBits, memLevel, strategy, bufsize"); |
3522 | PERL_UNUSED_VAR(ax)((void)sizeof(ax)); /* -Wall */ |
3523 | SPsp -= items; |
3524 | { |
3525 | Compress__Raw__Zlib__inflateScanStream inf_s; |
3526 | int flags = (int)SvIV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (1)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 1)],2)) |
3527 | ; |
3528 | int level = (int)SvIV(ST(2))((((PL_stack_base[ax + (2)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (2)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 2)],2)) |
3529 | ; |
3530 | int method = (int)SvIV(ST(3))((((PL_stack_base[ax + (3)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (3)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 3)],2)) |
3531 | ; |
3532 | int windowBits = (int)SvIV(ST(4))((((PL_stack_base[ax + (4)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (4)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 4)],2)) |
3533 | ; |
3534 | int memLevel = (int)SvIV(ST(5))((((PL_stack_base[ax + (5)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (5)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 5)],2)) |
3535 | ; |
3536 | int strategy = (int)SvIV(ST(6))((((PL_stack_base[ax + (6)])->sv_flags & (0x00000100|0x00200000 )) == 0x00000100) ? ((XPVIV*) (PL_stack_base[ax + (6)])->sv_any )->xiv_u.xivu_iv : Perl_sv_2iv_flags( PL_stack_base[ax + ( 6)],2)) |
3537 | ; |
3538 | uLong bufsize = (unsigned long)SvUV(ST(7))((((PL_stack_base[ax + (7)])->sv_flags & (0x00000100|0x80000000 |0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base [ax + (7)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags ( PL_stack_base[ax + (7)],2)) |
3539 | ; |
3540 | |
3541 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3542 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3543 | inf_s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3544 | } |
3545 | else |
3546 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3547 | "Compress::Raw::Zlib::inflateScanStream::_createDeflateStream", |
3548 | "inf_s", "Compress::Raw::Zlib::inflateScanStream") |
3549 | ; |
3550 | #line 2076 "Zlib.xs" |
3551 | { |
3552 | #ifndef MAGIC_APPEND |
3553 | flags = flags; |
3554 | level = level ; |
3555 | method = method; |
3556 | windowBits = windowBits; |
3557 | memLevel = memLevel; |
3558 | strategy = strategy; |
3559 | bufsize= bufsize; |
3560 | croakPerl_croak("_createDeflateStream needs zlib 1.2.1 or better"); |
3561 | #else |
3562 | int err ; |
3563 | deflateStream s ; |
3564 | |
3565 | if (trace0) |
3566 | warnPerl_warn("in _createDeflateStream(level=%d, method=%d, windowBits=%d, memLevel=%d, strategy=%d, bufsize=%lu\n", |
3567 | level, method, windowBits, memLevel, strategy, bufsize) ; |
3568 | if ((s = InitStream() )) { |
3569 | |
3570 | s->Level = level; |
3571 | s->Method = method; |
3572 | s->WindowBits = windowBits; |
3573 | s->MemLevel = memLevel; |
3574 | s->Strategy = strategy; |
3575 | |
3576 | err = deflateInit2(&(s->stream), level,deflateInit2_((&(s->stream)),(level),(method),(windowBits ),(memLevel), (strategy), "1.2.11", (int)sizeof(z_stream)) |
3577 | method, windowBits, memLevel, strategy)deflateInit2_((&(s->stream)),(level),(method),(windowBits ),(memLevel), (strategy), "1.2.11", (int)sizeof(z_stream)); |
3578 | |
3579 | if (err == Z_OK0) { |
3580 | err = deflateSetDictionary(&(s->stream), inf_s->window, inf_s->window_have); |
3581 | s->dict_adler = s->stream.adler ; |
3582 | } |
3583 | |
3584 | if (err != Z_OK0) { |
3585 | Safefree(s)Perl_safesysfree(((void *)(s))) ; |
3586 | s = NULL((void*)0) ; |
3587 | } |
3588 | else { |
3589 | PostInitStream(s, flags, bufsize, windowBits) ; |
3590 | s->crc32 = inf_s->crc32; |
3591 | s->adler32 = inf_s->adler32; |
3592 | s->stream.adler = inf_s->stream.adler ; |
3593 | /* s->stream.total_out = inf_s->bytesInflated ; */ |
3594 | s->stream.total_in = inf_s->stream.total_out ; |
3595 | if (inf_s->window_left) { |
3596 | /* printf("** window_left %d, window_lastByte %d\n", inf_s->window_left, inf_s->window_lastByte); */ |
3597 | deflatePrime(&(s->stream), 8 - inf_s->window_left, inf_s->window_lastByte); |
3598 | } |
3599 | } |
3600 | } |
3601 | else |
3602 | err = Z_MEM_ERROR(-4) ; |
3603 | |
3604 | XPUSHs(sv_setref_pv(sv_newmortal(),do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (Perl_sv_setref_pv( Perl_sv_newmortal(),"Compress::Raw::Zlib::deflateStream" ,(void*)s)); } while (0) |
3605 | "Compress::Raw::Zlib::deflateStream", (void*)s))do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (Perl_sv_setref_pv( Perl_sv_newmortal(),"Compress::Raw::Zlib::deflateStream" ,(void*)s)); } while (0); |
3606 | if (GIMME(PL_op->op_flags & 3 ? ((PL_op->op_flags & 3) == 3 ? 3 : 2) : Perl_dowantarray()) == G_ARRAY3) { |
3607 | SV * sv = sv_2mortal(newSViv(err))Perl_sv_2mortal( Perl_newSViv( err)) ; |
3608 | setDUALstatus(sv, err)Perl_sv_setnv( sv,(double)err) ; Perl_sv_setpv( sv,((err) ? GetErrorString (err) : "")) ; ( (sv)->sv_flags |= (0x00000200|0x00002000) );; |
3609 | XPUSHs(sv)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max - (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow ( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t) (1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); * ++sp = (sv); } while (0) ; |
3610 | } |
3611 | #endif |
3612 | } |
3613 | #line 3614 "Zlib.c" |
3614 | PUTBACKPL_stack_sp = sp; |
3615 | return; |
3616 | } |
3617 | } |
3618 | |
3619 | |
3620 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_status)static void XS_Compress__Raw__Zlib__inflateScanStream_status( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3621 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_status)static void XS_Compress__Raw__Zlib__inflateScanStream_status( CV* cv __attribute__((unused))) |
3622 | { |
3623 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3624 | if (items != 1) |
3625 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3626 | { |
3627 | Compress__Raw__Zlib__inflateScanStream s; |
3628 | DualType RETVAL; |
3629 | |
3630 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3631 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3632 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3633 | } |
3634 | else |
3635 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3636 | "Compress::Raw::Zlib::inflateScanStream::status", |
3637 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3638 | ; |
3639 | #line 2143 "Zlib.xs" |
3640 | RETVAL = s->last_error ; |
3641 | #line 3642 "Zlib.c" |
3642 | { |
3643 | SV * RETVALSV; |
3644 | RETVALSV = sv_newmortal()Perl_sv_newmortal(); |
3645 | setDUALstatus(RETVALSV, RETVAL)Perl_sv_setnv( RETVALSV,(double)RETVAL) ; Perl_sv_setpv( RETVALSV ,((RETVAL) ? GetErrorString(RETVAL) : "")) ; ( (RETVALSV)-> sv_flags |= (0x00000200|0x00002000)); ; |
3646 | ST(0)PL_stack_base[ax + (0)] = RETVALSV; |
3647 | } |
3648 | } |
3649 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3650 | } |
3651 | |
3652 | |
3653 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_crc32)static void XS_Compress__Raw__Zlib__inflateScanStream_crc32( CV * cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3654 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_crc32)static void XS_Compress__Raw__Zlib__inflateScanStream_crc32( CV * cv __attribute__((unused))) |
3655 | { |
3656 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3657 | if (items != 1) |
3658 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3659 | { |
3660 | Compress__Raw__Zlib__inflateScanStream s; |
3661 | uLong RETVAL; |
3662 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3663 | |
3664 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3665 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3666 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3667 | } |
3668 | else |
3669 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3670 | "Compress::Raw::Zlib::inflateScanStream::crc32", |
3671 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3672 | ; |
3673 | #line 2151 "Zlib.xs" |
3674 | RETVAL = s->crc32 ; |
3675 | #line 3676 "Zlib.c" |
3676 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3677 | } |
3678 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3679 | } |
3680 | |
3681 | |
3682 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_adler32)static void XS_Compress__Raw__Zlib__inflateScanStream_adler32 ( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */ |
3683 | XS_EUPXS(XS_Compress__Raw__Zlib__inflateScanStream_adler32)static void XS_Compress__Raw__Zlib__inflateScanStream_adler32 ( CV* cv __attribute__((unused))) |
3684 | { |
3685 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3686 | if (items != 1) |
3687 | croak_xs_usagePerl_croak_xs_usage(cv, "s"); |
3688 | { |
3689 | Compress__Raw__Zlib__inflateScanStream s; |
3690 | uLong RETVAL; |
3691 | dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad [PL_op->op_targ]) : Perl_sv_newmortal()); |
3692 | |
3693 | if (SvROK(ST(0))((PL_stack_base[ax + (0)])->sv_flags & 0x00000800) && sv_derived_from(ST(0), "Compress::Raw::Zlib::inflateScanStream")Perl_sv_derived_from( PL_stack_base[ax + (0)],"Compress::Raw::Zlib::inflateScanStream" )) { |
3694 | IV tmp = SvIV((SV*)SvRV(ST(0)))(((((SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_flags & (0x00000100|0x00200000)) == 0x00000100) ? ((XPVIV*) (( SV*)((PL_stack_base[ax + (0)])->sv_u.svu_rv))->sv_any)-> xiv_u.xivu_iv : Perl_sv_2iv_flags( (SV*)((PL_stack_base[ax + ( 0)])->sv_u.svu_rv),2)); |
3695 | s = INT2PTR(Compress__Raw__Zlib__inflateScanStream,tmp)(Compress__Raw__Zlib__inflateScanStream)(tmp); |
3696 | } |
3697 | else |
3698 | Perl_croak_nocontextPerl_croak("%s: %s is not of type %s", |
3699 | "Compress::Raw::Zlib::inflateScanStream::adler32", |
3700 | "s", "Compress::Raw::Zlib::inflateScanStream") |
3701 | ; |
3702 | #line 2160 "Zlib.xs" |
3703 | RETVAL = s->adler32 ; |
3704 | #line 3705 "Zlib.c" |
3705 | XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((IV)RETVAL)do { do { UV TARGu_uv = (IV)RETVAL; if (__builtin_expect((((( (targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800 |0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) & (1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool) 0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= ( UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1)) ) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000) ; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ ,TARGu_uv); } while (0); (*++sp = (targ)); } while (0); |
3706 | } |
3707 | XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); |
3708 | } |
3709 | |
3710 | #ifdef __cplusplus |
3711 | extern "C" |
3712 | #endif |
3713 | XS_EXTERNAL(boot_Compress__Raw__Zlib)void boot_Compress__Raw__Zlib( CV* cv __attribute__((unused)) ); /* prototype to pass -Wmissing-prototypes */ |
3714 | XS_EXTERNAL(boot_Compress__Raw__Zlib)void boot_Compress__Raw__Zlib( CV* cv __attribute__((unused)) ) |
3715 | { |
3716 | #if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5)) |
3717 | dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base + ax++; I32 items = (I32)(sp - mark); |
3718 | #else |
3719 | dVARstruct Perl___notused_struct; dXSBOOTARGSXSAPIVERCHKI32 ax = Perl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter )) << 16) | ((sizeof("" "2.093" "")-1) > 0xFF ? (Perl_croak ("panic: handshake overflow"), 0xFF) : (sizeof("" "2.093" "") -1) << 8) | ((((1)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | (( ((1)) ? (_Bool)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v" "5" "." "32" "." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow" ), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1))) , cv, "Zlib.c", "v" "5" "." "32" "." "0", "2.093"); SV **mark = PL_stack_base + ax; SV **sp = PL_stack_sp; I32 items = (I32 )(sp - mark); |
3720 | #endif |
3721 | #if (PERL_REVISION5 == 5 && PERL_VERSION32 < 9) |
3722 | char* file = __FILE__"Zlib.c"; |
3723 | #else |
3724 | const char* file = __FILE__"Zlib.c"; |
3725 | #endif |
3726 | |
3727 | PERL_UNUSED_VAR(file)((void)sizeof(file)); |
3728 | |
3729 | PERL_UNUSED_VAR(cv)((void)sizeof(cv)); /* -W */ |
3730 | PERL_UNUSED_VAR(items)((void)sizeof(items)); /* -W */ |
3731 | #if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5)) |
3732 | XS_VERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter)) << 16) | ((sizeof("" "2.093" "")-1) > 0xFF ? (Perl_croak ("panic: handshake overflow"), 0xFF) : (sizeof("" "2.093" "") -1) << 8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | (( ((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow" ), 0x0000001F) : (sizeof("" "" "")-1))), cv, "Zlib.c", items, ax, "2.093"); |
3733 | # ifdef XS_APIVERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter)) << 16) | ((sizeof("" "" "")-1) > 0xFF ? (Perl_croak ("panic: handshake overflow"), 0xFF) : (sizeof("" "" "")-1) << 8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | (((( 0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((0)) ? (_Bool )1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v" "5" "." "32" "." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow" ), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1))) , cv, "Zlib.c", items, ax, "v" "5" "." "32" "." "0") |
3734 | XS_APIVERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter)) << 16) | ((sizeof("" "" "")-1) > 0xFF ? (Perl_croak ("panic: handshake overflow"), 0xFF) : (sizeof("" "" "")-1) << 8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | (((( 0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((0)) ? (_Bool )1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v" "5" "." "32" "." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow" ), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1))) , cv, "Zlib.c", items, ax, "v" "5" "." "32" "." "0"); |
3735 | # endif |
3736 | #endif |
3737 | |
3738 | newXS_deffile("Compress::Raw::Zlib::constant", XS_Compress__Raw__Zlib_constant)Perl_newXS_deffile( "Compress::Raw::Zlib::constant",XS_Compress__Raw__Zlib_constant ); |
3739 | newXS_deffile("Compress::Raw::Zlib::zlib_version", XS_Compress__Raw__Zlib_zlib_version)Perl_newXS_deffile( "Compress::Raw::Zlib::zlib_version",XS_Compress__Raw__Zlib_zlib_version ); |
3740 | newXS_deffile("Compress::Raw::Zlib::ZLIB_VERNUM", XS_Compress__Raw__Zlib_ZLIB_VERNUM)Perl_newXS_deffile( "Compress::Raw::Zlib::ZLIB_VERNUM",XS_Compress__Raw__Zlib_ZLIB_VERNUM ); |
3741 | newXS_deffile("Compress::Raw::Zlib::zlibCompileFlags", XS_Compress__Raw__Zlib_zlibCompileFlags)Perl_newXS_deffile( "Compress::Raw::Zlib::zlibCompileFlags",XS_Compress__Raw__Zlib_zlibCompileFlags ); |
3742 | newXS_deffile("Compress::Raw::Zlib::adler32", XS_Compress__Raw__Zlib_adler32)Perl_newXS_deffile( "Compress::Raw::Zlib::adler32",XS_Compress__Raw__Zlib_adler32 ); |
3743 | newXS_deffile("Compress::Raw::Zlib::crc32", XS_Compress__Raw__Zlib_crc32)Perl_newXS_deffile( "Compress::Raw::Zlib::crc32",XS_Compress__Raw__Zlib_crc32 ); |
3744 | newXS_deffile("Compress::Raw::Zlib::crc32_combine", XS_Compress__Raw__Zlib_crc32_combine)Perl_newXS_deffile( "Compress::Raw::Zlib::crc32_combine",XS_Compress__Raw__Zlib_crc32_combine ); |
3745 | newXS_deffile("Compress::Raw::Zlib::adler32_combine", XS_Compress__Raw__Zlib_adler32_combine)Perl_newXS_deffile( "Compress::Raw::Zlib::adler32_combine",XS_Compress__Raw__Zlib_adler32_combine ); |
3746 | newXS_deffile("Compress::Raw::Zlib::_deflateInit", XS_Compress__Raw__Zlib__deflateInit)Perl_newXS_deffile( "Compress::Raw::Zlib::_deflateInit",XS_Compress__Raw__Zlib__deflateInit ); |
3747 | cv = newXS_deffile("Compress::Raw::Zlib::_inflateInit", XS_Compress__Raw__Zlib__inflateInit)Perl_newXS_deffile( "Compress::Raw::Zlib::_inflateInit",XS_Compress__Raw__Zlib__inflateInit ); |
3748 | XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u .xcv_xsubany.any_i32 = 0; |
3749 | cv = newXS_deffile("Compress::Raw::Zlib::_inflateScanInit", XS_Compress__Raw__Zlib__inflateInit)Perl_newXS_deffile( "Compress::Raw::Zlib::_inflateScanInit",XS_Compress__Raw__Zlib__inflateInit ); |
3750 | XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u .xcv_xsubany.any_i32 = 1; |
3751 | newXS_deffile("Compress::Raw::Zlib::deflateStream::DispStream", XS_Compress__Raw__Zlib__deflateStream_DispStream)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::DispStream" ,XS_Compress__Raw__Zlib__deflateStream_DispStream); |
3752 | newXS_deffile("Compress::Raw::Zlib::deflateStream::deflateReset", XS_Compress__Raw__Zlib__deflateStream_deflateReset)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::deflateReset" ,XS_Compress__Raw__Zlib__deflateStream_deflateReset); |
3753 | newXS_deffile("Compress::Raw::Zlib::deflateStream::deflate", XS_Compress__Raw__Zlib__deflateStream_deflate)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::deflate" ,XS_Compress__Raw__Zlib__deflateStream_deflate); |
3754 | newXS_deffile("Compress::Raw::Zlib::deflateStream::DESTROY", XS_Compress__Raw__Zlib__deflateStream_DESTROY)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::DESTROY" ,XS_Compress__Raw__Zlib__deflateStream_DESTROY); |
3755 | newXS_deffile("Compress::Raw::Zlib::deflateStream::flush", XS_Compress__Raw__Zlib__deflateStream_flush)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::flush" ,XS_Compress__Raw__Zlib__deflateStream_flush); |
3756 | newXS_deffile("Compress::Raw::Zlib::deflateStream::_deflateParams", XS_Compress__Raw__Zlib__deflateStream__deflateParams)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::_deflateParams" ,XS_Compress__Raw__Zlib__deflateStream__deflateParams); |
3757 | newXS_deffile("Compress::Raw::Zlib::deflateStream::get_Level", XS_Compress__Raw__Zlib__deflateStream_get_Level)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::get_Level" ,XS_Compress__Raw__Zlib__deflateStream_get_Level); |
3758 | newXS_deffile("Compress::Raw::Zlib::deflateStream::get_Strategy", XS_Compress__Raw__Zlib__deflateStream_get_Strategy)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::get_Strategy" ,XS_Compress__Raw__Zlib__deflateStream_get_Strategy); |
3759 | newXS_deffile("Compress::Raw::Zlib::deflateStream::get_Bufsize", XS_Compress__Raw__Zlib__deflateStream_get_Bufsize)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::get_Bufsize" ,XS_Compress__Raw__Zlib__deflateStream_get_Bufsize); |
3760 | newXS_deffile("Compress::Raw::Zlib::deflateStream::status", XS_Compress__Raw__Zlib__deflateStream_status)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::status" ,XS_Compress__Raw__Zlib__deflateStream_status); |
3761 | newXS_deffile("Compress::Raw::Zlib::deflateStream::crc32", XS_Compress__Raw__Zlib__deflateStream_crc32)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::crc32" ,XS_Compress__Raw__Zlib__deflateStream_crc32); |
3762 | newXS_deffile("Compress::Raw::Zlib::deflateStream::dict_adler", XS_Compress__Raw__Zlib__deflateStream_dict_adler)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::dict_adler" ,XS_Compress__Raw__Zlib__deflateStream_dict_adler); |
3763 | newXS_deffile("Compress::Raw::Zlib::deflateStream::adler32", XS_Compress__Raw__Zlib__deflateStream_adler32)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::adler32" ,XS_Compress__Raw__Zlib__deflateStream_adler32); |
3764 | newXS_deffile("Compress::Raw::Zlib::deflateStream::compressedBytes", XS_Compress__Raw__Zlib__deflateStream_compressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::compressedBytes" ,XS_Compress__Raw__Zlib__deflateStream_compressedBytes); |
3765 | newXS_deffile("Compress::Raw::Zlib::deflateStream::uncompressedBytes", XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::uncompressedBytes" ,XS_Compress__Raw__Zlib__deflateStream_uncompressedBytes); |
3766 | newXS_deffile("Compress::Raw::Zlib::deflateStream::total_in", XS_Compress__Raw__Zlib__deflateStream_total_in)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::total_in" ,XS_Compress__Raw__Zlib__deflateStream_total_in); |
3767 | newXS_deffile("Compress::Raw::Zlib::deflateStream::total_out", XS_Compress__Raw__Zlib__deflateStream_total_out)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::total_out" ,XS_Compress__Raw__Zlib__deflateStream_total_out); |
3768 | newXS_deffile("Compress::Raw::Zlib::deflateStream::msg", XS_Compress__Raw__Zlib__deflateStream_msg)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::msg" ,XS_Compress__Raw__Zlib__deflateStream_msg); |
3769 | newXS_deffile("Compress::Raw::Zlib::deflateStream::deflateTune", XS_Compress__Raw__Zlib__deflateStream_deflateTune)Perl_newXS_deffile( "Compress::Raw::Zlib::deflateStream::deflateTune" ,XS_Compress__Raw__Zlib__deflateStream_deflateTune); |
3770 | newXS_deffile("Compress::Raw::Zlib::inflateStream::DispStream", XS_Compress__Raw__Zlib__inflateStream_DispStream)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::DispStream" ,XS_Compress__Raw__Zlib__inflateStream_DispStream); |
3771 | newXS_deffile("Compress::Raw::Zlib::inflateStream::inflateReset", XS_Compress__Raw__Zlib__inflateStream_inflateReset)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::inflateReset" ,XS_Compress__Raw__Zlib__inflateStream_inflateReset); |
3772 | newXS_deffile("Compress::Raw::Zlib::inflateStream::inflate", XS_Compress__Raw__Zlib__inflateStream_inflate)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::inflate" ,XS_Compress__Raw__Zlib__inflateStream_inflate); |
3773 | newXS_deffile("Compress::Raw::Zlib::inflateStream::inflateCount", XS_Compress__Raw__Zlib__inflateStream_inflateCount)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::inflateCount" ,XS_Compress__Raw__Zlib__inflateStream_inflateCount); |
3774 | newXS_deffile("Compress::Raw::Zlib::inflateStream::compressedBytes", XS_Compress__Raw__Zlib__inflateStream_compressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::compressedBytes" ,XS_Compress__Raw__Zlib__inflateStream_compressedBytes); |
3775 | newXS_deffile("Compress::Raw::Zlib::inflateStream::uncompressedBytes", XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::uncompressedBytes" ,XS_Compress__Raw__Zlib__inflateStream_uncompressedBytes); |
3776 | newXS_deffile("Compress::Raw::Zlib::inflateStream::inflateSync", XS_Compress__Raw__Zlib__inflateStream_inflateSync)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::inflateSync" ,XS_Compress__Raw__Zlib__inflateStream_inflateSync); |
3777 | newXS_deffile("Compress::Raw::Zlib::inflateStream::DESTROY", XS_Compress__Raw__Zlib__inflateStream_DESTROY)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::DESTROY" ,XS_Compress__Raw__Zlib__inflateStream_DESTROY); |
3778 | newXS_deffile("Compress::Raw::Zlib::inflateStream::status", XS_Compress__Raw__Zlib__inflateStream_status)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::status" ,XS_Compress__Raw__Zlib__inflateStream_status); |
3779 | newXS_deffile("Compress::Raw::Zlib::inflateStream::crc32", XS_Compress__Raw__Zlib__inflateStream_crc32)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::crc32" ,XS_Compress__Raw__Zlib__inflateStream_crc32); |
3780 | newXS_deffile("Compress::Raw::Zlib::inflateStream::dict_adler", XS_Compress__Raw__Zlib__inflateStream_dict_adler)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::dict_adler" ,XS_Compress__Raw__Zlib__inflateStream_dict_adler); |
3781 | newXS_deffile("Compress::Raw::Zlib::inflateStream::total_in", XS_Compress__Raw__Zlib__inflateStream_total_in)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::total_in" ,XS_Compress__Raw__Zlib__inflateStream_total_in); |
3782 | newXS_deffile("Compress::Raw::Zlib::inflateStream::adler32", XS_Compress__Raw__Zlib__inflateStream_adler32)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::adler32" ,XS_Compress__Raw__Zlib__inflateStream_adler32); |
3783 | newXS_deffile("Compress::Raw::Zlib::inflateStream::total_out", XS_Compress__Raw__Zlib__inflateStream_total_out)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::total_out" ,XS_Compress__Raw__Zlib__inflateStream_total_out); |
3784 | newXS_deffile("Compress::Raw::Zlib::inflateStream::msg", XS_Compress__Raw__Zlib__inflateStream_msg)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::msg" ,XS_Compress__Raw__Zlib__inflateStream_msg); |
3785 | newXS_deffile("Compress::Raw::Zlib::inflateStream::get_Bufsize", XS_Compress__Raw__Zlib__inflateStream_get_Bufsize)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::get_Bufsize" ,XS_Compress__Raw__Zlib__inflateStream_get_Bufsize); |
3786 | newXS_deffile("Compress::Raw::Zlib::inflateStream::set_Append", XS_Compress__Raw__Zlib__inflateStream_set_Append)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateStream::set_Append" ,XS_Compress__Raw__Zlib__inflateStream_set_Append); |
3787 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::DESTROY", XS_Compress__Raw__Zlib__inflateScanStream_DESTROY)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::DESTROY" ,XS_Compress__Raw__Zlib__inflateScanStream_DESTROY); |
3788 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::DispStream", XS_Compress__Raw__Zlib__inflateScanStream_DispStream)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::DispStream" ,XS_Compress__Raw__Zlib__inflateScanStream_DispStream); |
3789 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::inflateReset", XS_Compress__Raw__Zlib__inflateScanStream_inflateReset)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::inflateReset" ,XS_Compress__Raw__Zlib__inflateScanStream_inflateReset); |
3790 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::scan", XS_Compress__Raw__Zlib__inflateScanStream_scan)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::scan" ,XS_Compress__Raw__Zlib__inflateScanStream_scan); |
3791 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::getEndOffset", XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::getEndOffset" ,XS_Compress__Raw__Zlib__inflateScanStream_getEndOffset); |
3792 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::inflateCount", XS_Compress__Raw__Zlib__inflateScanStream_inflateCount)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::inflateCount" ,XS_Compress__Raw__Zlib__inflateScanStream_inflateCount); |
3793 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::compressedBytes", XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::compressedBytes" ,XS_Compress__Raw__Zlib__inflateScanStream_compressedBytes); |
3794 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::uncompressedBytes", XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::uncompressedBytes" ,XS_Compress__Raw__Zlib__inflateScanStream_uncompressedBytes); |
3795 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::getLastBlockOffset", XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::getLastBlockOffset" ,XS_Compress__Raw__Zlib__inflateScanStream_getLastBlockOffset ); |
3796 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::getLastBufferOffset", XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::getLastBufferOffset" ,XS_Compress__Raw__Zlib__inflateScanStream_getLastBufferOffset ); |
3797 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::resetLastBlockByte", XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::resetLastBlockByte" ,XS_Compress__Raw__Zlib__inflateScanStream_resetLastBlockByte ); |
3798 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::_createDeflateStream", XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::_createDeflateStream" ,XS_Compress__Raw__Zlib__inflateScanStream__createDeflateStream ); |
3799 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::status", XS_Compress__Raw__Zlib__inflateScanStream_status)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::status" ,XS_Compress__Raw__Zlib__inflateScanStream_status); |
3800 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::crc32", XS_Compress__Raw__Zlib__inflateScanStream_crc32)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::crc32" ,XS_Compress__Raw__Zlib__inflateScanStream_crc32); |
3801 | newXS_deffile("Compress::Raw::Zlib::inflateScanStream::adler32", XS_Compress__Raw__Zlib__inflateScanStream_adler32)Perl_newXS_deffile( "Compress::Raw::Zlib::inflateScanStream::adler32" ,XS_Compress__Raw__Zlib__inflateScanStream_adler32); |
3802 | |
3803 | /* Initialisation Section */ |
3804 | |
3805 | #line 753 "Zlib.xs" |
3806 | /* Check this version of zlib is == 1 */ |
3807 | if (zlibVersion()[0] != '1') |
3808 | croakPerl_croak("Compress::Raw::Zlib needs zlib version 1.x\n") ; |
3809 | |
3810 | { |
3811 | /* Create the $os_code scalar */ |
3812 | SV * os_code_sv = perl_get_sv("Compress::Raw::Zlib::gzip_os_code", GV_ADDMULTI)Perl_get_sv( "Compress::Raw::Zlib::gzip_os_code",0x02) ; |
3813 | sv_setiv(os_code_sv, GZIP_OS_CODE)Perl_sv_setiv( os_code_sv,3) ; |
3814 | } |
3815 | |
3816 | #line 3817 "Zlib.c" |
3817 | |
3818 | /* End of Initialisation Section */ |
3819 | |
3820 | #if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5)) |
3821 | # if PERL_VERSION_GE(5, 9, 0)((5*1000000 + 32*1000 + 1) >= (5*1000000 + 9*1000 + 0)) |
3822 | if (PL_unitcheckav) |
3823 | call_list(PL_scopestack_ix, PL_unitcheckav)Perl_call_list( PL_scopestack_ix,PL_unitcheckav); |
3824 | # endif |
3825 | XSRETURN_YESdo { (PL_stack_base[ax + (0)] = &(PL_sv_immortals[0]) ); do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base + ax + (tmpXSoff - 1); return; } while (0); } while (0); |
3826 | #else |
3827 | Perl_xs_boot_epilog(aTHX_ ax); |
3828 | #endif |
3829 | } |
3830 |