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)  

pdfobj.c
Go to the documentation of this file.
1 /* $Header$
2 
3  This is dvipdfm, a DVI to PDF translator.
4  Copyright (C) 1998, 1999, 2008 by Mark A. Wicks
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 
20  The author may be contacted via the e-mail address
21 
22  mwicks@kettering.edu
23 */
24 
25 
26 #include <ctype.h>
27 #include <string.h>
28 #include "system.h"
29 #include "config.h"
30 #include "mem.h"
31 #include "error.h"
32 #include "mfileio.h"
33 #include "pdflimits.h"
34 #include "pdfobj.h"
35 #include "pdfspecial.h"
36 #include "pdfparse.h"
37 #include "twiddle.h"
38 
39 #ifdef HAVE_ZLIB
40 #include <zlib.h>
41 #endif /* HAVE_ZLIB */
42 
47 #define FORMAT_BUF_SIZE 4096
49 
50 static struct xref_entry
51 {
52  unsigned long file_position;
55 static unsigned long pdf_max_ind_objects = 0;
56 static unsigned long next_label = 1;
57 
58 static unsigned long startxref;
59 
60 static unsigned pdf_root_obj = 0, pdf_info_obj = 0;
61 
62 /* Internal static routines */
63 
64 static void pdf_flush_obj (FILE *file, const pdf_obj *object);
65 static void pdf_label_obj (pdf_obj *object);
66 
67 static void pdf_out_char (FILE *file, char c);
68 static void pdf_out (FILE *file, void *buffer, int length);
69 
70 static void release_indirect (pdf_indirect *data);
71 static void write_indirect (FILE *file, const pdf_indirect *indirect);
72 
73 static void release_boolean (pdf_obj *data);
74 static void write_boolean (FILE *file, const pdf_boolean *data);
75 
76 static void write_null (FILE *file);
77 static void release_null (void *data);
78 
79 static void release_number (pdf_number *data);
80 static void write_number (FILE *file, const pdf_number
81  *number);
82 
83 static void write_string (FILE *file, const pdf_string *string);
84 static void release_string (pdf_string *data);
85 
86 static void write_name (FILE *file, const pdf_name *name);
87 static void release_name (pdf_name *data);
88 
89 static void write_array (FILE *file, const pdf_array *array);
90 static void release_array (pdf_array *data);
91 
92 static void write_dict (FILE *file, const pdf_dict *dict);
93 static void release_dict (pdf_dict *data);
94 
95 static void write_stream (FILE *file, pdf_stream *stream);
96 static void release_stream (pdf_stream *stream);
97 static int pdf_match_name (const pdf_obj *name_obj, const char *name); /* Name does not include the / */
98 
99 static unsigned char debug = 0, verbose = 0;
100 static char compression_level = 9;
101 
103 {
104  if (level >= 0 && level <= 9)
106  else {
107  ERROR("set_compression: compression level");
108  }
109 #ifndef HAVE_ZLIB_COMPRESS2
110  if (level != 0)
111  fprintf (stderr, "Unable to set compression level--your zlib doesn't have compress2()\n");
112 #endif
113  return;
114 }
115 
116 static unsigned pdf_version = 4;
117 void pdf_set_version (unsigned version)
118 {
119  if (version >= 2 && version <= 7) {
121  }
122 }
123 
125 {
126  debug = 1;
127 }
128 
130 {
131  if (verbose < 255)
132  verbose += 1;
133 }
134 
135 
136 void pdf_out_init (const char *filename)
137 {
138  char v;
139 #ifdef MEM_DEBUG
140 MEM_START
141 #endif
143  if (strlen(filename) < 128) {
144  sprintf (format_buffer, "Unable to open %s\n", filename);
145  } else
146  sprintf (format_buffer, "Unable to open file");
148  }
149  pdf_out (pdf_output_file, "%PDF-1.", strlen("%PDF-1."));
150  v = '0'+pdf_version;
151  pdf_out (pdf_output_file, &v, 1);
152  pdf_out (pdf_output_file, "\n", 1);
153  /* Adobe recommends writing % and four non-ASCII bytes in the second
154  line of a PDF, so that programs have a better chance of realizing
155  it is not a text file. The string here is "%" followed by "pdfm"
156  with the 8th bit set on each letter. */
157  pdf_out (pdf_output_file, "\045\360\344\346\355\n", 6);
158 #ifdef MEM_DEBUG
159 MEM_END
160 #endif
161 }
162 
163 static void dump_xref(void)
164 {
165  int length;
166  unsigned long i;
167  startxref = pdf_output_file_position; /* Record where this xref is for
168  trailer */
169  pdf_out (pdf_output_file, "xref\n", 5);
170  length = sprintf (format_buffer, "%d %lu\n", 0, next_label);
172  length = sprintf (format_buffer, "%010ld %05ld f \n", 0L, 65535L);
173  /* Every space counts. The space after the 'f' and 'n' is
174  *essential*. The PDF spec says the lines must be 20 characters
175  long including the end of line character. */
177  for (i=1; i<next_label; i++){
178  length = sprintf (format_buffer, "%010ld %05ld n \n",
179  output_xref[i-1].file_position, 0L);
181  }
182  /* Done with xref table */
184 }
185 
186 static void dump_trailer(void)
187 {
188  int length;
189  unsigned long starttrailer;
190  starttrailer = pdf_output_file_position;
191  pdf_out (pdf_output_file, "trailer\n", 8);
192  pdf_out (pdf_output_file, "<<\n", 3);
193  length = sprintf (format_buffer, "/Size %lu\n",
194  next_label);
196  if (pdf_root_obj == 0)
197  ERROR ("dump_trailer: Invalid root object");
198  length = sprintf (format_buffer, "/Root %u %u R\n", pdf_root_obj, 0);
200  if (pdf_info_obj != 0) {
201  length = sprintf (format_buffer, "/Info %u %u R\n", pdf_info_obj, 0);
203  }
204  pdf_out (pdf_output_file, ">>\n", 3);
205  pdf_out (pdf_output_file, "startxref\n", 10);
206  length = sprintf (format_buffer, "%lu\n", startxref);
208  pdf_out (pdf_output_file, "%%EOF\n", 6);
209 }
210 
211 void pdf_out_flush (void)
212 {
213  if (pdf_output_file) {
214  if (debug) fprintf (stderr, "pdf_obj_out_flush: dumping xref\n");
215  dump_xref();
216  if (debug) fprintf (stderr, "pdf_obj_out_flush: dumping trailer\n");
217  dump_trailer();
218  if (verbose) {
219  if (compression_level>0) {
220  fprintf (stderr, "\nCompression eliminated approximately %lu bytes",
222  }
223  }
224  fprintf (stderr, "\n%lu bytes written",
227  }
228 }
229 
230 void pdf_error_cleanup (void)
231 {
232  /* This routine is the cleanup required for an abnormal exit.
233  For now, simply close the file. */
234  if (pdf_output_file)
236 }
237 
238 
239 void pdf_set_root (pdf_obj *object)
240 {
241  if (pdf_root_obj != 0) {
242  ERROR ("pdf_set_root: root object already set");
243  }
244  if (object -> label == 0) { /* Make sure this object has a label */
245  pdf_label_obj (object);
246  }
247  pdf_root_obj = object -> label;
248 }
249 
250 void pdf_set_info (pdf_obj *object)
251 {
252  if (pdf_info_obj != 0) {
253  ERROR ("pdf_set_info: info object already set");
254  }
255  if (object -> label == 0) { /* Make sure this object has a label */
256  pdf_label_obj (object);
257  }
258  pdf_info_obj = object -> label;
259 }
260 
261 static void pdf_out_char (FILE *file, char c)
262 {
263  fputc (c, file);
264  /* Keep tallys for xref table *only* if writing a pdf file */
265  if (file == pdf_output_file) {
268  }
269  if (file == pdf_output_file && c == '\n')
271 }
272 
273 static void pdf_out (FILE *file, void *buffer, int length)
274 {
275  fwrite (buffer, 1, length, file);
276  /* Keep tallys for xref table *only* if writing a pdf file */
277  if (file == pdf_output_file) {
280  if (length > 0 && ((char *)buffer)[length-1] == '\n')
282  }
283 }
284 
285 static void pdf_out_white (FILE *file)
286 {
288  pdf_out_char (file, '\n');
289  } else {
290  pdf_out_char (file, ' ');
291  }
292  return;
293 }
294 
296 {
297  pdf_obj *result;
298  result = NEW (1, pdf_obj);
299  result -> type = type;
300  result -> data = NULL;
301  result -> label = 0;
302  result -> generation = 0;
303  result -> refcount = 1;
304  return result;
305 }
306 
307 static void pdf_label_obj (pdf_obj *object)
308 {
309  if (object == NULL)
310  return;
314  struct xref_entry);
315  }
316  if (object -> label == 0) { /* Don't change label on an already labeled
317  object. Ignore such calls */
318  /* Save so we can lookup this object by its number */
320  object -> label = next_label++;
321  object -> generation = 0;
322  }
323 }
324 
325 /* This doesn't really copy the object, but allows
326  it to be used without fear that somebody else will free it */
327 
329 {
330  if (object == NULL)
331  ERROR ("pdf_link_obj passed null pointer");
332  object -> refcount += 1;
333  return object;
334 }
335 
336 
338 {
339  pdf_obj *result;
340  pdf_indirect *indirect;
341 
342  if (object == NULL)
343  ERROR ("pdf_ref_obj passed null pointer");
344 
345  if (object -> refcount == 0) {
346  fprintf (stderr, "\npdf_ref_obj: Called with already released object");
347  pdf_write_obj (stderr, object);
348  ERROR ("Fatal Error\n");
349  }
351  indirect = NEW (1, pdf_indirect);
352  result -> data = indirect;
353  if (object -> type == PDF_INDIRECT) { /* If an object is already an indirect reference,
354  reference the original
355  object, not the indirect
356  one */
357  indirect -> label = ((pdf_indirect *) (object -> data)) -> label;
358  indirect -> generation = ((pdf_indirect *) (object -> data)) -> generation;
359  indirect -> dirty = ((pdf_indirect *) (object -> data)) -> dirty;
360  indirect -> dirty_file = ((pdf_indirect *) (object -> data)) -> dirty_file;
361  } else {
362  if (object -> label == 0) {
363  pdf_label_obj (object);
364  }
365  indirect -> label = object -> label;
366  indirect -> generation = object -> generation;
367  indirect -> dirty = 0;
368  indirect -> dirty_file = NULL;
369  }
370  return result;
371 }
372 
374 {
375  RELEASE (data);
376 }
377 
378 static void write_indirect (FILE *file, const pdf_indirect *indirect)
379 {
380  int length;
381 #ifdef MEM_DEBUG
382 MEM_START
383 #endif
384  if (indirect -> dirty) {
385  if (file == stderr) {
386  pdf_out (file, "{d}", 3);
387  length = sprintf (format_buffer, "%d %d R", indirect -> label,
388  indirect -> generation);
390  }
391  else {
392  pdf_obj *clean;
393  if (indirect -> dirty_file != pdf_input_file) {
394  fprintf (stderr, "\nwrite_indirect, label=%d, from_file=%p, current_file=%p\n", indirect -> label, indirect->dirty_file, pdf_input_file);
395  ERROR ("write_indirect: input PDF file doesn't match object");
396  }
397  clean = pdf_ref_file_obj (indirect -> label);
400  }
401  } else {
402  length = sprintf (format_buffer, "%d %d R", indirect -> label,
403  indirect -> generation);
405  }
406 #ifdef MEM_DEBUG
407 MEM_END
408 #endif
409 }
410 
412 {
413  pdf_obj *result;
415  result -> data = NULL;
416  return result;
417 }
418 
419 static void release_null (void *data)
420 {
421  return;
422 }
423 
424 static void write_null (FILE *file)
425 {
426  pdf_out (file, "null", 4);
427 }
428 
430 {
431  pdf_obj *result;
432  pdf_boolean *data;
434  data = NEW (1, pdf_boolean);
435  result -> data = data;
436  data -> value = value;
437  return result;
438 }
439 
441 {
442  RELEASE (data);
443 }
444 
445 static void write_boolean (FILE *file, const pdf_boolean *data)
446 {
447  if (data -> value) {
448  pdf_out (file, "true", 4);
449  }
450  else {
451  pdf_out (file, "false", 5);
452  }
453 }
454 
455 void pdf_set_boolean (pdf_obj *object, char value)
456 {
457  if (object == NULL || object -> type != PDF_BOOLEAN) {
458  ERROR ("pdf_set_boolean: Passed non-boolean object");
459  }
460  ((pdf_boolean *) (object -> data)) -> value = value;
461 }
462 
464 {
465  pdf_obj *result;
466  pdf_number *data;
468  data = NEW (1, pdf_number);
469  result -> data = data;
470  data -> value = value;
471  return result;
472 }
473 
475 {
476  RELEASE (data);
477 }
478 
479 static void write_number (FILE *file, const pdf_number *number)
480 {
481  int count;
482  count = sprintf (format_buffer, "%.10g", number -> value);
484 }
485 
486 
487 void pdf_set_number (pdf_obj *object, double value)
488 {
489  if (object == NULL || object -> type != PDF_NUMBER) {
490  ERROR ("pdf_set_number: Passed non-number object");
491  }
492  ((pdf_number *) (object -> data)) -> value = value;
493 }
494 
495 double pdf_number_value (pdf_obj *object)
496 {
497  if (object == NULL || object -> type != PDF_NUMBER) {
498  ERROR ("pdf_obj_number_value: Passed non-number object");
499  }
500  return ((pdf_number *)(object -> data)) -> value;
501 }
502 
503 pdf_obj *pdf_new_string (const void *string, unsigned length)
504 {
505  pdf_obj *result;
506  pdf_string *data;
508  data = NEW (1, pdf_string);
509  result -> data = data;
510  if (length != 0) {
511  data -> length = length;
512  data -> string = NEW (length+1, unsigned char);
513  memcpy (data -> string, string, length);
514  data -> string[length] = 0;
515  } else {
516  data -> length = 0;
517  data -> string = NULL;
518  }
519  return result;
520 }
521 
522 void *pdf_string_value (pdf_obj *a_pdf_string)
523 {
524  pdf_string *data;
525  data = a_pdf_string -> data;
526  return data -> string;
527 }
528 
529 unsigned int pdf_string_length (pdf_obj *a_pdf_string)
530 {
531  pdf_string *data;
532  data = a_pdf_string -> data;
533  return (data -> length);
534 }
535 
536 /* This routine escapes non printable characters and control
537  characters in an output string. It optionally remaps
538  the problem characters in the encoding */
539 
540 int pdfobj_escape_str (char *buffer, int bufsize, unsigned char *s,
541  int len, int remap)
542 {
543  int result = 0, i;
544  unsigned char ch;
545  for (i=0; i<len; i++) {
546  ch = remap? twiddle(s[i]): s[i];
547  /* Exit as fast as possible for printable characters */
548  if (result+4 > bufsize)
549  ERROR ("pdfobj_escape_str: Buffer overflow");
550  if (ch < 32 || ch > 126) {
551  buffer[result++] = '\\';
552  result += sprintf (buffer+result, "%03o", ch);
553  continue;
554  }
555  switch (ch) {
556  case '(':
557  buffer[result++] = '\\';
558  buffer[result++] = '(';
559  break;
560  case ')':
561  buffer[result++] = '\\';
562  buffer[result++] = ')';
563  break;
564  case '\\':
565  buffer[result++] = '\\';
566  buffer[result++] = '\\';
567  break;
568  default:
569  buffer[result++] = ch;
570  break;
571  }
572  }
573  return result;
574 }
575 
576 
577 static void write_string (FILE *file, const pdf_string *string)
578 {
579  unsigned char *s = string -> string;
580  int count, i;
581  pdf_out_char (file, '(');
582  /* This section of code probably isn't speed critical. Escaping the
583  characters in the string one at a time may seem slow, but it's
584  safe if the formatted string length exceeds FORMAT_BUF_SIZE.
585  Occasionally you see some long strings in PDF. pdfobj_escape_str
586  is also used for strings of text with no kerning. These must be
587  handled as quickly as possible since there are so many of them. */
588  for (i=0; i<string->length; i++) {
590  1, 0);
592  }
593  pdf_out_char (file, ')');
594 }
595 
597 {
598  if (data -> string != NULL)
599  RELEASE (data -> string);
600  RELEASE (data);
601 }
602 
603 void pdf_set_string (pdf_obj *object, unsigned char *string, unsigned length)
604 {
605  pdf_string *data;
606  if (object == NULL || object -> type != PDF_STRING) {
607  ERROR ("pdf_set_string: Passed non-string object");
608  }
609  data = object -> data;
610  if (data -> length != 0) {
611  RELEASE (data -> string);
612  }
613  if (length != 0) {
614  data -> length = length;
615  data -> string = NEW (length+1, unsigned char);
616  memcpy (data -> string, string, length);
617  (data->string)[length] = 0;
618  } else {
619  data -> length = 0;
620  data -> string = NULL;
621  }
622  return;
623 }
624 
625 int pdf_check_name(const char *name)
626 {
627  static char *valid_chars =
628  "!\"#$&'*+,-.0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\^_`abcdefghijklmnopqrstuvwxyz|~";
629  if (strspn (name, valid_chars) == strlen (name))
630  return 1;
631  else
632  return 0;
633 }
634 
635 pdf_obj *pdf_new_name (const char *name) /* name does *not* include the / */
636 {
637  pdf_obj *result;
638  unsigned length = strlen (name);
639  pdf_name *data;
640  if (!pdf_check_name (name)) {
641  fprintf (stderr, "Invalid PDF name \"%s\"\n", name);
642  ERROR ("pdf_new_name: invalid PDF name");
643  }
645  data = NEW (1, pdf_name);
646  result -> data = data;
647  if (length != 0) {
648  data -> name = NEW (length+1, char);
649  memcpy (data -> name, name, length);
650  (data->name)[length] = 0;
651  } else
652  data -> name = NULL;
653  return result;
654 }
655 
656 static void write_name (FILE *file, const pdf_name *name)
657 {
658  char *s = name -> name;
659  int i, length;
660  pdf_out_char (file, '/');
661  if (name -> name == NULL)
662  length = 0;
663  else
664  length = strlen (name -> name);
665  for (i=0; i < length; i++) {
666  if (isprint (s[i]) &&
667  s[i] != '/' &&
668  s[i] != '%' &&
669  s[i] != '(' &&
670  s[i] != ')' &&
671  s[i] != '[' &&
672  s[i] != ']')
673  pdf_out_char (file, s[i]);
674  }
675 }
676 
677 
678 static void release_name (pdf_name *data)
679 {
680  if (data -> name != NULL)
681  RELEASE (data -> name);
682  RELEASE (data);
683 }
684 
685 void pdf_set_name (pdf_obj *object, char *name)
686 {
687  pdf_name *data;
688  unsigned length = strlen (name);
689  if (object == NULL || object -> type != PDF_NAME) {
690  ERROR ("pdf_set_name: Passed non-name object");
691  }
692  data = object -> data;
693  if (data -> name != NULL) {
694  RELEASE (data -> name);
695  }
696  if (length != 0) {
697  data -> name = NEW (length+1, char);
698  memcpy (data -> name, name, length);
699  (data->name)[length] = 0;
700  } else {
701  data -> name = NULL;
702  }
703 }
704 
705 char *pdf_name_value (pdf_obj *object)
706 {
707  pdf_name *data;
708  if (object == NULL || object -> type != PDF_NAME) {
709  ERROR ("pdf_name_value: Passed non-name object");
710  }
711  data = object -> data;
712  if (data -> name == NULL)
713  return NULL;
714  return data -> name;
715 }
716 
717 
719 {
720  pdf_obj *result;
721  pdf_array *data;
723  data = NEW (1, pdf_array);
724  data -> values = NULL;
725  data -> max = 0;
726  data -> size = 0;
727  result -> data = data;
728  return result;
729 }
730 
731 static void write_array (FILE *file, const pdf_array *array)
732 {
733  if (array -> size > 0) {
734  unsigned long i;
735  pdf_out_char (file, '[');
736  for (i=0; i<array->size; i++) {
737  if (i != 0 &&
738  ((array->values)[i]->type) != PDF_STRING &&
739  ((array->values)[i]->type) != PDF_NAME &&
740  ((array->values)[i]->type) != PDF_ARRAY)
742  pdf_write_obj (file, (array->values)[i]);
743  }
744  pdf_out_char (file, ']');
745  } else {
746  write_null (file);
747  }
748 }
749 
751 {
752  pdf_array *data;
753  pdf_obj *result = NULL;
754  if (array == NULL) {
755  ERROR ("pdf_get_array: passed NULL object");
756  }
757  if (array -> type != PDF_ARRAY) {
758  ERROR ("pdf_get_array: passed non array object");
759  }
760  data = array -> data;
761  if (index < data -> size) {
762  result = (data->values)[index];
763  }
764  return result;
765 }
766 
768 {
769  unsigned long i;
770  for (i=0; i<data->size; i++) {
771  pdf_release_obj ((data ->values)[i]);
772  }
773  if (data->size > 0)
774  RELEASE (data->values);
775  RELEASE (data);
776 }
777 
778 void pdf_add_array (pdf_obj *array, pdf_obj *object) /* Array is ended
779  by a node with NULL
780  this pointer */
781 {
782  pdf_array *data;
783  if (array == NULL || array -> type != PDF_ARRAY) {
784  ERROR ("pdf_add_array: Passed non-array object");
785  }
786  data = array -> data;
787  if (data -> size >= data -> max) {
788  data->max += ARRAY_ALLOC_SIZE;
789  data->values = RENEW (data->values, data->max, pdf_obj *);
790  }
791  (data->values)[data->size++] = object;
792  return;
793 }
794 
795 
796 static void write_dict (FILE *file, const pdf_dict *dict)
797 {
798  pdf_out (file, "<<\n", 3);
799  while (dict -> key != NULL) {
800  pdf_write_obj (file, dict -> key);
801  if (((dict -> value) -> type) == PDF_BOOLEAN ||
802  ((dict -> value) -> type) == PDF_NUMBER ||
803  ((dict -> value) -> type) == PDF_INDIRECT ||
804  ((dict -> value) -> type) == PDF_NULL)
806  pdf_write_obj (file, dict -> value);
807  dict = dict -> next;
808  pdf_out_char (file, '\n');
809  }
810  pdf_out (file, ">>", 2);
811 }
812 
814 {
815  pdf_obj *result;
816  pdf_dict *data;
818  data = NEW (1, pdf_dict);
819  data -> key = NULL;
820  data -> value = NULL;
821  data -> next = NULL;
822  result -> data = data;
823  return result;
824 }
825 
826 static void release_dict (pdf_dict *data)
827 {
828  pdf_dict *next;
829  while (data != NULL && data -> key != NULL) {
830  pdf_release_obj (data -> key);
832  next = data -> next;
833  RELEASE (data);
834  data = next;
835  }
836  RELEASE (data);
837 }
838 
839 void pdf_add_dict (pdf_obj *dict, pdf_obj *key, pdf_obj *value) /* Array is ended
840  by a node with NULL
841  this pointer */
842 {
843  pdf_dict *data;
845  if (key == NULL || key -> type != PDF_NAME ) {
846  ERROR ("pdf_add_dict: Passed invalid key");
847  }
848  if (value != NULL &&
849  (value -> type == 0 || value -> type > PDF_INDIRECT )) {
850  ERROR ("pdf_add_dict: Passed invalid value");
851  }
852  if (dict == NULL || dict -> type != PDF_DICT) {
853  fprintf (stderr, "key:");
854  pdf_write_obj (stderr, key);
855  fprintf (stderr, "value:");
856  pdf_write_obj (stderr, value);
857  ERROR ("pdf_add_dict: Passed non-dict object");
858  }
859  data = dict -> data;
860  /* If this key already exists, simply replace the value */
861  while (data -> key != NULL) {
862  if (!strcmp (pdf_name_value(key), pdf_name_value(data->key))) {
863  /* Release the old value */
864  pdf_release_obj (data->value);
865  /* Release the new key (we don't need it) */
867  data->value = value;
868  break;
869  }
870  data = data -> next;
871  }
872  /* If we didn't find the key, build a new "end" node and add
873  the new key just before the end */
874  if (data -> key == NULL) {
875  new_node = NEW (1, pdf_dict);
876  new_node -> key = NULL;
877  new_node -> value = NULL;
878  new_node -> next = NULL;
879  data -> next = new_node;
880  data -> key = key;
881  data -> value = value;
882  }
883  return;
884 }
885 
886 /* pdf_merge_dict makes a link for each item in dict2 before
887  stealing it */
888 void pdf_merge_dict (pdf_obj *dict1, pdf_obj *dict2)
889 {
890  pdf_dict *data;
891  if (dict1 == NULL || dict1 -> type != PDF_DICT)
892  ERROR ("pdf_merge_dict: Passed invalid first dictionary");
893  if (dict2 == NULL || dict2 -> type != PDF_DICT)
894  ERROR ("pdf_merge_dict: Passed invalid second dictionary");
895  data = dict2 -> data;
896  while (data -> key != NULL) {
897  pdf_add_dict (dict1, pdf_link_obj(data -> key),
898  pdf_link_obj (data -> value));
899  data = data -> next;
900  }
901 }
902 
903 static int pdf_match_name (const pdf_obj *name_obj, const char *name_string)
904 {
905  pdf_name *data;
906  data = name_obj -> data;
907  return (!strcmp (data -> name, name_string));
908 }
909 
910 pdf_obj *pdf_lookup_dict (const pdf_obj *dict, const char *name)
911 {
912  pdf_dict *data;
913  if (dict == NULL || dict ->type != PDF_DICT)
914  ERROR ("pdf_lookup_dict: Passed invalid dictionary");
915  data = dict -> data;
916  while (data -> key != NULL) {
917  if (pdf_match_name (data -> key, name))
918  return data -> value;
919  data = data -> next;
920  }
921  return NULL;
922 }
923 
924 void pdf_remove_dict (pdf_obj *dict, const char *name)
925 {
926  pdf_dict *data, **data_p;
927  if (dict == NULL || dict->type != PDF_DICT)
928  ERROR ("pdf_remove_dict: Passed invalid dictionary");
929  data = (dict -> data);
930  data_p = (pdf_dict **) &(dict->data);
931  while (data->key != NULL) {
932  if (pdf_match_name (data -> key, name)) {
933  pdf_release_obj (data -> key);
935  *data_p = data -> next;
936  RELEASE (data);
937  break;
938  }
939  data_p = &(data->next);
940  data = data -> next;
941  }
942  return;
943 }
944 
945 char *pdf_get_dict (const pdf_obj *dict, int index)
946 {
947  pdf_dict *data;
948  char *result;
949  if (dict == NULL) {
950  ERROR ("pdf_get_dict: passed NULL object");
951  }
952  if (dict -> type != PDF_DICT) {
953  ERROR ("pdf_get_dict: passed non array object");
954  }
955  data = dict -> data;
956  while (index-- > 0 && data -> next != NULL)
957  data = data -> next;
958  if (data -> next == NULL)
959  return NULL;
960  result = pdf_name_value (data -> key);
961  return result;
962 }
963 
965 {
966  pdf_obj *result;
967 #ifdef HAVE_ZLIB
968  pdf_obj *filters = NULL;
969 #endif /* HAVE_ZLIB */
970  pdf_stream *data;
972  data = NEW (1, pdf_stream);
973  result -> data = data;
974  data -> dict = pdf_new_dict (); /* Although we are using an arbitrary
975  pdf_object here, it must have
976  type=PDF_DICT and cannot be an
977  indirect reference. This will
978  be checked by the output routine
979  */
980  data -> _flags = flags;
981 #ifdef HAVE_ZLIB
982  if ((flags & STREAM_COMPRESS) && compression_level > 0) {
983  if (!filters) {
985  pdf_add_dict (data -> dict, pdf_new_name ("Filter"), filters);
986  }
987  pdf_add_array (filters, pdf_new_name ("FlateDecode"));
988  }
989 #endif /* HAVE_ZLIB */
990 
991  data -> stream_length = 0;
992  data -> max_length = 0;
993  data -> stream = NULL;
994  return result;
995 }
996 
997 
999 {
1000 #define COMPRESS_LEVEL 9
1001 #define THRESHOLD 100
1002  unsigned char *filtered;
1003  unsigned long filtered_length;
1004 #ifdef HAVE_ZLIB
1005  unsigned long buffer_length;
1006  unsigned char *buffer;
1007 #endif /* HAVE_ZLIB */
1008  /* Always work from a copy of the stream */
1009  /* All filters read from "filtered" and leave their result in
1010  "filtered" */
1011  filtered = NEW (stream->stream_length+1, unsigned char);
1012  memcpy (filtered, stream->stream, stream->stream_length);
1013  filtered_length = stream->stream_length;
1014 
1015 #ifdef HAVE_ZLIB
1016  /* Apply compression filter if requested */
1017  if ((stream -> _flags & STREAM_COMPRESS) && compression_level > 0) {
1018  buffer_length = filtered_length + filtered_length/1000 + 14;
1019  buffer = NEW (buffer_length, unsigned char);
1020 #ifdef HAVE_ZLIB_COMPRESS2
1021  if (compress2 (buffer, &buffer_length, filtered,
1022  filtered_length, compression_level))
1023  ERROR ("Zlib error");
1024 #else
1025  if (compress (buffer, &buffer_length, filtered,
1026  filtered_length))
1027  ERROR ("Zlib error");
1028 #endif /* HAVE_ZLIB_COMPRESS2 */
1029  RELEASE (filtered);
1030  filtered = buffer;
1031  compression_saved += (filtered_length-buffer_length)-strlen("/Filter [/FlateDecode]\n");
1032  filtered_length = buffer_length;
1033  }
1034 #endif /* HAVE_ZLIB */
1035  /* Add a '\n' if the last character wasn't one */
1036  if (filtered_length > 0 && filtered[filtered_length-1] != '\n') {
1037  filtered[filtered_length++] = '\n';
1038  }
1039  pdf_add_dict (stream->dict,
1040  pdf_new_name ("Length"),
1041  pdf_new_number(filtered_length));
1042  pdf_write_obj (file, stream -> dict);
1043  pdf_out (file, "\nstream\n", 8);
1044 
1045  if (filtered_length > 0) {
1046  pdf_out (file, filtered, filtered_length);
1047  }
1048 
1049  RELEASE (filtered);
1050  /* This stream length "object" gets reset every time write_stream is
1051  called for the stream object */
1052  /* If this stream gets written more than once with different
1053  filters, this could be a problem */
1054  pdf_out (file, "endstream", 9);
1055  return;
1056 }
1057 
1059 {
1060  pdf_release_obj (stream -> dict);
1061  if (stream -> stream_length > 0)
1062  RELEASE (stream -> stream);
1063  RELEASE (stream);
1064 }
1065 
1067 {
1068  pdf_stream *data;
1069  if (stream == NULL || stream -> type != PDF_STREAM) {
1070  ERROR ("pdf_stream_dict: Passed non-stream object");
1071  }
1072  data = stream -> data;
1073  return data -> dict;
1074 }
1075 
1076 void pdf_add_stream (pdf_obj *stream, char *stream_data, unsigned length)
1077 {
1078  pdf_stream *data;
1079  if (stream == NULL || stream -> type != PDF_STREAM) {
1080  ERROR ("pdf_add_stream: Passed non-stream object");
1081  }
1082  if (length == 0)
1083  return;
1084  data = stream -> data;
1085  if (data -> stream_length + length > data -> max_length) {
1086  data -> max_length += length + STREAM_ALLOC_SIZE;
1087  data -> stream = RENEW (data -> stream, data->max_length, char);
1088  }
1089  memcpy ((data->stream)+(data->stream_length), stream_data,
1090  length);
1091  data->stream_length += length;
1092 }
1093 
1094 void pdf_write_obj (FILE *file, const pdf_obj *object)
1095 {
1096  if (object == NULL) {
1097  write_null(file);
1098  return;
1099  }
1100  if (object -> type > PDF_INDIRECT) {
1101  fprintf (stderr, "Object type = %d\n", object -> type);
1102  ERROR ("pdf_write_obj: Called with invalid object");
1103  }
1104  if (file == stderr)
1105  fprintf (stderr, "{%d}", object -> refcount);
1106  switch (object -> type) {
1107  case PDF_BOOLEAN:
1108  write_boolean (file, object -> data);
1109  break;
1110  case PDF_NUMBER:
1111  write_number (file, object -> data);
1112  break;
1113  case PDF_STRING:
1114  write_string (file, object -> data);
1115  break;
1116  case PDF_NAME:
1117  write_name (file, object -> data);
1118  break;
1119  case PDF_ARRAY:
1120  write_array (file, object -> data);
1121  break;
1122  case PDF_DICT:
1123  write_dict (file, object -> data);
1124  break;
1125  case PDF_STREAM:
1126  write_stream (file, object -> data);
1127  break;
1128  case PDF_NULL:
1129  write_null (file);
1130  break;
1131  case PDF_INDIRECT:
1132  write_indirect (file, object -> data);
1133  break;
1134  }
1135 }
1136 
1137 static void pdf_flush_obj (FILE *file, const pdf_obj *object)
1138  /* Write the object to the file */
1139 {
1140  int length;
1141  /* Record file position. No object is numbered 0, so subtract 1
1142  when using as an array index */
1144  length = sprintf (format_buffer, "%lu %d obj\n", object -> label ,
1145  object -> generation);
1147  pdf_write_obj (file, object);
1148  pdf_out (file, "\nendobj\n", 8);
1149 }
1150 
1151 
1152 void pdf_release_obj (pdf_obj *object)
1153 {
1154  if (object == NULL)
1155  return;
1156  if (object -> type > PDF_INDIRECT ||
1157  object -> refcount <= 0) {
1158  fprintf (stderr, "pdf_release_obj: object = %p, type = %d\n", object, object ->
1159  type);
1160  pdf_write_obj (stderr, object);
1161  ERROR ("pdf_release_obj: Called with invalid object");
1162  }
1163  object -> refcount -= 1;
1164  if (object -> refcount == 0) { /* Nothing is using this object so it's okay to
1165  remove it */
1166  /* Nonzero "label" means object needs to be written before it's destroyed*/
1167  if (object -> label && pdf_output_file != NULL) {
1168  pdf_flush_obj (pdf_output_file, object);
1169  }
1170  switch (object -> type) {
1171  case PDF_BOOLEAN:
1172  release_boolean (object -> data);
1173  break;
1174  case PDF_NULL:
1175  release_null (object -> data);
1176  break;
1177  case PDF_NUMBER:
1178  release_number (object -> data);
1179  break;
1180  case PDF_STRING:
1181  release_string (object -> data);
1182  break;
1183  case PDF_NAME:
1184  release_name (object -> data);
1185  break;
1186  case PDF_ARRAY:
1187  release_array (object -> data);
1188  break;
1189  case PDF_DICT:
1190  release_dict (object -> data);
1191  break;
1192  case PDF_STREAM:
1193  release_stream (object -> data);
1194  break;
1195  case PDF_INDIRECT:
1196  release_indirect (object -> data);
1197  break;
1198  }
1199  /* This might help detect freeing already freed objects */
1200  /* object -> type = -1;*/
1201  RELEASE (object);
1202  }
1203 }
1204 
1205 static int backup_line (void)
1206 {
1207  int ch;
1208  ch = -1;
1209  if (debug) {
1210  fprintf (stderr, "\nbackup_line:\n");
1211  }
1212  /* Note: this code should work even if \r\n is eol.
1213  It could fail on a machine where \n is eol and
1214  there is a \r in the stream---Highly unlikely
1215  in the last few bytes where this is likely to be used.
1216  */
1217  if (tell_position (pdf_input_file) > 1)
1218  do {
1220  if (debug)
1221  fprintf (stderr, "%c", ch);
1222  } while (tell_position (pdf_input_file) > 0 &&
1223  (ch = fgetc (pdf_input_file)) >= 0 &&
1224  (ch != '\n' && ch != '\r' ));
1225  if (debug)
1226  fprintf (stderr, "<-\n");
1227  if (ch < 0) {
1228  return 0;
1229  }
1230  return 1;
1231 }
1232 
1233 static unsigned long pdf_file_size = 0;
1234 
1235 static long find_xref(void)
1236 {
1237  long currentpos, xref_pos;
1238  int tries = 10;
1239  char *start, *end, *number;
1240  if (debug)
1241  fprintf (stderr, "(find_xref");
1244  do {
1245  if (!backup_line()) {
1246  tries = 0;
1247  break;
1248  }
1249  currentpos = tell_position(pdf_input_file);
1250  fread (work_buffer, sizeof(char), strlen("startxref"),
1251  pdf_input_file);
1252  if (debug) {
1253  work_buffer[strlen("startxref")] = 0;
1254  fprintf (stderr, "[%s]\n", work_buffer);
1255  }
1256  seek_absolute(pdf_input_file, currentpos);
1257  tries--;
1258  } while (tries > 0 && strncmp (work_buffer, "startxref", strlen ("startxref")));
1259  if (tries <= 0)
1260  return 0;
1261  /* Skip rest of this line */
1263  /* Next line of input file should contain actual xref location */
1265  if (debug) {
1266  fprintf (stderr, "\n->[%s]<-\n", work_buffer);
1267  }
1268  start = work_buffer;
1270  skip_white(&start, end);
1271  xref_pos = (long) atof (number = parse_number (&start, end));
1272  RELEASE (number);
1273  if (debug) {
1274  fprintf (stderr, ")\n");
1275  fprintf (stderr, "xref @ %lu\n", xref_pos);
1276  }
1277  return xref_pos;
1278 }
1279 
1281 {
1282  char *start;
1283 #ifdef MEM_DEBUG
1284 MEM_START
1285 #endif
1286  /* This routine must be called with the file pointer located at
1287  the start of the trailer */
1288  /* Fill work_buffer and hope trailer fits. This should
1289  be made a bit more robust sometime */
1290  if (fread (work_buffer, sizeof(char), WORK_BUFFER_SIZE,
1291  pdf_input_file) == 0 ||
1292  strncmp (work_buffer, "trailer", strlen("trailer"))) {
1293  fprintf (stderr, "No trailer. Are you sure this is a PDF file?\n");
1294  fprintf (stderr, "\nbuffer:\n->%s<-\n", work_buffer);
1295  return NULL;
1296  }
1297  start = work_buffer + strlen("trailer");
1299 #ifdef MEM_DEBUG
1300 MEM_END
1301 #endif
1303 }
1304 
1305 struct object
1306 {
1307  unsigned long position;
1308  unsigned generation;
1309  /* Object numbers in original file and new file must have different
1310  object numbers.
1311  new_ref provides a reference for the object in the new file
1312  object space. When it is first set, an object in the old file
1313  is copied to the new file with a new number. new_ref remains set
1314  until the file is closed so that future references can access the
1315  object via new_ref instead of copying the object again */
1318  int used;
1321 
1322 long next_object (unsigned long obj)
1323 {
1324  /* routine tries to estimate an upper bound for character position
1325  of the end of the object, so it knows how big the buffer must be.
1326  The parsing routines require that the entire object be read into
1327  memory. It would be a major pain to rewrite them. The worst case
1328  is that an object before an xref table will grab the whole table
1329  :-( */
1330  unsigned long i;
1331  long this_position, result = pdf_file_size; /* Worst case */
1332  this_position = xref_table[obj].position;
1333  /* Check all other objects to find next one */
1334  for (i=0; i<num_input_objects; i++) {
1335  if ((xref_table[i].used) &&
1336  xref_table[i].position > this_position &&
1339  }
1340  return result;
1341 }
1342 
1343 /* The following routine returns a reference to an object existing
1344  only in the input file. It does this as follows. If the object
1345  has never been referenced before, it reads the object
1346  in and creates a reference to it. Then it writes
1347  the object out, keeping the existing reference. If the
1348  object has been read in (and written out) before, it simply
1349  returns the retained existing reference to that object */
1350 
1351 pdf_obj *pdf_ref_file_obj (unsigned long obj_no)
1352 {
1353  pdf_obj *direct, *indirect;
1354 #ifdef MEM_DEBUG
1355 MEM_START
1356 #endif
1357  if (obj_no >= num_input_objects) {
1358  fprintf (stderr, "\n\npdf_ref_file_obj: nonexistent object\n");
1359  return NULL;
1360  }
1361  if (xref_table[obj_no].indirect != NULL) {
1362  return pdf_link_obj(xref_table[obj_no].indirect);
1363  }
1364  if ((direct = pdf_read_object (obj_no)) == NULL) {
1365  fprintf (stderr, "\npdf_ref_file_obj: Could not read object\n");
1366  return NULL;
1367  }
1368  indirect = pdf_ref_obj (direct);
1369  xref_table[obj_no].indirect = indirect;
1370  xref_table[obj_no].direct = direct;
1371  /* Make sure the caller can't doesn't free this object */
1372 #ifdef MEM_DEBUG
1373 MEM_END
1374 #endif
1375  return pdf_link_obj(indirect);
1376 }
1377 
1378 
1379 pdf_obj *pdf_new_ref (unsigned long label, int generation)
1380 {
1381  pdf_obj *result;
1382  pdf_indirect *indirect;
1383  if (label >= num_input_objects || label < 0) {
1384  fprintf (stderr, "pdf_new_ref: Object doesn't exist\n");
1385  return NULL;
1386  }
1388  indirect = NEW (1, pdf_indirect);
1389  result -> data = indirect;
1390  indirect -> label = label;
1391  indirect -> generation = generation;
1392  indirect -> dirty = 1;
1393  indirect -> dirty_file = pdf_input_file;
1394  return result;
1395 }
1396 
1397 pdf_obj *pdf_read_object (unsigned long obj_no)
1398 {
1399  long start_pos, end_pos;
1400  char *buffer, *number, *parse_pointer, *end;
1401  pdf_obj *result;
1402 #ifdef MEM_DEBUG
1403 MEM_START
1404 #endif
1405  if (debug) {
1406  fprintf (stderr, "\nread_object: obj=%lu\n", obj_no);
1407  }
1408  if (obj_no < 0 || obj_no >= num_input_objects) {
1409  fprintf (stderr, "\nTrying to read nonexistent object\n");
1410  return NULL;
1411  }
1412  if (!xref_table[obj_no].used) {
1413  fprintf (stderr, "\nTrying to read deleted object\n");
1414  return NULL;
1415  }
1416  if (debug) {
1417  fprintf (stderr, "\nobj@%lu\n", xref_table[obj_no].position);
1418  }
1420  xref_table[obj_no].position);
1421  end_pos = next_object (obj_no);
1422  if (debug) {
1423  fprintf (stderr, "\nendobj@%lu\n", end_pos);
1424  }
1425  buffer = NEW (end_pos - start_pos+1, char);
1426  fread (buffer, sizeof(char), end_pos-start_pos, pdf_input_file);
1427  buffer[end_pos-start_pos] = 0;
1428  if (debug) {
1429  fprintf (stderr, "\nobject:\n%s", buffer);
1430  }
1431  parse_pointer = buffer;
1432  end = buffer+(end_pos-start_pos);
1433  skip_white (&parse_pointer, end);
1434  number = parse_number (&parse_pointer, end);
1435  if ((int) atof(number) != obj_no) {
1436  fprintf (stderr, "Object number doesn't match\n");
1437  RELEASE (buffer);
1438  return NULL;
1439  }
1440  if (number != NULL)
1441  RELEASE(number);
1442  skip_white (&parse_pointer, end);
1443  number = parse_number (&parse_pointer, end);
1444  if (number != NULL)
1445  RELEASE(number);
1446  skip_white(&parse_pointer, end);
1447  if (strncmp(parse_pointer, "obj", strlen("obj"))) {
1448  fprintf (stderr, "Didn't find \"obj\"\n");
1449  RELEASE (buffer);
1450  return (NULL);
1451  }
1452  parse_pointer += strlen("obj");
1453  result = parse_pdf_object (&parse_pointer, end);
1454  skip_white (&parse_pointer, end);
1455  if (strncmp(parse_pointer, "endobj", strlen("endobj"))) {
1456  fprintf (stderr, "Didn't find \"endobj\"\n");
1457  if (result != NULL)
1459  result = NULL;
1460  }
1461  RELEASE (buffer);
1462  return (result);
1463 #ifdef MEM_DEBUG
1464 MEM_END
1465 #endif
1466 }
1467 /* pdf_deref_obj always returns a link instead of the original */
1469 {
1470  pdf_obj *result, *tmp;
1471  pdf_indirect *indirect;
1472  if (obj == NULL)
1473  return NULL;
1474  if (obj -> type != PDF_INDIRECT) {
1475  return pdf_link_obj (obj);
1476  }
1477  indirect = obj -> data;
1478  if (!(indirect -> dirty)) {
1479  ERROR ("Tried to deref a non-file object");
1480  }
1481  result = pdf_read_object (indirect -> label);
1482 
1483  if (debug){
1484  fprintf (stderr, "\npdf_deref_obj: read_object returned\n");
1485  pdf_write_obj (stderr, result);
1486  }
1487 
1488  while (result && result -> type == PDF_INDIRECT) {
1489  tmp = pdf_read_object (result -> label);
1491  result = tmp;
1492  }
1493  return result;
1494 }
1495 
1496 /* extends the xref table if we get another segment
1497  with higher object numbers than the current object */
1498 static void extend_xref (long new_size)
1499 {
1500  unsigned long i;
1502  struct object);
1503  for (i=num_input_objects; i<new_size; i++) {
1504  xref_table[i].direct = NULL;
1506  xref_table[i].used = 0;
1507  xref_table[i].position = 0;
1508  }
1510 }
1511 
1512 
1513 
1514 static int parse_xref (void)
1515 {
1516  unsigned long first_obj, num_table_objects;
1517  unsigned long i;
1518  /* This routine reads one xref segment. It must be called
1519  positioned at the beginning of an xref table. It may be called
1520  multiple times on the same file. xref tables sometimes come in
1521  pieces */
1523  if (strncmp (work_buffer, "xref", strlen("xref"))) {
1524  fprintf (stderr, "No xref. Are you sure this is a PDF file?\n");
1525  return 0;
1526  }
1527  /* Next line in file has first item and size of table */
1528  for (;;) {
1529  unsigned long current_pos;
1530  current_pos = tell_position (pdf_input_file);
1532  NULL)
1533  ERROR ("parse_xref: premature end of PDF file while parsing xref");
1534  if (!strncmp (work_buffer, "trailer", strlen ("trailer"))) {
1535  /* Backup... This is ugly, but it seems like the safest thing to
1536  do. It is possible the trailer dictionary starts on the same
1537  logical line as the word trailer. In that case, the mfgets
1538  call might have started to read the trailer dictionary and
1539  parse_trailer would fail */
1540  seek_absolute (pdf_input_file, current_pos);
1541  break;
1542  }
1543  sscanf (work_buffer, "%lu %lu", &first_obj, &num_table_objects);
1544  if (num_input_objects < first_obj+num_table_objects) {
1545  extend_xref (first_obj+num_table_objects);
1546  }
1547  if (debug) {
1548  fprintf (stderr, "\nfirstobj=%lu,number=%lu\n",
1549  first_obj,num_table_objects);
1550  }
1551  for (i=first_obj; i<first_obj+num_table_objects; i++) {
1552  fread (work_buffer, sizeof(char), 20, pdf_input_file);
1553  /* Don't overwrite positions that have already been set by a
1554  modified xref table. We are working our way backwards
1555  through the reference table, so we only set "position"
1556  if it hasn't been set yet. */
1557  if (xref_table[i].position == 0) {
1558  work_buffer[19] = 0;
1559  sscanf (work_buffer, "%lu %u", &(xref_table[i].position),
1560  &(xref_table[i].generation));
1561  }
1562  if (debug) {
1563  fprintf (stderr, "pos: %lu gen: %u\n", xref_table[i].position,
1564  xref_table[i].generation);
1565  }
1566  if (work_buffer[17] != 'n' && work_buffer[17] != 'f') {
1567  fprintf (stderr, "PDF file is corrupt\n");
1568  fprintf (stderr, "[%s]\n", work_buffer);
1569  return 0;
1570  }
1571  if (work_buffer[17] == 'n')
1572  xref_table[i].used = 1;
1573  else
1574  xref_table[i].used = 0;
1575  xref_table[i].direct = NULL;
1577  }
1578  }
1579  return 1;
1580 }
1581 
1583 {
1584  pdf_obj *main_trailer, *prev_trailer, *prev_xref, *xref_size;
1585  long xref_pos;
1586 #ifdef MEM_DEBUG
1587 MEM_START
1588 #endif
1589  if ((xref_pos = find_xref()) == 0) {
1590  fprintf (stderr, "Can't find xref table.\n");
1591  return NULL;
1592  }
1593  if (debug) {
1594  fprintf(stderr, "xref@%lu\n", xref_pos);
1595  }
1596  /* Read primary xref table */
1597  seek_absolute (pdf_input_file, xref_pos);
1598  if (!parse_xref()) {
1599  fprintf (stderr,
1600  "\nCouldn't read xref table. Is this a correct PDF file?\n");
1601  return NULL;
1602  }
1603  if ((main_trailer = parse_trailer()) == NULL) {
1604  fprintf (stderr,
1605  "\nCouldn't read xref trailer. Is this a correct PDF file?\n");
1606  return NULL;
1607  }
1608  if (pdf_lookup_dict (main_trailer, "Root") == NULL ||
1609  (xref_size = pdf_lookup_dict (main_trailer, "Size")) == NULL) {
1610  fprintf (stderr,
1611  "\nTrailer doesn't have catalog or a size. Is this a correct PDF file?\n");
1612  return NULL;
1613  }
1614  if (num_input_objects < pdf_number_value (xref_size)) {
1615  extend_xref ((long)pdf_number_value (xref_size));
1616  }
1617  /* Read any additional xref tables */
1618  prev_trailer = pdf_link_obj (main_trailer);
1619  while ((prev_xref = pdf_lookup_dict (prev_trailer, "Prev")) != NULL) {
1620  xref_pos = pdf_number_value (prev_xref);
1621  seek_absolute (pdf_input_file, xref_pos);
1622  pdf_release_obj (prev_trailer);
1623  if (!parse_xref()) {
1624  fprintf (stderr,
1625  "\nCouldn't read xref table. Is this a correct PDF file?\n");
1626  return NULL;
1627  }
1628  if ((prev_trailer = parse_trailer()) == NULL) {
1629  fprintf (stderr,
1630  "\nCouldn't read xref trailer. Is this a correct PDF file?\n");
1631  return NULL;
1632  }
1633  if (debug) {
1634  fprintf (stderr, "\nprev_trailer:\n");
1635  pdf_write_obj (stderr, prev_trailer);
1636  }
1637  }
1638 #ifdef MEM_DEBUG
1639 MEM_END
1640 #endif
1641  pdf_release_obj (prev_trailer);
1642  return main_trailer;
1643 }
1644 
1645 static char any_open = 0;
1646 
1648 {
1649  pdf_obj *trailer;
1650 #ifdef MEM_DEBUG
1651 MEM_START
1652 #endif
1653  if (any_open) {
1654  fprintf (stderr, "\nOnly one PDF file may be open at one time.\n");
1655  any_open = 1;
1656  exit(1);
1657  }
1658  pdf_input_file = file;
1659  if (!check_for_pdf (pdf_input_file)) {
1660  fprintf (stderr, "pdf_open: Not a PDF 1.[1-3] file\n");
1661  return NULL;
1662  }
1663  if ((trailer = read_xref()) == NULL) {
1664  fprintf (stderr, "No trailer.\n");
1665  pdf_close ();
1666  return NULL;
1667  }
1668  if (debug) {
1669  fprintf (stderr, "\nDone with xref:\n");
1670  }
1671 #ifdef MEM_DEBUG
1672  MEM_END
1673 #endif
1674  return trailer;
1675 }
1676 
1677 void pdf_close (void)
1678 {
1679  /* Following loop must be iterated because each write could trigger
1680  an additional indirect reference of an object with a lower
1681  number! */
1682  unsigned long i;
1683  int done;
1684  if (debug) {
1685  fprintf (stderr, "\npdf_close:\n");
1686  fprintf (stderr, "pdf_input_file=%p\n", pdf_input_file);
1687  }
1688  do {
1689  done = 1;
1690  for (i=0; i<num_input_objects; i++) {
1691  if (xref_table[i].direct != NULL) {
1693  xref_table[i].direct = NULL;
1694  done = 0;
1695  }
1696  }
1697  } while (!done);
1698  /* Now take care of the indirect objects
1699  They had to be left around until all the direct
1700  objects were flushed */
1701  for (i=0; i<num_input_objects; i++) {
1702  if (xref_table[i].indirect != NULL) {
1703  pdf_release_obj (xref_table[i].indirect);
1704  }
1705  }
1706  RELEASE (xref_table);
1707  xref_table = NULL;
1708  num_input_objects = 0;
1709  any_open = 0;
1710  pdf_input_file = NULL;
1711  if (debug) {
1712  fprintf (stderr, "\nexiting pdf_close:\n");
1713  }
1714 }
1715 
1717 {
1718  int result = 0;
1719  rewind (file);
1720  if (fread (work_buffer, sizeof(char), strlen("%PDF-1.x"), file) ==
1721  strlen("%PDF-1.x") &&
1722  !strncmp(work_buffer, "%PDF-1.", strlen("%PDF-1."))) {
1723  if (work_buffer[7] >= '0' && work_buffer[7] <= '0'+pdf_version)
1724  result = 1;
1725  else {
1726  fprintf (stderr, "\nVersion of PDF file (1.%c) is newer than version limit specification.\n", work_buffer[7]);
1727  }
1728  }
1729  return result;
1730 }
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
int level
Definition: afm2pl.c:1694
#define type(a)
Definition: aptex-macros.h:171
#define count(a)
Definition: aptex-macros.h:781
#define name
#define next(a)
Definition: aptex-macros.h:924
size_t __cdecl strspn(char const *_Str, char const *_Control)
int filters
Definition: bmp2png.c:22
int v
Definition: dviconv.c:10
#define fread
Definition: xxstdio.h:25
#define fgetc
Definition: xxstdio.h:26
int strcmp()
Definition: coll.cpp:143
int sscanf()
struct rect data
Definition: dvipdfm.c:64
#define s
Definition: afcover.h:80
#define c(n)
Definition: gpos-common.c:150
#define FOPEN_WBIN_MODE
Definition: gsftopk.c:171
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define bufsize
void * object
Definition: jmemsys.h:48
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
void exit()
#define NEW
Definition: gdkanji.c:77
int compress2(Bytef *dest, uLongf *destLen, Bytef *source, uLong sourceLen, int level)
Definition: compress.c:22
double atof(const char *)
static void skip_white(const char **pp, const char *endptr)
Definition: dpxutil.c:74
#define RENEW(p, n, type)
Definition: mem.h:38
#define RELEASE(p)
Definition: mem.h:39
void seek_relative(FILE *file, int32_t pos)
Definition: mfileio.c:85
char * mfgets(char *buffer, int length, FILE *file)
Definition: mfileio.c:132
void seek_end(FILE *file)
Definition: mfileio.c:93
void seek_absolute(FILE *file, int32_t pos)
Definition: mfileio.c:78
int32_t tell_position(FILE *file)
Definition: mfileio.c:100
char work_buffer[1024]
Definition: mfileio.c:171
#define WORK_BUFFER_SIZE
Definition: mfileio.h:68
#define MFOPEN(name, mode)
Definition: mfileio.h:42
#define MFCLOSE(file)
Definition: mfileio.h:44
int dirty
Definition: pdfdoc.c:2774
pdf_obj * pdf_new_array(void)
Definition: pdfobj.c:1421
void pdf_error_cleanup(void)
Definition: pdfobj.c:750
pdf_obj * pdf_new_name(const char *name)
Definition: pdfobj.c:1330
void pdf_close(pdf_file *pf)
Definition: pdfobj.c:4320
void pdf_out_flush(void)
Definition: pdfobj.c:659
pdf_obj * pdf_new_number(double value)
Definition: pdfobj.c:1076
#define STREAM_ALLOC_SIZE
Definition: pdfobj.c:50
pdf_obj * pdf_ref_obj(pdf_obj *object)
Definition: pdfobj.c:960
pdf_obj * pdf_deref_obj(pdf_obj *obj)
Definition: pdfobj.c:3688
char * pdf_name_value(pdf_obj *object)
Definition: pdfobj.c:1404
pdf_obj * pdf_new_stream(int flags)
Definition: pdfobj.c:1863
pdf_file * pdf_open(const char *ident, FILE *file)
Definition: pdfobj.c:4243
double pdf_number_value(pdf_obj *object)
Definition: pdfobj.c:1119
void pdf_release_obj(pdf_obj *object)
Definition: pdfobj.c:3217
#define ARRAY_ALLOC_SIZE
Definition: pdfobj.c:51
void pdf_remove_dict(pdf_obj *dict, const char *name)
Definition: pdfobj.c:1841
void pdf_set_root(pdf_obj *object)
Definition: pdfobj.c:764
void pdf_set_string(pdf_obj *object, unsigned char *str, unsigned length)
Definition: pdfobj.c:1307
void pdf_set_info(pdf_obj *object)
Definition: pdfobj.c:781
int check_for_pdf(FILE *file)
Definition: pdfobj.c:4346
int pdfobj_escape_str(char *buffer, int bufsize, const unsigned char *s, int len)
Definition: pdfobj.c:1183
void pdf_set_number(pdf_obj *object, double value)
Definition: pdfobj.c:1108
void pdf_merge_dict(pdf_obj *dict1, pdf_obj *dict2)
Definition: pdfobj.c:1763
pdf_obj * pdf_new_boolean(char value)
Definition: pdfobj.c:1034
pdf_out * pdf_out_init(const char *filename, const unsigned char *id1, const unsigned char *id2, int ver_major, int ver_minor, int compression_level, int enable_encrypt, int enable_objstm, int enable_predictor)
Definition: pdfobj.c:450
unsigned pdf_string_length(pdf_obj *object)
Definition: pdfobj.c:1167
pdf_obj * pdf_lookup_dict(pdf_obj *dict, const char *name)
Definition: pdfobj.c:1800
pdf_obj * pdf_stream_dict(pdf_obj *stream)
Definition: pdfobj.c:2374
void pdf_add_stream(pdf_obj *stream, const void *stream_data, int length)
Definition: pdfobj.c:2424
pdf_obj * pdf_new_string(const void *str, unsigned length)
Definition: pdfobj.c:1131
pdf_obj * pdf_link_obj(pdf_obj *object)
Definition: pdfobj.c:948
pdf_obj * pdf_get_array(pdf_obj *array, int idx)
Definition: pdfobj.c:1461
void * pdf_string_value(pdf_obj *object)
Definition: pdfobj.c:1155
#define IND_OBJECTS_ALLOC_SIZE
Definition: pdfobj.c:52
void pdf_add_array(pdf_obj *array, pdf_obj *object)
Definition: pdfobj.c:1511
pdf_obj * pdf_new_dict(void)
Definition: pdfobj.c:1645
pdf_obj * pdf_new_null(void)
Definition: pdfobj.c:1017
int pdf_add_dict(pdf_obj *dict, pdf_obj *key, pdf_obj *value)
Definition: pdfobj.c:1680
#define PDF_ARRAY
Definition: pdfobj.h:36
#define PDF_STREAM
Definition: pdfobj.h:38
#define PDF_BOOLEAN
Definition: pdfobj.h:32
#define PDF_NUMBER
Definition: pdfobj.h:33
#define PDF_STRING
Definition: pdfobj.h:34
#define PDF_INDIRECT
Definition: pdfobj.h:40
#define PDF_NULL
Definition: pdfobj.h:39
#define PDF_NAME
Definition: pdfobj.h:35
#define STREAM_COMPRESS
Definition: pdfobj.h:45
#define PDF_DICT
Definition: pdfobj.h:37
char * parse_number(const char **start, const char *end)
Definition: pdfparse.c:138
pdf_obj * parse_pdf_dict(const char **pp, const char *endptr, pdf_file *pf)
Definition: pdfparse.c:976
pdf_obj * parse_pdf_object(const char **pp, const char *endptr, pdf_file *pf)
Definition: pdfparse.c:988
#define ERROR(string)
Definition: error.h:36
#define MEM_END
Definition: mem.h:45
#define MEM_START
Definition: mem.h:44
pdf_obj * pdf_ref_file_obj(unsigned long obj_no)
Definition: pdfobj.c:1351
void pdf_obj_set_compression(int level)
Definition: pdfobj.c:102
static unsigned long startxref
Definition: pdfobj.c:58
static void release_indirect(pdf_indirect *data)
Definition: pdfobj.c:373
static unsigned long pdf_max_ind_objects
Definition: pdfobj.c:55
static void write_number(FILE *file, pdf_number *number)
Definition: pdfobj.c:479
static void release_name(pdf_name *data)
Definition: pdfobj.c:678
static void write_boolean(FILE *file, pdf_boolean *data)
Definition: pdfobj.c:445
static int backup_line(void)
Definition: pdfobj.c:1205
static long find_xref(void)
Definition: pdfobj.c:1235
pdf_obj * pdf_read_object(unsigned long obj_no)
Definition: pdfobj.c:1397
static void pdf_flush_obj(FILE *file, pdf_obj *object)
Definition: pdfobj.c:1137
pdf_obj * pdf_new_ref(unsigned long label, int generation)
Definition: pdfobj.c:1379
static void release_null(void *data)
Definition: pdfobj.c:419
static unsigned long pdf_file_size
Definition: pdfobj.c:1233
void pdf_obj_set_verbose(void)
Definition: pdfobj.c:129
static void pdf_out_white(FILE *file)
Definition: pdfobj.c:285
static void write_dict(FILE *file, pdf_dict *dict)
Definition: pdfobj.c:796
static unsigned pdf_version
Definition: pdfobj.c:116
void pdf_set_boolean(pdf_obj *object, char value)
Definition: pdfobj.c:455
static void pdf_label_obj(pdf_obj *object)
Definition: pdfobj.c:307
static unsigned pdf_info_obj
Definition: pdfobj.c:60
static void release_array(pdf_array *data)
Definition: pdfobj.c:767
unsigned long compression_saved
Definition: pdfobj.c:45
char * pdf_get_dict(pdf_obj *dict, int index)
Definition: pdfobj.c:945
pdf_obj * read_xref(void)
Definition: pdfobj.c:1582
static void release_string(pdf_string *data)
Definition: pdfobj.c:596
unsigned long pdf_output_file_position
Definition: pdfobj.c:45
static void release_stream(pdf_stream *stream)
Definition: pdfobj.c:1058
static unsigned long next_label
Definition: pdfobj.c:56
long next_object(unsigned long obj)
Definition: pdfobj.c:1322
static int parse_xref(void)
Definition: pdfobj.c:1514
static void write_string(FILE *file, pdf_string *string)
Definition: pdfobj.c:577
void pdf_write_obj(FILE *file, pdf_obj *object)
Definition: pdfobj.c:1094
static char compression_level
Definition: pdfobj.c:100
void pdf_set_name(pdf_obj *object, char *name)
Definition: pdfobj.c:685
struct object * xref_table
int pdf_output_line_position
Definition: pdfobj.c:46
static unsigned char debug
Definition: pdfobj.c:99
FILE * pdf_input_file
Definition: pdfobj.c:44
pdf_obj * parse_trailer(void)
Definition: pdfobj.c:1280
static void write_indirect(FILE *file, pdf_indirect *indirect)
Definition: pdfobj.c:378
static void write_array(FILE *file, pdf_array *array)
Definition: pdfobj.c:731
long num_input_objects
Definition: pdfobj.c:1320
static unsigned char verbose
Definition: pdfobj.c:99
static struct xref_entry * output_xref
static unsigned pdf_root_obj
Definition: pdfobj.c:60
static void pdf_out(FILE *file, void *buffer, int length)
Definition: pdfobj.c:273
char format_buffer[4096]
Definition: pdfobj.c:48
static void dump_trailer(void)
Definition: pdfobj.c:186
void pdf_obj_set_debug(void)
Definition: pdfobj.c:124
pdf_obj * pdf_new_obj(pdf_obj_type type)
Definition: pdfobj.c:295
int pdf_check_name(char *name)
Definition: pdfobj.c:625
static int pdf_match_name(pdf_obj *name_obj, char *name)
Definition: pdfobj.c:903
static void write_stream(FILE *file, pdf_stream *stream)
Definition: pdfobj.c:998
static void pdf_out_char(FILE *file, char c)
Definition: pdfobj.c:261
static char any_open
Definition: pdfobj.c:1645
void pdf_set_version(unsigned version)
Definition: pdfobj.c:117
static void release_number(pdf_number *data)
Definition: pdfobj.c:474
static void write_null(FILE *file)
Definition: pdfobj.c:424
static void write_name(FILE *file, pdf_name *name)
Definition: pdfobj.c:656
#define FORMAT_BUF_SIZE
Definition: pdfobj.c:47
static void release_dict(pdf_dict *data)
Definition: pdfobj.c:826
static void extend_xref(long new_size)
Definition: pdfobj.c:1498
static void release_boolean(pdf_obj *data)
Definition: pdfobj.c:440
static void dump_xref(void)
Definition: pdfobj.c:163
#define fprintf
Definition: mendex.h:64
#define string
Definition: ctangleboot.c:111
#define length(c)
Definition: ctangleboot.c:65
#define compress(c)
Definition: ctangleboot.c:151
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
int strncmp()
#define sprintf
Definition: snprintf.c:44
#define version
Definition: nup.c:10
union value value
Definition: obx.h:44
unsigned start_pos
Definition: parse_ofm.c:60
#define max(a, b)
Definition: pbmto4425.c:11
char * filename[256]
Definition: pbmtopk.c:46
pdf_obj_type
Definition: pdftypes.h:202
static int size
Definition: ppmlabel.c:24
struct stream_s stream
Definition: pts_fax.h:93
#define flags
static avl_node * new_node(void *item, avl_node *up, mp_avl_tree t)
Definition: avl.c:147
Definition: utils.c:300
Definition: vmsdir.h:32
Definition: filedef.h:30
Definition: mendex.h:20
pdf_obj * direct
Definition: pdfobj.c:1316
int used
Definition: pdfobj.c:1318
unsigned long position
Definition: pdfobj.c:1307
pdf_obj * indirect
Definition: pdfobj.c:1317
unsigned generation
Definition: pdfobj.c:1308
FILE * dirty_file
Definition: pdfobj.h:117
Definition: pdfobj.c:63
void * data
Definition: pdfobj.c:70
int type
Definition: pdfobj.c:64
Definition: exec.h:58
Definition: pdfobj.c:166
unsigned long file_position
Definition: pdfobj.c:52
pdf_obj * pdf_obj
Definition: pdfobj.c:53
struct def_label label[1024]
Definition: t1part.c:286
int number
Definition: t1part.c:207
#define FILE
Definition: t1stdio.h:34
ch
Definition: t4ht.c:1443
*job_name strlen((char *) job_name) - 4)
char * file
Definition: t4ht.c:931
#define key
Definition: tex2xindy.c:753
#define twiddle(n)
Definition: twiddle.h:2
@ L
Definition: ubidiimp.h:45
Definition: obx.h:51
@ start
Definition: preamble.c:52
static void new_size(int size, int block)
Definition: gc.c:702
#define buffer
Definition: xmlparse.c:611
#define end(cp)
Definition: zic.c:71