w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pts_lzw.c
Go to the documentation of this file.
1 #define DUMMY \
2 set -ex; \
3 g++ -DNDEBUG=1 -O3 -ansi -pedantic \
4  -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline \
5  -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
6  -Wmissing-declarations pts_lzw.c -c; \
7 exit
8 /* pts_lzw.c -- a real, effective implementation of PostScript
9  * LanguageLevel2 and PDF /LZWEncode and /LZWDecode filters (same as the LZW
10  * compression used in TIFF raster image files)
11  *
12  * based on tif_lzw.c in libtiff-v3.4beta037 by Sam Leffler and Silicon Graphics.
13  * by pts@fazekas.hu at Sun Dec 30 15:04:19 CET 2001
14  * encoding and decoding works at Sun Dec 30 17:05:23 CET 2001
15  * modified for sam2p at Mon Mar 4 00:21:59 CET 2002
16  *
17  * Note that the LZW compression (but not uncompression) is patented by
18  * Unisys (patent number #4,558,302), so use this program at your own legal
19  * risk!
20  *
21  * Predictors and PostScript LanguageLevel3 filter options are not supported.
22  *
23  * Test: linux-2.2.8.tar.gz
24  * -- uncompressed: 58 388 480 bytes
25  * -- LZWEncode (lzw_codec.c): 26 518 397 bytes (uncompression OK)
26  * -- FlateEncode (almost gzip): 13 808 890 bytes (uncompression: zcat)
27  *
28  * This program is free software; you can redistribute it and/or modify
29  * it under the terms of the GNU General Public License as published by
30  * the Free Software Foundation; either version 2 of the License, or
31  * (at your option) any later version.
32  *
33  * This program is distributed in the hope that it will be useful,
34  * but WITHOUT ANY WARRANTY; without even the implied warranty of
35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36  * GNU General Public License for more details.
37  *
38  * You should have received a copy of the GNU General Public License
39  * along with this program; if not, write to the Free Software
40  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41  */
42 /* Imp: check #ifdef _WINDOWS */
43 /* Dat: a strip is an interval of rows. Each strip -- probably except for the
44  * last -- has a same number of rows. Strips are useful for TIFF writers
45  * to better organize data in memory or disk.
46  */
47 
48 #ifdef __GNUC__
49 #ifndef __clang__
50 #pragma implementation
51 #endif
52 #endif
53 
54 #if _MSC_VER > 1000
55 # undef __PROTOTYPES__
56 # define __PROTOTYPES__ 1
57 # pragma warning(disable: 4127) /* conditional expression is constant */
58 # pragma warning(disable: 4244) /* =' : conversion from 'int ' to 'unsigned char ', possible loss of data */
59 #endif
60 
61 
62 /* Original: /d1/sam/tiff/libtiff/RCS/tif_lzw.c,v 1.73 1997/08/29 21:45:54 sam Exp */
63 
64 /*
65  * Copyright (c) 1988-1997 Sam Leffler
66  * Copyright (c) 1991-1997 Silicon Graphics, Inc.
67  *
68  * Permission to use, copy, modify, distribute, and sell this software and
69  * its documentation for any purpose is hereby granted without fee, provided
70  * that (i) the above copyright notices and this permission notice appear in
71  * all copies of the software and related documentation, and (ii) the names of
72  * Sam Leffler and Silicon Graphics may not be used in any advertising or
73  * publicity relating to the software without the specific, prior written
74  * permission of Sam Leffler and Silicon Graphics.
75  *
76  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
77  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
78  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
79  *
80  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
81  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
82  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
83  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
84  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
85  * OF THIS SOFTWARE.
86  */
87 
88 /**** pts ****/
89 #if OBJDEP
90 # warning PROVIDES: pts_lzw
91 #endif
92 #define LZW_SUPPORT 1
93 #if 0 /* conflicts with some system defs */
94 typedef unsigned short u_short;
95 typedef unsigned char u_char;
96 typedef unsigned long u_long;
97 #endif
98 #define TO_RDONLY 1
99 #define _TIFFmalloc malloc
100 #define _TIFFfree free
101 #define _TIFFmemset memset
102 #include <stdlib.h>
103 #include <string.h>
104 
105 /*
106  * ``Library-private'' definitions.
107  */
108 
109 /*
110  * TIFF I/O Library Definitions.
111  */
112 /*
113  * Tag Image File Format (TIFF)
114  *
115  * Based on Rev 6.0 from:
116  * Developer's Desk
117  * Aldus Corporation
118  * 411 First Ave. South
119  * Suite 200
120  * Seattle, WA 98104
121  * 206-622-5500
122  */
123 #define TIFF_VERSION 42
124 
125 /*
126  * NB: In the comments below,
127  * - items marked with a + are obsoleted by revision 5.0,
128  * - items marked with a ! are introduced in revision 6.0.
129  * - items marked with a % are introduced post revision 6.0.
130  * - items marked with a $ are obsoleted by revision 6.0.
131  */
132 
133 /* --- */
134 
135 /*
136  * This define can be used in code that requires
137  * compilation-related definitions specific to a
138  * version or versions of the library. Runtime
139  * version checking should be done based on the
140  * string returned by TIFFGetVersion.
141  */
142 #define TIFFLIB_VERSION 19970127 /* January 27, 1997 */
143 
144 /*
145  * The following typedefs define the intrinsic size of
146  * data types used in the *exported* interfaces. These
147  * definitions depend on the proper definition of types
148  * in tiff.h. Note also that the varargs interface used
149  * to pass tag types and values uses the types defined in
150  * tiff.h directly.
151  *
152  * NB: ttag_t is unsigned int and not unsigned short because
153  * ANSI C requires that the type before the ellipsis be a
154  * promoted type (i.e. one of int, unsigned int, pointer,
155  * or double) and because we defined pseudo-tags that are
156  * outside the range of legal Aldus-assigned tags.
157  * NB: tsize_t is int32 and not uint32 because some functions
158  * return -1.
159  * NB: toff_t is not off_t for many reasons; TIFFs max out at
160  * 32-bit file offsets being the most important
161  */
162 
163 #ifndef NULL
164 #define NULL 0
165 #endif
166 
167 typedef struct pts_lzw_state TIFF;
168 #include "pts_lzw.h"
169 
170 /**** pts ****/
171 static int TIFFInitLZW(TIFF*);
172 static void TIFFError(char const*a, char const*b);
173 #if 0 /**** pts ****/
174 static void TIFFWarning(char const*a, char const*b, int c);
175 void TIFFWarning(char const*a, char const*b, int c) {
176  fprintf(stderr, "Warning: %s: ", a);
177  fprintf(stderr, b, c);
178  fprintf(stderr, "\n");
179 }
180 #endif
181 static int TIFFAppendTo(TIFF*, tidataval_t*, tsize_t); /* tif_write.h */
182 #if 0
183 static void TIFFReverseBits(unsigned char *, unsigned long);
184 #endif
185 
186 #ifdef LZW_SUPPORT
187 /*
188  * TIFF Library.
189  * Rev 5.0 Lempel-Ziv & Welch Compression Support
190  *
191  * This code is derived from the compress program whose code is
192  * derived from software contributed to Berkeley by James A. Woods,
193  * derived from original work by Spencer Thomas and Joseph Orost.
194  *
195  * The original Berkeley copyright notice appears below in its entirety.
196  */
197 
198 #include <assert.h>
199 /* #include <stdio.h> */
200 
201 /*
202  * Internal version of TIFFFlushData that can be
203  * called by ``encodestrip routines'' w/o concern
204  * for infinite recursion.
205  */
206 static int
208 {
209  if (tif->tif_rawcc > 0) {
210 #if 0
211  if (tif->tif_revbits_p)
212  TIFFReverseBits((unsigned char *)tif->tif_rawdata,
213  tif->tif_rawcc);
214 #endif
215  if (!TIFFAppendTo(tif,
216  /* isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip, */
217  tif->tif_rawdata, tif->tif_rawcc))
218  return (0);
219  tif->tif_rawcc = 0;
220  tif->tif_rawcp = tif->tif_rawdata;
221  }
222  return (1);
223 }
224 
225 
226 
227 /*
228  * NB: The 5.0 spec describes a different algorithm than Aldus
229  * implements. Specifically, Aldus does code length transitions
230  * one code earlier than should be done (for real LZW).
231  * Earlier versions of this library implemented the correct
232  * LZW algorithm, but emitted codes in a bit order opposite
233  * to the TIFF spec. Thus, to maintain compatibility w/ Aldus
234  * we interpret MSB-LSB ordered codes to be images written w/
235  * old versions of this library, but otherwise adhere to the
236  * Aldus "off by one" algorithm.
237  *
238  * Future revisions to the TIFF spec are expected to "clarify this issue".
239  */
240 #define LZW_COMPAT /* include backwards compatibility code */
241 /*
242  * Each strip of data is supposed to be terminated by a CODE_EOI.
243  * If the following #define is included, the decoder will also
244  * check for end-of-strip w/o seeing this code. This makes the
245  * library more robust, but also slower.
246  */
247 #define LZW_CHECKEOS /* include checks for strips w/o EOI code */
248 #undef LZW_CHECKEOS /**** pts ****/
249 
250 #define MAXCODE(n) ((1L<<(n))-1)
251 /*
252  * The TIFF spec specifies that encoded bit
253  * strings range from 9 to 12 bits.
254  */
255 #define BITS_MIN 9 /* start with 9 bits */
256 #define BITS_MAX 12 /* max of 12 bit strings */
257 /* predefined codes */
258 #define CODE_CLEAR 256 /* code to clear string table */
259 #define CODE_EOI 257 /* end-of-information code */
260 #define CODE_FIRST 258 /* first free code entry */
261 #define CODE_MAX MAXCODE(BITS_MAX)
262 #define HSIZE 9001L /* 91% occupancy */
263 #define HSHIFT (13-8)
264 #ifdef LZW_COMPAT
265 /* NB: +1024 is for compatibility with old files */
266 #define CSIZE (MAXCODE(BITS_MAX)+1024L)
267 #else
268 #define CSIZE (MAXCODE(BITS_MAX)+1L)
269 #endif
270 
271 /*
272  * State block for each open TIFF file using LZW
273  * compression/decompression. Note that the predictor
274  * state block must be first in this data structure.
275  */
276 typedef struct {
277 #if 0 /****pts****/
278  TIFFPredictorState predict; /* predictor super class */
279 #endif
280 
281  unsigned short nbits; /* # of bits/code */
282  unsigned short maxcode; /* maximum code for lzw_nbits */
283  unsigned short free_ent; /* next free entry in hash table */
284  long nextdata; /* next bits of i/o */
285  long nextbits; /* # of valid bits in lzw_nextdata */
286 } LZWBaseState;
287 
288 #define lzw_nbits base.nbits
289 #define lzw_maxcode base.maxcode
290 #define lzw_free_ent base.free_ent
291 #define lzw_nextdata base.nextdata
292 #define lzw_nextbits base.nextbits
293 
294 /*
295  * Decoding-specific state.
296  */
297 typedef struct code_ent {
298  struct code_ent *next;
299  unsigned short length; /* string len, including this token */
300  unsigned char value; /* data value */
301  unsigned char firstchar; /* first token of string */
303 
305 
306 typedef struct {
308  long dec_nbitsmask; /* lzw_nbits 1 bits, right adjusted */
309  long dec_restart; /* restart count */
310 #ifdef LZW_CHECKEOS
311  long dec_bitsleft; /* available bits in raw data */
312 #endif
313  decodeFunc dec_decode; /* regular or backwards compatible */
314  code_t* dec_codep; /* current recognized code */
315  code_t* dec_oldcodep; /* previously recognized code */
316  code_t* dec_free_entp; /* next free entry */
317  code_t* dec_maxcodep; /* max available entry */
318  code_t* dec_codetab; /* kept separate for small machines */
320 
321 /*
322  * Encoding-specific state.
323  */
324 typedef unsigned short hcode_t; /* codes fit in 16 bits */
325 typedef struct {
326  long hash;
327  hcode_t code;
328 } hash_t;
329 
330 typedef struct {
332  int enc_oldcode; /* last code encountered */
333  long enc_checkpoint; /* point at which to clear table */
334 #define CHECK_GAP 10000 /* enc_ratio check interval */
335  long enc_ratio; /* current compression ratio */
336  long enc_incount; /* (input) data bytes encoded */
337  long enc_outcount; /* encoded (output) bytes */
338  tidataval_t* enc_rawlimit; /* bound on tif_rawdata buffer */
339  hash_t* enc_hashtab; /* kept separate for small machines */
341 
342 #define LZWState(tif) ((LZWBaseState*) (void*) (tif)->tif_data)
343 #define DecoderState(tif) ((LZWDecodeState*)(void*) LZWState(tif))
344 #define EncoderState(tif) ((LZWEncodeState*)(void*) LZWState(tif))
345 /* ^^^ Dat: (void*) -> suppress gcc warning from -Wcast-align */
346 
347 static void cl_hash(LZWEncodeState*);
348 
349 #if 0 /**** pts ****/ /* LZW decoder is not needed */
350 
351 static int LZWDecode(TIFF*, tidataval_t*, tsize_t);
352 #ifdef LZW_COMPAT
353 static int LZWDecodeCompat(TIFF*, tidataval_t*, tsize_t);
354 #endif
355 
356 /*
357  * LZW Decoder.
358  */
359 
360 #ifdef LZW_CHECKEOS
361 /*
362  * This check shouldn't be necessary because each
363  * strip is suppose to be terminated with CODE_EOI.
364  */
365 #define NextCode(_tif, _sp, _bp, _code, _get) { \
366  if ((_sp)->dec_bitsleft < nbits) { \
367  TIFFWarning(_tif->tif_name, \
368  "LZWDecode: Strip %d not terminated with EOI code", \
369  /*_tif->tif_curstrip*/ 0); \
370  _code = CODE_EOI; \
371  } else { \
372  _get(_sp,_bp,_code); \
373  (_sp)->dec_bitsleft -= nbits; \
374  } \
375 }
376 #else
377 #define NextCode(tif, sp, bp, code, get) get(sp, bp, code)
378 #endif
379 
380 static int
381 LZWSetupDecode(TIFF* tif)
382 {
384  static const char module[] = " LZWSetupDecode";
385  int code;
386 
387  assert(sp != NULL);
388  if (sp->dec_codetab == NULL) {
389  sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
390  if (sp->dec_codetab == NULL) {
391  TIFFError(module, "No space for LZW code table");
392  return (0);
393  }
394  /*
395  * Pre-load the table.
396  */
397  for (code = 255; code >= 0; code--) {
398  sp->dec_codetab[code].value = code;
399  sp->dec_codetab[code].firstchar = code;
400  sp->dec_codetab[code].length = 1;
401  sp->dec_codetab[code].next = NULL;
402  }
403  }
404  return (1);
405 }
406 
407 /*
408  * Setup state for decoding a strip.
409  */
410 static int
411 LZWPreDecode(TIFF* tif)
412 {
414 
415  assert(sp != NULL);
416  /*
417  * Check for old bit-reversed codes.
418  */
419  if (tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) {
420 #ifdef LZW_COMPAT
421  if (!sp->dec_decode) {
422  TIFFWarning(tif->tif_name,
423  "Old-style LZW codes, convert file %d", 0);
424 #if 0 /**** pts ****/
425  /*
426  * Override default decoding methods with
427  * ones that deal with the old coding.
428  * Otherwise the predictor versions set
429  * above will call the compatibility routines
430  * through the dec_decode method.
431  */
435  /*
436  * If doing horizontal differencing, must
437  * re-setup the predictor logic since we
438  * switched the basic decoder methods...
439  */
440  (*tif->tif_setupdecode)(tif);
441 #endif
442  LZWSetupDecode(tif);
443  sp->dec_decode = LZWDecodeCompat;
444  }
445  sp->lzw_maxcode = MAXCODE(BITS_MIN);
446 #else /* !LZW_COMPAT */
447  if (!sp->dec_decode) {
448  TIFFError(tif->tif_name,
449  "Old-style LZW codes not supported");
450  sp->dec_decode = LZWDecode;
451  }
452  return (0);
453 #endif/* !LZW_COMPAT */
454  } else {
455  sp->lzw_maxcode = MAXCODE(BITS_MIN)-1;
456  sp->dec_decode = LZWDecode;
457  }
458  sp->lzw_nbits = BITS_MIN;
459  sp->lzw_nextbits = 0;
460  sp->lzw_nextdata = 0;
461 
462  sp->dec_restart = 0;
463  sp->dec_nbitsmask = MAXCODE(BITS_MIN);
464 #ifdef LZW_CHECKEOS
465  sp->dec_bitsleft = tif->tif_rawcc << 3;
466 #endif
467  sp->dec_free_entp = sp->dec_codetab + CODE_FIRST;
468  /*
469  * Zero entries that are not yet filled in. We do
470  * this to guard against bogus input data that causes
471  * us to index into undefined entries. If you can
472  * come up with a way to safely bounds-check input codes
473  * while decoding then you can remove this operation.
474  */
475  _TIFFmemset(sp->dec_free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
476  sp->dec_oldcodep = &sp->dec_codetab[-1];
477  sp->dec_maxcodep = &sp->dec_codetab[sp->dec_nbitsmask-1];
478  return (1);
479 }
480 
481 /*
482  * Decode a "hunk of data".
483  */
484 #define GetNextCode(sp, bp, code) { \
485  nextdata = (nextdata<<8) | *(bp)++; \
486  nextbits += 8; \
487  if (nextbits < nbits) { \
488  nextdata = (nextdata<<8) | *(bp)++; \
489  nextbits += 8; \
490  } \
491  code = (hcode_t)((nextdata >> (nextbits-nbits)) & nbitsmask); \
492  nextbits -= nbits; \
493 }
494 
495 static void
496 codeLoop(TIFF* tif)
497 {
498  TIFFError(tif->tif_name,
499  "LZWDecode: Bogus encoding, loop in the code table; scanline %d"
500  /*,tif->tif_row*/);
501 }
502 
503 static int
504 LZWDecode(TIFF* tif, tidataval_t* op0, tsize_t occ0)
505 {
507  char *op = (char*) op0;
508  long occ = (long) occ0;
509  char *tp;
510  unsigned char *bp;
511  hcode_t code;
512  int len;
513  long nbits, nextbits, nextdata, nbitsmask;
514  code_t *codep, *free_entp, *maxcodep, *oldcodep;
515 
516  assert(sp != NULL);
517  /*
518  * Restart interrupted output operation.
519  */
520  if (sp->dec_restart) {
521  long residue;
522 
523  codep = sp->dec_codep;
524  residue = codep->length - sp->dec_restart;
525  if (residue > occ) {
526  /*
527  * Residue from previous decode is sufficient
528  * to satisfy decode request. Skip to the
529  * start of the decoded string, place decoded
530  * values in the output buffer, and return.
531  */
532  sp->dec_restart += occ;
533  do {
534  codep = codep->next;
535  } while (--residue > occ && codep);
536  if (codep) {
537  tp = op + occ;
538  do {
539  *--tp = codep->value;
540  codep = codep->next;
541  } while (--occ && codep);
542  }
543  return occ0-occ;
544  }
545  /*
546  * Residue satisfies only part of the decode request.
547  */
548  op += residue, occ -= residue;
549  tp = op;
550  do {
551  int t;
552  --tp;
553  t = codep->value;
554  codep = codep->next;
555  *tp = t;
556  } while (--residue && codep);
557  sp->dec_restart = 0;
558  }
559 
560  bp = (unsigned char *)tif->tif_rawcp; /* reading from here */
561  nbits = sp->lzw_nbits;
562  nextdata = sp->lzw_nextdata;
563  nextbits = sp->lzw_nextbits;
564  nbitsmask = sp->dec_nbitsmask;
565  oldcodep = sp->dec_oldcodep;
566  free_entp = sp->dec_free_entp;
567  maxcodep = sp->dec_maxcodep;
568 
569  while (occ > 0 && bp<tif->tif_rawend /**** pts ****/) {
570  NextCode(tif, sp, bp, code, GetNextCode);
571  #if 0
572  if (bp>tif->tif_rawend) fprintf(stderr, "over %d\n", tif->tif_rawend-bp);
573  assert(bp<=tif->tif_rawend);
574  #endif
575  if (code == CODE_EOI)
576  break;
577  if (code == CODE_CLEAR) {
578  free_entp = sp->dec_codetab + CODE_FIRST;
579  nbits = BITS_MIN;
580  nbitsmask = MAXCODE(BITS_MIN);
581  maxcodep = sp->dec_codetab + nbitsmask-1;
582 
583 #if 1 /**** pts ****/
584  NextCode(tif, sp, bp, code, GetNextCode);
585  if (code == CODE_EOI)
586  break;
587  *op++ = code, occ--;
588  oldcodep = sp->dec_codetab + code; /* ! */
589 #endif
590  continue;
591  }
592  codep = sp->dec_codetab + code;
593 
594  /*
595  * Add the new entry to the code table.
596  */
597  assert(&sp->dec_codetab[0] <= free_entp && free_entp < &sp->dec_codetab[CSIZE]);
598  free_entp->next = oldcodep;
599  free_entp->firstchar = free_entp->next->firstchar;
600  free_entp->length = free_entp->next->length+1;
601  free_entp->value = (codep < free_entp) ?
602  codep->firstchar : free_entp->firstchar;
603  if (++free_entp > maxcodep) {
604  if (++nbits > BITS_MAX) /* should not happen */
605  nbits = BITS_MAX;
606  nbitsmask = MAXCODE(nbits);
607  maxcodep = sp->dec_codetab + nbitsmask-1;
608  }
609  oldcodep = codep;
610  if (code >= 256) {
611  /*
612  * Code maps to a string, copy string
613  * value to output (written in reverse).
614  */
615  if (codep->length > occ) {
616  /*
617  * String is too long for decode buffer,
618  * locate portion that will fit, copy to
619  * the decode buffer, and setup restart
620  * logic for the next decoding call.
621  */
622  sp->dec_codep = codep;
623  do {
624  codep = codep->next;
625  } while (codep && codep->length > occ);
626  if (codep) {
627  sp->dec_restart = occ;
628  tp = op + occ;
629  do {
630  *--tp = codep->value;
631  codep = codep->next;
632  } while (--occ && codep);
633  if (codep) {
634  codeLoop(tif);
635  return -1;
636  }
637  }
638  break;
639  }
640  len = codep->length;
641  tp = op + len;
642  do {
643  int t;
644  --tp;
645  t = codep->value;
646  codep = codep->next;
647  *tp = t;
648  } while (codep && tp > op);
649  if (codep) {
650  codeLoop(tif);
651  return -1;
652  /* break; */
653  }
654  op += len, occ -= len;
655  } else
656  *op++ = code, occ--;
657  }
658 
659  tif->tif_rawcp = (tidataval_t*) bp;
660  sp->lzw_nbits = (unsigned short) nbits;
661  sp->lzw_nextdata = nextdata;
662  sp->lzw_nextbits = nextbits;
663  sp->dec_nbitsmask = nbitsmask;
664  sp->dec_oldcodep = oldcodep;
665  sp->dec_free_entp = free_entp;
666  sp->dec_maxcodep = maxcodep;
667 
668 #if 0 /**** pts ****/
669  if (occ > 0) {
670  TIFFError(tif->tif_name,
671  "LZWDecode: Not enough data at scanline %d (short %d bytes)"
672  /*,tif->tif_row, occ*/);
673  return (0);
674  }
675 #endif
676  return occ0-occ;
677 }
678 
679 #ifdef LZW_COMPAT
680 /*
681  * Decode a "hunk of data" for old images.
682  */
683 #define GetNextCodeCompat(sp, bp, code) { \
684  nextdata |= (unsigned long) *(bp)++ << nextbits; \
685  nextbits += 8; \
686  if (nextbits < nbits) { \
687  nextdata |= (unsigned long) *(bp)++ << nextbits; \
688  nextbits += 8; \
689  } \
690  code = (hcode_t)(nextdata & nbitsmask); \
691  nextdata >>= nbits; \
692  nextbits -= nbits; \
693 }
694 
695 static int
696 LZWDecodeCompat(TIFF* tif, tidataval_t* op0, tsize_t occ0)
697 {
699  char *op = (char*) op0;
700  long occ = (long) occ0;
701  char *tp;
702  unsigned char *bp;
703  int code, nbits;
704  long nextbits, nextdata, nbitsmask;
705  code_t *codep, *free_entp, *maxcodep, *oldcodep;
706 
707  assert(0);
708  assert(sp != NULL);
709  /*
710  * Restart interrupted output operation.
711  */
712  if (sp->dec_restart) {
713  long residue;
714 
715  codep = sp->dec_codep;
716  residue = codep->length - sp->dec_restart;
717  if (residue > occ) {
718  /*
719  * Residue from previous decode is sufficient
720  * to satisfy decode request. Skip to the
721  * start of the decoded string, place decoded
722  * values in the output buffer, and return.
723  */
724  sp->dec_restart += occ;
725  do {
726  codep = codep->next;
727  } while (--residue > occ);
728  tp = op + occ;
729  do {
730  *--tp = codep->value;
731  codep = codep->next;
732  } while (--occ);
733  return occ0-occ;
734  }
735  /*
736  * Residue satisfies only part of the decode request.
737  */
738  op += residue, occ -= residue;
739  tp = op;
740  do {
741  *--tp = codep->value;
742  codep = codep->next;
743  } while (--residue);
744  sp->dec_restart = 0;
745  }
746 
747  bp = (unsigned char *)tif->tif_rawcp;
748  nbits = sp->lzw_nbits;
749  nextdata = sp->lzw_nextdata;
750  nextbits = sp->lzw_nextbits;
751  nbitsmask = sp->dec_nbitsmask;
752  oldcodep = sp->dec_oldcodep;
753  free_entp = sp->dec_free_entp;
754  maxcodep = sp->dec_maxcodep;
755 
756  while (occ > 0 && bp<tif->tif_rawend) {
758  if (code == CODE_EOI)
759  break;
760  if (code == CODE_CLEAR) {
761  free_entp = sp->dec_codetab + CODE_FIRST;
762  nbits = BITS_MIN;
763  nbitsmask = MAXCODE(BITS_MIN);
764  maxcodep = sp->dec_codetab + nbitsmask;
766  if (code == CODE_EOI)
767  break;
768  *op++ = code, occ--;
769  oldcodep = sp->dec_codetab + code;
770  continue;
771  }
772  codep = sp->dec_codetab + code;
773 
774  /*
775  * Add the new entry to the code table.
776  */
777  assert(&sp->dec_codetab[0] <= free_entp && free_entp < &sp->dec_codetab[CSIZE]);
778  free_entp->next = oldcodep;
779  free_entp->firstchar = free_entp->next->firstchar;
780  free_entp->length = free_entp->next->length+1;
781  free_entp->value = (codep < free_entp) ?
782  codep->firstchar : free_entp->firstchar;
783  if (++free_entp > maxcodep) {
784  if (++nbits > BITS_MAX) /* should not happen */
785  nbits = BITS_MAX;
786  nbitsmask = MAXCODE(nbits);
787  maxcodep = sp->dec_codetab + nbitsmask;
788  }
789  oldcodep = codep;
790  if (code >= 256) {
791  /*
792  * Code maps to a string, copy string
793  * value to output (written in reverse).
794  */
795  if (codep->length > occ) {
796  /*
797  * String is too long for decode buffer,
798  * locate portion that will fit, copy to
799  * the decode buffer, and setup restart
800  * logic for the next decoding call.
801  */
802  sp->dec_codep = codep;
803  do {
804  codep = codep->next;
805  } while (codep->length > occ);
806  sp->dec_restart = occ;
807  tp = op + occ;
808  do {
809  *--tp = codep->value;
810  codep = codep->next;
811  } while (--occ);
812  break;
813  }
814  op += codep->length, occ -= codep->length;
815  tp = op;
816  do {
817  *--tp = codep->value;
818  } while (0!=(codep = codep->next));
819  } else
820  *op++ = code, occ--;
821  }
822 
823  tif->tif_rawcp = (tidataval_t*) bp;
824  sp->lzw_nbits = nbits;
825  sp->lzw_nextdata = nextdata;
826  sp->lzw_nextbits = nextbits;
827  sp->dec_nbitsmask = nbitsmask;
828  sp->dec_oldcodep = oldcodep;
829  sp->dec_free_entp = free_entp;
830  sp->dec_maxcodep = maxcodep;
831 
832 #if 0 /**** pts ****/
833  if (occ > 0) {
834  TIFFError(tif->tif_name,
835  "LZWDecodeCompat: Not enough data at scanline %d (short %d bytes)"
836  /*,tif->tif_row, occ*/);
837  return (0);
838  }
839 #endif
840  return occ0-occ;
841 }
842 #endif /* LZW_COMPAT */
843 
844 #endif /**** pts ****/
845 
846 /* --- */
847 
848 /*
849  * LZW Encoding.
850  */
851 
852 static int
854 {
856  static const char module[] = "LZWSetupEncode";
857 
858  assert(sp != NULL);
859  sp->enc_hashtab = (hash_t*) _TIFFmalloc(HSIZE*sizeof (hash_t));
860  if (sp->enc_hashtab == NULL) {
861  TIFFError(module, "No space for LZW hash table");
862  return (0);
863  }
864  return (1);
865 }
866 
867 /*
868  * Reset encoding state at the start of a strip.
869  */
870 static int
872 {
874 
875  assert(sp != NULL);
876  sp->lzw_nbits = BITS_MIN;
877  sp->lzw_maxcode = MAXCODE(BITS_MIN);
878  sp->lzw_free_ent = CODE_FIRST;
879  sp->lzw_nextbits = 0;
880  sp->lzw_nextdata = 0;
881  sp->enc_checkpoint = CHECK_GAP;
882  sp->enc_ratio = 0;
883  sp->enc_incount = 0;
884  sp->enc_outcount = 0;
885  /*
886  * The 4 here insures there is space for 2 max-sized
887  * codes in LZWEncode and LZWPostDecode.
888  */
889  sp->enc_rawlimit = tif->tif_rawdata + tif->tif_rawdatasize-1 - 4;
890  cl_hash(sp); /* clear hash table */
891  sp->enc_oldcode = (hcode_t) -1; /* generates CODE_CLEAR in LZWEncode */
892  return (1);
893 }
894 
895 #define CALCRATIO(sp, rat) { \
896  if (incount > 0x007fffff) { /* NB: shift will overflow */\
897  rat = outcount >> 8; \
898  rat = (rat == 0 ? 0x7fffffff : incount/rat); \
899  } else \
900  rat = (incount<<8) / outcount; \
901 }
902 #define PutNextCode(op, c) { \
903  nextdata = (nextdata << nbits) | c; \
904  nextbits += nbits; \
905  *op++ = (unsigned char)(nextdata >> (nextbits-8)); \
906  nextbits -= 8; \
907  if (nextbits >= 8) { \
908  *op++ = (unsigned char)(nextdata >> (nextbits-8)); \
909  nextbits -= 8; \
910  } \
911  outcount += nbits; \
912 }
913 
914 /*
915  * Encode a chunk of pixels.
916  *
917  * Uses an open addressing double hashing (no chaining) on the
918  * prefix code/next character combination. We do a variant of
919  * Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's
920  * relatively-prime secondary probe. Here, the modular division
921  * first probe is gives way to a faster exclusive-or manipulation.
922  * Also do block compression with an adaptive reset, whereby the
923  * code table is cleared when the compression ratio decreases,
924  * but after the table fills. The variable-length output codes
925  * are re-sized at this point, and a CODE_CLEAR is generated
926  * for the decoder.
927  */
928 static int
930 {
931  register LZWEncodeState *sp = EncoderState(tif);
932  register long fcode;
933  register hash_t *hp;
934  register int h, c;
935  hcode_t ent;
936  long disp;
937  long incount, outcount, checkpoint;
938  long nextdata, nextbits;
939  int free_ent, maxcode, nbits;
940  tidataval_t* op, *limit;
941 
942  if (sp == NULL)
943  return (0);
944  /*
945  * Load local state.
946  */
947  incount = sp->enc_incount;
948  outcount = sp->enc_outcount;
949  checkpoint = sp->enc_checkpoint;
950  nextdata = sp->lzw_nextdata;
951  nextbits = sp->lzw_nextbits;
952  free_ent = sp->lzw_free_ent;
953  maxcode = sp->lzw_maxcode;
954  nbits = sp->lzw_nbits;
955  op = tif->tif_rawcp;
956  limit = sp->enc_rawlimit;
957  ent = sp->enc_oldcode;
958 
959  if (ent == (hcode_t) -1 && cc > 0) {
960  /*
961  * NB: This is safe because it can only happen
962  * at the start of a strip where we know there
963  * is space in the data buffer.
964  */
966  ent = *bp++; cc--; incount++;
967  }
968  while (cc > 0) {
969  c = *bp++; cc--; incount++;
970  fcode = ((long)c << BITS_MAX) + ent;
971  h = (c << HSHIFT) ^ ent; /* xor hashing */
972 #ifdef _WINDOWS /* ?? */
973  /*
974  * Check hash index for an overflow.
975  */
976  if (h >= HSIZE)
977  h -= HSIZE;
978 #endif
979  hp = &sp->enc_hashtab[h];
980  if (hp->hash == fcode) {
981  ent = hp->code;
982  continue;
983  }
984  if (hp->hash >= 0) {
985  /*
986  * Primary hash failed, check secondary hash.
987  */
988  disp = HSIZE - h;
989  if (h == 0)
990  disp = 1;
991  do {
992  /*
993  * Avoid pointer arithmetic 'cuz of
994  * wraparound problems with segments.
995  */
996  if ((h -= disp) < 0)
997  h += HSIZE;
998  hp = &sp->enc_hashtab[h];
999  if (hp->hash == fcode) {
1000  ent = hp->code;
1001  goto hit;
1002  }
1003  } while (hp->hash >= 0);
1004  }
1005  /*
1006  * New entry, emit code and add to table.
1007  */
1008  /*
1009  * Verify there is space in the buffer for the code
1010  * and any potential Clear code that might be emitted
1011  * below. The value of limit is setup so that there
1012  * are at least 4 bytes free--room for 2 codes.
1013  */
1014  if (op > limit) {
1015  tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata);
1016  TIFFFlushData1(tif);
1017  op = tif->tif_rawdata;
1018  }
1019  PutNextCode(op, ent);
1020  ent = c;
1021  hp->code = free_ent++;
1022  hp->hash = fcode;
1023  if (free_ent == CODE_MAX-1) {
1024  /* table is full, emit clear code and reset */
1025  cl_hash(sp);
1026  sp->enc_ratio = 0;
1027  incount = 0;
1028  outcount = 0;
1029  free_ent = CODE_FIRST;
1031  nbits = BITS_MIN;
1033  } else {
1034  /*
1035  * If the next entry is going to be too big for
1036  * the code size, then increase it, if possible.
1037  */
1038  if (free_ent > maxcode) {
1039  nbits++;
1040  assert(nbits <= BITS_MAX);
1041  maxcode = (int) MAXCODE(nbits);
1042  } else if (incount >= checkpoint) {
1043  long rat;
1044  /*
1045  * Check compression ratio and, if things seem
1046  * to be slipping, clear the hash table and
1047  * reset state. The compression ratio is a
1048  * 24+8-bit fractional number.
1049  */
1050  checkpoint = incount+CHECK_GAP;
1051  CALCRATIO(sp, rat);
1052  if (rat <= sp->enc_ratio) {
1053  cl_hash(sp);
1054  sp->enc_ratio = 0;
1055  incount = 0;
1056  outcount = 0;
1057  free_ent = CODE_FIRST;
1059  nbits = BITS_MIN;
1061  } else
1062  sp->enc_ratio = rat;
1063  }
1064  }
1065  hit:
1066  ;
1067  }
1068 
1069  /*
1070  * Restore global state.
1071  */
1072  sp->enc_incount = incount;
1073  sp->enc_outcount = outcount;
1074  sp->enc_checkpoint = checkpoint;
1075  sp->enc_oldcode = ent;
1076  sp->lzw_nextdata = nextdata;
1077  sp->lzw_nextbits = nextbits;
1078  sp->lzw_free_ent = free_ent;
1079  sp->lzw_maxcode = maxcode;
1080  sp->lzw_nbits = nbits;
1081  tif->tif_rawcp = op;
1082  return (1);
1083 }
1084 
1085 /*
1086  * Finish off an encoded strip by flushing the last
1087  * string and tacking on an End Of Information code.
1088  */
1089 static int
1091 {
1092  register LZWEncodeState *sp = EncoderState(tif);
1093  tidataval_t* op = tif->tif_rawcp;
1094  long nextbits = sp->lzw_nextbits;
1095  long nextdata = sp->lzw_nextdata;
1096  long outcount = sp->enc_outcount;
1097  int nbits = sp->lzw_nbits;
1098 
1099  if (op > sp->enc_rawlimit) {
1100  /* fprintf(stderr, "Yupp!\n"); */
1101  tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata);
1102  TIFFFlushData1(tif);
1103  op = tif->tif_rawdata;
1104  }
1105  if (sp->enc_oldcode != (hcode_t) -1) {
1106  /* fprintf(stderr, "EIK\n"); */
1107  PutNextCode(op, sp->enc_oldcode);
1108  sp->enc_oldcode = (hcode_t) -1;
1109  }
1111  if (nextbits > 0)
1112  *op++ = (unsigned char)(nextdata << (8-nextbits));
1113  tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata);
1114  return (1);
1115 }
1116 
1117 /*
1118  * Reset encoding hash table.
1119  */
1120 static void
1122 {
1123  register hash_t *hp = &sp->enc_hashtab[HSIZE-1];
1124  register long i = HSIZE-8;
1125 
1126  do {
1127  i -= 8;
1128  hp[-7].hash = -1;
1129  hp[-6].hash = -1;
1130  hp[-5].hash = -1;
1131  hp[-4].hash = -1;
1132  hp[-3].hash = -1;
1133  hp[-2].hash = -1;
1134  hp[-1].hash = -1;
1135  hp[ 0].hash = -1;
1136  hp -= 8;
1137  } while (i >= 0);
1138  for (i += 8; i > 0; i--, hp--)
1139  hp->hash = -1;
1140 }
1141 
1142 static void
1144 {
1145  if (tif->tif_data) {
1146  if (tif->tif_reading_p) {
1147  if (DecoderState(tif)->dec_codetab)
1148  _TIFFfree(DecoderState(tif)->dec_codetab);
1149  } else {
1150  if (EncoderState(tif)->enc_hashtab)
1151  _TIFFfree(EncoderState(tif)->enc_hashtab);
1152  }
1153  _TIFFfree(tif->tif_data);
1154  tif->tif_data = NULL;
1155  }
1156  _TIFFfree(tif->tif_rawdata);
1157 }
1158 
1159 static int
1161 {
1162  /* assert(scheme == COMPRESSION_LZW); */
1163  /*
1164  * Allocate state block so tag methods have storage to record values.
1165  */
1166  if (tif->tif_reading_p) {
1167  tif->tif_data = (tidataval_t*) _TIFFmalloc(sizeof (LZWDecodeState));
1168  if (tif->tif_data == NULL)
1169  goto bad;
1170  DecoderState(tif)->dec_codetab = NULL;
1171  DecoderState(tif)->dec_decode = NULL;
1172  } else {
1173  tif->tif_data = (tidataval_t*) _TIFFmalloc(sizeof (LZWEncodeState));
1174  if (tif->tif_data == NULL)
1175  goto bad;
1176  EncoderState(tif)->enc_hashtab = NULL;
1177  }
1178 #if 0 /**** pts ****/
1179  /*
1180  * Install codec methods.
1181  */
1183  tif->tif_predecode = LZWPreDecode;
1184  tif->tif_decoderow = LZWDecode;
1185  tif->tif_decodestrip = LZWDecode;
1186  tif->tif_decodetile = LZWDecode;
1188  tif->tif_preencode = LZWPreEncode;
1190  tif->tif_encoderow = LZWEncode;
1191  tif->tif_encodestrip = LZWEncode;
1192  tif->tif_encodetile = LZWEncode;
1193  tif->tif_cleanup = LZWCleanup;
1194 #endif
1195 #if 0 /**** pts ****/
1196  /*
1197  * Setup predictor setup.
1198  */
1199  (void) TIFFPredictorInit(tif);
1200 #endif
1201  return (1);
1202 bad:
1203  TIFFError("TIFFInitLZW", "No space for LZW state block");
1204  return (0);
1205 }
1206 
1207 /*
1208  * Copyright (c) 1985, 1986 The Regents of the University of California.
1209  * All rights reserved.
1210  *
1211  * This code is derived from software contributed to Berkeley by
1212  * James A. Woods, derived from original work by Spencer Thomas
1213  * and Joseph Orost.
1214  *
1215  * Redistribution and use in source and binary forms are permitted
1216  * provided that the above copyright notice and this paragraph are
1217  * duplicated in all such forms and that any documentation,
1218  * advertising materials, and other materials related to such
1219  * distribution and use acknowledge that the software was developed
1220  * by the University of California, Berkeley. The name of the
1221  * University may not be used to endorse or promote products derived
1222  * from this software without specific prior written permission.
1223  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1224  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1225  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1226  */
1227 #endif /* LZW_SUPPORT */
1228 
1229 #if 0
1230 #ifdef __cplusplus
1231 extern "C"
1232 #else
1233 extern
1234 #endif
1235 FILE *fdopen (int fildes, const char *mode); /* POSIX, but not ANSI */
1236 #else
1237 #undef _POSIX_SOURCE
1238 #define _POSIX_SOURCE 1
1239 #undef _POSIX_C_SOURCE /* Sat Jun 1 14:25:53 CEST 2002 */
1240 #define _POSIX_C_SOURCE 2
1241 #include <stdio.h>
1242 #endif
1243 
1244 #if 0 /**** pts: never needed, because output FillOrder is always 1 */
1245 void
1246 TIFFReverseBits(register unsigned char* cp, register unsigned long n)
1247 {
1248  char *TIFFBitRevTable=...; /**** pts ****/
1249  for (; n > 8; n -= 8) {
1250  cp[0] = TIFFBitRevTable[cp[0]];
1251  cp[1] = TIFFBitRevTable[cp[1]];
1252  cp[2] = TIFFBitRevTable[cp[2]];
1253  cp[3] = TIFFBitRevTable[cp[3]];
1254  cp[4] = TIFFBitRevTable[cp[4]];
1255  cp[5] = TIFFBitRevTable[cp[5]];
1256  cp[6] = TIFFBitRevTable[cp[6]];
1257  cp[7] = TIFFBitRevTable[cp[7]];
1258  cp += 8;
1259  }
1260  while (n-- > 0)
1261  *cp = TIFFBitRevTable[*cp], cp++;
1262 }
1263 #endif
1264 
1265 static void TIFFError(char const*a, char const*b) {
1266  fprintf(stderr, "%s: %s\n", a, b);
1267 }
1268 static int TIFFAppendTo(TIFF*tif, tidataval_t* data, tsize_t cc) {
1269  (void)tif;
1270  (void)data;
1271  (void)cc;
1272  /* fwrite(data, 1, cc, (FILE*)tif->tif_sout);
1273  if (ferror((FILE*)tif->tif_sout)) return 0; */
1274  if (-1==tif->tif_writer((char*)data, cc, tif->tif_sout)) return 0;
1275 #if 0 /**** pts ****/ /* tif_write.h */
1276  (void)strip;
1277  TIFFDirectory *td = &tif->tif_dir;
1278  static const char module[] = "TIFFAppendToStrip";
1279 
1280  if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
1281  /*
1282  * No current offset, set the current strip.
1283  */
1284  if (td->td_stripoffset[strip] != 0) {
1285  if (!SeekOK(tif, td->td_stripoffset[strip])) {
1286  TIFFError(module,
1287  "%s: Seek error at scanline %lu",
1288  tif->tif_name, (unsigned long) tif->tif_row);
1289  return (0);
1290  }
1291  } else
1292  td->td_stripoffset[strip] =
1293  TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
1294  tif->tif_curoff = td->td_stripoffset[strip];
1295  }
1296  if (!WriteOK(tif, data, cc)) {
1297  TIFFError(module, "%s: Write error at scanline %lu",
1298  tif->tif_name, (unsigned long) tif->tif_row);
1299  return (0);
1300  }
1301  tif->tif_curoff += cc;
1302  td->td_stripbytecount[strip] += cc;
1303 #endif
1304  return (1);
1305 }
1306 
1307 #if 0
1308 static tidataval_t readbuf[4096];
1309 unsigned int readlen;
1310 static char *inname;
1311 typedef int (*filter_t)(FILE *sin, FILE*sout);
1312 /** /LZWEncode filter, STDIN -> STDOUT */
1313 static int lzw_encode(FILE *sin, FILE *sout) {
1314  TIFF tif;
1315  tif.tif_sout=sout;
1316  tif.tif_reading_p=0;
1317 #if 0
1318  tif.tif_revbits_p=0;
1319 #endif
1320  tif.tif_name=inname;
1321  tif.tif_rawdata=(tidataval_t*)_TIFFmalloc(tif.tif_rawdatasize=4096); /* Imp: check */
1322  tif.tif_rawcp=tif.tif_rawdata;
1323  tif.tif_rawcc=0;
1324  if (TIFFInitLZW(&tif) &&
1325  LZWSetupEncode(&tif) &&
1326  LZWPreEncode(&tif) /* for each strip */) {
1327  while ((readlen=fread(readbuf, 1, sizeof(readbuf), sin))!=0) {
1328  if (!LZWEncode(&tif, readbuf, readlen)) goto err;
1329  /* fprintf(stderr, "readlen=%d\n", readlen); */
1330  }
1331  if (!LZWPostEncode(&tif)) goto err; /* for each strip */
1332  LZWCleanup(&tif);
1333  if (!TIFFFlushData1(&tif)) { _TIFFfree(tif.tif_rawdata); fflush(sout); return 0; }
1334  fflush(sout);
1335  } else { err:
1336  fflush(sout);
1337  LZWCleanup(&tif);
1338  _TIFFfree(tif.tif_rawdata);
1339  return 0;
1340  }
1341  return 1;
1342 }
1343 /** /LZWEncode filter, STDIN -> STDOUT */
1344 static int lzw_decode(FILE *sin, FILE *sout) {
1345  TIFF tif;
1346  /* tidataval_t *rawend0; */
1347  /* char *xbuf; */
1348  int got;
1349  unsigned int left;
1350  tif.tif_reading_p=1;
1351 #if 0
1352  tif.tif_revbits_p=0;
1353 #endif
1354  tif.tif_name=inname;
1355  tif.tif_rawdata=(tidataval_t*)_TIFFmalloc(tif.tif_rawdatasize=4096); /* Imp: check */
1356  tif.tif_rawcc=0;
1357  left=0;
1358  if (TIFFInitLZW(&tif) &&
1359  LZWSetupDecode(&tif) &&
1360  LZWPreDecode(&tif) /* for each strip */) {
1361  /* vvv Dat: fread returns >=0 ! */
1362  while ((readlen=left+fread(tif.tif_rawdata+left, 1, tif.tif_rawdatasize-left, sin))!=0) {
1363  #if DEBUGMSG
1364  fprintf(stderr, "readlen+=%d\n", readlen);
1365  #endif
1366  while (readlen<=3) {
1367  if ((got=fread(tif.tif_rawdata+readlen, 1, tif.tif_rawdatasize-readlen, sin))==0) {
1368  tif.tif_rawend=tif.tif_rawdata+readlen;
1369  goto star;
1370  }
1371  readlen+=got;
1372  }
1373  tif.tif_rawend=tif.tif_rawdata+readlen-3;
1374  star:
1375  tif.tif_rawcp=tif.tif_rawdata;
1376  #if DEBUGMSG
1377  fprintf(stderr, "readlen:=%d\n", readlen);
1378  #endif
1379  while (1) {
1380  if (-1==(got=(DecoderState(&tif)->dec_decode)(&tif, readbuf, sizeof(readbuf)))) goto err;
1381  #if DEBUGMSG
1382  fprintf(stderr, "OK, written: %d %d\n", got, tif.tif_rawend-tif.tif_rawcp);
1383  #endif
1384  if (0==got) break;
1385  fwrite(readbuf, 1, got, sout);
1386  }
1387  left=tif.tif_rawdata+readlen-tif.tif_rawcp;
1388  got=left;
1389  #if DEBUGMSG
1390  fprintf(stderr, "left=%d\n", left); fflush(stderr);
1391  #endif
1392  while (got--!=0) { tif.tif_rawdata[got]=tif.tif_rawcp[got]; }
1393  }
1394 #if 0
1395  if (!LZWPostDecode(&tif)) { LZWCleanup(&tif); return 0; } /* for each strip */
1396 #endif
1397  LZWCleanup(&tif);
1398  fflush(sout);
1399  } else { err:
1400  fflush(sout);
1401  LZWCleanup(&tif);
1402  _TIFFfree(tif.tif_rawdata);
1403  return 0;
1404  }
1405  return 1;
1406 }
1407 #endif
1408 
1409 static int feeder(char *readbuf, unsigned readlen, TIFF *tif) {
1410  /*(void)LZWPreDecode;*/ /* Imp: better avoid gcc warning... */
1411  if (readlen!=0) {
1412  if (!LZWEncode(tif, (tidataval_t*)readbuf, readlen)) { e1:
1413  LZWCleanup(tif); e2:
1414  _TIFFfree(tif->tif_rawdata);
1415  return 0;
1416  }
1417  } else {
1418  if (!LZWPostEncode(tif)) goto e1;
1419  if (!TIFFFlushData1(tif)) goto e2;
1420  LZWCleanup(tif);
1421  }
1422  return 1;
1423 }
1424 
1425 /** /LZWEncode filter, STDIN -> STDOUT */
1426 int pts_lzw_init(TIFF *tif) {
1427  /* tif_sout and tif_writer are already filled */
1428  tif->tif_feeder=feeder;
1429  tif->tif_reading_p=0;
1430 #if 0
1431  tif->tif_revbits_p=0;
1432 #endif
1433  tif->tif_name="//.filter";/*inname;*/
1434  tif->tif_rawdata=(tidataval_t*)_TIFFmalloc(tif->tif_rawdatasize=4096); /* Imp: check */
1435  tif->tif_rawcp=tif->tif_rawdata;
1436  tif->tif_rawcc=0;
1437  if (TIFFInitLZW(tif) &&
1438  LZWSetupEncode(tif) &&
1439  LZWPreEncode(tif) /* for each strip */) {
1440  return 1;
1441  }
1442  LZWCleanup(tif);
1443  _TIFFfree(tif->tif_rawdata);
1444  return 0;
1445 }
1446 
1447 
1448 #if 0
1449 /**** pts ****/
1450 int main(int argc, char **argv) {
1451  filter_t filter;
1452  FILE *sin, *sout;
1453  inname="STDIN";
1454 
1455  if (argc>=2 && argc<=4 && argv[1][0]=='e') {
1457  } else if (argc>=2 && argc<=4 && argv[1][0]=='d') {
1459  } else {
1460  fprintf(stderr,
1461  "This is PotterSoftware LZW codec v0.1, (C) pts@fazekas.hu in Late Dec 2001\n"
1462  "THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!\n"
1463  "This program is free software, covered by the GNU GPL.\n"
1464  " Derived from code Copyright (c) 1988-1997 Sam Leffler\n"
1465  " Derived from code Copyright (c) 1991-1997 Silicon Graphics, Inc.\n\n"
1466  "Usage: %s encode|decode [INFILE] [OUTFILE]\n\n"
1467  "Unspecified file names mean STDIN or STDOUT.\n"
1468  "Encoding is /LZWEncode compression, decoding is /LZWDecode uncompression.\n\n"
1469  "Note that the LZW compression (but not uncompression) is patented by\n"
1470  "Unisys (patent number #4,558,302), so use this program at your own legal\n"
1471  "risk!\n"
1472  ,argv[0]);
1473  return 2;
1474  }
1475  if (argc>=3) sin= fopen(inname=argv[2],"rb");
1476  else sin= fdopen(0, "rb");
1477  if (sin==0) {
1478  fprintf(stderr, "%s: error opening infile\n", argv[0]);
1479  return 3;
1480  }
1481  if (argc>=4) sout=fopen(inname=argv[3],"wb");
1482  else sout=fdopen(1, "wb");
1483  if (sout==0) {
1484  fprintf(stderr, "%s: error opening outfile\n", argv[0]);
1485  return 4;
1486  }
1487  return !filter(sin, sout);
1488  /* fclose(sout); fclose(sin); */
1489 }
1490 #endif
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
char * strip(char *str, const enum Strip flags)
Definition: Utility.c:168
bp
Definition: action.c:1035
cp
Definition: action.c:1035
int code
Definition: aftopl.c:52
#define mode
Definition: aptex-macros.h:510
#define hash
Definition: aptex.h:388
static size_t outcount
Definition: backend_pdf.c:77
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
unsigned char u_char
Definition: defines.h:140
int h
Definition: dviconv.c:9
#define fopen
Definition: xxstdio.h:21
#define fread
Definition: xxstdio.h:25
#define fflush
Definition: xxstdio.h:24
double sin()
struct rect data
Definition: dvipdfm.c:64
static void
Definition: fpif.c:118
Integer_T bad
#define tp
#define t
Definition: afcover.h:96
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
int base
Definition: gsftopk.c:1502
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
register bit_buf_type register int int nbits
Definition: jdhuff.h:156
small capitals from c petite p scientific i
Definition: afcover.h:80
sizeof(AF_ModuleRec)
#define SEEK_END
Definition: ftzconf.h:251
static char * inname
Definition: pngtest.c:1817
#define fprintf
Definition: mendex.h:64
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
ushort u_short
Definition: types.h:74
#define NextCode(_tif, _sp, _bp, _code, _get)
Definition: tif_lzw.c:175
static void codeLoop(TIFF *tif)
Definition: tif_lzw.c:304
static int LZWDecodeCompat(TIFF *, tidata_t, tsize_t, tsample_t)
Definition: tif_lzw.c:493
uint16 hcode_t
Definition: tif_lzw.c:138
static int LZWPreDecode(TIFF *tif, tsample_t s)
Definition: tif_lzw.c:221
#define GetNextCode(sp, bp, code)
Definition: tif_lzw.c:292
#define GetNextCodeCompat(sp, bp, code)
Definition: tif_lzw.c:480
static int LZWDecode(TIFF *, tidata_t, tsize_t, tsample_t)
Definition: tif_lzw.c:312
static int LZWSetupDecode(TIFF *tif)
Definition: tif_lzw.c:191
int TIFFPredictorInit(TIFF *tif)
Definition: tif_predict.c:437
static const unsigned char TIFFBitRevTable[256]
Definition: tif_swab.c:126
void TIFFReverseBits(register u_char *cp, register u_long n)
Definition: tif_swab.c:202
void TIFFWarning(const char *module, const char *fmt,...)
Definition: tif_warning.c:41
int32 tsize_t
Definition: tiffio.h:73
int32 toff_t
Definition: tiffio.h:75
#define WriteOK(tif, buf, size)
Definition: tiffiop.h:190
unsigned char tidataval_t
Definition: tiffiop.h:55
#define SeekOK(tif, off)
Definition: tiffiop.h:186
#define TIFFSeekFile(tif, off, whence)
Definition: tiffiop.h:167
ssize_t readbuf(int, void *, size_t)
Definition: misc.c:369
@ err
Definition: mtxline.h:24
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
static int filter
Definition: pnmtopng.c:113
static code_int free_ent
Definition: ppmtogif.c:634
static code_int maxcode
Definition: ppmtogif.c:606
#define CODE_EOI
Definition: pts_lzw.c:259
#define NULL
Definition: pts_lzw.c:164
#define BITS_MIN
Definition: pts_lzw.c:255
#define PutNextCode(op, c)
Definition: pts_lzw.c:902
#define MAXCODE(n)
Definition: pts_lzw.c:250
#define EncoderState(tif)
Definition: pts_lzw.c:344
static int TIFFAppendTo(TIFF *, tidataval_t *, tsize_t)
Definition: pts_lzw.c:1268
static int TIFFInitLZW(TIFF *)
Definition: pts_lzw.c:1160
#define CODE_MAX
Definition: pts_lzw.c:261
static int LZWPreEncode(TIFF *tif)
Definition: pts_lzw.c:871
#define DecoderState(tif)
Definition: pts_lzw.c:343
#define BITS_MAX
Definition: pts_lzw.c:256
#define CALCRATIO(sp, rat)
Definition: pts_lzw.c:895
struct code_ent code_t
#define _TIFFfree
Definition: pts_lzw.c:100
#define CODE_CLEAR
Definition: pts_lzw.c:258
static void TIFFError(char const *a, char const *b)
Definition: pts_lzw.c:1265
unsigned short hcode_t
Definition: pts_lzw.c:324
#define _TIFFmemset
Definition: pts_lzw.c:101
static void LZWCleanup(TIFF *tif)
Definition: pts_lzw.c:1143
#define CHECK_GAP
Definition: pts_lzw.c:334
#define CODE_FIRST
Definition: pts_lzw.c:260
#define _TIFFmalloc
Definition: pts_lzw.c:99
#define HSIZE
Definition: pts_lzw.c:262
static int TIFFFlushData1(TIFF *tif)
Definition: pts_lzw.c:207
static int LZWSetupEncode(TIFF *tif)
Definition: pts_lzw.c:853
static int LZWPostEncode(TIFF *tif)
Definition: pts_lzw.c:1090
#define CSIZE
Definition: pts_lzw.c:266
#define HSHIFT
Definition: pts_lzw.c:263
static void cl_hash(LZWEncodeState *)
Definition: pts_lzw.c:1121
static int feeder(char *readbuf, unsigned readlen, TIFF *tif)
Definition: pts_lzw.c:1409
int(* decodeFunc)(TIFF *, tidataval_t *, tsize_t)
Definition: pts_lzw.c:304
int pts_lzw_init(TIFF *tif)
Definition: pts_lzw.c:1426
static int LZWEncode(TIFF *tif, tidataval_t *bp, tsize_t cc)
Definition: pts_lzw.c:929
iof_status lzw_encode(iof *I, iof *O, int flags)
Definition: utillzw.c:601
iof_status lzw_decode(iof *I, iof *O, int flags)
Definition: utillzw.c:588
FILE * fdopen(int, const char *)
lft_cell * left
Definition: routines.h:73
mp_ptr hp
Definition: sec_pi1_div.c:86
unsigned short free_ent
Definition: pts_lzw.c:283
unsigned short maxcode
Definition: pts_lzw.c:282
unsigned short nbits
Definition: pts_lzw.c:281
tidataval_t * enc_rawlimit
Definition: pts_lzw.c:338
uint32 * td_stripbytecount
Definition: tif_dir.h:77
uint32 * td_stripoffset
Definition: tif_dir.h:76
Definition: obx.h:117
u_short length
Definition: tif_lzw.c:113
unsigned char value
Definition: pts_lzw.c:300
u_char value
Definition: tif_lzw.c:114
unsigned char firstchar
Definition: pts_lzw.c:301
unsigned short length
Definition: pts_lzw.c:299
struct code_ent * next
Definition: tif_lzw.c:112
u_char firstchar
Definition: tif_lzw.c:115
Definition: inftrees.h:24
Definition: sh.h:1226
Definition: dvips.h:235
Definition: tiffiop.h:70
tsize_t tif_rawcc
Definition: tiffiop.h:134
TIFFCodeMethod tif_encodestrip
Definition: tiffiop.h:119
tidata_t tif_data
Definition: tiffiop.h:127
TIFFCodeMethod tif_encodetile
Definition: tiffiop.h:121
tidata_t tif_rawdata
Definition: tiffiop.h:131
TIFFPreMethod tif_preencode
Definition: tiffiop.h:114
TIFFPreMethod tif_predecode
Definition: tiffiop.h:112
TIFFCodeMethod tif_decodestrip
Definition: tiffiop.h:118
TIFFCodeMethod tif_decoderow
Definition: tiffiop.h:116
toff_t tif_curoff
Definition: tiffiop.h:100
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:113
TIFFDirectory tif_dir
Definition: tiffiop.h:92
TIFFBoolMethod tif_postencode
Definition: tiffiop.h:115
TIFFCodeMethod tif_encoderow
Definition: tiffiop.h:117
TIFFVoidMethod tif_cleanup
Definition: tiffiop.h:124
uint32 tif_row
Definition: tiffiop.h:97
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:111
tsize_t tif_rawdatasize
Definition: tiffiop.h:132
tidata_t tif_rawcp
Definition: tiffiop.h:133
TIFFCodeMethod tif_decodetile
Definition: tiffiop.h:120
char * tif_name
Definition: tiffiop.h:71
#define FILE
Definition: t1stdio.h:34
while(temp)
Definition: t4ht.c:858
op
Definition: tex4ht.c:3129
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
#define sp
Definition: stack.c:11
unsigned long u_long
Definition: vmsdir.h:26
#define argv
Definition: xmain.c:270
#define main
Definition: xmain.c:31
#define argc
Definition: xmain.c:269
#define limit(x)
Definition: yuvsplittoppm.c:26