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)  

dvi.c
Go to the documentation of this file.
1 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
2 
3  Copyright (C) 2002-2021 by Jin-Hwan Cho and Shunsaku Hirata,
4  the dvipdfmx project team.
5 
6  Copyright (C) 2012-2015 by Khaled Hosny <khaledhosny@eglug.org>
7 
8  Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23 */
24 
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28 
29 #include <sys/types.h>
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <ctype.h>
33 #include <string.h>
34 
35 #ifdef WIN32
36 #include <fcntl.h>
37 #include <io.h>
38 #endif
39 
40 #include "system.h"
41 #include "mem.h"
42 #include "error.h"
43 #include "mfileio.h"
44 #include "numbers.h"
45 #include "dpxconf.h"
46 #include "dpxutil.h"
47 
48 #include "pdfdev.h"
49 #include "pdfdoc.h"
50 #include "pdfparse.h"
51 #include "pdfresource.h"
52 #include "pdfdraw.h"
53 
54 #include "fontmap.h"
55 
56 #include "dvicodes.h"
57 #include "tfm.h"
58 #include "vf.h"
59 #include "subfont.h"
60 
61 #include "spc_util.h"
62 #include "specials.h"
63 
64 #include "dvi.h"
65 #include "dvipdfmx.h"
66 
67 #include "dpxfile.h"
68 #include "pdfximage.h"
69 #include "tt_aux.h"
70 #include "tt_table.h"
71 #include "t1_load.h"
72 #include "t1_char.h"
73 #include "cff_dict.h"
74 
75 #define DVI_STACK_DEPTH_MAX 256u
76 #define TEX_FONTS_ALLOC_SIZE 16u
77 #define VF_NESTING_MAX 16u
78 
79 /* UTF-32 over U+FFFF -> UTF-16 surrogate pair */
80 #define UTF32toUTF16HS(x) (0xd800 + (((x-0x10000) >> 10) & 0x3ff))
81 #define UTF32toUTF16LS(x) (0xdc00 + ( x & 0x3ff))
82 
83 /* Interal Variables */
84 static FILE *dvi_file = NULL;
85 static char linear = 0; /* set to 1 for strict linear processing of the input */
86 
87 static int32_t *page_loc = NULL;
88 static unsigned int num_pages = 0;
89 
91 
92 static struct dvi_header
93 {
98  unsigned int stackdepth;
99  char comment[257];
100 } dvi_info = {
101  25400000 , /* num */
102  473628672, /* den */
103  1000, /* mag */
104  0, 0, /* media width and height */
105  0, /* stackdepth */
106  {'\0'} /* comment */
107 };
108 
109 static double dev_origin_x = 72.0, dev_origin_y = 770.0;
110 
111 double get_origin (int x)
112 {
113  return x ? dev_origin_x : dev_origin_y;
114 }
115 
116 #define LTYPESETTING 0 /* typesetting from left to right */
117 #define RTYPESETTING 1 /* typesetting from right to left */
118 #define SKIMMING 2 /* skimming through reflected segment measuring its width */
119 #define REVERSE(MODE) (LTYPESETTING + RTYPESETTING - MODE)
120 
121 struct dvi_lr
122 {
123  int state, font;
124  unsigned int buf_index;
125 };
126 
127 static struct dvi_lr lr_state; /* state at start of current skimming */
128 static int lr_mode; /* current direction or skimming depth */
129 static uint32_t lr_width; /* total width of reflected segment */
131 static unsigned lr_width_stack_depth = 0;
132 
133 #define PHYSICAL 1
134 #define VIRTUAL 2
135 #define SUBFONT 3
136 #define NATIVE 4
137 #define DVI 1
138 #define VF 2
139 
140 struct gm {
142 };
143 
144 static struct loaded_font
145 {
146  int type; /* Type is physical or virtual */
147  int font_id; /* id returned by dev (for PHYSICAL fonts)
148  * or by vf module for (VIRTUAL fonts)
149  */
150  int subfont_id; /* id returned by subfont_locate_font() */
151  int tfm_id;
153  int source; /* Source is either DVI or VF */
156  /* Indicates that rgba_color is used or not.
157  * It enables full range of opacity: 0-255.
158  */
159  int xgs_id; /* Transparency ExtGState */
160 
161  /* XeTeX requires glyph metrics */
162  struct gm *gm;
165 
167 
168  float extend;
169  float slant;
170  float embolden;
171 
173  int minbytes;
174  char padbytes[4];
176 static int num_loaded_fonts = 0, max_loaded_fonts = 0;
177 
178 static void
179 need_more_fonts (unsigned n)
180 {
184  }
185 }
186 
187 static struct font_def
188 {
192  char *font_name;
193  int font_id; /* index of _loaded_ font in loaded_fonts array */
194  int used;
195  int native; /* boolean */
196  uint32_t rgba_color; /* only used for native fonts in XeTeX */
197  uint8_t rgba_used; /* Indicates that rgba_color is used or not.
198  * It enables full range of opacity: 0-255.
199  */
201  int layout_dir; /* 1 = vertical, 0 = horizontal */
202  int extend;
203  int slant;
204  int embolden;
206 
207 #define XDV_FLAG_VERTICAL 0x0100
208 #define XDV_FLAG_COLORED 0x0200
209 #define XDV_FLAG_FEATURES 0x0400
210 #define XDV_FLAG_EXTEND 0x1000
211 #define XDV_FLAG_SLANT 0x2000
212 #define XDV_FLAG_EMBOLDEN 0x4000
213 
214 static int num_def_fonts = 0, max_def_fonts = 0;
215 static int compute_boxes = 0, link_annot = 1;
216 /* If "catch_phantom" is non-zero, dvipdfmx try to catch phantom texts.
217  * Dvipdfmx treats DVI horizontal movement instructions (x, w, right) differently
218  * when "catch_phantom" is non-zero. Amount of horizontal move will be added to
219  * the current annotation rectangle with "height" and "depth" estimated as,
220  *
221  * catch_phantom=1: with current font size
222  * catch_phantom=2: with specified height and depth
223  */
224 static int catch_phantom = 0;
225 static double phantom_height = 0.0;
226 static double phantom_depth = 0.0;
227 
228 #define DVI_PAGE_BUF_CHUNK 0x10000U /* 64K should be plenty for most pages */
229 
230 static unsigned char* dvi_page_buffer;
231 static unsigned int dvi_page_buf_size;
232 static unsigned int dvi_page_buf_index;
233 
234 /* functions to read numbers from the dvi file and store them in dvi_page_buffer */
236 {
237  int ch;
238  if ((ch = fgetc (file)) < 0)
239  ERROR ("File ended prematurely\n");
243  }
245  return ch;
246 }
247 
248 static unsigned int get_and_buffer_unsigned_pair (FILE *file)
249 {
250  unsigned int pair = get_and_buffer_unsigned_byte(file);
251  pair = (pair << 8) | get_and_buffer_unsigned_byte(file);
252  return pair;
253 }
254 
255 static void get_and_buffer_bytes(FILE *file, unsigned int count)
256 {
260  }
262  ERROR ("File ended prematurely\n");
264 }
265 
266 /* functions to fetch values from dvi_page_buffer */
267 
268 static int get_buffered_unsigned_byte (void)
269 {
271 }
272 
273 static unsigned int get_buffered_unsigned_pair (void)
274 {
275  unsigned int pair = dvi_page_buffer[dvi_page_buf_index++];
276  pair = (pair << 8) | dvi_page_buffer[dvi_page_buf_index++];
277  return pair;
278 }
279 
281 {
282  int i;
284  /* Check sign on first byte before reading others */
285  if (quad >= 0x80)
286  quad -= 0x100;
287  for (i=0; i<3; i++) {
289  }
290  return quad;
291 }
292 
293 static int32_t get_buffered_signed_num(unsigned char num)
294 {
296  if (quad > 0x7f)
297  quad -= 0x100;
298  switch (num) {
299  case 3: quad = (quad << 8) | dvi_page_buffer[dvi_page_buf_index++];
300  case 2: quad = (quad << 8) | dvi_page_buffer[dvi_page_buf_index++];
301  case 1: quad = (quad << 8) | dvi_page_buffer[dvi_page_buf_index++];
302  default: break;
303  }
304  return quad;
305 }
306 
307 static int32_t get_buffered_unsigned_num(unsigned char num)
308 {
310  switch (num) {
311  case 3: if (quad > 0x7f)
312  quad -= 0x100;
314  case 2: quad = (quad << 8) | dvi_page_buffer[dvi_page_buf_index++];
315  case 1: quad = (quad << 8) | dvi_page_buffer[dvi_page_buf_index++];
316  default: break;
317  }
318  return quad;
319 }
320 
321 #define skip_bufferd_bytes(n) dvi_page_buf_index += n
322 
323 unsigned int
325 {
326  return num_pages;
327 }
328 
329 static const char invalid_signature[] =
330 "Something is wrong. Are you sure this is a DVI file?";
331 
332 #define range_check_loc(loc) \
333  if ((loc) > dvi_file_size) {\
334  ERROR(invalid_signature); \
335  }
336 
337 static int pre_id_byte, post_id_byte, is_ptex = 0, has_ptex = 0;
338 
339 static void
342  ERROR ("Inconsistent DVI id_bytes %d (pre) and %d (post)", pre_id_byte, post_id_byte);
343 }
344 
345 static void
346 need_XeTeX (int c) {
348  ERROR ("DVI opcode %i only valid for XeTeX", c);
349 }
350 
351 static void
352 need_pTeX (int c) {
353  if (!is_ptex)
354  ERROR ("DVI opcode %i only valid for Ascii pTeX", c);
355  has_ptex = 1;
356 }
357 
358 static int32_t
359 find_post (void)
360 {
361  off_t dvi_size;
363  int ch;
364 
365  /* First find end of file */
366  dvi_size = xfile_size (dvi_file, "DVI");
367  if (dvi_size > 0x7fffffff)
368  ERROR("DVI file size exceeds 31-bit");
369  dvi_file_size = dvi_size;
370  current = dvi_size;
371 
372  /* Scan backwards through PADDING */
373  do {
374  xseek_absolute (dvi_file, --current, "DVI");
375  } while ((ch = fgetc(dvi_file)) == PADDING &&
376  current > 0);
377 
378  /* file_position now points to last non padding character or
379  * beginning of file */
380  if (dvi_file_size - current < 4 || current == 0 ||
381  !(ch == DVI_ID || ch == DVIV_ID || ch == XDV_ID || ch == XDV_ID_OLD)) {
382  MESG("DVI ID = %d\n", ch);
384  }
385 
386  post_id_byte = ch;
387  if (ch == XDV_ID || ch == XDV_ID_OLD)
389  is_ptex = ch == DVIV_ID;
390 
391  /* Make sure post_post is really there */
392  current = current - 5;
393  xseek_absolute (dvi_file, current, "DVI");
394  if ((ch = fgetc(dvi_file)) != POST_POST) {
395  MESG("Found %d where post_post opcode should be\n", ch);
397  }
399  xseek_absolute (dvi_file, current, "DVI");
400  if ((ch = fgetc(dvi_file)) != POST) {
401  MESG("Found %d where post_post opcode should be\n", ch);
403  }
404 
405  /* Finally check the ID byte in the preamble */
406  /* An Ascii pTeX DVI file has id_byte DVI_ID in the preamble but DVIV_ID in the postamble. */
407  xseek_absolute (dvi_file, 0, "DVI");
408  if ((ch = get_unsigned_byte(dvi_file)) != PRE) {
409  MESG("Found %d where PRE was expected\n", ch);
411  }
413  if (!(ch == DVI_ID || ch == XDV_ID || ch == XDV_ID_OLD)) {
414  MESG("DVI ID = %d\n", ch);
416  }
417  pre_id_byte = ch;
418  check_id_bytes();
419 
420  return current;
421 }
422 
423 static void
425 {
426  int i;
427 
428  xseek_absolute (dvi_file, post_location + 27, "DVI");
430  if (num_pages == 0) {
431  ERROR("Page count is 0!");
432  }
433  if (dpx_conf.verbose_level > 2) {
434  MESG("Page count:\t %4d\n", num_pages);
435  }
436 
438 
439  xseek_absolute (dvi_file, post_location + 1, "DVI");
442  for (i = num_pages - 2; i >= 0; i--) {
443  xseek_absolute (dvi_file, page_loc[i+1] + 41, "DVI");
446  }
447 }
448 
449 /* Following are computed "constants" used for unit conversion */
450 static double dvi2pts = 1.52018, total_mag = 1.0;
451 
452 double
454 {
455  return total_mag;
456 }
457 
458 static void
459 do_scales (double mag)
460 {
461  total_mag = (double) dvi_info.mag / 1000.0 * mag;
462  dvi2pts = (double) dvi_info.unit_num / (double) dvi_info.unit_den;
463  dvi2pts *= (72.0 / 254000.0);
464 }
465 
466 static void
468 {
469  xseek_absolute (dvi_file, post_location + 5, "DVI");
470 
474 
477 
479 
481  WARN("DVI need stack depth of %d,", dvi_info.stackdepth);
482  WARN("but DVI_STACK_DEPTH_MAX is %d.", DVI_STACK_DEPTH_MAX);
483  ERROR("Capacity exceeded.");
484  }
485 
486  if (dpx_conf.verbose_level > 2) {
487  MESG("DVI File Info\n");
488  MESG("Unit: %ld / %ld\n", dvi_info.unit_num, dvi_info.unit_den);
489  MESG("Magnification: %ld\n", dvi_info.mag);
490  MESG("Media Height: %ld\n", dvi_info.media_height);
491  MESG("Media Width: %ld\n", dvi_info.media_width);
492  MESG("Stack Depth: %d\n", dvi_info.stackdepth);
493  }
494 }
495 
496 static void
498 {
499  int ch;
500 
502  if (ch != PRE) {
503  MESG("Found %d where PRE was expected\n", ch);
505  }
506 
507  /* An Ascii pTeX DVI file has id_byte DVI_ID in the preamble but DVIV_ID in the postamble. */
509  if (!(ch == DVI_ID || ch == XDV_ID || ch == XDV_ID_OLD)) {
510  MESG("DVI ID = %d\n", ch);
512  }
513 
514  pre_id_byte = ch;
515  if (ch == XDV_ID || ch == XDV_ID_OLD)
517  is_ptex = ch == DVI_ID; /* maybe */
518 
519  dvi_info.unit_num = get_positive_quad(dvi_file, "DVI", "unit_num");
520  dvi_info.unit_den = get_positive_quad(dvi_file, "DVI", "unit_den");
521  dvi_info.mag = get_positive_quad(dvi_file, "DVI", "mag");
522 
524  if (fread(dvi_info.comment,
525  1, ch, dvi_file) != ch) {
527  }
528  dvi_info.comment[ch] = '\0';
529 
530  if (dpx_conf.verbose_level > 2) {
531  MESG("DVI File Info\n");
532  MESG("Unit: %ld / %ld\n", dvi_info.unit_num, dvi_info.unit_den);
533  MESG("Magnification: %ld\n", dvi_info.mag);
534  }
535 
536  if (dpx_conf.verbose_level > 0) {
537  MESG("DVI Comment: %s\n", dvi_info.comment);
538  }
539 
540  num_pages = 0x7FFFFFFU; /* for linear processing: we just keep going! */
541 }
542 
543 const char *
545 {
546  return dvi_info.comment;
547 }
548 
549 static void
551 {
552  char *file_name, *p, *q, *endptr;
553  uint32_t index = 0;
554  uint32_t embolden = 0;
555  int32_t slant = 0, extend = 0x00010000;
556 
557  ASSERT(font_name[0] == '[');
558 
559  /* redundant check but leave this here anyway */
560  if (num_def_fonts >= max_def_fonts) {
563  }
564 
565  file_name = NEW(strlen(font_name) + 1, char);
566  strcpy(file_name, font_name + 1);
567  endptr = file_name + strlen(file_name);
568  q = strchr(file_name, ']');
569  if (q == NULL) {
570  ERROR("Syntax error in dvilua fnt_def: no ']' found in font name.");
571  }
572  *q = '\0';
573 
574  p = q + 1;
575  if (p < endptr && *p == ':') {
576  for (p++; *p != '\0' && p < endptr; ) {
577  char *kvsep, *delim;
578 
579  delim = strchr(p, ';');
580  kvsep = strchr(p, '=');
581  if (delim == NULL)
582  delim = endptr;
583  if (kvsep == NULL || kvsep >= delim) {
584  ERROR("Syntax error in dvilua fnt_def: not in key=value format: %s", font_name);
585  }
586  *kvsep = '\0';
587  if (!strcmp(p, "index")) {
588  uint32_t value = strtoul(kvsep + 1, &q, 10);
589  if (q != delim) {
590  WARN("Syntax error in dvilua fnt_def: invalid value specified for \"%s\": %s", p, font_name);
591  } else {
592  index = value;
593  }
594  } else if (!strcmp(p, "embolden")) {
595  int32_t value = strtol(kvsep + 1, &q, 10);
596  if (q != delim) {
597  WARN("Syntax error in dvilua fnt_def: invalid value specified for \"%s\": %s", p, font_name);
598  } else {
599  embolden = value;
600  }
601  } else if (!strcmp(p, "slant")) {
602  int32_t value = strtol(kvsep + 1, &q, 10);
603  if (q != delim) {
604  WARN("Syntax error in dvilua fnt_def: invalid value specified for \"%s\": %s", p, font_name);
605  } else {
606  slant = value;
607  }
608  } else if (!strcmp(p, "extend")) {
609  int32_t value = strtol(kvsep + 1, &q, 10);
610  if (q != delim) {
611  WARN("Syntax error in dvilua fnt_def: invalid value specified for \"%s\": %s", p, font_name);
612  } else {
613  extend = value;
614  }
615  } else {
616  WARN("Ignoring unrecognized/unsupported key \"%s\" in dvilua fnt_def: %s", p, font_name);
617  }
618  p = delim + 1;
619  }
620  }
621 
622  def_fonts[num_def_fonts].tex_id = tex_id;
629 
631  def_fonts[num_def_fonts].rgba_color = 0xffffffff;
635  def_fonts[num_def_fonts].embolden = embolden;
636 
637  num_def_fonts++;
638 
639  return;
640 }
641 
642 #define SIG_DVILUA_FNT_DEF ('L' << 24|'u' << 16|'a' << 8|'F')
643 
644 static void
646 {
647  int dir_length, name_length;
650  char *directory, *font_name;
651 
652  if (num_def_fonts >= max_def_fonts) {
655  }
657  point_size = get_positive_quad(dvi_file, "DVI", "point_size");
658  design_size = get_positive_quad(dvi_file, "DVI", "design_size");
659  dir_length = get_unsigned_byte(dvi_file);
661 
662  directory = NEW(dir_length + 1, char);
663  if (fread(directory, 1, dir_length, dvi_file) != dir_length) {
665  }
666  directory[dir_length] = '\0';
667  RELEASE(directory); /* unused */
668 
669  font_name = NEW(name_length + 1, char);
672  }
673  font_name[name_length] = '\0';
674 
675  if (checksum == SIG_DVILUA_FNT_DEF && name_length > 0 && font_name[0] == '[') {
678  return;
679  }
680  def_fonts[num_def_fonts].tex_id = tex_id;
686  def_fonts[num_def_fonts].rgba_color = 0xffffffff;
690  def_fonts[num_def_fonts].extend = 0x00010000; /* 1.0 */
693  num_def_fonts++;
694 
695  return;
696 }
697 
698 static void
700 {
701  unsigned int flags;
703  char *font_name;
704  int len;
705  uint32_t index;
706 
707  if (num_def_fonts >= max_def_fonts) {
710  }
711  point_size = get_positive_quad(dvi_file, "DVI", "point_size");
713 
714  len = (int) get_unsigned_byte(dvi_file); /* font name length */
715  font_name = NEW(len + 1, char);
716  if (fread(font_name, 1, len, dvi_file) != len) {
718  }
719  font_name[len] = '\0';
720 
721  index = get_positive_quad(dvi_file, "DVI", "index");
722 
723  def_fonts[num_def_fonts].tex_id = tex_id;
727  def_fonts[num_def_fonts].design_size = 655360; /* hard-code as 10pt for now, not used anyway */
730 
732  def_fonts[num_def_fonts].rgba_color = 0xffffffff;
734  def_fonts[num_def_fonts].extend = 0x00010000;
737 
738  if (flags & XDV_FLAG_VERTICAL)
740 
741  if (flags & XDV_FLAG_COLORED) {
744  }
745 
746  if (flags & XDV_FLAG_EXTEND)
748 
749  if (flags & XDV_FLAG_SLANT)
751 
752  if (flags & XDV_FLAG_EMBOLDEN)
754 
755  num_def_fonts++;
756 
757  return;
758 }
759 
760 static void
762 {
763  int code;
764 
765  xseek_absolute (dvi_file, post_location + 29, "DVI");
766  while ((code = get_unsigned_byte(dvi_file)) != POST_POST) {
767  switch (code) {
768  case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4:
770  break;
771  case XDV_NATIVE_FONT_DEF:
772  need_XeTeX(code);
774  break;
775  default:
776  MESG("Unexpected op code: %3d\n", code);
778  }
779  }
780  if (dpx_conf.verbose_level > 2) {
781  unsigned i;
782 
783  MESG("\n");
784  MESG("DVI file font info\n");
785  for (i = 0; i < num_def_fonts; i++) {
786  MESG("TeX Font: %10s loaded at ID=%5d, ",
787  def_fonts[i].font_name, def_fonts[i].tex_id);
788  MESG("size=%5.2fpt (scaled %4.1f%%)",
790  100.0 * ((double) def_fonts[i].point_size / def_fonts[i].design_size));
791  MESG("\n");
792  }
793  }
794 }
795 
796 static void get_comment (void)
797 {
798  int length;
799 
800  xseek_absolute (dvi_file, 14, "DVI");
802  if (fread(dvi_info.comment,
803  1, length, dvi_file) != length) {
805  }
806  dvi_info.comment[length] = '\0';
807  if (dpx_conf.verbose_level > 0) {
808  MESG("DVI Comment: %s\n", dvi_info.comment);
809  }
810 }
811 
812 /*
813  * The section below this line deals with the actual processing of the
814  * dvi file.
815  *
816  * The dvi file processor state is contained in the following variables:
817  */
818 
820 {
821  int32_t h, v, w, x, y, z;
822  unsigned int d;
823 };
824 
825 static struct dvi_registers dvi_state;
827 static unsigned dvi_stack_depth = 0 ;
828 static int current_font = -1;
829 static int processing_page = 0 ;
830 
831 static void
833 {
834  dvi_state.h = 0; dvi_state.v = 0; dvi_state.w = 0;
835  dvi_state.x = 0; dvi_state.y = 0; dvi_state.z = 0;
836  dvi_state.d = 0; /* direction */
838  dvi_stack_depth = 0;
839  current_font = -1;
840 }
841 
842 /* Migrated from pdfdev.c:
843  * The following codes are originally put into pdfdev.c.
844  * But they are moved to here to make PDF output independent
845  * from DVI input.
846  * pdfdoc, pdfspecial and htex are also modified. pdfspecial
847  * and htex does tag/untag depth. pdfdev and pdfdoc now does
848  * not care about line-breaking at all.
849  */
850 static unsigned marked_depth = 0;
851 static int tagged_depth = -1;
852 
853 static void
855 {
856  /* If decreasing below tagged_depth */
857  if (link_annot &&
859  dvi_stack_depth == tagged_depth - 1) {
860  /*
861  * See if this appears to be the end of a "logical unit"
862  * that's been broken. If so, flush the logical unit.
863  */
865  }
867 }
868 
869 /*
870  * The following routines setup and tear down a callback at a
871  * certain stack depth. This is used to handle broken (linewise)
872  * links.
873  */
874 void
876 {
879 }
880 
881 void
883 {
884  tagged_depth = -1;
886 }
887 
888 void
890 {
892 }
893 
894 void
896 {
897  link_annot = flag;
898 }
899 
900 int
902 {
904 }
905 
906 void
908 {
909  catch_phantom = mode != 0 ? 1 : 0;
910 }
911 
912 void
914 {
917  catch_phantom = 2;
918 }
919 
920 /* All those things related to "compensation" is intruduced due to
921  * bcontent/econtent specials. They are originally implemented with
922  * modification to very important part of pdfdev functions such as
923  * pdf_dev_set_string(), and it made things very unclear.
924  *
925  * It is not good idea to modify the core part of PDF output routines
926  * just for implementing DVI "special" command. They do not make sense
927  * and just look odd when PDF output routines are separated from dvipdfmx.
928  */
929 static struct spt_coord {
931 } compensation = { 0, 0 };
932 
933 void dvi_set_compensation (double x, double y)
934 {
937 }
938 
939 static void
941  spt_t ypos,
942  const void *instr_ptr,
943  int instr_len,
944  spt_t width,
945  int font_id)
946 {
947  xpos -= compensation.x;
948  ypos -= compensation.y;
949  pdf_dev_set_string(xpos, ypos, instr_ptr, instr_len, width, font_id);
950 }
951 
952 static void
954 {
955  xpos -= compensation.x;
956  ypos -= compensation.y;
957  pdf_dev_set_rule(xpos, ypos, width, height);
958 }
959 
960 static void
962 {
963  xpos -= compensation.x;
964  ypos -= compensation.y;
965  pdf_dev_set_rect(r, xpos, ypos, width, height, depth);
966 }
967 
968 void
970 {
971  double x_user, y_user, mag;
972  const char *p;
973  int is_drawable = 0;
974  pdf_rect rect = {0.0, 0.0, 0.0, 0.0};
975 
976  graphics_mode();
977 
978  p = (const char *) buffer;
979 
980  x_user = dvi_state.h * dvi2pts;
981  y_user = -dvi_state.v * dvi2pts;
982  mag = dvi_tell_mag();
983 
984  if (spc_exec_special(p, size, x_user, y_user, mag, &is_drawable, &rect) < 0) {
985  if (dpx_conf.verbose_level > 0) {
986  dump(p, p + size);
987  }
988  return;
989  }
990 
991  if (dvi_is_tracking_boxes() && is_drawable) {
993  }
994 
995  return;
996 }
997 
998 double
1000 {
1001  return dvi2pts;
1002 }
1003 
1004 
1005 int
1006 dvi_locate_font (const char *tfm_name, spt_t ptsize)
1007 {
1008  int cur_id = -1;
1009  const char *name = tfm_name;
1010  int subfont_id = -1, font_id; /* VF or device font ID */
1011  fontmap_rec *mrec;
1012 
1013  if (dpx_conf.verbose_level > 0)
1014  MESG("<%s@%.2fpt", tfm_name, ptsize * dvi2pts);
1015 
1016  need_more_fonts(1);
1017 
1018  /* This routine needs to be recursive/reentrant. Load current high water
1019  * mark into an automatic variable.
1020  */
1021  cur_id = num_loaded_fonts++;
1022 
1023  mrec = pdf_lookup_fontmap_record(tfm_name);
1024  /* Load subfont mapping table */
1025  if (mrec && mrec->charmap.sfd_name && mrec->charmap.subfont_id) {
1026  subfont_id = sfd_load_record(mrec->charmap.sfd_name, mrec->charmap.subfont_id);
1027  }
1028 
1029  memset(&loaded_fonts[cur_id], 0, sizeof (struct loaded_font));
1030 
1031  /* TFM must exist here. */
1032  loaded_fonts[cur_id].tfm_id = tfm_open(tfm_name, 1);
1033  loaded_fonts[cur_id].subfont_id = subfont_id;
1034  loaded_fonts[cur_id].size = ptsize;
1035  /* This will be reset later if it was really generated by the dvi file. */
1036  loaded_fonts[cur_id].source = VF;
1037 
1038  /* The order of searching fonts is as follows:
1039  *
1040  * 1. If mrec is null, that is, there is no map entry matching
1041  * with tfm_name, then search a virtual font matching with
1042  * tfm_name at first. If no virtual font is found, search a
1043  * PK font matching with tfm_name.
1044  *
1045  * 2. If mrec is non-null, search a physical scalable font.
1046  *
1047  * 3. Notice that every subfont gets non-null mrec. In this case,
1048  * enc_name corresponding to mrec will be used instead of mrec.
1049  * That is enc_name is NULL, search a virtual font for Omega (.ovf)
1050  * matching with the base name of the subfont. If no virtual font
1051  * for Omega is found, it is a fatal error because there is no PK font
1052  * for Omega.
1053  */
1054  if (!mrec) {
1055  font_id = vf_locate_font(tfm_name, ptsize);
1056  if (font_id >= 0) {
1057  loaded_fonts[cur_id].type = VIRTUAL;
1058  loaded_fonts[cur_id].font_id = font_id;
1059  if (dpx_conf.verbose_level > 0)
1060  MESG("(VF)>");
1061  return cur_id;
1062  }
1063  }
1064 #if 1
1065  /* Sorry, I don't understand this well... Please fix.
1066  * The purpose of this seems to be:
1067  *
1068  * Map 8-bit char codes in subfont to 16-bit code with SFD mapping
1069  * and map subfonts to single OVF font.
1070  *
1071  * But it apparently only does TFM -> OVF mapping but no character
1072  * code mapping. Please see dvi_set(), you can't have both font->type
1073  * VIRTUAL and font->subfont_id >= 0. Am I missing something?
1074  */
1075  else if (subfont_id >= 0 && mrec->map_name)
1076  {
1078  /* enc_name=NULL should be used only for 'built-in' encoding.
1079  * Please fix this!
1080  */
1081  if (mrec1 && !mrec1->enc_name) {
1082  font_id = vf_locate_font(mrec1->font_name, ptsize);
1083  if (font_id < 0)
1084  WARN("Could not locate Omega Virtual Font \"%s\" for \"%s\".",
1085  mrec1->font_name, tfm_name);
1086  else {
1087  loaded_fonts[cur_id].type = VIRTUAL;
1088  loaded_fonts[cur_id].font_id = font_id;
1089  if (dpx_conf.verbose_level > 0)
1090  MESG("(OVF)>");
1091  return cur_id;
1092  }
1093  }
1094  }
1095 #endif /* 1 */
1096 
1097  /* Failed to load a virtual font so we try to load a physical font. */
1098 
1099  /* If mrec->map_name is not NULL, font name identified in PDF output
1100  * is different than tfm_name, this can happen for subfonts grouped
1101  * into a single "intermediate" font foo@SFD@.
1102  * This is necessary for optimal output; to avoid unnecessary creation
1103  * of multiple instances of a same font, to avoid frequent font selection
1104  * and break of string_mode.
1105  */
1106  if (mrec && mrec->map_name) {
1107  name = mrec->map_name;
1108  } else {
1109  name = tfm_name;
1110  }
1111 
1112  /* We need ptsize for PK font creation. */
1114  if (font_id < 0) {
1115  WARN("Could not locate a virtual/physical font for TFM \"%s\".", tfm_name);
1116  if (mrec && mrec->map_name) { /* has map_name */
1118  WARN(">> This font is mapped to an intermediate 16-bit font \"%s\" with SFD charmap=<%s,%s>,",
1119  mrec->map_name, mrec->charmap.sfd_name, mrec->charmap.subfont_id);
1120  if (!mrec1)
1121  WARN(">> but I couldn't find font mapping for \"%s\".", mrec->map_name);
1122  else {
1123  WARN(">> and then mapped to a physical font \"%s\" by fontmap.", mrec1->font_name);
1124  WARN(">> Please check if kpathsea library can find this font: %s", mrec1->font_name);
1125  }
1126  } else if (mrec && !mrec->map_name) {
1127  char *finaldot = strrchr(mrec->font_name, '.');
1128  if (finaldot && strcasecmp(finaldot, ".pfa") == 0) {
1129  /* type1 fonts with pfa format are not supported */
1130  WARN("This font is mapped to a physical font \"%s\".", mrec->font_name);
1131  ERROR("Sorry, pfa format not supported; please convert the font to pfb, e.g., with t1binary.");
1132  } else {
1133  WARN(">> This font is mapped to a physical font \"%s\".", mrec->font_name);
1134  WARN(">> Please check if kpathsea library can find this font: %s", mrec->font_name);
1135  }
1136  } else {
1137  WARN(">> There are no valid font mapping entry for this font.");
1138  WARN(">> Font file name \"%s\" was assumed but failed to locate that font.", tfm_name);
1139  }
1140  ERROR("Cannot proceed without .vf or \"physical\" font for PDF output...");
1141  }
1142  memset(loaded_fonts[cur_id].padbytes, 0, 4);
1143  if (mrec) {
1144  if (mrec->opt.mapc >= 0) {
1145  loaded_fonts[cur_id].padbytes[2] = (mrec->opt.mapc >> 8) & 0xff;
1146  }
1147  if (mrec->enc_name && !strcmp(mrec->enc_name, "unicode")) {
1148  loaded_fonts[cur_id].is_unicode = 1;
1149  if (mrec->opt.mapc >= 0) {
1150  loaded_fonts[cur_id].padbytes[0] = (mrec->opt.mapc >> 24) & 0xff;
1151  loaded_fonts[cur_id].padbytes[1] = (mrec->opt.mapc >> 16) & 0xff;
1152  }
1153  }
1154  }
1156  loaded_fonts[cur_id].type = PHYSICAL;
1157  loaded_fonts[cur_id].font_id = font_id;
1158  if (loaded_fonts[cur_id].minbytes > 4) {
1159  WARN("Input encoding requries more than 4 bytes per char... (unsupported)");
1160  loaded_fonts[cur_id].minbytes = 4;
1161  }
1162 
1163  if (dpx_conf.verbose_level > 0)
1164  MESG(">");
1165 
1166  return cur_id;
1167 }
1168 
1169 #if defined(LIBDPX)
1170 int
1171 #else
1172 static int
1173 #endif /* LIBDPX */
1175  spt_t ptsize, int layout_dir, int extend, int slant, int embolden)
1176 {
1177  int cur_id = -1;
1178  fontmap_rec *mrec;
1179  char *fontmap_key;
1180  FILE *fp;
1181  char *path;
1182  sfnt *sfont;
1183  ULONG offset = 0;
1184  int is_dfont = 0, is_type1 = 0;
1185 
1186  if (dpx_conf.verbose_level > 0)
1187  MESG("<%s@%.2fpt", filename, ptsize * dvi2pts);
1188 
1189  if ((path = dpx_find_dfont_file(filename)) != NULL &&
1190  (fp = MFOPEN(path, "rb")) != NULL)
1191  is_dfont = 1;
1192  else if ((path = dpx_find_type1_file(filename)) != NULL)
1193  is_type1 = 1;
1194  else if (((path = dpx_find_opentype_file(filename)) == NULL
1196  || (fp = MFOPEN(path, "rb")) == NULL) {
1197  ERROR("Cannot proceed without the font: %s", filename);
1198  }
1199  need_more_fonts(1);
1200 
1201  cur_id = num_loaded_fonts++;
1202 
1203  fontmap_key = malloc(strlen(path) + 40); // CHECK this is enough
1204  sprintf(fontmap_key, "%s/%u/%c/%d/%d/%d", path, index, layout_dir == 0 ? 'H' : 'V', extend, slant, embolden);
1205  mrec = pdf_lookup_fontmap_record(fontmap_key);
1206  if (mrec == NULL) {
1207  if ((mrec = pdf_insert_native_fontmap_record(path, index, layout_dir, extend, slant, embolden)) == NULL) {
1208  ERROR("Failed to insert font record for font: %s", filename);
1209  }
1210  }
1211 
1212  memset(&loaded_fonts[cur_id], 0, sizeof (struct loaded_font));
1213 
1214  loaded_fonts[cur_id].font_id = pdf_dev_locate_font(fontmap_key, ptsize);
1215  loaded_fonts[cur_id].size = ptsize;
1216  loaded_fonts[cur_id].type = NATIVE;
1218  if (loaded_fonts[cur_id].minbytes > 4) {
1219  WARN("Input encoding requries more than 4 bytes per char... (unsupprted)");
1220  loaded_fonts[cur_id].minbytes = 4;
1221  }
1222  RELEASE(fontmap_key);
1223 
1224  if (is_type1) {
1225  cff_font *cffont;
1226  char *enc_vec[256];
1227  uint16_t num_glyphs;
1228  int i;
1229 
1231  if (!fp)
1232  return -1;
1233 
1234  if (!is_pfb(fp))
1235  ERROR("Failed to read Type 1 font \"%s\".", filename);
1236 
1237  memset(enc_vec, 0, 256 * sizeof(char *));
1238  cffont = t1_load_font(enc_vec, 0, fp);
1239  if (!cffont)
1240  ERROR("Failed to read Type 1 font \"%s\".", filename);
1241  for (i = 0; i < 256; i++) {
1242  if (enc_vec[i])
1243  RELEASE(enc_vec[i]);
1244  }
1245  loaded_fonts[cur_id].shift_gid = cffont->is_notdef_notzero;
1246  loaded_fonts[cur_id].num_glyphs = num_glyphs = cffont->num_glyphs;
1247  loaded_fonts[cur_id].gm = NEW(num_glyphs + 1, struct gm);
1248  for (i = 0; i < num_glyphs; i++) {
1249  double advance, ascent, descent;
1250  cff_index *cstrings = cffont->cstrings;
1251  t1_ginfo gm;
1252  uint16_t gid;
1253 
1254  /* If .notdef is not the 1st glyph in CharStrings, glyph_id given by
1255  * FreeType should be increased by 1
1256  */
1257  gid = (cffont->is_notdef_notzero) ? i + 1 : i;
1258  if (gid == num_glyphs)
1259  break;
1260  t1char_get_metrics(cstrings->data + cstrings->offset[gid] - 1,
1261  cstrings->offset[gid + 1] - cstrings->offset[gid],
1262  cffont->subrs[0], &gm);
1263 
1264  advance = layout_dir == 0 ? gm.wx : gm.wy;
1265  ascent = gm.bbox.ury;
1266  descent = gm.bbox.lly;
1267  loaded_fonts[cur_id].gm[gid].advance = (spt_t) (ptsize * ((advance / 1000.0) * mrec->opt.extend));
1268  loaded_fonts[cur_id].gm[gid].ascent = (spt_t) (ptsize * ((ascent / 1000.0)));
1269  loaded_fonts[cur_id].gm[gid].descent = (spt_t) (ptsize * ((descent / 1000.0)));
1270  }
1271  cff_close(cffont);
1272  DPXFCLOSE(fp);
1273  } else {
1274  struct tt_head_table *head;
1275  struct tt_maxp_table *maxp;
1276  struct tt_hhea_table *hhea;
1277  struct tt_longMetrics *gm;
1278  spt_t ascent, descent;
1279  uint16_t num_glyphs;
1280  int i;
1281 
1282  if (is_dfont)
1283  sfont = dfont_open(fp, index);
1284  else
1285  sfont = sfnt_open(fp);
1286  if (sfont->type == SFNT_TYPE_TTC)
1287  offset = ttc_read_offset(sfont, index);
1288  else if (sfont->type == SFNT_TYPE_DFONT)
1289  offset = sfont->offset;
1290 
1292  head = tt_read_head_table(sfont);
1293  maxp = tt_read_maxp_table(sfont);
1294  hhea = tt_read_hhea_table(sfont);
1295  ascent = (spt_t) (ptsize * ((double) hhea->ascent / (double) head->unitsPerEm));
1296  descent = (spt_t) (ptsize * ((double) hhea->descent / (double) head->unitsPerEm));
1297  loaded_fonts[cur_id].num_glyphs = num_glyphs = maxp->numGlyphs;
1298  if (layout_dir == 1 && sfnt_find_table_pos(sfont, "vmtx") > 0) {
1299  struct tt_vhea_table *vhea = tt_read_vhea_table(sfont);
1300  sfnt_locate_table(sfont, "vmtx");
1302  RELEASE(vhea);
1303  } else {
1304  sfnt_locate_table(sfont, "hmtx");
1306  }
1307  if (!gm)
1308  ERROR("Failed to read TrueType/OpenType glyph metrics table.");
1309  loaded_fonts[cur_id].gm = NEW(num_glyphs, struct gm);
1310  for (i = 0; i < num_glyphs; i++) {
1311  loaded_fonts[cur_id].gm[i].advance = (spt_t) (ptsize * ((double) gm[i].advance / (double) head->unitsPerEm) * mrec->opt.extend);
1312  loaded_fonts[cur_id].gm[i].ascent = ascent;
1313  loaded_fonts[cur_id].gm[i].descent = descent;
1314 
1315  }
1316  RELEASE(gm);
1317  RELEASE(hhea);
1318  RELEASE(maxp);
1319  RELEASE(head);
1320  sfnt_close(sfont);
1321  DPXFCLOSE(fp);
1322  }
1323 
1324  RELEASE(path);
1325 
1326  loaded_fonts[cur_id].layout_dir = layout_dir;
1327  loaded_fonts[cur_id].extend = mrec->opt.extend;
1328  loaded_fonts[cur_id].slant = mrec->opt.slant;
1329  loaded_fonts[cur_id].embolden = mrec->opt.bold;
1330 
1331  if (dpx_conf.verbose_level > 0)
1332  MESG(">");
1333 
1334  return cur_id;
1335 }
1336 
1337 double
1339 {
1340  return dvi_state.h * dvi2pts;
1341 }
1342 
1343 double
1345 {
1346  return -(dvi_state.v * dvi2pts);
1347 }
1348 
1349 static void do_moveto (int32_t x, int32_t y)
1350 {
1351  dvi_state.h = x;
1352  dvi_state.v = y;
1353 }
1354 
1356 {
1357  spt_t save_h, save_v;
1358 
1359  if (lr_mode >= SKIMMING) {
1360  lr_width += x;
1361  return;
1362  }
1363 
1364  if (lr_mode == RTYPESETTING)
1365  x = -x;
1366 
1367  save_h = dvi_state.h;
1368  save_v = dvi_state.v;
1369 
1370  switch (dvi_state.d) {
1371  case 0:
1372  dvi_state.h += x; break;
1373  case 1:
1374  dvi_state.v += x; break;
1375  case 3:
1376  dvi_state.v -= x; break;
1377  }
1378 
1379  if (dvi_is_tracking_boxes() && catch_phantom > 0) {
1380  pdf_rect rect;
1381  spt_t width, height, depth;
1382  if (catch_phantom == 1) {
1383  if (current_font >= 0 && current_font < num_loaded_fonts) {
1385  } else {
1386  if (dpx_conf.verbose_level > 0) {
1387  WARN("Don't know how to calculate the box height since current font is not set...");
1388  }
1389  height = 0.0;
1390  }
1391  depth = 0.0;
1392  } else {
1395  }
1396  switch (dvi_state.d) {
1397  case 0:
1398  width = dvi_state.h - save_h;
1399  break;
1400  case 1:
1401  case 2:
1402  width = dvi_state.v - save_v;
1403  break;
1404  default:
1405  width = dvi_state.h - save_h;
1406  }
1407  calc_rect(&rect, save_h, -save_v, width, height, depth);
1409  }
1410 }
1411 
1413 {
1414  if (lr_mode < SKIMMING) {
1415  switch (dvi_state.d) {
1416  case 0:
1417  dvi_state.v += y; break;
1418  case 1:
1419  dvi_state.h -= y; break;
1420  case 3:
1421  dvi_state.h += y; break;
1422  }
1423  }
1424 }
1425 
1426 /* _FIXME_
1427  * CMap decoder wants multibyte strings as input but
1428  * how DVI char codes are converted to multibyte sting
1429  * is not clear.
1430  */
1431 void
1433 {
1434  struct loaded_font *font;
1435  spt_t width, height, depth;
1436  unsigned char wbuf[4];
1437  int n, cbytes;
1438 
1439  if (current_font < 0) {
1440  ERROR("No font selected!");
1441  }
1442  /* The division by dvi2pts seems strange since we actually know the
1443  * "dvi" size of the fonts contained in the DVI file. In other
1444  * words, we converted from DVI units to pts and back again!
1445  * The problem comes from fonts defined in VF files where we don't know
1446  * the DVI size. It's keeping me sane to keep *point sizes* of *all*
1447  * fonts in the dev.c file and convert them back if necessary.
1448  */
1450 
1451  if (font->type == NATIVE) {
1452  if (ch >= 0 && ch < font->num_glyphs) {
1453  width = font->gm[ch].advance;
1454  } else {
1455  WARN("Invalid char for dvilua font (ignored): %04x", ch);
1456  return;
1457  }
1458  } else {
1459  width = tfm_get_fw_width(font->tfm_id, ch);
1460  width = sqxfw(font->size, width);
1461  }
1462 
1463  if (lr_mode >= SKIMMING) {
1464  lr_width += width;
1465  return;
1466  }
1467 
1468  if (lr_mode == RTYPESETTING)
1469  dvi_right(width); /* Will actually move left */
1470 
1471  memcpy(wbuf, font->padbytes, 4);
1472  switch (font->type) {
1473  case PHYSICAL:
1474  if (ch > 65535) {
1475  /* FIXME: uptex specific undocumented */
1476  if (!font->is_unicode && tfm_is_jfm(font->tfm_id)) {
1477  wbuf[0] = (UTF32toUTF16HS(ch) >> 8) & 0xff;
1478  wbuf[1] = UTF32toUTF16HS(ch) & 0xff;
1479  wbuf[2] = (UTF32toUTF16LS(ch) >> 8) & 0xff;
1480  wbuf[3] = UTF32toUTF16LS(ch) & 0xff;
1481  } else {
1482  wbuf[0] = (ch >> 24) & 0xff;
1483  wbuf[1] = (ch >> 16) & 0xff;
1484  wbuf[2] = (ch >> 8) & 0xff;
1485  wbuf[3] = ch & 0xff;
1486  }
1487  n = 4;
1488  } else if (ch > 255) {
1489  wbuf[2] = (ch >> 8) & 0xff;
1490  wbuf[3] = ch & 0xff;
1491  n = 2;
1492  } else if (font->subfont_id >= 0) {
1493  uint16_t uch = lookup_sfd_record(font->subfont_id, (unsigned char) ch);
1494  wbuf[2] = (uch >> 8) & 0xff;
1495  wbuf[3] = uch & 0xff;
1496  n = 2;
1497  } else {
1498  wbuf[3] = (unsigned char) ch;
1499  n = 1;
1500  }
1501  cbytes = font->minbytes > n ? font->minbytes : n;
1502  set_string(dvi_state.h, -dvi_state.v, wbuf + 4 - cbytes, cbytes, width, font->font_id);
1503  if (dvi_is_tracking_boxes()) {
1504  pdf_rect rect;
1505 
1506  height = tfm_get_fw_height(font->tfm_id, ch);
1507  depth = tfm_get_fw_depth (font->tfm_id, ch);
1508  height = sqxfw(font->size, height);
1509  depth = sqxfw(font->size, depth);
1510 
1513  }
1514  break;
1515  case NATIVE:
1516  wbuf[0] = (ch >> 8) & 0xff;
1517  wbuf[1] = ch & 0xff;
1518  set_string(dvi_state.h, -dvi_state.v, wbuf, 2, width, font->font_id);
1519  if (dvi_is_tracking_boxes()) {
1520  pdf_rect rect;
1521 
1522  height = font->gm[ch].ascent;
1523  depth = font->gm[ch].descent;
1526  }
1527  break;
1528  case VIRTUAL:
1529 #if 0
1530  /* See comment in locate_font() */
1531  if (font->subfont_id >= 0)
1532  ch = lookup_sfd_record(font->subfont_id, (unsigned char) ch);
1533 #endif /* 0 */
1534  vf_set_char(ch, font->font_id); /* push/pop invoked */
1535  break;
1536  }
1537 
1538  if (lr_mode == LTYPESETTING)
1539  dvi_right(width);
1540 
1541 }
1542 
1543 void
1545 {
1546  struct loaded_font *font;
1547  spt_t width, height, depth;
1548  unsigned char wbuf[4];
1549  int n, cbytes;
1550 
1551  if (current_font < 0) {
1552  ERROR("No font selected!");
1553  }
1554 
1556 
1557  memcpy(wbuf, font->padbytes, 4);
1558  switch (font->type) {
1559  case PHYSICAL:
1560  width = tfm_get_fw_width(font->tfm_id, ch);
1561  width = sqxfw(font->size, width);
1562  /* Treat a single character as a one byte string and use the
1563  * string routine.
1564  */
1565  if (ch > 65535) {
1566  /* FIXME: uptex specific undocumented */
1567  if (!font->is_unicode && tfm_is_jfm(font->tfm_id)) {
1568  wbuf[0] = (UTF32toUTF16HS(ch) >> 8) & 0xff;
1569  wbuf[1] = UTF32toUTF16HS(ch) & 0xff;
1570  wbuf[2] = (UTF32toUTF16LS(ch) >> 8) & 0xff;
1571  wbuf[3] = UTF32toUTF16LS(ch) & 0xff;
1572  } else {
1573  wbuf[0] = (ch >> 24) & 0xff;
1574  wbuf[1] = (ch >> 16) & 0xff;
1575  wbuf[2] = (ch >> 8) & 0xff;
1576  wbuf[3] = ch & 0xff;
1577  }
1578  n = 4;
1579  } else if (ch > 255) {
1580  wbuf[2] = (ch >> 8) & 0xff;
1581  wbuf[3] = ch & 0xff;
1582  n = 2;
1583  } else if (font->subfont_id >= 0) {
1584  uint16_t uch = lookup_sfd_record(font->subfont_id, (unsigned char) ch);
1585  wbuf[2] = (uch >> 8) & 0xff;
1586  wbuf[3] = uch & 0xff;
1587  n = 2;
1588  } else {
1589  wbuf[3] = (unsigned char) ch;
1590  n = 1;
1591  }
1592  cbytes = font->minbytes > n ? font->minbytes : n;
1593  set_string(dvi_state.h, -dvi_state.v, wbuf + 4 - cbytes, cbytes, width, font->font_id);
1594  if (dvi_is_tracking_boxes()) {
1595  pdf_rect rect;
1596 
1597  height = tfm_get_fw_height(font->tfm_id, ch);
1598  depth = tfm_get_fw_depth (font->tfm_id, ch);
1599  height = sqxfw(font->size, height);
1600  depth = sqxfw(font->size, depth);
1601 
1604  }
1605  break;
1606  case VIRTUAL:
1607 #if 0
1608  /* See comment in locate_font() */
1609  if (font->subfont_id >= 0)
1610  ch = lookup_sfd_record(font->subfont_id, (unsigned char) ch);
1611 #endif /* 0 */
1612  vf_set_char(ch, font->font_id);
1613  break;
1614  }
1615 
1616  return;
1617 }
1618 
1619 
1620 void
1622 {
1623  if (width > 0 && height > 0) {
1625 
1626  switch (dvi_state.d) {
1627  case 0:
1629  break;
1630  case 1:
1632  break;
1633  case 3:
1635  break;
1636  }
1637  }
1638 }
1639 
1640 void
1641 dvi_dirchg (unsigned char dir)
1642 {
1643  if (dpx_conf.verbose_level > 0)
1644  fprintf(stderr, " > dvi_dirchg %d\n", dir);
1645  dvi_state.d = dir;
1646  pdf_dev_set_dirmode(dvi_state.d); /* 0: horizontal, 1,3: vertical */
1647 }
1648 
1649 static void
1651 {
1652  int32_t width, height;
1653 
1656  switch (lr_mode) {
1657  case LTYPESETTING:
1658  dvi_rule(width, height);
1659  dvi_right(width);
1660  break;
1661  case RTYPESETTING:
1662  dvi_right(width);
1663  dvi_rule(width, height);
1664  break;
1665  default:
1666  lr_width += width;
1667  break;
1668  }
1669 }
1670 
1671 static void
1673 {
1674  int32_t width, height;
1675 
1678  switch (lr_mode) {
1679  case LTYPESETTING:
1680  dvi_rule(width, height);
1681  break;
1682  case RTYPESETTING:
1683  dvi_right(width);
1684  dvi_rule(width, height);
1685  dvi_right(-width);
1686  break;
1687  default:
1688  break;
1689  }
1690 }
1691 
1692 void
1693 dvi_push (void)
1694 {
1696  ERROR("DVI stack exceeded limit.");
1697 
1699 }
1700 
1701 void
1702 dvi_pop (void)
1703 {
1704  if (dvi_stack_depth <= 0)
1705  ERROR ("Tried to pop an empty stack.");
1706 
1709  pdf_dev_set_dirmode(dvi_state.d); /* 0: horizontal, 1,3: vertical */
1710 }
1711 
1712 
1713 void
1715 {
1716  dvi_state.w = ch;
1717  dvi_right(ch);
1718 }
1719 
1720 void
1721 dvi_w0 (void)
1722 {
1724 }
1725 
1726 void
1728 {
1729  dvi_state.x = ch;
1730  dvi_right(ch);
1731 }
1732 
1733 void
1734 dvi_x0 (void)
1735 {
1737 }
1738 
1739 void
1741 {
1742  dvi_state.y = ch;
1743  dvi_down(ch);
1744 }
1745 
1746 void
1747 dvi_y0 (void)
1748 {
1749  dvi_down(dvi_state.y);
1750 }
1751 
1752 void
1754 {
1755  dvi_state.z = ch;
1756  dvi_down(ch);
1757 }
1758 
1759 void
1760 dvi_z0 (void)
1761 {
1762  dvi_down(dvi_state.z);
1763 }
1764 
1765 static void
1767 {
1768  int area_len, name_len;
1769 
1770  skip_bytes(12, dvi_file);
1771  area_len = get_unsigned_byte(dvi_file);
1772  name_len = get_unsigned_byte(dvi_file);
1773  skip_bytes(area_len + name_len, dvi_file);
1774 }
1775 
1776 /* when pre-scanning the page, we process fntdef
1777  and remove the fntdef opcode from the buffer */
1778 static void
1780 {
1781  if (linear)
1782  read_font_record(tex_id);
1783  else
1784  skip_fntdef();
1786 }
1787 
1788 void
1790 {
1792 }
1793 
1794 static void
1795 do_fnt (int32_t tex_id)
1796 {
1797  int i;
1798 
1799  for (i = 0; i < num_def_fonts; i++) {
1800  if (def_fonts[i].tex_id == tex_id)
1801  break;
1802  }
1803 
1804  if (i == num_def_fonts) {
1805  ERROR("Tried to select a font that hasn't been defined: id=%d", tex_id);
1806  }
1807 
1808  if (!def_fonts[i].used) {
1809  int font_id;
1810 
1811  if (def_fonts[i].native) {
1813  def_fonts[i].face_index,
1816  def_fonts[i].extend,
1817  def_fonts[i].slant,
1818  def_fonts[i].embolden);
1819  } else {
1822  }
1825  /* if rgba_used == 0, not a colored font */
1826  if (loaded_fonts[font_id].rgba_used == 0) {
1827  loaded_fonts[font_id].xgs_id = -1;
1828  } else {
1829  pdf_obj *xgs_dict;
1830  int a = loaded_fonts[font_id].rgba_color & 0xff;
1831 
1832  /* Inefficient but don't care as transparency is not expected to be frequently used. */
1833  xgs_dict = pdf_new_dict();
1834  pdf_add_dict(xgs_dict, pdf_new_name("Type"), pdf_new_name("ExtGState"));
1835  pdf_add_dict(xgs_dict, pdf_new_name("ca"), pdf_new_number(a/255.0));
1836  pdf_add_dict(xgs_dict, pdf_new_name("CA"), pdf_new_number(a/255.0));
1837  loaded_fonts[font_id].xgs_id = pdf_defineresource("ExtGState", NULL, xgs_dict, 0);
1838  }
1840  def_fonts[i].used = 1;
1842  }
1844 }
1845 
1846 static void
1848 {
1849  if (lr_mode < SKIMMING)
1852 }
1853 
1854 static void
1855 do_bop (void)
1856 {
1857  int i;
1858 
1859  if (processing_page)
1860  ERROR("Got a bop in the middle of a page!");
1861 
1862  /* For now, ignore TeX's count registers */
1863  for (i = 0; i < 10; i++) {
1864  skip_bufferd_bytes(4);
1865  }
1866  /* Ignore previous page pointer since we have already
1867  * saved this information
1868  */
1869  skip_bufferd_bytes(4);
1870  clear_state();
1871  processing_page = 1;
1872 
1875 
1876  return;
1877 }
1878 
1879 static void
1880 do_eop (void)
1881 {
1882  processing_page = 0;
1883 
1884  if (dvi_stack_depth != 0) {
1885  ERROR("DVI stack depth is not zero at end of page");
1886  }
1888 
1889  pdf_doc_end_page();
1890 
1891  return;
1892 }
1893 
1894 static void
1895 do_dir (void)
1896 {
1898  pdf_dev_set_dirmode(dvi_state.d); /* 0: horizontal, 1,3: vertical */
1899 }
1900 
1901 static void
1903 {
1905  ERROR("Segment width stack exceeded limit.");
1906 
1908 }
1909 
1910 static void
1912 {
1913  if (lr_width_stack_depth <= 0)
1914  ERROR("Tried to pop an empty segment width stack.");
1915 
1917 }
1918 
1919 static void
1921 {
1922  if (lr_mode >= SKIMMING) {
1923  ++lr_mode;
1924  } else {
1928  lr_mode = SKIMMING;
1929  lr_width = 0;
1930  }
1931 }
1932 
1933 static void
1935 {
1936  switch (lr_mode) {
1937  case SKIMMING:
1940  lr_mode = REVERSE(lr_state.state); /* must precede dvi_right */
1942  lr_width_push();
1943  break;
1944  case LTYPESETTING:
1945  case RTYPESETTING:
1946  lr_width_pop();
1948  lr_mode = REVERSE(lr_mode);
1949  break;
1950  default: /* lr_mode > SKIMMING */
1951  lr_mode--;
1952  }
1953 }
1954 
1955 static void
1957 {
1958  unsigned int flags;
1959  int name_length;
1960 
1961  skip_bytes(4, dvi_file); /* skip point size */
1965 
1966  if (flags & XDV_FLAG_COLORED)
1967  skip_bytes(4, dvi_file);
1968 
1969  if (flags & XDV_FLAG_EXTEND)
1970  skip_bytes(4, dvi_file);
1971 
1972  if (flags & XDV_FLAG_SLANT)
1973  skip_bytes(4, dvi_file);
1974 
1975  if (flags & XDV_FLAG_EMBOLDEN)
1976  skip_bytes(4, dvi_file);
1977 }
1978 
1979 static void
1981 {
1982  if (linear)
1983  read_native_font_record(tex_id);
1984  else
1986  --dvi_page_buf_index; /* don't buffer the opcode */
1987 }
1988 
1989 static void
1991 {
1992  unsigned int i, slen = 0;
1993  slen = (unsigned int) get_buffered_unsigned_pair();
1994  for (i = 0; i < slen; i++) {
1995  skip_bufferd_bytes(4);
1996  skip_bufferd_bytes(4);
1997  skip_bufferd_bytes(2);
1998  }
1999 }
2000 
2001 static void
2002 do_glyphs (int do_actual_text)
2003 {
2004  struct loaded_font *font;
2005  spt_t width, height, depth, *xloc, *yloc;
2006  unsigned char wbuf[2];
2007  int32_t i;
2008  uint16_t glyph_id, slen = 0;
2009 
2010  if (current_font < 0)
2011  ERROR("No font selected!");
2012 
2014 
2015  if (do_actual_text) {
2016  slen = (unsigned int) get_buffered_unsigned_pair();
2017  if (lr_mode >= SKIMMING) {
2018  for (i = 0; i < slen; i++) {
2019  skip_bufferd_bytes(2);
2020  }
2021  } else {
2022  uint16_t *unicodes = NEW(slen, uint16_t);
2023  for (i = 0; i < slen; i++) {
2024  unicodes[i] = (uint16_t) get_buffered_unsigned_pair();
2025  }
2026  pdf_dev_begin_actualtext (unicodes, slen);
2027  RELEASE(unicodes);
2028  }
2029  }
2030 
2032 
2033  if (lr_mode >= SKIMMING) {
2034  lr_width += width;
2035  skip_glyphs();
2036  return;
2037  }
2038 
2039  if (lr_mode == RTYPESETTING)
2040  dvi_right(width); /* Will actually move left */
2041 
2042  slen = (unsigned int) get_buffered_unsigned_pair();
2043  xloc = NEW(slen, spt_t);
2044  yloc = NEW(slen, spt_t);
2045  for (i = 0; i < slen; i++) {
2046  xloc[i] = get_buffered_signed_quad();
2047  yloc[i] = get_buffered_signed_quad();
2048  }
2049 
2050  if (font->rgba_used == 1) {
2051  pdf_color color;
2053  (double)((unsigned char)(font->rgba_color >> 24) & 0xff) / 255,
2054  (double)((unsigned char)(font->rgba_color >> 16) & 0xff) / 255,
2055  (double)((unsigned char)(font->rgba_color >> 8) & 0xff) / 255);
2057  /* Opacity:
2058  * Enter graphics_mode and then enclose with save/resotre
2059  * since pdf_color_pop() may not restore graphics state.
2060  */
2061  if (font->xgs_id >= 0) {
2062  pdf_obj *ref;
2063  char resname[16];
2064  char content[22];
2065 
2066  sprintf(resname, "Xtx_Gs_%08x", current_font);
2067  ref = pdf_get_resource_reference(font->xgs_id);
2068  pdf_doc_add_page_resource("ExtGState", resname, ref);
2069  graphics_mode();
2070  pdf_dev_gsave();
2071  sprintf(content, " /%s gs ", resname);
2073  }
2074  }
2075 
2076  for (i = 0; i < slen; i++) {
2077  spt_t advance = 0;
2078 
2079  glyph_id = get_buffered_unsigned_pair(); /* freetype glyph index */
2080  if (glyph_id < font->num_glyphs) {
2081  if (font->shift_gid)
2082  glyph_id++;
2083  advance = font->gm[glyph_id].advance;
2084  if (dvi_is_tracking_boxes()) {
2085  pdf_rect rect;
2086  height = font->gm[glyph_id].ascent ;
2087  depth = -font->gm[glyph_id].descent;
2088  calc_rect(&rect, dvi_state.h + xloc[i], -dvi_state.v - yloc[i], advance, height, depth);
2090  }
2091  }
2092  wbuf[0] = glyph_id >> 8;
2093  wbuf[1] = glyph_id & 0xff;
2094  set_string(dvi_state.h + xloc[i], -dvi_state.v - yloc[i], wbuf, 2, advance, font->font_id);
2095  }
2096 
2097  if (font->rgba_used == 1) {
2098  if (font->xgs_id >= 0) {
2099  graphics_mode();
2100  pdf_dev_grestore();
2101  }
2102  pdf_color_pop();
2103  }
2104  RELEASE(xloc);
2105  RELEASE(yloc);
2106 
2107  if (do_actual_text) {
2109  }
2110 
2111  if (lr_mode == LTYPESETTING)
2112  dvi_right(width);
2113 
2114  return;
2115 }
2116 
2117 static void
2119 {
2120  int code;
2121 
2122  skip_bytes(28, dvi_file);
2123  while ((code = get_unsigned_byte(dvi_file)) != POST_POST) {
2124  switch (code) {
2125  case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4:
2126  skip_bytes(code + 1 - FNT_DEF1, dvi_file);
2127  skip_fntdef();
2128  break;
2129  case XDV_NATIVE_FONT_DEF:
2130  skip_bytes(4, dvi_file);
2132  break;
2133  default:
2134  ERROR("Unexpected op code (%u) in postamble", code);
2135  }
2136  }
2137  skip_bytes(4, dvi_file);
2140  MESG("DVI ID = %d\n", post_id_byte);
2142  }
2143  check_id_bytes();
2144  if (has_ptex && post_id_byte != DVIV_ID)
2145  ERROR ("Saw opcode %i in DVI file not for Ascii pTeX", PTEXDIR);
2146 
2147  num_pages = 0; /* force loop to terminate */
2148 }
2149 
2150 /* Most of the work of actually interpreting
2151  * the dvi file is here.
2152  */
2153 void
2154 dvi_do_page (double page_paper_height, double hmargin, double vmargin)
2155 {
2156  unsigned char opcode;
2157 
2158  /* before this is called, we have scanned the page for papersize specials
2159  and the complete DVI data is now in dvi_page_buffer */
2160  dvi_page_buf_index = 0;
2161 
2162  /* DVI coordinate */
2163  dev_origin_x = hmargin;
2164  dev_origin_y = page_paper_height - vmargin;
2165 
2166  dvi_stack_depth = 0;
2167  for (;;) {
2169 
2170  if (opcode <= SET_CHAR_127) {
2171  dvi_set(opcode);
2172  continue;
2173  }
2174 
2175  /* If we are here, we have an opcode that is something
2176  * other than SET_CHAR.
2177  */
2178  if (opcode >= FNT_NUM_0 && opcode <= FNT_NUM_63) {
2180  continue;
2181  }
2182 
2183  switch (opcode) {
2184  case SET1: case SET2: case SET3:
2186  case SET4:
2187  ERROR("Multibyte (>24 bits) character not supported!");
2188  break;
2189 
2190  case SET_RULE:
2191  do_setrule();
2192  break;
2193 
2194  case PUT1: case PUT2: case PUT3:
2196  case PUT4:
2197  ERROR("Multibyte (>24 bits) character not supported!");
2198  break;
2199 
2200  case PUT_RULE:
2201  do_putrule();
2202  break;
2203 
2204  case NOP:
2205  break;
2206 
2207  case BOP:
2208  do_bop();
2209  break;
2210  case EOP:
2211  do_eop();
2212  if (linear) {
2213  if ((opcode = get_unsigned_byte(dvi_file)) == POST)
2214  check_postamble();
2215  else
2217  }
2218  return;
2219 
2220  case PUSH:
2221  dvi_push();
2222  if (lr_mode >= SKIMMING)
2223  lr_width_push();
2224  /* The following line needs to go here instead of in
2225  * dvi_push() since logical structure of document is
2226  * oblivous to virtual fonts. For example the last line on a
2227  * page could be at stack level 3 and the page footer should
2228  * be at stack level 3. However, if the page footer contains
2229  * virtual fonts (or other nested constructions), it could
2230  * fool the link breaker into thinking it was a continuation
2231  * of the link */
2232  dvi_mark_depth();
2233  break;
2234  case POP:
2235  dvi_pop();
2236  if (lr_mode >= SKIMMING)
2237  lr_width_pop();
2238  /* Above explanation holds for following line too */
2239  dvi_mark_depth();
2240  break;
2241 
2242  case RIGHT1: case RIGHT2: case RIGHT3: case RIGHT4:
2244 
2245  case W0: dvi_w0(); break;
2246  case W1: case W2: case W3: case W4:
2248 
2249  case X0: dvi_x0(); break;
2250  case X1: case X2: case X3: case X4:
2252 
2253  case DOWN1: case DOWN2: case DOWN3: case DOWN4:
2255 
2256  case Y0: dvi_y0(); break;
2257  case Y1: case Y2: case Y3: case Y4:
2259 
2260  case Z0: dvi_z0(); break;
2261  case Z1: case Z2: case Z3: case Z4:
2263 
2264  case FNT1: case FNT2: case FNT3: case FNT4:
2266 
2267  /* Specials */
2268  case XXX1: case XXX2: case XXX3: case XXX4:
2269  {
2271  if (size < 0)
2272  WARN("DVI: Special with %d bytes???", size);
2273  else
2274  do_xxx(size);
2275  break;
2276  }
2277 
2278  /* These should not occur - processed during pre-scanning */
2279  case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4:
2280  break;
2281 
2282  /* pTeX extension */
2283  case PTEXDIR:
2284  need_pTeX(opcode);
2285  do_dir();
2286  break;
2287 
2288  /* XeTeX extensions */
2289  case XDV_GLYPHS:
2290  need_XeTeX(opcode);
2291  do_glyphs(0);
2292  break;
2293  case XDV_TEXT_AND_GLYPHS:
2294  need_XeTeX(opcode);
2295  do_glyphs(1);
2296  break;
2297  /* should not occur - processed during pre-scanning */
2298  case XDV_NATIVE_FONT_DEF:
2299  need_XeTeX(opcode);
2300  break;
2301  case BEGIN_REFLECT:
2302  need_XeTeX(opcode);
2304  break;
2305  case END_REFLECT:
2306  need_XeTeX(opcode);
2307  dvi_end_reflect();
2308  break;
2309 
2310  case POST:
2311  if (linear && !processing_page) {
2312  /* for linear processing, this means there are no more pages */
2313  num_pages = 0; /* force loop to terminate */
2314  return;
2315  }
2316  /* else fall through to error case */
2317  case PRE: case POST_POST:
2318  ERROR("Unexpected preamble or postamble in dvi file");
2319  break;
2320  default:
2321  ERROR("Unexpected opcode or DVI file ended prematurely");
2322  }
2323  }
2324 }
2325 
2326 double
2327 dvi_init (char *dvi_filename, double mag)
2328 {
2330 
2331  if (!dvi_filename) { /* no filename: reading from stdin, probably a pipe */
2332  int ch;
2333 #ifdef WIN32
2334  setmode(fileno(stdin), _O_BINARY);
2335 #endif
2336  dvi_file = stdin;
2337  linear = 1;
2338 
2340  do_scales(mag);
2341  if ((ch = get_unsigned_byte(dvi_file)) == POST)
2342  check_postamble();
2343  else
2344  ungetc(ch, dvi_file);
2345  } else {
2346  char *p, *saved_orig_name;
2347  dvi_file = NULL;
2348  saved_orig_name = xstrdup(dvi_filename);
2349  p = strrchr(dvi_filename, '.');
2350  if (p == NULL || (!FILESTRCASEEQ(p, ".dvi") &&
2351  !FILESTRCASEEQ(p, ".xdv"))) {
2352  strcat(dvi_filename, ".xdv");
2354  if (!dvi_file) {
2355  dvi_filename[strlen(dvi_filename) - 4] = '\0';
2356  strcat(dvi_filename, ".dvi");
2358  }
2359  }
2360  if (!dvi_file)
2361  dvi_file = MFOPEN(saved_orig_name, FOPEN_RBIN_MODE);
2362  free(saved_orig_name);
2363 
2364  if (!dvi_file) {
2365  ERROR("Could not open specified DVI (or XDV) file: %s",
2366  dvi_filename);
2367  return 0.0;
2368  }
2369 
2370  /* DVI files are most easily read backwards by
2371  * searching for post_post and then post opcode.
2372  */
2375  do_scales(mag);
2377  get_comment();
2379  }
2380  clear_state();
2381 
2383  dvi_page_buffer = NEW(dvi_page_buf_size, unsigned char);
2384 
2385  return dvi2pts;
2386 }
2387 
2388 void
2390 {
2391  int i;
2392 
2393  if (linear) {
2394  /* probably reading a pipe from xetex; consume any remaining data */
2395  while (fgetc(dvi_file) != EOF)
2396  ;
2397  }
2398 
2399  /* We add comment in dvi_close instead of dvi_init so user
2400  * has a change to overwrite it. The docinfo dictionary is
2401  * treated as a write-once record.
2402  */
2403 
2404  /* Do some house cleaning */
2405  MFCLOSE(dvi_file);
2406  dvi_file = NULL;
2407 
2408  if (def_fonts) {
2409  for (i = 0; i < num_def_fonts; i++) {
2410  if (def_fonts[i].font_name)
2413  }
2414  RELEASE(def_fonts);
2415  }
2416  def_fonts = NULL;
2417 
2418  if (page_loc)
2419  RELEASE(page_loc);
2420  page_loc = NULL;
2421  num_pages = 0;
2422 
2423  for (i = 0; i < num_loaded_fonts; i++)
2424  {
2425  if (loaded_fonts[i].gm != NULL)
2427 
2428  loaded_fonts[i].gm = NULL;
2429  }
2430 
2431  if (loaded_fonts)
2433  loaded_fonts = NULL;
2434  num_loaded_fonts = 0;
2435 
2437  tfm_close_all ();
2438 
2439  if (dvi_page_buffer) {
2442  dvi_page_buf_size = 0;
2443  }
2444 }
2445 
2446 /* The following are need to implement virtual fonts
2447  According to documentation, the vf "subroutine"
2448  must have state pushed and must have
2449  w,v,y, and z set to zero. The current font
2450  is determined by the virtual font header, which
2451  may be undefined */
2452 
2454 static int num_saved_fonts = 0;
2455 
2456 void
2457 dvi_vf_init (int dev_font_id)
2458 {
2459  dvi_push();
2460 
2461  dvi_state.w = 0; dvi_state.x = 0;
2462  dvi_state.y = 0; dvi_state.z = 0;
2463 
2464  /* do not reset dvi_state.d. */
2467  } else
2468  ERROR("Virtual fonts nested too deeply!");
2469  current_font = dev_font_id;
2470 }
2471 
2472 /* After VF subroutine is finished, we simply pop the DVI stack */
2473 void
2475 {
2476  dvi_pop();
2477  if (num_saved_fonts > 0)
2479  else {
2480  ERROR("Tried to pop an empty font stack");
2481  }
2482 }
2483 
2484 
2485 /* Scan various specials */
2486 #include "dpxutil.h"
2487 /* For MAX_PWD_LEN */
2488 #include "pdfencrypt.h"
2489 
2490 static int
2491 scan_special_encrypt (int *key_bits, int32_t *permission, char *opassword, char *upassword,
2492  const char **curptr, const char *endptr)
2493 {
2494  int error = 0;
2495  const char *p = *curptr;
2496 
2497  skip_white(&p, endptr);
2498 
2499  opassword[0] = '\0';
2500  upassword[0] = '\0';
2501  while (!error && p < endptr) {
2502  char *kp = parse_c_ident(&p, endptr);
2503  if (!kp)
2504  break;
2505  else {
2506  pdf_obj *obj;
2507  skip_white(&p, endptr);
2508  if (!strcmp(kp, "ownerpw")) {
2509  if ((obj = parse_pdf_string(&p, endptr))) {
2510  if (pdf_string_value(obj)) {
2511  int str_length = (MAX_PWD_LEN - 1 > pdf_string_length(obj)
2512  ? pdf_string_length(obj) : MAX_PWD_LEN - 1);
2513  strncpy(opassword, pdf_string_value(obj), str_length);
2514  opassword[str_length] = '\0';
2515  }
2516  pdf_release_obj(obj);
2517  } else
2518  error = -1;
2519  } else if (!strcmp(kp, "userpw")) {
2520  if ((obj = parse_pdf_string(&p, endptr))) {
2521  if (pdf_string_value(obj)) {
2522  int str_length = (MAX_PWD_LEN - 1 > pdf_string_length(obj)
2523  ? pdf_string_length(obj) : MAX_PWD_LEN - 1);
2524  strncpy(upassword, pdf_string_value(obj), str_length);
2525  upassword[str_length] = '\0';
2526  }
2527  pdf_release_obj(obj);
2528  } else
2529  error = -1;
2530  } else if (!strcmp(kp, "length")) {
2531  if ((obj = parse_pdf_number(&p, endptr)) && PDF_OBJ_NUMBERTYPE(obj)) {
2532  *key_bits = (unsigned) pdf_number_value(obj);
2533  } else
2534  error = -1;
2535  if (obj)
2536  pdf_release_obj(obj);
2537  } else if (!strcmp(kp, "perm")) {
2538  if ((obj = parse_pdf_number(&p, endptr)) && PDF_OBJ_NUMBERTYPE(obj)) {
2539  *permission = (unsigned) pdf_number_value(obj);
2540  } else
2541  error = -1;
2542  if (obj)
2543  pdf_release_obj(obj);
2544  } else
2545  error = -1;
2546  RELEASE(kp);
2547  }
2548  skip_white(&p, endptr);
2549  }
2550  *curptr = p;
2551 
2552  return error;
2553 }
2554 
2555 static int
2556 scan_special_trailerid (unsigned char *id1, unsigned char *id2,
2557  const char **curptr, const char *endptr)
2558 {
2559  int error = 0;
2560  pdf_obj *id_array;
2561  const char *p = *curptr;
2562 
2563  skip_white(&p, endptr);
2564  id_array = parse_pdf_array(&p, endptr, NULL);
2565  if (id_array) {
2566  if (pdf_array_length(id_array) == 2) {
2567  pdf_obj *tmp1, *tmp2;
2568  tmp1 = pdf_get_array(id_array, 0);
2569  tmp2 = pdf_get_array(id_array, 1);
2570  if (PDF_OBJ_STRINGTYPE(tmp1) && pdf_string_length(tmp1) == 16 &&
2571  PDF_OBJ_STRINGTYPE(tmp2) && pdf_string_length(tmp2) == 16) {
2572  memcpy(id1, pdf_string_value(tmp1), 16);
2573  memcpy(id2, pdf_string_value(tmp2), 16);
2574  } else {
2575  error = -1;
2576  }
2577  } else {
2578  error = -1;
2579  }
2580  pdf_release_obj(id_array);
2581  } else {
2582  error = -1;
2583  }
2584  skip_white(&p, endptr);
2585  *curptr = p;
2586 
2587  return error;
2588 }
2589 
2590 static int
2591 scan_special (double *wd, double *ht, double *xo, double *yo, int *lm,
2592  int *majorversion, int *minorversion,
2593  int *enable_encryption, int *key_bits, int32_t *permission,
2594  char *opassword, char *upassword,
2595  int *has_id, unsigned char *id1, unsigned char *id2,
2596  const char *buf, uint32_t size)
2597 {
2598  char *q;
2599  const char *p = buf, *endptr;
2600  int ns_pdf = 0, ns_dvipdfmx = 0, error = 0;
2601  double tmp;
2602 
2603  endptr = p + size;
2604 
2605  skip_white(&p, endptr);
2606 
2607  q = parse_c_ident(&p, endptr);
2608  if (q && !strcmp(q, "pdf")) {
2609  skip_white(&p, endptr);
2610  if (p < endptr && *p == ':') {
2611  p++;
2612  skip_white(&p, endptr);
2613  RELEASE(q);
2614  q = parse_c_ident(&p, endptr); ns_pdf = 1;
2615  }
2616  }
2617  else if (q && !strcmp(q, "x")) {
2618  skip_white(&p, endptr);
2619  if (p < endptr && *p == ':') {
2620  p++;
2621  skip_white(&p, endptr);
2622  RELEASE(q);
2623  q = parse_c_ident(&p, endptr);
2624  }
2625  }
2626  else if (q && !strcmp(q, "dvipdfmx")) {
2627  skip_white(&p, endptr);
2628  if (p < endptr && *p == ':') {
2629  p++;
2630  skip_white(&p, endptr);
2631  RELEASE(q);
2632  q = parse_c_ident(&p, endptr); ns_dvipdfmx = 1;
2633  }
2634  }
2635  skip_white(&p, endptr);
2636 
2637  if (q) {
2638  if (!strcmp(q, "landscape")) {
2639  *lm = 1;
2640  } else if (ns_pdf && !strcmp(q, "pagesize")) {
2641  while (!error && p < endptr) {
2642  char *kp = parse_c_ident(&p, endptr);
2643  if (!kp)
2644  break;
2645  else {
2646  skip_white(&p, endptr);
2647  if (!strcmp(kp, "width")) {
2648  error = dpx_util_read_length(&tmp, dvi_tell_mag(), &p, endptr);
2649  if (!error)
2650  *wd = tmp * dvi_tell_mag();
2651  } else if (!strcmp(kp, "height")) {
2652  error = dpx_util_read_length(&tmp, dvi_tell_mag(), &p, endptr);
2653  if (!error)
2654  *ht = tmp * dvi_tell_mag();
2655  } else if (!strcmp(kp, "xoffset")) {
2656  error = dpx_util_read_length(&tmp, dvi_tell_mag(), &p, endptr);
2657  if (!error)
2658  *xo = tmp * dvi_tell_mag();
2659  } else if (!strcmp(kp, "yoffset")) {
2660  error = dpx_util_read_length(&tmp, dvi_tell_mag(), &p, endptr);
2661  if (!error)
2662  *yo = tmp * dvi_tell_mag();
2663  } else if (!strcmp(kp, "default")) {
2664  *wd = paper_width;
2665  *ht = paper_height;
2666  *lm = landscape_mode;
2667  *xo = *yo = 72.0;
2668  }
2669  RELEASE(kp);
2670  }
2671  skip_white(&p, endptr);
2672  }
2673  } else if (!strcmp(q, "papersize")) {
2674  char qchr = 0;
2675  if (*p == '=') p++;
2676  skip_white(&p, endptr);
2677  if (p < endptr && (*p == '\'' || *p == '\"')) {
2678  qchr = *p; p++;
2679  skip_white(&p, endptr);
2680  }
2681  error = dpx_util_read_length(&tmp, 1.0, &p, endptr);
2682  if (!error) {
2683  double tmp1;
2684 
2685  skip_white(&p, endptr);
2686  if (p < endptr && *p == ',') {
2687  p++; skip_white(&p, endptr);
2688  }
2689  error = dpx_util_read_length(&tmp1, 1.0, &p, endptr);
2690  if (!error) {
2691  *wd = tmp;
2692  *ht = tmp1;
2693  skip_white(&p, endptr);
2694  }
2695  }
2696  if (!error && qchr) { /* Check if properly quoted */
2697  if (p >= endptr || *p != qchr)
2698  error = -1;
2699  }
2700  if (error == 0) {
2701  paper_width = *wd;
2702  paper_height = *ht;
2703  }
2704  } else if (minorversion && ns_pdf && !strcmp(q, "minorversion")) {
2705  char *kv;
2706  if (*p == '=') p++;
2707  skip_white(&p, endptr);
2708  kv = parse_float_decimal(&p, endptr);
2709  if (kv) {
2710  *minorversion = (int)strtol(kv, NULL, 10);
2711  RELEASE(kv);
2712  }
2713  } else if (majorversion && ns_pdf && !strcmp(q, "majorversion")) {
2714  char *kv;
2715  if (*p == '=') p++;
2716  skip_white(&p, endptr);
2717  kv = parse_float_decimal(&p, endptr);
2718  if (kv) {
2719  *majorversion = (int)strtol(kv, NULL, 10);
2720  RELEASE(kv);
2721  }
2722  } else if (enable_encryption && ns_pdf && !strcmp(q, "encrypt")) {
2723  *enable_encryption = 1;
2724  error = scan_special_encrypt(key_bits, permission, opassword, upassword, &p, endptr);
2725  } else if (ns_dvipdfmx && !strcmp(q, "config")) {
2726  read_config_special(&p, endptr);
2727  } else if (has_id && id1 && id2 && ns_pdf && !strcmp(q, "trailerid")) {
2728  error = scan_special_trailerid(id1, id2, &p, endptr);
2729  if (error) {
2730  WARN("Invalid argument for pdf:trailerid special.");
2731  *has_id = 0;
2732  } else {
2733  *has_id = 1;
2734  }
2735  }
2736  RELEASE(q);
2737  }
2738 
2739  return error;
2740 }
2741 
2742 
2743 void
2744 dvi_scan_specials (int page_no,
2745  double *page_width, double *page_height,
2746  double *x_offset, double *y_offset, int *landscape,
2747  int *majorversion, int *minorversion,
2748  int *do_enc, int *key_bits, int32_t *permission,
2749  char *owner_pw, char *user_pw,
2750  int *has_id, unsigned char *id1, unsigned char *id2)
2751 {
2752  FILE *fp = dvi_file;
2753  int32_t offset;
2754  unsigned char opcode;
2755  static int buffered_page = -1;
2756  unsigned int len;
2757 
2758  if (page_no == buffered_page || num_pages == 0)
2759  return; /* because dvipdfmx wants to scan first page twice! */
2760  buffered_page = page_no;
2761 
2762  dvi_page_buf_index = 0;
2763 
2764  if (!linear) {
2765  if (page_no >= num_pages)
2766  ERROR("Invalid page number: %u", page_no);
2767  offset = page_loc[page_no];
2768 
2769  xseek_absolute (fp, offset, "DVI");
2770  }
2771 
2772  while ((opcode = get_and_buffer_unsigned_byte(fp)) != EOP) {
2773  if (opcode <= SET_CHAR_127 ||
2774  (opcode >= FNT_NUM_0 && opcode <= FNT_NUM_63))
2775  continue;
2776  else if (opcode == XXX1 || opcode == XXX2 ||
2777  opcode == XXX3 || opcode == XXX4) {
2779  switch (opcode) {
2780  case XXX4: size = size * 0x100u + get_and_buffer_unsigned_byte(fp);
2781  if (size > 0x7fff)
2782  WARN("Unsigned number starting with %x exceeds 0x7fffffff", size);
2783  case XXX3: size = size * 0x100u + get_and_buffer_unsigned_byte(fp);
2784  case XXX2: size = size * 0x100u + get_and_buffer_unsigned_byte(fp);
2785  default: break;
2786  }
2790  }
2791 #define buf ((char*)(dvi_page_buffer + dvi_page_buf_index))
2792  if (fread(buf, sizeof(char), size, fp) != size)
2793  ERROR("Reading DVI file failed!");
2795  majorversion, minorversion,
2796  do_enc, key_bits, permission, owner_pw, user_pw,
2797  has_id, id1, id2,
2798  buf, size))
2799  WARN("Reading special command failed: \"%.*s\"", size, buf);
2800 #undef buf
2802  continue;
2803  }
2804 
2805  /* Skipping... */
2806  switch (opcode) {
2807  case BOP:
2808  get_and_buffer_bytes(fp, 44);
2809  break;
2810  case NOP: case PUSH: case POP:
2811  case W0: case X0: case Y0: case Z0:
2812  break;
2813  case SET1: case PUT1: case RIGHT1: case DOWN1:
2814  case W1: case X1: case Y1: case Z1: case FNT1:
2816  break;
2817 
2818  case SET2: case PUT2: case RIGHT2: case DOWN2:
2819  case W2: case X2: case Y2: case Z2: case FNT2:
2821  break;
2822 
2823  case SET3: case PUT3: case RIGHT3: case DOWN3:
2824  case W3: case X3: case Y3: case Z3: case FNT3:
2826  break;
2827 
2828  case SET4: case PUT4: case RIGHT4: case DOWN4:
2829  case W4: case X4: case Y4: case Z4: case FNT4:
2831  break;
2832 
2833  case SET_RULE: case PUT_RULE:
2835  break;
2836 
2837  case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4:
2839  break;
2840  case XDV_GLYPHS:
2841  need_XeTeX(opcode);
2842  get_and_buffer_bytes(fp, 4); /* width */
2843  len = get_and_buffer_unsigned_pair(fp); /* glyph count */
2844  get_and_buffer_bytes(fp, len * 10); /* 2 bytes ID + 8 bytes x,y-location per glyph */
2845  break;
2846  case XDV_TEXT_AND_GLYPHS:
2847  need_XeTeX(opcode);
2848  len = get_and_buffer_unsigned_pair(fp); /* utf16 code unit count */
2849  get_and_buffer_bytes(fp, len * 2); /* 2 bytes per code unit */
2850  get_and_buffer_bytes(fp, 4); /* width */
2851  len = get_and_buffer_unsigned_pair(fp); /* glyph count */
2852  get_and_buffer_bytes(fp, len * 10); /* 2 bytes ID + 8 bytes x,y-location per glyph */
2853  break;
2854  case XDV_NATIVE_FONT_DEF:
2855  need_XeTeX(opcode);
2857  break;
2858  case BEGIN_REFLECT:
2859  case END_REFLECT:
2860  need_XeTeX(opcode);
2861  break;
2862 
2863  case PTEXDIR:
2864  need_pTeX(opcode);
2866  break;
2867 
2868  case POST:
2869  if (linear && dvi_page_buf_index == 1) {
2870  /* this is actually an indication that we've reached the end of the input */
2871  return;
2872  }
2873  /* else fall through to error case */
2874  default: /* case PRE: case POST_POST: and others */
2875  ERROR("Unexpected opcode %d at pos=0x%x", opcode, tell_position(fp));
2876  break;
2877  }
2878  }
2879 
2880  return;
2881 }
2882 #if defined(LIBDPX)
2883 #include "dvi_ng.c"
2884 #endif /* LIBDPX */
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
unsigned long __cdecl strtoul(char const *_String, char **_EndPtr, int _Radix)
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
q
Definition: afm2pl.c:2287
int code
Definition: aftopl.c:52
double quad
Definition: aftopl.c:71
#define font
Definition: aptex-macros.h:175
#define width(a)
Definition: aptex-macros.h:198
#define depth(a)
Definition: aptex-macros.h:199
#define head
Definition: aptex-macros.h:513
#define count(a)
Definition: aptex-macros.h:781
#define mag
Definition: aptex-macros.h:802
#define name
#define height(a)
Definition: aptex-macros.h:200
#define advance
Definition: aptex-macros.h:464
#define slant(f)
#define mode
Definition: aptex-macros.h:510
static int font_id[65536]
Definition: aptex-src.c:20628
END BEGIN name_length
Definition: bibtex-2.c:2032
#define n
Definition: t4ht.c:1290
#define FNT_NUM_0
Definition: dd.h:706
#define free(a)
Definition: decNumber.cpp:310
#define strrchr
Definition: detex.c:67
const char * dvi_filename
Definition: dt2dv.c:333
#define POP
Definition: dtl.h:135
#define Y0
Definition: dtl.h:159
#define PUT2
Definition: dtl.h:127
#define X4
Definition: dtl.h:152
#define DOWN4
Definition: dtl.h:157
#define X1
Definition: dtl.h:149
#define RIGHT4
Definition: dtl.h:140
#define Y1
Definition: dtl.h:160
#define Y2
Definition: dtl.h:161
#define Z2
Definition: dtl.h:167
#define W3
Definition: dtl.h:145
#define PUSH
Definition: dtl.h:134
#define Z1
Definition: dtl.h:166
#define Z0
Definition: dtl.h:165
#define DOWN3
Definition: dtl.h:156
#define Z3
Definition: dtl.h:168
#define RIGHT2
Definition: dtl.h:138
#define Y4
Definition: dtl.h:163
#define W0
Definition: dtl.h:142
#define Y3
Definition: dtl.h:162
#define SET3
Definition: dtl.h:122
#define PUT3
Definition: dtl.h:128
#define EOP
Definition: dtl.h:133
#define X2
Definition: dtl.h:150
#define RIGHT1
Definition: dtl.h:137
#define X0
Definition: dtl.h:148
#define BOP
Definition: dtl.h:132
#define SET4
Definition: dtl.h:123
#define SET1
Definition: dtl.h:120
#define RIGHT3
Definition: dtl.h:139
#define DOWN2
Definition: dtl.h:155
#define PUT4
Definition: dtl.h:129
#define W1
Definition: dtl.h:143
#define W2
Definition: dtl.h:144
#define PUT1
Definition: dtl.h:126
#define W4
Definition: dtl.h:146
#define DOWN1
Definition: dtl.h:154
#define SET2
Definition: dtl.h:121
#define X3
Definition: dtl.h:151
#define Z4
Definition: dtl.h:169
#define fread
Definition: xxstdio.h:25
#define fgetc
Definition: xxstdio.h:26
#define FOPEN_RBIN_MODE
Definition: dvips.h:86
__BOOLEAN__ landscape
Definition: global.h:129
const char * delim
Definition: dvistuff.c:159
char * strncpy()
int strcmp()
Definition: coll.cpp:143
char * strcpy()
#define error(a)
Definition: dviinfo.c:48
struct rect rect
Definition: dvipdfm.c:59
#define FILESTRCASEEQ
Definition: dvips.h:372
long int flag
Definition: f2c.h:53
int ptsize
Definition: ftlib.c:46
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define PRE
Definition: hbf2gf.c:42
#define XXX3
Definition: hbf2gf.c:55
#define XXX2
Definition: hbf2gf.c:54
#define POST
Definition: hbf2gf.c:60
#define XXX1
Definition: hbf2gf.c:53
#define XXX4
Definition: hbf2gf.c:56
#define slen
Definition: hpcdtoppm.c:1329
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
unsigned char uch
Definition: zutil.h:34
#define EOF
Definition: afmparse.c:59
kerning y
Definition: ttdriver.c:212
#define NEW
Definition: gdkanji.c:77
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
#define POST_POST
Definition: commands.h:259
#define FNT_DEF1
Definition: commands.h:253
#define FNT2
Definition: commands.h:246
#define FNT_DEF3
Definition: commands.h:255
#define FNT1
Definition: commands.h:245
#define FNT3
Definition: commands.h:247
#define FNT4
Definition: commands.h:248
#define FNT_DEF2
Definition: commands.h:254
#define PUT_RULE
Definition: commands.h:147
#define SET_RULE
Definition: commands.h:142
#define FNT_DEF4
Definition: commands.h:256
dvi_push()
Definition: dvi.c:158
int num
Definition: disdvi.c:621
dvi_pop()
Definition: dvi.c:174
#define xstrdup(s)
Definition: writet1.c:34
void cff_close(cff_font *cff)
Definition: cff.c:192
struct _dpx_conf dpx_conf
Definition: dpxconf.c:33
@ dpx_mode_xdv_mode
Definition: dpxconf.h:29
char * dpx_find_dfont_file(const char *filename)
Definition: dpxfile.c:814
char * dpx_find_type1_file(const char *filename)
Definition: dpxfile.c:745
char * dpx_find_opentype_file(const char *filename)
Definition: dpxfile.c:781
char * dpx_find_truetype_file(const char *filename)
Definition: dpxfile.c:763
#define DPXFCLOSE(f)
Definition: dpxfile.h:57
#define DPXFOPEN(n, t)
Definition: dpxfile.h:56
@ DPX_RES_TYPE_T1FONT
Definition: dpxfile.h:31
char * parse_float_decimal(const char **pp, const char *endptr)
Definition: dpxutil.c:839
int dpx_util_read_length(double *vp, double mag, const char **pp, const char *endptr)
Definition: dpxutil.c:87
char * parse_c_ident(const char **pp, const char *endptr)
Definition: dpxutil.c:821
static void skip_white(const char **pp, const char *endptr)
Definition: dpxutil.c:74
static void do_bop(void)
Definition: dvi.c:1855
double dvi_unit_size(void)
Definition: dvi.c:999
static void set_string(spt_t xpos, spt_t ypos, const void *instr_ptr, int instr_len, spt_t width, int font_id)
Definition: dvi.c:940
void dvi_untag_depth(void)
Definition: dvi.c:882
#define PHYSICAL
Definition: dvi.c:133
static void do_dir(void)
Definition: dvi.c:1895
static unsigned marked_depth
Definition: dvi.c:850
#define XDV_FLAG_SLANT
Definition: dvi.c:211
void dvi_do_page(double page_paper_height, double hmargin, double vmargin)
Definition: dvi.c:2154
static void check_postamble(void)
Definition: dvi.c:2118
static uint32_t dvi_file_size
Definition: dvi.c:90
static void dvi_end_reflect(void)
Definition: dvi.c:1934
#define REVERSE(MODE)
Definition: dvi.c:119
static int scan_special_trailerid(unsigned char *id1, unsigned char *id2, const char **curptr, const char *endptr)
Definition: dvi.c:2556
static int32_t * page_loc
Definition: dvi.c:87
static void proc_dvilua_font_record(int32_t tex_id, const char *font_name, uint32_t point_size, uint32_t design_size)
Definition: dvi.c:550
static int processing_page
Definition: dvi.c:829
static void do_setrule(void)
Definition: dvi.c:1650
static int catch_phantom
Definition: dvi.c:224
static void lr_width_push(void)
Definition: dvi.c:1902
static void get_page_info(int32_t post_location)
Definition: dvi.c:424
#define DVI
Definition: dvi.c:137
static int get_buffered_unsigned_byte(void)
Definition: dvi.c:268
#define TEX_FONTS_ALLOC_SIZE
Definition: dvi.c:76
void dvi_w(int32_t ch)
Definition: dvi.c:1714
static void do_fntdef(int32_t tex_id)
Definition: dvi.c:1779
const char * dvi_comment(void)
Definition: dvi.c:544
static int32_t get_buffered_signed_num(unsigned char num)
Definition: dvi.c:293
static FILE * dvi_file
Definition: dvi.c:84
int dvi_locate_font(const char *tfm_name, spt_t ptsize)
Definition: dvi.c:1006
static struct spt_coord compensation
static void get_comment(void)
Definition: dvi.c:796
static int scan_special(double *wd, double *ht, double *xo, double *yo, int *lm, int *majorversion, int *minorversion, int *enable_encryption, int *key_bits, int32_t *permission, char *opassword, char *upassword, int *has_id, unsigned char *id1, unsigned char *id2, const char *buf, uint32_t size)
Definition: dvi.c:2591
static void need_XeTeX(int c)
Definition: dvi.c:346
static int32_t get_buffered_unsigned_num(unsigned char num)
Definition: dvi.c:307
static void need_pTeX(int c)
Definition: dvi.c:352
static unsigned int num_pages
Definition: dvi.c:88
#define LTYPESETTING
Definition: dvi.c:116
void dvi_compute_boxes(int flag)
Definition: dvi.c:889
void dvi_set_linkmode(int mode)
Definition: dvi.c:907
static struct dvi_header dvi_info
#define skip_bufferd_bytes(n)
Definition: dvi.c:321
static struct dvi_registers dvi_stack[256u]
Definition: dvi.c:826
static struct font_def * def_fonts
void dvi_x(int32_t ch)
Definition: dvi.c:1727
static void dvi_begin_reflect(void)
Definition: dvi.c:1920
static int post_id_byte
Definition: dvi.c:337
#define RTYPESETTING
Definition: dvi.c:117
void dvi_do_special(const void *buffer, int32_t size)
Definition: dvi.c:969
#define SIG_DVILUA_FNT_DEF
Definition: dvi.c:642
static double dev_origin_y
Definition: dvi.c:109
double dvi_dev_ypos(void)
Definition: dvi.c:1344
static void clear_state(void)
Definition: dvi.c:832
static double phantom_height
Definition: dvi.c:225
void dvi_y(int32_t ch)
Definition: dvi.c:1740
static void set_rule(spt_t xpos, spt_t ypos, spt_t width, spt_t height)
Definition: dvi.c:953
#define XDV_FLAG_EXTEND
Definition: dvi.c:210
void dvi_z(int32_t ch)
Definition: dvi.c:1753
void dvi_vf_finish(void)
Definition: dvi.c:2474
#define UTF32toUTF16HS(x)
Definition: dvi.c:80
static uint32_t lr_width
Definition: dvi.c:129
static int dvi_locate_native_font(const char *filename, uint32_t index, spt_t ptsize, int layout_dir, int extend, int slant, int embolden)
Definition: dvi.c:1174
void dvi_scan_specials(int page_no, double *page_width, double *page_height, double *x_offset, double *y_offset, int *landscape, int *majorversion, int *minorversion, int *do_enc, int *key_bits, int32_t *permission, char *owner_pw, char *user_pw, int *has_id, unsigned char *id1, unsigned char *id2)
Definition: dvi.c:2744
#define range_check_loc(loc)
Definition: dvi.c:332
#define VIRTUAL
Definition: dvi.c:134
static int max_def_fonts
Definition: dvi.c:214
static double dev_origin_x
Definition: dvi.c:109
static struct loaded_font * loaded_fonts
void dvi_set_phantom_height(double height, double depth)
Definition: dvi.c:913
static void do_eop(void)
Definition: dvi.c:1880
static void calc_rect(pdf_rect *r, spt_t xpos, spt_t ypos, spt_t width, spt_t height, spt_t depth)
Definition: dvi.c:961
static int max_loaded_fonts
Definition: dvi.c:176
static struct dvi_lr lr_state
Definition: dvi.c:127
double dvi_tell_mag(void)
Definition: dvi.c:453
void dvi_z0(void)
Definition: dvi.c:1760
#define DVI_PAGE_BUF_CHUNK
Definition: dvi.c:228
static int lr_mode
Definition: dvi.c:128
static unsigned dvi_stack_depth
Definition: dvi.c:827
static int num_saved_fonts
Definition: dvi.c:2454
static void read_font_record(int32_t tex_id)
Definition: dvi.c:645
static void get_dvi_fonts(int32_t post_location)
Definition: dvi.c:761
void dvi_set(int32_t ch)
Definition: dvi.c:1432
static int has_ptex
Definition: dvi.c:337
#define VF
Definition: dvi.c:138
static void lr_width_pop(void)
Definition: dvi.c:1911
static int saved_dvi_font[16u]
Definition: dvi.c:2453
static int32_t get_buffered_signed_quad(void)
Definition: dvi.c:280
static void need_more_fonts(unsigned n)
Definition: dvi.c:179
static void skip_native_font_def(void)
Definition: dvi.c:1956
static unsigned int dvi_page_buf_index
Definition: dvi.c:232
static void dvi_mark_depth(void)
Definition: dvi.c:854
static void skip_fntdef(void)
Definition: dvi.c:1766
static void read_native_font_record(int32_t tex_id)
Definition: dvi.c:699
static void do_scales(double mag)
Definition: dvi.c:459
#define NATIVE
Definition: dvi.c:136
#define buf
static uint32_t lr_width_stack[256u]
Definition: dvi.c:130
void dvi_x0(void)
Definition: dvi.c:1734
static struct dvi_registers dvi_state
Definition: dvi.c:825
double get_origin(int x)
Definition: dvi.c:111
void dvi_rule(int32_t width, int32_t height)
Definition: dvi.c:1621
static int num_loaded_fonts
Definition: dvi.c:176
double dvi_dev_xpos(void)
Definition: dvi.c:1338
static void do_glyphs(int do_actual_text)
Definition: dvi.c:2002
static unsigned int get_buffered_unsigned_pair(void)
Definition: dvi.c:273
static int scan_special_encrypt(int *key_bits, int32_t *permission, char *opassword, char *upassword, const char **curptr, const char *endptr)
Definition: dvi.c:2491
void dvi_close(void)
Definition: dvi.c:2389
void dvi_set_compensation(double x, double y)
Definition: dvi.c:933
void dvi_dirchg(unsigned char dir)
Definition: dvi.c:1641
void dvi_y0(void)
Definition: dvi.c:1747
static int current_font
Definition: dvi.c:828
#define SKIMMING
Definition: dvi.c:118
#define XDV_FLAG_VERTICAL
Definition: dvi.c:207
#define XDV_FLAG_COLORED
Definition: dvi.c:208
static double dvi2pts
Definition: dvi.c:450
static void get_and_buffer_bytes(FILE *file, unsigned int count)
Definition: dvi.c:255
int dvi_is_tracking_boxes(void)
Definition: dvi.c:901
double dvi_init(char *dvi_filename, double mag)
Definition: dvi.c:2327
static int link_annot
Definition: dvi.c:215
void dvi_right(int32_t x)
Definition: dvi.c:1355
void dvi_vf_init(int dev_font_id)
Definition: dvi.c:2457
static double total_mag
Definition: dvi.c:450
void dvi_w0(void)
Definition: dvi.c:1721
#define XDV_FLAG_EMBOLDEN
Definition: dvi.c:212
static void do_native_font_def(int32_t tex_id)
Definition: dvi.c:1980
static int compute_boxes
Definition: dvi.c:215
static int get_and_buffer_unsigned_byte(FILE *file)
Definition: dvi.c:235
static const char invalid_signature[]
Definition: dvi.c:329
void dvi_link_annot(int flag)
Definition: dvi.c:895
void dvi_down(int32_t y)
Definition: dvi.c:1412
void dvi_set_font(int font_id)
Definition: dvi.c:1789
static int num_def_fonts
Definition: dvi.c:214
static void do_xxx(int32_t size)
Definition: dvi.c:1847
void dvi_put(int32_t ch)
Definition: dvi.c:1544
static void do_fnt(int32_t tex_id)
Definition: dvi.c:1795
static void check_id_bytes(void)
Definition: dvi.c:340
static unsigned char * dvi_page_buffer
Definition: dvi.c:230
static void do_moveto(int32_t x, int32_t y)
Definition: dvi.c:1349
static int32_t find_post(void)
Definition: dvi.c:359
static unsigned int dvi_page_buf_size
Definition: dvi.c:231
static void get_dvi_info(int32_t post_location)
Definition: dvi.c:467
static void get_preamble_dvi_info(void)
Definition: dvi.c:497
static int tagged_depth
Definition: dvi.c:851
static int is_ptex
Definition: dvi.c:337
void dvi_tag_depth(void)
Definition: dvi.c:875
static double phantom_depth
Definition: dvi.c:226
static unsigned lr_width_stack_depth
Definition: dvi.c:131
static void do_putrule(void)
Definition: dvi.c:1672
static char linear
Definition: dvi.c:85
#define UTF32toUTF16LS(x)
Definition: dvi.c:81
unsigned int dvi_npages(void)
Definition: dvi.c:324
static unsigned int get_and_buffer_unsigned_pair(FILE *file)
Definition: dvi.c:248
#define DVI_STACK_DEPTH_MAX
Definition: dvi.c:75
static void skip_glyphs(void)
Definition: dvi.c:1990
static int pre_id_byte
Definition: dvi.c:337
#define VF_NESTING_MAX
Definition: dvi.c:77
int landscape_mode
Definition: dvipdfmx.c:123
double paper_width
Definition: dvipdfmx.c:119
double paper_height
Definition: dvi.h:32
#define PTEXDIR
Definition: dvicodes.h:128
#define SET_CHAR_127
Definition: dvicodes.h:30
#define BEGIN_REFLECT
Definition: dvicodes.h:120
#define PADDING
Definition: dvicodes.h:118
#define DVI_ID
Definition: dvicodes.h:101
#define XDV_ID
Definition: dvicodes.h:104
#define XDV_GLYPHS
Definition: dvicodes.h:125
#define FNT_NUM_63
Definition: dvicodes.h:80
#define XDV_NATIVE_FONT_DEF
Definition: dvicodes.h:124
#define XDV_ID_OLD
Definition: dvicodes.h:103
#define XDV_TEXT_AND_GLYPHS
Definition: dvicodes.h:126
#define END_REFLECT
Definition: dvicodes.h:121
#define DVIV_ID
Definition: dvicodes.h:102
void read_config_special(const char **start, const char *end)
Definition: dvipdfmx.c:782
static int32_t permission
Definition: dvipdfmx.c:116
static int key_bits
Definition: dvipdfmx.c:115
void WARN(const char *fmt,...)
Definition: error.c:62
void MESG(const char *fmt,...)
Definition: error.c:49
#define ASSERT(e)
Definition: error.h:48
fontmap_rec * pdf_lookup_fontmap_record(const char *tfm_name)
Definition: fontmap.c:1137
fontmap_rec * pdf_insert_native_fontmap_record(const char *path, uint32_t index, int layout_dir, int extend, int slant, int embolden)
Definition: fontmap.c:1037
#define RENEW(p, n, type)
Definition: mem.h:38
#define RELEASE(p)
Definition: mem.h:39
int32_t tell_position(FILE *file)
Definition: mfileio.c:100
off_t xfile_size(FILE *file, const char *name)
Definition: mfileio.c:122
#define MFOPEN(name, mode)
Definition: mfileio.h:42
#define xseek_absolute(file, pos, name)
Definition: mfileio.h:56
#define MFCLOSE(file)
Definition: mfileio.h:44
unsigned char get_unsigned_byte(FILE *file)
Definition: numbers.c:32
int32_t get_signed_quad(FILE *file)
Definition: numbers.c:97
uint32_t get_positive_quad(FILE *file, const char *type, const char *name)
Definition: numbers.c:132
uint32_t get_unsigned_quad(FILE *file)
Definition: numbers.c:107
int32_t sqxfw(int32_t sq, fixword fw)
Definition: numbers.c:140
void skip_bytes(unsigned int n, FILE *file)
Definition: numbers.c:40
int32_t get_unsigned_num(FILE *file, unsigned char num)
Definition: numbers.c:117
unsigned short get_unsigned_pair(FILE *file)
Definition: numbers.c:55
int pdf_color_rgbcolor(pdf_color *color, double r, double g, double b)
Definition: pdfcolor.c:52
void pdf_color_pop(void)
Definition: pdfcolor.c:480
void pdf_color_push(pdf_color *sc, pdf_color *fc)
Definition: pdfcolor.c:468
void pdf_dev_set_dirmode(int text_dir)
Definition: pdfdev.c:1554
void graphics_mode(void)
Definition: pdfdev.c:1781
int pdf_dev_font_minbytes(int font_id)
Definition: pdfdev.c:1846
void pdf_dev_end_actualtext(void)
Definition: pdfdev.c:1770
void pdf_dev_set_rect(pdf_rect *rect, spt_t x_user, spt_t y_user, spt_t width, spt_t height, spt_t depth)
Definition: pdfdev.c:1486
int pdf_dev_locate_font(const char *font_name, spt_t ptsize)
Definition: pdfdev.c:1291
void pdf_dev_set_rule(spt_t xpos, spt_t ypos, spt_t width, spt_t height)
Definition: pdfdev.c:1422
void pdf_dev_begin_actualtext(uint16_t *unicodes, int count)
Definition: pdfdev.c:1726
void pdf_dev_set_string(spt_t xpos, spt_t ypos, const void *instr_ptr, int instr_len, spt_t width, int font_id)
Definition: pdfdev.c:957
int spt_t
Definition: pdfdev.h:32
void pdf_doc_begin_page(double scale, double x_origin, double y_origin)
Definition: pdfdoc.c:2442
void pdf_doc_add_page_content(const char *buffer, unsigned length)
Definition: pdfdoc.c:2473
void pdf_doc_add_page_resource(const char *category, const char *resource_name, pdf_obj *resource_ref)
Definition: pdfdoc.c:529
void pdf_doc_end_page(void)
Definition: pdfdoc.c:2460
void pdf_doc_expand_box(const pdf_rect *rect)
Definition: pdfdoc.c:2836
void pdf_doc_break_annot(void)
Definition: pdfdoc.c:2806
int pdf_dev_gsave(void)
Definition: pdfdraw.c:1209
int pdf_dev_grestore(void)
Definition: pdfdraw.c:1225
static unsigned char wbuf[1024]
Definition: pdfencoding.c:596
#define MAX_PWD_LEN
Definition: pdfencrypt.h:29
pdf_obj * pdf_new_name(const char *name)
Definition: pdfobj.c:1330
pdf_obj * pdf_new_number(double value)
Definition: pdfobj.c:1076
double pdf_number_value(pdf_obj *object)
Definition: pdfobj.c:1119
void pdf_release_obj(pdf_obj *object)
Definition: pdfobj.c:3217
unsigned pdf_string_length(pdf_obj *object)
Definition: pdfobj.c:1167
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
pdf_obj * pdf_new_dict(void)
Definition: pdfobj.c:1645
unsigned pdf_array_length(pdf_obj *array)
Definition: pdfobj.c:1479
int pdf_add_dict(pdf_obj *dict, pdf_obj *key, pdf_obj *value)
Definition: pdfobj.c:1680
#define PDF_OBJ_NUMBERTYPE(o)
Definition: pdfobj.h:77
#define PDF_OBJ_STRINGTYPE(o)
Definition: pdfobj.h:79
void dump(const char *start, const char *end)
Definition: pdfparse.c:74
pdf_obj * parse_pdf_array(const char **pp, const char *endptr, pdf_file *pf)
Definition: pdfparse.c:982
pdf_obj * parse_pdf_number(const char **pp, const char *endptr)
Definition: pdfparse.c:224
pdf_obj * parse_pdf_string(const char **pp, const char *endptr)
Definition: pdfparse.c:622
int pdf_defineresource(const char *category, const char *resname, pdf_obj *object, int flags)
Definition: pdfresource.c:193
pdf_obj * pdf_get_resource_reference(int rc_id)
Definition: pdfresource.c:312
int sfnt_read_table_directory(sfnt *sfont, SFNT_ULONG offset)
Definition: sfnt.c:356
sfnt * dfont_open(FILE *fp, int index)
Definition: sfnt.c:86
void sfnt_close(sfnt *sfont)
Definition: sfnt.c:164
SFNT_ULONG sfnt_find_table_pos(sfnt *sfont, const char *tag)
Definition: sfnt.c:320
static unsigned char padbytes[4]
Definition: sfnt.c:434
sfnt * sfnt_open(FILE *fp)
Definition: sfnt.c:52
SFNT_ULONG sfnt_locate_table(sfnt *sfont, const char *tag)
Definition: sfnt.c:340
#define SFNT_TYPE_TTC
Definition: sfnt.h:72
#define SFNT_TYPE_DFONT
Definition: sfnt.h:73
int spc_exec_at_end_page(void)
Definition: specials.c:682
int spc_exec_at_begin_page(void)
Definition: specials.c:667
int spc_exec_special(const char *buffer, int32_t size, double x_user, double y_user, double mag, int *is_drawable, pdf_rect *rect)
Definition: specials.c:789
int sfd_load_record(const char *sfd_name, const char *subfont_id)
Definition: subfont.c:356
unsigned short lookup_sfd_record(int rec_id, unsigned char c)
Definition: subfont.c:446
int t1char_get_metrics(card8 *src, int srclen, cff_index *subrs, t1_ginfo *ginfo)
Definition: t1_char.c:1324
cff_font * t1_load_font(char **enc_vec, int mode, FILE *fp)
Definition: t1_load.c:1273
int is_pfb(FILE *fp)
Definition: t1_load.c:1091
int tfm_is_jfm(int font_id)
Definition: tfm.c:1214
fixword tfm_get_fw_width(int font_id, int32_t ch)
Definition: tfm.c:976
int tfm_open(const char *tfm_name, int must_exist)
Definition: tfm.c:833
fixword tfm_get_fw_depth(int font_id, int32_t ch)
Definition: tfm.c:1038
fixword tfm_get_fw_height(int font_id, int32_t ch)
Definition: tfm.c:1007
void tfm_close_all(void)
Definition: tfm.c:958
SFNT_ULONG ttc_read_offset(sfnt *sfont, SFNT_ULONG ttc_idx)
Definition: tt_aux.c:38
struct tt_head_table * tt_read_head_table(sfnt *sfont)
Definition: tt_table.c:77
struct tt_maxp_table * tt_read_maxp_table(sfnt *sfont)
Definition: tt_table.c:133
struct tt_vhea_table * tt_read_vhea_table(sfnt *sfont)
Definition: tt_table.c:248
struct tt_longMetrics * tt_read_longMetrics(sfnt *sfont, USHORT numGlyphs, USHORT numLongMetrics, USHORT numExSideBearings)
Definition: tt_table.c:324
struct tt_hhea_table * tt_read_hhea_table(sfnt *sfont)
Definition: tt_table.c:185
void vf_close_all_fonts(void)
Definition: vf.c:539
int vf_locate_font(const char *tex_name, spt_t ptsize)
Definition: vf.c:241
void vf_set_char(int32_t ch, int vf_font)
Definition: vf.c:403
static unsigned long post_location
Definition: dvi.c:49
#define ERROR(string)
Definition: error.h:36
static double page_width
Definition: pdfdev.c:71
static double page_height
Definition: pdfdev.c:71
static pdf_obj * tmp1
Definition: pdfdoc.c:76
#define strcasecmp
Definition: c-auto.h:150
#define fileno
Definition: win32lib.h:72
#define fprintf
Definition: mendex.h:64
char file_name[][1024]
Definition: cwebboot.c:318
#define length(c)
Definition: ctangleboot.c:65
#define malloc
Definition: alloca.c:91
long off_t
Definition: types.h:34
int setmode()
#define sprintf
Definition: snprintf.c:44
#define NOP
Definition: tif_getimage.c:684
#define _O_BINARY
Definition: lfs.c:127
#define x_offset
Definition: mfluac.c:342
#define y_offset
Definition: mfluac.c:343
#define design_size
Definition: mfluac.c:339
float x
Definition: cordic.py:15
def ref(x)
Definition: pdf-org.py:104
union value value
Definition: obx.h:44
static double extend
Definition: otftotfm.cc:277
integer checksum
Definition: pbmtopk.c:63
#define round(a)
Definition: pbmtopk.c:22
char * filename[256]
Definition: pbmtopk.c:46
unsigned long ULONG
Definition: pdfgen.h:158
struct const_name font_name[]
Definition: picttoppm.c:492
static struct Point current
Definition: picttoppm.c:134
#define fp
#define index(s, c)
Definition: plain2.h:351
subroutine mrec1(lineq, iccount, ndxm)
Definition: pmx294.for:19317
static int size
Definition: ppmlabel.c:24
int r
Definition: ppmqvga.c:68
static int offset
Definition: ppmtogif.c:642
bstring c int memset(void *s, int c, int length)
#define dir
#define flags
#define flag
Definition: round_prec.c:45
#define uint16_t
Definition: stdint.in.h:161
#define str_length(a)
Definition: stringpool.h:59
Definition: tables.h:434
int verbose_level
Definition: dpxconf.h:35
enum dpx_mode compat_mode
Definition: dpxconf.h:36
Definition: utils.c:300
Definition: cff.h:46
card16 num_glyphs
Definition: cff.h:66
int is_notdef_notzero
Definition: cff.h:80
cff_index * cstrings
Definition: cff.h:58
cff_index ** subrs
Definition: cff.h:61
l_offset * offset
Definition: cff_types.h:52
card8 * data
Definition: cff_types.h:53
Definition: inftrees.h:24
Definition: pdfdev.c:706
Definition: dir.c:365
Definition: dvi.c:93
uint32_t media_height
Definition: dvi.c:97
uint32_t media_width
Definition: dvi.c:97
char comment[257]
Definition: dvi.c:99
uint32_t unit_den
Definition: dvi.c:95
unsigned int stackdepth
Definition: dvi.c:98
uint32_t unit_num
Definition: dvi.c:94
uint32_t mag
Definition: dvi.c:96
Definition: dvi.c:122
int state
Definition: dvi.c:123
unsigned int buf_index
Definition: dvi.c:124
int font
Definition: dvi.c:123
int32_t y
Definition: dvi.c:821
int32_t h
Definition: dvi.c:821
int32_t w
Definition: dvi.c:821
int32_t z
Definition: dvi.c:821
unsigned int d
Definition: dvi.c:822
int32_t v
Definition: dvi.c:821
int32_t x
Definition: dvi.c:821
Definition: filedef.h:30
Definition: dvi.c:188
char * font_name
Definition: dvi.c:192
spt_t design_size
Definition: dvi.c:191
uint32_t rgba_color
Definition: dvi.c:196
spt_t point_size
Definition: dvi.c:190
int native
Definition: dvi.c:195
int font_id
Definition: dvi.c:193
int32_t tex_id
Definition: dvi.c:189
int slant
Definition: dvi.c:203
uint8_t rgba_used
Definition: dvi.c:197
int used
Definition: dvi.c:194
int embolden
Definition: dvi.c:204
int extend
Definition: dvi.c:202
uint32_t face_index
Definition: dvi.c:200
int layout_dir
Definition: dvi.c:201
Definition: pbmfont.h:11
int mapc
Definition: fontmap.h:43
double bold
Definition: fontmap.h:41
double slant
Definition: fontmap.h:41
double extend
Definition: fontmap.h:41
fontmap_opt opt
Definition: fontmap.h:71
char * font_name
Definition: fontmap.h:60
char * subfont_id
Definition: fontmap.h:68
char * enc_name
Definition: fontmap.h:61
struct fontmap_rec::@128 charmap
char * sfd_name
Definition: fontmap.h:67
char * map_name
Definition: fontmap.h:58
Definition: dvi.c:140
spt_t ascent
Definition: dvi.c:141
spt_t advance
Definition: dvi.c:141
spt_t descent
Definition: dvi.c:141
Definition: ttf.h:354
Definition: mendex.h:20
Definition: ttf.h:392
int shift_gid
Definition: dvi.c:163
float embolden
Definition: dvi.c:170
uint16_t num_glyphs
Definition: dvi.c:164
struct gm * gm
Definition: dvi.c:162
int type
Definition: dvi.c:146
int subfont_id
Definition: dvi.c:150
float slant
Definition: dvi.c:169
int layout_dir
Definition: dvi.c:166
int source
Definition: dvi.c:153
int xgs_id
Definition: dvi.c:159
int is_unicode
Definition: dvi.c:172
spt_t size
Definition: dvi.c:152
uint32_t rgba_color
Definition: dvi.c:154
char padbytes[4]
Definition: dvi.c:174
int tfm_id
Definition: dvi.c:151
int minbytes
Definition: dvi.c:173
int font_id
Definition: dvi.c:147
float extend
Definition: dvi.c:168
uint8_t rgba_used
Definition: dvi.c:155
Definition: ttf.h:413
uint16 numGlyphs
Definition: ttf.h:415
Definition: tpic.c:45
Definition: pdfobj.c:63
Definition: axohelp.c:810
Definition: dvipdfm.c:55
Definition: sfnt.h:76
int type
Definition: sfnt.h:77
SFNT_ULONG offset
Definition: sfnt.h:80
Definition: dvi.c:929
spt_t x
Definition: dvi.c:930
spt_t y
Definition: dvi.c:930
FWord ascent
Definition: tt_table.h:52
USHORT numOfLongHorMetrics
Definition: tt_table.h:64
FWord descent
Definition: tt_table.h:53
USHORT numOfExSideBearings
Definition: tt_table.h:65
USHORT numOfLongVerMetrics
Definition: tt_table.h:83
USHORT numOfExSideBearings
Definition: tt_table.h:84
pointer path
Definition: t1imager.h:36
@ point_size
Definition: t1info.c:77
#define FILE
Definition: t1stdio.h:34
#define ungetc(c, f)
Definition: t1stdio.h:106
ch
Definition: t4ht.c:1443
*job_name strlen((char *) job_name) - 4)
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
static TTF_DIRECTORY * directory
Definition: ttf.c:67
Definition: obx.h:51
#define is_type1(fm)
Definition: ptexmac.h:182