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)  

cairo-script-surface.c
Go to the documentation of this file.
1 /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
2 /* cairo - a vector graphics library with display and print output
3  *
4  * Copyright © 2008 Chris Wilson
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it either under the terms of the GNU Lesser General Public
8  * License version 2.1 as published by the Free Software Foundation
9  * (the "LGPL") or, at your option, under the terms of the Mozilla
10  * Public License Version 1.1 (the "MPL"). If you do not alter this
11  * notice, a recipient may use your version of this file under either
12  * the MPL or the LGPL.
13  *
14  * You should have received a copy of the LGPL along with this library
15  * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
17  * You should have received a copy of the MPL along with this library
18  * in the file COPYING-MPL-1.1
19  *
20  * The contents of this file are subject to the Mozilla Public License
21  * Version 1.1 (the "License"); you may not use this file except in
22  * compliance with the License. You may obtain a copy of the License at
23  * http://www.mozilla.org/MPL/
24  *
25  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27  * the specific language governing rights and limitations.
28  *
29  * The Original Code is the cairo graphics library.
30  *
31  * The Initial Developer of the Original Code is Chris Wilson.
32  *
33  * Contributor(s):
34  * Chris Wilson <chris@chris-wilson.co.uk>
35  */
36 
37 /* The script surface is one that records all operations performed on
38  * it in the form of a procedural script, similar in fashion to
39  * PostScript but using Cairo's imaging model. In essence, this is
40  * equivalent to the recording-surface, but as there is no impedance mismatch
41  * between Cairo and CairoScript, we can generate output immediately
42  * without having to copy and hold the data in memory.
43  */
44 
45 /**
46  * SECTION:cairo-script
47  * @Title: Script Surfaces
48  * @Short_Description: Rendering to replayable scripts
49  * @See_Also: #cairo_surface_t
50  *
51  * The script surface provides the ability to render to a native
52  * script that matches the cairo drawing model. The scripts can
53  * be replayed using tools under the util/cairo-script directory,
54  * or with cairo-perf-trace.
55  **/
56 
57 /**
58  * CAIRO_HAS_SCRIPT_SURFACE:
59  *
60  * Defined if the script surface backend is available.
61  * The script surface backend is always built in since 1.12.
62  *
63  * Since: 1.12
64  **/
65 
66 
67 #include "cairoint.h"
68 
69 #include "cairo-script.h"
70 #include "cairo-script-private.h"
71 
74 #include "cairo-device-private.h"
75 #include "cairo-error-private.h"
76 #include "cairo-list-inline.h"
79 #include "cairo-pattern-private.h"
86 
87 #if CAIRO_HAS_FT_FONT
88 #include "cairo-ft-private.h"
89 #endif
90 
91 #include <ctype.h>
92 
93 #ifdef WORDS_BIGENDIAN
94 #define to_be32(x) x
95 #else
96 #define to_be32(x) bswap_32(x)
97 #endif
98 
99 #define _cairo_output_stream_puts(S, STR) \
100  _cairo_output_stream_write ((S), (STR), strlen (STR))
101 
102 #define static cairo_warn static
103 
108 
109 typedef struct _operand {
110  enum {
111  SURFACE,
112  DEFERRED,
113  } type;
116 
117 
118 struct deferred_finish {
121 };
122 
123 struct _cairo_script_context {
125 
126  int active;
127  int attach_snapshots;
128 
132 
133  struct _bitmap {
134  unsigned long min;
135  unsigned long count;
136  unsigned int map[64];
137  struct _bitmap *next;
138  } surface_id, font_id;
139 
142 
145 };
146 
147 struct _cairo_script_font {
149 
151  unsigned long id;
152  unsigned long subset_glyph_index;
155 };
156 
160  double current_tolerance;
171 };
172 
173 struct _cairo_script_surface {
175 
177 
179 
184 
185  double width, height;
186 
187  /* implicit flattened context */
189 };
190 
192 
193 static cairo_script_surface_t *
197  cairo_surface_t *passthrough);
198 
199 static void
201  cairo_scaled_font_t *scaled_font);
202 
203 static void
205 
206 static void
208 
209 static void
210 _bitmap_release_id (struct _bitmap *b, unsigned long token)
211 {
212  struct _bitmap **prev = NULL;
213 
214  do {
215  if (token < b->min + sizeof (b->map) * CHAR_BIT) {
216  unsigned int bit, elem;
217 
218  token -= b->min;
219  elem = token / (sizeof (b->map[0]) * CHAR_BIT);
220  bit = token % (sizeof (b->map[0]) * CHAR_BIT);
221  b->map[elem] &= ~(1 << bit);
222  if (! --b->count && prev) {
223  *prev = b->next;
224  free (b);
225  }
226  return;
227  }
228  prev = &b->next;
229  b = b->next;
230  } while (b != NULL);
231 }
232 
233 static cairo_status_t
234 _bitmap_next_id (struct _bitmap *b,
235  unsigned long *id)
236 {
237  struct _bitmap *bb, **prev = NULL;
238  unsigned long min = 0;
239 
240  do {
241  if (b->min != min)
242  break;
243 
244  if (b->count < sizeof (b->map) * CHAR_BIT) {
245  unsigned int n, m, bit;
246  for (n = 0; n < ARRAY_LENGTH (b->map); n++) {
247  if (b->map[n] == (unsigned int) -1)
248  continue;
249 
250  for (m=0, bit=1; m<sizeof (b->map[0])*CHAR_BIT; m++, bit<<=1) {
251  if ((b->map[n] & bit) == 0) {
252  b->map[n] |= bit;
253  b->count++;
254  *id = n * sizeof (b->map[0])*CHAR_BIT + m + b->min;
255  return CAIRO_STATUS_SUCCESS;
256  }
257  }
258  }
259  }
260  min += sizeof (b->map) * CHAR_BIT;
261 
262  prev = &b->next;
263  b = b->next;
264  } while (b != NULL);
265  assert (prev != NULL);
266 
267  bb = _cairo_malloc (sizeof (struct _bitmap));
268  if (unlikely (bb == NULL))
270 
271  *prev = bb;
272  bb->next = b;
273  bb->min = min;
274  bb->count = 1;
275  bb->map[0] = 0x1;
276  memset (bb->map + 1, 0, sizeof (bb->map) - sizeof (bb->map[0]));
277  *id = min;
278 
279  return CAIRO_STATUS_SUCCESS;
280 }
281 
282 static void
283 _bitmap_fini (struct _bitmap *b)
284 {
285  while (b != NULL) {
286  struct _bitmap *next = b->next;
287  free (b);
288  b = next;
289  }
290 }
291 
292 static const char *
294 {
295  static const char *names[] = {
296  "FORWARD",
297  "BACKWARD"
298  };
299  assert (backward < ARRAY_LENGTH (names));
300  return names[backward];
301 }
302 
303 static const char *
305 {
306  static const char *names[] = {
307  "CLEAR", /* CAIRO_OPERATOR_CLEAR */
308 
309  "SOURCE", /* CAIRO_OPERATOR_SOURCE */
310  "OVER", /* CAIRO_OPERATOR_OVER */
311  "IN", /* CAIRO_OPERATOR_IN */
312  "OUT", /* CAIRO_OPERATOR_OUT */
313  "ATOP", /* CAIRO_OPERATOR_ATOP */
314 
315  "DEST", /* CAIRO_OPERATOR_DEST */
316  "DEST_OVER", /* CAIRO_OPERATOR_DEST_OVER */
317  "DEST_IN", /* CAIRO_OPERATOR_DEST_IN */
318  "DEST_OUT", /* CAIRO_OPERATOR_DEST_OUT */
319  "DEST_ATOP", /* CAIRO_OPERATOR_DEST_ATOP */
320 
321  "XOR", /* CAIRO_OPERATOR_XOR */
322  "ADD", /* CAIRO_OPERATOR_ADD */
323  "SATURATE", /* CAIRO_OPERATOR_SATURATE */
324 
325  "MULTIPLY", /* CAIRO_OPERATOR_MULTIPLY */
326  "SCREEN", /* CAIRO_OPERATOR_SCREEN */
327  "OVERLAY", /* CAIRO_OPERATOR_OVERLAY */
328  "DARKEN", /* CAIRO_OPERATOR_DARKEN */
329  "LIGHTEN", /* CAIRO_OPERATOR_LIGHTEN */
330  "DODGE", /* CAIRO_OPERATOR_COLOR_DODGE */
331  "BURN", /* CAIRO_OPERATOR_COLOR_BURN */
332  "HARD_LIGHT", /* CAIRO_OPERATOR_HARD_LIGHT */
333  "SOFT_LIGHT", /* CAIRO_OPERATOR_SOFT_LIGHT */
334  "DIFFERENCE", /* CAIRO_OPERATOR_DIFFERENCE */
335  "EXCLUSION", /* CAIRO_OPERATOR_EXCLUSION */
336  "HSL_HUE", /* CAIRO_OPERATOR_HSL_HUE */
337  "HSL_SATURATION", /* CAIRO_OPERATOR_HSL_SATURATION */
338  "HSL_COLOR", /* CAIRO_OPERATOR_HSL_COLOR */
339  "HSL_LUMINOSITY" /* CAIRO_OPERATOR_HSL_LUMINOSITY */
340  };
341  assert (op < ARRAY_LENGTH (names));
342  return names[op];
343 }
344 
345 static const char *
347 {
348  static const char *names[] = {
349  "EXTEND_NONE", /* CAIRO_EXTEND_NONE */
350  "EXTEND_REPEAT", /* CAIRO_EXTEND_REPEAT */
351  "EXTEND_REFLECT", /* CAIRO_EXTEND_REFLECT */
352  "EXTEND_PAD" /* CAIRO_EXTEND_PAD */
353  };
355  return names[extend];
356 }
357 
358 static const char *
360 {
361  static const char *names[] = {
362  "FILTER_FAST", /* CAIRO_FILTER_FAST */
363  "FILTER_GOOD", /* CAIRO_FILTER_GOOD */
364  "FILTER_BEST", /* CAIRO_FILTER_BEST */
365  "FILTER_NEAREST", /* CAIRO_FILTER_NEAREST */
366  "FILTER_BILINEAR", /* CAIRO_FILTER_BILINEAR */
367  "FILTER_GAUSSIAN", /* CAIRO_FILTER_GAUSSIAN */
368  };
370  return names[filter];
371 }
372 
373 static const char *
375 {
376  static const char *names[] = {
377  "WINDING", /* CAIRO_FILL_RULE_WINDING */
378  "EVEN_ODD" /* CAIRO_FILL_RILE_EVEN_ODD */
379  };
381  return names[rule];
382 }
383 
384 static const char *
386 {
387  static const char *names[] = {
388  "ANTIALIAS_DEFAULT", /* CAIRO_ANTIALIAS_DEFAULT */
389  "ANTIALIAS_NONE", /* CAIRO_ANTIALIAS_NONE */
390  "ANTIALIAS_GRAY", /* CAIRO_ANTIALIAS_GRAY */
391  "ANTIALIAS_SUBPIXEL", /* CAIRO_ANTIALIAS_SUBPIXEL */
392  "ANTIALIAS_FAST", /* CAIRO_ANTIALIAS_FAST */
393  "ANTIALIAS_GOOD", /* CAIRO_ANTIALIAS_GOOD */
394  "ANTIALIAS_BEST" /* CAIRO_ANTIALIAS_BEST */
395  };
397  return names[antialias];
398 }
399 
400 static const char *
402 {
403  static const char *names[] = {
404  "LINE_CAP_BUTT", /* CAIRO_LINE_CAP_BUTT */
405  "LINE_CAP_ROUND", /* CAIRO_LINE_CAP_ROUND */
406  "LINE_CAP_SQUARE" /* CAIRO_LINE_CAP_SQUARE */
407  };
408  assert (line_cap < ARRAY_LENGTH (names));
409  return names[line_cap];
410 }
411 
412 static const char *
414 {
415  static const char *names[] = {
416  "LINE_JOIN_MITER", /* CAIRO_LINE_JOIN_MITER */
417  "LINE_JOIN_ROUND", /* CAIRO_LINE_JOIN_ROUND */
418  "LINE_JOIN_BEVEL", /* CAIRO_LINE_JOIN_BEVEL */
419  };
420  assert (line_join < ARRAY_LENGTH (names));
421  return names[line_join];
422 }
423 
424 static inline cairo_script_context_t *
426 {
427  return (cairo_script_context_t *) surface->base.device;
428 }
429 
430 static cairo_bool_t
432 {
433  return cairo_list_is_first (&surface->operand.link,
434  &to_context (surface)->operands);
435 }
436 
437 static void
439 {
440  cairo_list_move (&surface->operand.link, &to_context (surface)->operands);
441 }
442 
443 static int
445 {
447  int depth = 0;
448 
449  cairo_list_foreach (link, &to_context (surface)->operands) {
450  if (link == &surface->operand.link)
451  break;
452  depth++;
453  }
454 
455  return depth;
456 }
457 
458 static void
460 {
462 
463  if (target_is_active (surface)) {
464  _cairo_output_stream_puts (ctx->stream, "dup ");
465  return;
466  }
467 
468  if (surface->defined) {
469  _cairo_output_stream_printf (ctx->stream, "s%u ",
470  surface->base.unique_id);
471  } else {
472  int depth = target_depth (surface);
473 
474  assert (! cairo_list_is_empty (&surface->operand.link));
476 
477  if (ctx->active) {
478  _cairo_output_stream_printf (ctx->stream, "%d index ", depth);
479  _cairo_output_stream_puts (ctx->stream, "/target get exch pop ");
480  } else {
481  if (depth == 1) {
482  _cairo_output_stream_puts (ctx->stream, "exch ");
483  } else {
485  "%d -1 roll ", depth);
486  }
488  _cairo_output_stream_puts (ctx->stream, "dup ");
489  }
490  }
491 }
492 
493 static const char *
495 {
496  switch (content) {
497  case CAIRO_CONTENT_ALPHA: return "ALPHA";
498  case CAIRO_CONTENT_COLOR: return "COLOR";
499  default:
500  case CAIRO_CONTENT_COLOR_ALPHA: return "COLOR_ALPHA";
501  }
502 }
503 
504 static cairo_status_t
506 {
508 
510  "<< /content //%s",
512  if (surface->width != -1 && surface->height != -1) {
514  " /width %f /height %f",
515  surface->width,
516  surface->height);
517  }
518 
519  if (surface->base.x_fallback_resolution !=
523  {
525  " /fallback-resolution [%f %f]",
528  }
529 
530  if (surface->base.device_transform.x0 != 0. ||
531  surface->base.device_transform.y0 != 0.)
532  {
533  /* XXX device offset is encoded into the pattern matrices etc. */
534  if (0) {
536  " /device-offset [%f %f]",
538  surface->base.device_transform.y0);
539  }
540  }
541 
542  _cairo_output_stream_puts (ctx->stream, " >> surface context\n");
543  surface->emitted = TRUE;
544  return CAIRO_STATUS_SUCCESS;
545 }
546 
547 static cairo_status_t
549 {
551 
553  return CAIRO_STATUS_SUCCESS;
554 
555  while (! cairo_list_is_empty (&ctx->operands)) {
556  operand_t *op;
558 
560  operand_t,
561  link);
562  if (op->type == DEFERRED)
563  break;
564 
565  old = cairo_container_of (op, cairo_script_surface_t, operand);
566  if (old == surface)
567  break;
568  if (old->active)
569  break;
570 
571  if (! old->defined) {
572  assert (old->emitted);
574  "/target get /s%u exch def pop\n",
575  old->base.unique_id);
576  old->defined = TRUE;
577  } else {
578  _cairo_output_stream_puts (ctx->stream, "pop\n");
579  }
580 
581  cairo_list_del (&old->operand.link);
582  }
583 
585  return CAIRO_STATUS_SUCCESS;
586 
587  if (! surface->emitted) {
589 
591  if (unlikely (status))
592  return status;
593  } else if (cairo_list_is_empty (&surface->operand.link)) {
594  assert (surface->defined);
596  "s%u context\n",
597  surface->base.unique_id);
600  } else {
601  int depth = target_depth (surface);
602  if (depth == 1) {
603  _cairo_output_stream_puts (ctx->stream, "exch\n");
604  } else {
606  "%d -1 roll\n",
607  depth);
608  }
609  }
611 
612  return CAIRO_STATUS_SUCCESS;
613 }
614 
615 static cairo_status_t
618 {
620 
621  if (surface->cr.current_operator == op)
622  return CAIRO_STATUS_SUCCESS;
623 
624  surface->cr.current_operator = op;
625 
627  "//%s set-operator\n",
629  return CAIRO_STATUS_SUCCESS;
630 }
631 
632 static cairo_status_t
634  cairo_fill_rule_t fill_rule)
635 {
637 
638  if (surface->cr.current_fill_rule == fill_rule)
639  return CAIRO_STATUS_SUCCESS;
640 
641  surface->cr.current_fill_rule = fill_rule;
642 
644  "//%s set-fill-rule\n",
645  _fill_rule_to_string (fill_rule));
646  return CAIRO_STATUS_SUCCESS;
647 }
648 
649 static cairo_status_t
651  double tolerance,
653 {
655 
656  if ((! force ||
658  surface->cr.current_tolerance == tolerance)
659  {
660  return CAIRO_STATUS_SUCCESS;
661  }
662 
663  surface->cr.current_tolerance = tolerance;
664 
666  "%f set-tolerance\n",
667  tolerance);
668  return CAIRO_STATUS_SUCCESS;
669 }
670 
671 static cairo_status_t
674 {
676 
677  if (surface->cr.current_antialias == antialias)
678  return CAIRO_STATUS_SUCCESS;
679 
680  surface->cr.current_antialias = antialias;
681 
683  "//%s set-antialias\n",
685 
686  return CAIRO_STATUS_SUCCESS;
687 }
688 
689 static cairo_status_t
691  double line_width,
693 {
695 
696  if ((! force ||
697  fabs (line_width - CAIRO_GSTATE_LINE_WIDTH_DEFAULT) < 1e-5) &&
698  surface->cr.current_style.line_width == line_width)
699  {
700  return CAIRO_STATUS_SUCCESS;
701  }
702 
703  surface->cr.current_style.line_width = line_width;
704 
706  "%f set-line-width\n",
707  line_width);
708  return CAIRO_STATUS_SUCCESS;
709 }
710 
711 static cairo_status_t
713  cairo_line_cap_t line_cap)
714 {
716 
717  if (surface->cr.current_style.line_cap == line_cap)
718  return CAIRO_STATUS_SUCCESS;
719 
720  surface->cr.current_style.line_cap = line_cap;
721 
723  "//%s set-line-cap\n",
724  _line_cap_to_string (line_cap));
725  return CAIRO_STATUS_SUCCESS;
726 }
727 
728 static cairo_status_t
730  cairo_line_join_t line_join)
731 {
733 
734  if (surface->cr.current_style.line_join == line_join)
735  return CAIRO_STATUS_SUCCESS;
736 
737  surface->cr.current_style.line_join = line_join;
738 
740  "//%s set-line-join\n",
741  _line_join_to_string (line_join));
742  return CAIRO_STATUS_SUCCESS;
743 }
744 
745 static cairo_status_t
747  double miter_limit,
749 {
751 
752  if ((! force ||
753  fabs (miter_limit - CAIRO_GSTATE_MITER_LIMIT_DEFAULT) < 1e-5) &&
754  surface->cr.current_style.miter_limit == miter_limit)
755  {
756  return CAIRO_STATUS_SUCCESS;
757  }
758 
759  surface->cr.current_style.miter_limit = miter_limit;
760 
762  "%f set-miter-limit\n",
763  miter_limit);
764  return CAIRO_STATUS_SUCCESS;
765 }
766 
767 static cairo_bool_t
768 _dashes_equal (const double *a, const double *b, int num_dashes)
769 {
770  while (num_dashes--) {
771  if (fabs (*a - *b) > 1e-5)
772  return FALSE;
773  a++, b++;
774  }
775 
776  return TRUE;
777 }
778 
779 static cairo_status_t
781  const double *dash,
782  unsigned int num_dashes,
783  double offset,
785 {
786  unsigned int n;
787 
789 
790  if (force &&
791  num_dashes == 0 &&
792  surface->cr.current_style.num_dashes == 0)
793  {
794  return CAIRO_STATUS_SUCCESS;
795  }
796 
797  if (! force &&
798  (surface->cr.current_style.num_dashes == num_dashes &&
799  (num_dashes == 0 ||
800  (fabs (surface->cr.current_style.dash_offset - offset) < 1e-5 &&
801  _dashes_equal (surface->cr.current_style.dash, dash, num_dashes)))))
802  {
803  return CAIRO_STATUS_SUCCESS;
804  }
805 
806 
807  if (num_dashes) {
808  surface->cr.current_style.dash = _cairo_realloc_ab
809  (surface->cr.current_style.dash, num_dashes, sizeof (double));
810  if (unlikely (surface->cr.current_style.dash == NULL))
812 
813  memcpy (surface->cr.current_style.dash, dash,
814  sizeof (double) * num_dashes);
815  } else {
816  free (surface->cr.current_style.dash);
817  surface->cr.current_style.dash = NULL;
818  }
819 
820  surface->cr.current_style.num_dashes = num_dashes;
821  surface->cr.current_style.dash_offset = offset;
822 
824  for (n = 0; n < num_dashes; n++) {
826  if (n < num_dashes-1)
828  }
830  "] %f set-dash\n",
831  offset);
832 
833  return CAIRO_STATUS_SUCCESS;
834 }
835 
836 static cairo_status_t
840 {
842 
844 
845  status = _emit_line_width (surface, style->line_width, force);
846  if (unlikely (status))
847  return status;
848 
849  status = _emit_line_cap (surface, style->line_cap);
850  if (unlikely (status))
851  return status;
852 
853  status = _emit_line_join (surface, style->line_join);
854  if (unlikely (status))
855  return status;
856 
857  status = _emit_miter_limit (surface, style->miter_limit, force);
858  if (unlikely (status))
859  return status;
860 
862  style->dash, style->num_dashes, style->dash_offset,
863  force);
864  if (unlikely (status))
865  return status;
866 
867  return CAIRO_STATUS_SUCCESS;
868 }
869 
870 static const char *
872 {
873  switch (format) {
874  case CAIRO_FORMAT_ARGB32: return "ARGB32";
875  case CAIRO_FORMAT_RGB30: return "RGB30";
876  case CAIRO_FORMAT_RGB24: return "RGB24";
877  case CAIRO_FORMAT_RGB16_565: return "RGB16_565";
878  case CAIRO_FORMAT_A8: return "A8";
879  case CAIRO_FORMAT_A1: return "A1";
880  case CAIRO_FORMAT_INVALID: return "INVALID";
881  }
883  return "INVALID";
884 }
885 
886 static cairo_status_t
888  const cairo_pattern_t *pattern)
889 {
892 
893  if (! CAIRO_COLOR_IS_OPAQUE (&solid->color))
894  {
895  if (! (surface->base.content & CAIRO_CONTENT_COLOR) ||
896  ((solid->color.red_short == 0 || solid->color.red_short == 0xffff) &&
897  (solid->color.green_short == 0 || solid->color.green_short == 0xffff) &&
898  (solid->color.blue_short == 0 || solid->color.blue_short == 0xffff) ))
899  {
901  "%f a",
902  solid->color.alpha);
903  }
904  else
905  {
907  "%f %f %f %f rgba",
908  solid->color.red,
909  solid->color.green,
910  solid->color.blue,
911  solid->color.alpha);
912  }
913  }
914  else
915  {
916  if (solid->color.red_short == solid->color.green_short &&
917  solid->color.red_short == solid->color.blue_short)
918  {
920  "%f g",
921  solid->color.red);
922  }
923  else
924  {
926  "%f %f %f rgb",
927  solid->color.red,
928  solid->color.green,
929  solid->color.blue);
930  }
931  }
932 
933  return CAIRO_STATUS_SUCCESS;
934 }
935 
936 
937 static cairo_status_t
940 {
941  unsigned int n;
942 
943  for (n = 0; n < gradient->n_stops; n++) {
945  "\n %f %f %f %f %f add-color-stop",
946  gradient->stops[n].offset,
951  }
952 
953  return CAIRO_STATUS_SUCCESS;
954 }
955 
956 static cairo_status_t
958  const cairo_pattern_t *pattern)
959 {
962 
964 
966  "%f %f %f %f linear",
967  linear->pd1.x, linear->pd1.y,
968  linear->pd2.x, linear->pd2.y);
969  return _emit_gradient_color_stops (&linear->base, ctx->stream);
970 }
971 
972 static cairo_status_t
974  const cairo_pattern_t *pattern)
975 {
977  cairo_radial_pattern_t *radial;
978 
979  radial = (cairo_radial_pattern_t *) pattern;
980 
982  "%f %f %f %f %f %f radial",
983  radial->cd1.center.x,
984  radial->cd1.center.y,
985  radial->cd1.radius,
986  radial->cd2.center.x,
987  radial->cd2.center.y,
988  radial->cd2.radius);
989  return _emit_gradient_color_stops (&radial->base, ctx->stream);
990 }
991 
992 static cairo_status_t
994  const cairo_pattern_t *pattern)
995 {
997  cairo_pattern_t *mesh;
999  unsigned int i, n;
1000 
1001  mesh = (cairo_pattern_t *) pattern;
1003  if (unlikely (status))
1004  return status;
1005 
1006  _cairo_output_stream_printf (ctx->stream, "mesh");
1007  for (i = 0; i < n; i++) {
1008  cairo_path_t *path;
1010  int j;
1011 
1012  _cairo_output_stream_printf (ctx->stream, "\n begin-patch");
1013 
1015  if (unlikely (path->status))
1016  return path->status;
1017 
1018  for (j = 0; j < path->num_data; j+=data[0].header.length) {
1019  data = &path->data[j];
1020  switch (data->header.type) {
1021  case CAIRO_PATH_MOVE_TO:
1023  "\n %f %f m",
1024  data[1].point.x, data[1].point.y);
1025  break;
1026  case CAIRO_PATH_LINE_TO:
1028  "\n %f %f l",
1029  data[1].point.x, data[1].point.y);
1030  break;
1031  case CAIRO_PATH_CURVE_TO:
1033  "\n %f %f %f %f %f %f c",
1034  data[1].point.x, data[1].point.y,
1035  data[2].point.x, data[2].point.y,
1036  data[3].point.x, data[3].point.y);
1037  break;
1038  case CAIRO_PATH_CLOSE_PATH:
1039  break;
1040  }
1041  }
1043 
1044  for (j = 0; j < 4; j++) {
1045  double x, y;
1046 
1048  if (unlikely (status))
1049  return status;
1051  "\n %d %f %f set-control-point",
1052  j, x, y);
1053  }
1054 
1055  for (j = 0; j < 4; j++) {
1056  double r, g, b, a;
1057 
1058  status = cairo_mesh_pattern_get_corner_color_rgba (mesh, i, j, &r, &g, &b, &a);
1059  if (unlikely (status))
1060  return status;
1061 
1063  "\n %d %f %f %f %f set-corner-color",
1064  j, r, g, b, a);
1065  }
1066 
1067  _cairo_output_stream_printf (ctx->stream, "\n end-patch");
1068  }
1069 
1070  return CAIRO_STATUS_SUCCESS;
1071 }
1072 
1073 struct script_snapshot {
1075 };
1076 
1077 static cairo_status_t
1078 script_snapshot_finish (void *abstract_surface)
1079 {
1080  return CAIRO_STATUS_SUCCESS;
1081 }
1082 
1086 };
1087 
1088 static void
1090 {
1091  cairo_script_surface_t *surface = (cairo_script_surface_t *)abstract_surface;
1093 
1095  "/s%d undef\n",
1096  surface->base.unique_id);
1097 }
1098 
1099 static void
1102 {
1103  struct script_snapshot *surface;
1104 
1105  if (! ctx->attach_snapshots)
1106  return;
1107 
1108  surface = _cairo_malloc (sizeof (*surface));
1109  if (unlikely (surface == NULL))
1110  return;
1111 
1112  _cairo_surface_init (&surface->base,
1114  &ctx->base,
1115  source->content,
1116  source->is_vector);
1117 
1119  "dup /s%d exch def ",
1120  surface->base.unique_id);
1121 
1123  cairo_surface_destroy (&surface->base);
1124 }
1125 
1126 static cairo_status_t
1129 {
1132  cairo_script_surface_t *similar;
1133  cairo_surface_t *snapshot;
1136 
1138  if (snapshot) {
1139  _cairo_output_stream_printf (ctx->stream, "s%d", snapshot->unique_id);
1140  return CAIRO_INT_STATUS_SUCCESS;
1141  }
1142 
1143  extents = NULL;
1145  extents = &r;
1146 
1148  source->base.content,
1149  extents,
1150  NULL);
1151  if (unlikely (similar->base.status))
1152  return similar->base.status;
1153 
1154  similar->base.is_clear = TRUE;
1155 
1156  _cairo_output_stream_printf (ctx->stream, "//%s ",
1157  _content_to_string (source->base.content));
1158  if (extents) {
1159  _cairo_output_stream_printf (ctx->stream, "[%f %f %f %f]",
1160  extents->x, extents->y,
1161  extents->width, extents->height);
1162  } else
1163  _cairo_output_stream_puts (ctx->stream, "[]");
1164  _cairo_output_stream_puts (ctx->stream, " record\n");
1165 
1166  attach_snapshot (ctx, &source->base);
1167 
1168  _cairo_output_stream_puts (ctx->stream, "dup context\n");
1169 
1170  target_push (similar);
1171  similar->emitted = TRUE;
1172 
1173 
1174  old_cr = surface->cr;
1176  status = _cairo_recording_surface_replay (&source->base, &similar->base);
1177  surface->cr = old_cr;
1178 
1179  if (unlikely (status)) {
1180  cairo_surface_destroy (&similar->base);
1181  return status;
1182  }
1183 
1184  cairo_list_del (&similar->operand.link);
1186 
1187  _cairo_output_stream_puts (ctx->stream, "pop ");
1188  cairo_surface_destroy (&similar->base);
1189 
1190  return CAIRO_STATUS_SUCCESS;
1191 }
1192 
1193 static cairo_status_t
1196 {
1197  _get_target (source);
1198 
1199  return CAIRO_STATUS_SUCCESS;
1200 }
1201 
1202 static cairo_status_t
1205 {
1206  int row, width;
1207  ptrdiff_t stride;
1208  uint8_t row_stack[CAIRO_STACK_BUFFER_SIZE];
1209  uint8_t *rowdata;
1210  uint8_t *data;
1211 
1212  stride = image->stride;
1213  width = image->width;
1214  data = image->data;
1215 #if WORDS_BIGENDIAN
1216  switch (image->format) {
1217  case CAIRO_FORMAT_A1:
1218  for (row = image->height; row--; ) {
1220  data += stride;
1221  }
1222  break;
1223  case CAIRO_FORMAT_A8:
1224  for (row = image->height; row--; ) {
1226  data += stride;
1227  }
1228  break;
1230  for (row = image->height; row--; ) {
1232  data += stride;
1233  }
1234  break;
1235  case CAIRO_FORMAT_RGB24:
1236  for (row = image->height; row--; ) {
1237  int col;
1238  rowdata = data;
1239  for (col = width; col--; ) {
1240  _cairo_output_stream_write (output, rowdata, 3);
1241  rowdata+=4;
1242  }
1243  data += stride;
1244  }
1245  break;
1246  case CAIRO_FORMAT_ARGB32:
1247  for (row = image->height; row--; ) {
1249  data += stride;
1250  }
1251  break;
1252  case CAIRO_FORMAT_INVALID:
1253  default:
1255  break;
1256  }
1257 #else
1258  if (stride > ARRAY_LENGTH (row_stack)) {
1259  rowdata = _cairo_malloc (stride);
1260  if (unlikely (rowdata == NULL))
1262  } else
1263  rowdata = row_stack;
1264 
1265  switch (image->format) {
1266  case CAIRO_FORMAT_A1:
1267  for (row = image->height; row--; ) {
1268  int col;
1269  for (col = 0; col < (width + 7)/8; col++)
1270  rowdata[col] = CAIRO_BITSWAP8 (data[col]);
1271  _cairo_output_stream_write (output, rowdata, (width+7)/8);
1272  data += stride;
1273  }
1274  break;
1275  case CAIRO_FORMAT_A8:
1276  for (row = image->height; row--; ) {
1278  data += stride;
1279  }
1280  break;
1282  for (row = image->height; row--; ) {
1283  uint16_t *src = (uint16_t *) data;
1284  uint16_t *dst = (uint16_t *) rowdata;
1285  int col;
1286  for (col = 0; col < width; col++)
1287  dst[col] = bswap_16 (src[col]);
1288  _cairo_output_stream_write (output, rowdata, 2*width);
1289  data += stride;
1290  }
1291  break;
1292  case CAIRO_FORMAT_RGB24:
1293  for (row = image->height; row--; ) {
1294  uint8_t *src = data;
1295  int col;
1296  for (col = 0; col < width; col++) {
1297  rowdata[3*col+2] = *src++;
1298  rowdata[3*col+1] = *src++;
1299  rowdata[3*col+0] = *src++;
1300  src++;
1301  }
1302  _cairo_output_stream_write (output, rowdata, 3*width);
1303  data += stride;
1304  }
1305  break;
1306  case CAIRO_FORMAT_RGB30:
1307  case CAIRO_FORMAT_ARGB32:
1308  for (row = image->height; row--; ) {
1309  uint32_t *src = (uint32_t *) data;
1310  uint32_t *dst = (uint32_t *) rowdata;
1311  int col;
1312  for (col = 0; col < width; col++)
1313  dst[col] = bswap_32 (src[col]);
1314  _cairo_output_stream_write (output, rowdata, 4*width);
1315  data += stride;
1316  }
1317  break;
1318  case CAIRO_FORMAT_INVALID:
1319  default:
1321  break;
1322  }
1323  if (rowdata != row_stack)
1324  free (rowdata);
1325 #endif
1326 
1327  return CAIRO_STATUS_SUCCESS;
1328 }
1329 
1330 static cairo_int_status_t
1333 {
1335  cairo_output_stream_t *base85_stream;
1337  const uint8_t *mime_data;
1338  unsigned long mime_data_length;
1339 
1341  &mime_data, &mime_data_length);
1342  if (mime_data == NULL)
1344 
1346  "<< "
1347  "/width %d "
1348  "/height %d "
1349  "/format //%s "
1350  "/mime-type (image/png) "
1351  "/source <~",
1352  image->width, image->height,
1353  _format_to_string (image->format));
1354 
1355  base85_stream = _cairo_base85_stream_create (ctx->stream);
1356  _cairo_output_stream_write (base85_stream, mime_data, mime_data_length);
1357  status = _cairo_output_stream_destroy (base85_stream);
1358  if (unlikely (status))
1359  return status;
1360 
1361  _cairo_output_stream_puts (ctx->stream, "~> >> image ");
1362  return CAIRO_STATUS_SUCCESS;
1363 }
1364 
1365 static cairo_int_status_t
1368 {
1370  cairo_output_stream_t *base85_stream;
1371  cairo_output_stream_t *zlib_stream;
1372  cairo_int_status_t status, status2;
1373  cairo_surface_t *snapshot;
1374  const uint8_t *mime_data;
1375  unsigned long mime_data_length;
1376 
1377  snapshot = _cairo_surface_has_snapshot (&image->base,
1379  if (snapshot) {
1380  _cairo_output_stream_printf (ctx->stream, "s%u ", snapshot->unique_id);
1381  return CAIRO_INT_STATUS_SUCCESS;
1382  }
1383 
1386  return status;
1387  } else if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
1388  cairo_image_surface_t *clone;
1389  uint32_t len;
1390 
1391  if (image->format == CAIRO_FORMAT_INVALID) {
1393  } else {
1394  clone = (cairo_image_surface_t *)
1395  cairo_surface_reference (&image->base);
1396  }
1397 
1399  "<< "
1400  "/width %d "
1401  "/height %d "
1402  "/format //%s "
1403  "/source ",
1404  clone->width, clone->height,
1405  _format_to_string (clone->format));
1406 
1407  switch (clone->format) {
1408  case CAIRO_FORMAT_A1:
1409  len = (clone->width + 7)/8;
1410  break;
1411  case CAIRO_FORMAT_A8:
1412  len = clone->width;
1413  break;
1415  len = clone->width * 2;
1416  break;
1417  case CAIRO_FORMAT_RGB24:
1418  len = clone->width * 3;
1419  break;
1420  case CAIRO_FORMAT_RGB30:
1421  case CAIRO_FORMAT_ARGB32:
1422  len = clone->width * 4;
1423  break;
1424  case CAIRO_FORMAT_INVALID:
1425  default:
1427  len = 0;
1428  break;
1429  }
1430  len *= clone->height;
1431 
1432  if (len > 24) {
1433  _cairo_output_stream_puts (ctx->stream, "<|");
1434 
1435  base85_stream = _cairo_base85_stream_create (ctx->stream);
1436 
1437  len = to_be32 (len);
1438  _cairo_output_stream_write (base85_stream, &len, sizeof (len));
1439 
1440  zlib_stream = _cairo_deflate_stream_create (base85_stream);
1441  status = _write_image_surface (zlib_stream, clone);
1442 
1443  status2 = _cairo_output_stream_destroy (zlib_stream);
1445  status = status2;
1446  status2 = _cairo_output_stream_destroy (base85_stream);
1448  status = status2;
1449  if (unlikely (status))
1450  return status;
1451  } else {
1452  _cairo_output_stream_puts (ctx->stream, "<~");
1453 
1454  base85_stream = _cairo_base85_stream_create (ctx->stream);
1455  status = _write_image_surface (base85_stream, clone);
1456  status2 = _cairo_output_stream_destroy (base85_stream);
1458  status = status2;
1459  if (unlikely (status))
1460  return status;
1461  }
1462  _cairo_output_stream_puts (ctx->stream, "~> >> image ");
1463 
1464  cairo_surface_destroy (&clone->base);
1465  }
1466 
1468  &mime_data, &mime_data_length);
1469  if (mime_data != NULL) {
1471  "\n (%s) <~",
1473 
1474  base85_stream = _cairo_base85_stream_create (ctx->stream);
1475  _cairo_output_stream_write (base85_stream, mime_data, mime_data_length);
1476  status = _cairo_output_stream_destroy (base85_stream);
1477  if (unlikely (status))
1478  return status;
1479 
1480  _cairo_output_stream_puts (ctx->stream, "~> set-mime-data\n");
1481  }
1482 
1484  &mime_data, &mime_data_length);
1485  if (mime_data != NULL) {
1487  "\n (%s) <~",
1489 
1490  base85_stream = _cairo_base85_stream_create (ctx->stream);
1491  _cairo_output_stream_write (base85_stream, mime_data, mime_data_length);
1492  status = _cairo_output_stream_destroy (base85_stream);
1493  if (unlikely (status))
1494  return status;
1495 
1496  _cairo_output_stream_puts (ctx->stream, "~> set-mime-data\n");
1497  }
1498 
1499  return CAIRO_INT_STATUS_SUCCESS;
1500 }
1501 
1502 static cairo_int_status_t
1505 {
1508  void *extra;
1509 
1511  if (likely (status == CAIRO_STATUS_SUCCESS)) {
1514  }
1515 
1516  return status;
1517 }
1518 
1519 static cairo_int_status_t
1522 {
1523  cairo_surface_t *source = sub->target;
1525 
1526  switch ((int) source->backend->type) {
1529  break;
1532  break;
1533  default:
1535  break;
1536  }
1537  if (unlikely (status))
1538  return status;
1539 
1541  "%d %d %d %d subsurface ",
1542  sub->extents.x,
1543  sub->extents.y,
1544  sub->extents.width,
1545  sub->extents.height);
1546  return CAIRO_INT_STATUS_SUCCESS;
1547 }
1548 
1549 static cairo_int_status_t
1551  const cairo_pattern_t *pattern)
1552 {
1554  cairo_surface_pattern_t *surface_pattern;
1555  cairo_surface_t *source, *snapshot, *free_me = NULL;
1556  cairo_surface_t *take_snapshot = NULL;
1558 
1559  surface_pattern = (cairo_surface_pattern_t *) pattern;
1560  source = surface_pattern->surface;
1561 
1564  if (snapshot) {
1566  "s%d pattern ",
1567  snapshot->unique_id);
1568  return CAIRO_INT_STATUS_SUCCESS;
1569  }
1570 
1572  take_snapshot = source;
1573 
1575  }
1576 
1577  switch ((int) source->backend->type) {
1580  break;
1583  break;
1586  break;
1587  default:
1589  break;
1590  }
1591  cairo_surface_destroy (free_me);
1592  if (unlikely (status))
1593  return status;
1594 
1595  if (take_snapshot)
1596  attach_snapshot (ctx, take_snapshot);
1597 
1598  _cairo_output_stream_puts (ctx->stream, "pattern");
1599  return CAIRO_INT_STATUS_SUCCESS;
1600 }
1601 
1602 static cairo_int_status_t
1604  const cairo_pattern_t *pattern)
1605 {
1608 
1610  if (unlikely (source == NULL)) {
1613  }
1614  if (unlikely (source->status))
1615  return source->status;
1616 
1619  if (unlikely (status))
1620  return status;
1621 
1623  return CAIRO_INT_STATUS_SUCCESS;
1624 }
1625 
1626 static cairo_int_status_t
1628  const cairo_pattern_t *pattern)
1629 {
1632  cairo_bool_t is_default_extend;
1633  cairo_bool_t need_newline = TRUE;
1634 
1635  switch (pattern->type) {
1637  /* solid colors do not need filter/extend/matrix */
1639 
1642  is_default_extend = pattern->extend == CAIRO_EXTEND_GRADIENT_DEFAULT;
1643  break;
1646  is_default_extend = pattern->extend == CAIRO_EXTEND_GRADIENT_DEFAULT;
1647  break;
1650  is_default_extend = TRUE;
1651  break;
1654  is_default_extend = pattern->extend == CAIRO_EXTEND_SURFACE_DEFAULT;
1655  break;
1658  is_default_extend = pattern->extend == CAIRO_EXTEND_SURFACE_DEFAULT;
1659  break;
1660 
1661  default:
1664  }
1665  if (unlikely (status))
1666  return status;
1667 
1668  if (! _cairo_matrix_is_identity (&pattern->matrix)) {
1669  if (need_newline) {
1670  _cairo_output_stream_puts (ctx->stream, "\n ");
1671  need_newline = FALSE;
1672  }
1673 
1675  " [%f %f %f %f %f %f] set-matrix\n ",
1676  pattern->matrix.xx, pattern->matrix.yx,
1677  pattern->matrix.xy, pattern->matrix.yy,
1678  pattern->matrix.x0, pattern->matrix.y0);
1679  }
1680 
1681  /* XXX need to discriminate the user explicitly setting the default */
1682  if (pattern->filter != CAIRO_FILTER_DEFAULT) {
1683  if (need_newline) {
1684  _cairo_output_stream_puts (ctx->stream, "\n ");
1685  need_newline = FALSE;
1686  }
1687 
1689  " //%s set-filter\n ",
1690  _filter_to_string (pattern->filter));
1691  }
1692  if (! is_default_extend ){
1693  if (need_newline) {
1694  _cairo_output_stream_puts (ctx->stream, "\n ");
1695  need_newline = FALSE;
1696  }
1697 
1699  " //%s set-extend\n ",
1700  _extend_to_string (pattern->extend));
1701  }
1702 
1703  if (need_newline)
1704  _cairo_output_stream_puts (ctx->stream, "\n ");
1705 
1706  return CAIRO_INT_STATUS_SUCCESS;
1707 }
1708 
1709 static cairo_int_status_t
1711  cairo_bool_t *matrix_updated)
1712 {
1714 
1715  if (_cairo_matrix_is_identity (&surface->cr.current_ctm))
1716  return CAIRO_INT_STATUS_SUCCESS;
1717 
1719  "identity set-matrix\n");
1720 
1721  *matrix_updated = TRUE;
1722  cairo_matrix_init_identity (&surface->cr.current_ctm);
1723 
1724  return CAIRO_INT_STATUS_SUCCESS;
1725 }
1726 
1727 static cairo_int_status_t
1730  const cairo_pattern_t *source)
1731 {
1732  cairo_bool_t matrix_updated = FALSE;
1734 
1736 
1737  if (op == CAIRO_OPERATOR_CLEAR) {
1738  /* the source is ignored, so don't change it */
1739  return CAIRO_INT_STATUS_SUCCESS;
1740  }
1741 
1742  if (_cairo_pattern_equal (&surface->cr.current_source.base, source))
1743  return CAIRO_INT_STATUS_SUCCESS;
1744 
1745  _cairo_pattern_fini (&surface->cr.current_source.base);
1746  status = _cairo_pattern_init_copy (&surface->cr.current_source.base,
1747  source);
1748  if (unlikely (status))
1749  return status;
1750 
1751  status = _emit_identity (surface, &matrix_updated);
1752  if (unlikely (status))
1753  return status;
1754 
1756  if (unlikely (status))
1757  return status;
1758 
1761  " set-source\n");
1762  return CAIRO_INT_STATUS_SUCCESS;
1763 }
1764 
1765 static cairo_status_t
1767  const cairo_point_t *point)
1768 {
1770  " %f %f m",
1773 
1774  return CAIRO_STATUS_SUCCESS;
1775 }
1776 
1777 static cairo_status_t
1779  const cairo_point_t *point)
1780 {
1782  " %f %f l",
1785 
1786  return CAIRO_STATUS_SUCCESS;
1787 }
1788 
1789 static cairo_status_t
1791  const cairo_point_t *p1,
1792  const cairo_point_t *p2,
1793  const cairo_point_t *p3)
1794 {
1796  " %f %f %f %f %f %f c",
1801  _cairo_fixed_to_double (p3->x),
1802  _cairo_fixed_to_double (p3->y));
1803 
1804  return CAIRO_STATUS_SUCCESS;
1805 }
1806 
1807 static cairo_status_t
1809 {
1811  " h");
1812 
1813  return CAIRO_STATUS_SUCCESS;
1814 }
1815 
1816 static cairo_status_t
1818  const cairo_path_fixed_t *path)
1819 {
1823  struct _cairo_boxes_chunk *chunk;
1824  cairo_boxes_t boxes;
1825  cairo_box_t box;
1826  int i;
1827 
1828  _cairo_boxes_init (&boxes);
1830  while (_cairo_path_fixed_iter_is_fill_box (&iter, &box)) {
1831  if (box.p1.y == box.p2.y || box.p1.x == box.p2.x)
1832  continue;
1833 
1835  if (unlikely (status)) {
1836  _cairo_boxes_fini (&boxes);
1837  return status;
1838  }
1839  }
1840 
1841  if (! _cairo_path_fixed_iter_at_end (&iter)) {
1842  _cairo_boxes_fini (&boxes);
1844  }
1845 
1846  for (chunk = &boxes.chunks; chunk; chunk = chunk->next) {
1847  for (i = 0; i < chunk->count; i++) {
1848  const cairo_box_t *b = &chunk->base[i];
1849  double x1 = _cairo_fixed_to_double (b->p1.x);
1850  double y1 = _cairo_fixed_to_double (b->p1.y);
1851  double x2 = _cairo_fixed_to_double (b->p2.x);
1852  double y2 = _cairo_fixed_to_double (b->p2.y);
1853 
1855  "\n %f %f %f %f rectangle",
1856  x1, y1, x2 - x1, y2 - y1);
1857  }
1858  }
1859 
1860  _cairo_boxes_fini (&boxes);
1861  return status;
1862 }
1863 
1864 static cairo_status_t
1866  const cairo_path_fixed_t *path,
1867  cairo_bool_t is_fill)
1868 {
1870  cairo_box_t box;
1872 
1874  assert (_cairo_matrix_is_identity (&surface->cr.current_ctm));
1875 
1876  if (_cairo_path_fixed_equal (&surface->cr.current_path, path))
1877  return CAIRO_STATUS_SUCCESS;
1878 
1879  _cairo_path_fixed_fini (&surface->cr.current_path);
1880 
1881  _cairo_output_stream_puts (ctx->stream, "n");
1882 
1883  if (path == NULL) {
1884  _cairo_path_fixed_init (&surface->cr.current_path);
1885  _cairo_output_stream_puts (ctx->stream, "\n");
1886  return CAIRO_STATUS_SUCCESS;
1887  }
1888 
1889  status = _cairo_path_fixed_init_copy (&surface->cr.current_path, path);
1890  if (unlikely (status))
1891  return status;
1892 
1895  double x1 = _cairo_fixed_to_double (box.p1.x);
1896  double y1 = _cairo_fixed_to_double (box.p1.y);
1897  double x2 = _cairo_fixed_to_double (box.p2.x);
1898  double y2 = _cairo_fixed_to_double (box.p2.y);
1899 
1900  assert (x1 > -9999);
1901 
1903  " %f %f %f %f rectangle",
1904  x1, y1, x2 - x1, y2 - y1);
1906  } else if (is_fill && _cairo_path_fixed_fill_is_rectilinear (path)) {
1908  }
1909 
1912  _path_move_to,
1913  _path_line_to,
1915  _path_close,
1916  ctx->stream);
1917  }
1918 
1919  _cairo_output_stream_puts (ctx->stream, "\n");
1920 
1921  return status;
1922 }
1923 static cairo_bool_t
1925  const cairo_matrix_t *b)
1926 {
1927  return fabs (a->xx - b->xx) < 1e-5 &&
1928  fabs (a->xy - b->xy) < 1e-5 &&
1929  fabs (a->yx - b->yx) < 1e-5 &&
1930  fabs (a->yy - b->yy) < 1e-5;
1931 }
1932 
1933 static cairo_status_t
1935  const cairo_matrix_t *ctm,
1936  cairo_bool_t *matrix_updated)
1937 {
1939  cairo_bool_t was_identity;
1941 
1942  if (_scaling_matrix_equal (&surface->cr.current_ctm, ctm))
1943  return CAIRO_STATUS_SUCCESS;
1944 
1945  was_identity = _cairo_matrix_is_identity (&surface->cr.current_ctm);
1946 
1947  *matrix_updated = TRUE;
1948  surface->cr.current_ctm = *ctm;
1949  surface->cr.current_ctm.x0 = 0.;
1950  surface->cr.current_ctm.y0 = 0.;
1951 
1952  if (_cairo_matrix_is_identity (&surface->cr.current_ctm)) {
1954  "identity set-matrix\n");
1955  } else if (was_identity && fabs (ctm->yx) < 1e-5 && fabs (ctm->xy) < 1e-5) {
1957  "%f %f scale\n",
1958  ctm->xx, ctm->yy);
1959  } else {
1961  "[%f %f %f %f 0 0] set-matrix\n",
1962  ctm->xx, ctm->yx,
1963  ctm->xy, ctm->yy);
1964  }
1965 
1966  return CAIRO_STATUS_SUCCESS;
1967 }
1968 
1969 static cairo_status_t
1971  const cairo_matrix_t *font_matrix)
1972 {
1975 
1976  if (memcmp (&surface->cr.current_font_matrix,
1977  font_matrix,
1978  sizeof (cairo_matrix_t)) == 0)
1979  {
1980  return CAIRO_STATUS_SUCCESS;
1981  }
1982 
1983  surface->cr.current_font_matrix = *font_matrix;
1984 
1985  if (_cairo_matrix_is_identity (font_matrix)) {
1987  "identity set-font-matrix\n");
1988  } else {
1990  "[%f %f %f %f %f %f] set-font-matrix\n",
1991  font_matrix->xx, font_matrix->yx,
1992  font_matrix->xy, font_matrix->yy,
1993  font_matrix->x0, font_matrix->y0);
1994  }
1995 
1996  return CAIRO_STATUS_SUCCESS;
1997 }
1998 
1999 static cairo_surface_t *
2002  int width,
2003  int height)
2004 {
2005  cairo_script_surface_t *surface, *other = abstract_surface;
2006  cairo_surface_t *passthrough = NULL;
2010 
2011  ctx = to_context (other);
2012 
2013  status = cairo_device_acquire (&ctx->base);
2014  if (unlikely (status))
2016 
2017  if (! other->emitted) {
2019  if (unlikely (status)) {
2020  cairo_device_release (&ctx->base);
2022  }
2023 
2024  target_push (other);
2025  }
2026 
2027  if (_cairo_surface_wrapper_is_active (&other->wrapper)) {
2028  passthrough =
2030  content, width, height);
2031  if (unlikely (passthrough->status)) {
2032  cairo_device_release (&ctx->base);
2033  return passthrough;
2034  }
2035  }
2036 
2037  extents.x = extents.y = 0;
2038  extents.width = width;
2039  extents.height = height;
2041  &extents, passthrough);
2042  cairo_surface_destroy (passthrough);
2043 
2044  if (unlikely (surface->base.status)) {
2045  cairo_device_release (&ctx->base);
2046  return &surface->base;
2047  }
2048 
2049  _get_target (other);
2051  "%u %u //%s similar dup /s%u exch def context\n",
2052  width, height,
2054  surface->base.unique_id);
2055 
2056  surface->emitted = TRUE;
2057  surface->defined = TRUE;
2058  surface->base.is_clear = TRUE;
2059  target_push (surface);
2060 
2061  cairo_device_release (&ctx->base);
2062  return &surface->base;
2063 }
2064 
2065 static cairo_status_t
2066 _device_flush (void *abstract_device)
2067 {
2068  cairo_script_context_t *ctx = abstract_device;
2069 
2070  return _cairo_output_stream_flush (ctx->stream);
2071 }
2072 
2073 static void
2074 _device_destroy (void *abstract_device)
2075 {
2076  cairo_script_context_t *ctx = abstract_device;
2078 
2079  while (! cairo_list_is_empty (&ctx->fonts)) {
2081 
2083  cairo_list_del (&font->base.link);
2084  cairo_list_del (&font->link);
2085  free (font);
2086  }
2087 
2088  _bitmap_fini (ctx->surface_id.next);
2089  _bitmap_fini (ctx->font_id.next);
2090 
2091  if (ctx->owns_stream)
2093 
2094  free (ctx);
2095 }
2096 
2097 static cairo_surface_t *
2098 _cairo_script_surface_source (void *abstract_surface,
2100 {
2101  cairo_script_surface_t *surface = abstract_surface;
2102 
2103  if (extents) {
2104  extents->x = extents->y = 0;
2105  extents->width = surface->width;
2106  extents->height = surface->height;
2107  }
2108 
2109  return &surface->base;
2110 }
2111 
2112 static cairo_status_t
2114  cairo_image_surface_t **image_out,
2115  void **image_extra)
2116 {
2117  cairo_script_surface_t *surface = abstract_surface;
2118 
2119  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
2121  image_out,
2122  image_extra);
2123  }
2124 
2126 }
2127 
2128 static void
2131  void *image_extra)
2132 {
2133  cairo_script_surface_t *surface = abstract_surface;
2134 
2137  image,
2138  image_extra);
2139 }
2140 
2141 static cairo_status_t
2142 _cairo_script_surface_finish (void *abstract_surface)
2143 {
2144  cairo_script_surface_t *surface = abstract_surface;
2147 
2149 
2150  free (surface->cr.current_style.dash);
2151  surface->cr.current_style.dash = NULL;
2152 
2153  _cairo_pattern_fini (&surface->cr.current_source.base);
2154  _cairo_path_fixed_fini (&surface->cr.current_path);
2156 
2157  status = cairo_device_acquire (&ctx->base);
2158  if (unlikely (status))
2159  return status;
2160 
2161  if (surface->emitted) {
2162  assert (! surface->active);
2163 
2164  if (! cairo_list_is_empty (&surface->operand.link)) {
2165  if (! ctx->active) {
2166  if (target_is_active (surface)) {
2168  "pop\n");
2169  } else {
2170  int depth = target_depth (surface);
2171  if (depth == 1) {
2173  "exch pop\n");
2174  } else {
2176  "%d -1 roll pop\n",
2177  depth);
2178  }
2179  }
2180  cairo_list_del (&surface->operand.link);
2181  } else {
2182  struct deferred_finish *link = _cairo_malloc (sizeof (*link));
2183  if (link == NULL) {
2186  status = status2;
2187  cairo_list_del (&surface->operand.link);
2188  } else {
2189  link->operand.type = DEFERRED;
2190  cairo_list_swap (&link->operand.link,
2191  &surface->operand.link);
2192  cairo_list_add (&link->link, &ctx->deferred);
2193  }
2194  }
2195  }
2196 
2197  if (surface->defined) {
2199  "/s%u undef\n",
2200  surface->base.unique_id);
2201  }
2202  }
2203 
2206 
2207  cairo_device_release (&ctx->base);
2208 
2209  return status;
2210 }
2211 
2212 static cairo_int_status_t
2213 _cairo_script_surface_copy_page (void *abstract_surface)
2214 {
2215  cairo_script_surface_t *surface = abstract_surface;
2217 
2219  if (unlikely (status))
2220  return status;
2221 
2223  if (unlikely (status))
2224  goto BAIL;
2225 
2226  _cairo_output_stream_puts (to_context (surface)->stream, "copy-page\n");
2227 
2228 BAIL:
2230  return status;
2231 }
2232 
2233 static cairo_int_status_t
2234 _cairo_script_surface_show_page (void *abstract_surface)
2235 {
2236  cairo_script_surface_t *surface = abstract_surface;
2238 
2240  if (unlikely (status))
2241  return status;
2242 
2244  if (unlikely (status))
2245  goto BAIL;
2246 
2247  _cairo_output_stream_puts (to_context (surface)->stream, "show-page\n");
2248 
2249 BAIL:
2251  return status;
2252 }
2253 
2254 static cairo_status_t
2257  cairo_fill_rule_t fill_rule,
2258  double tolerance,
2260 {
2263  clipper);
2265  cairo_bool_t matrix_updated = FALSE;
2267  cairo_box_t box;
2268 
2270  if (unlikely (status))
2271  return status;
2272 
2273  if (path == NULL) {
2274  if (surface->cr.has_clip) {
2275  _cairo_output_stream_puts (ctx->stream, "reset-clip\n");
2276  surface->cr.has_clip = FALSE;
2277  }
2278  return CAIRO_STATUS_SUCCESS;
2279  }
2280 
2281  /* skip the trivial clip covering the surface extents */
2282  if (surface->width >= 0 && surface->height >= 0 &&
2284  {
2285  if (box.p1.x <= 0 && box.p1.y <= 0 &&
2286  box.p2.x >= _cairo_fixed_from_double (surface->width) &&
2287  box.p2.y >= _cairo_fixed_from_double (surface->height))
2288  {
2289  return CAIRO_STATUS_SUCCESS;
2290  }
2291  }
2292 
2293  status = _emit_identity (surface, &matrix_updated);
2294  if (unlikely (status))
2295  return status;
2296 
2297  status = _emit_fill_rule (surface, fill_rule);
2298  if (unlikely (status))
2299  return status;
2300 
2301  if (path->has_curve_to) {
2302  status = _emit_tolerance (surface, tolerance, matrix_updated);
2303  if (unlikely (status))
2304  return status;
2305  }
2306 
2309  if (unlikely (status))
2310  return status;
2311  }
2312 
2314  if (unlikely (status))
2315  return status;
2316 
2317  _cairo_output_stream_puts (ctx->stream, "clip+\n");
2318  surface->cr.has_clip = TRUE;
2319 
2320  return CAIRO_STATUS_SUCCESS;
2321 }
2322 
2323 static cairo_status_t
2325 {
2327 
2329  if (unlikely (status))
2330  return status;
2331 
2332  if (surface->active++ == 0)
2333  to_context (surface)->active++;
2334 
2335  return CAIRO_STATUS_SUCCESS;
2336 }
2337 
2338 static void
2340 {
2342  cairo_list_t sorted;
2343 
2344  assert (surface->active > 0);
2345  if (--surface->active)
2346  goto DONE;
2347 
2348  assert (ctx->active > 0);
2349  if (--ctx->active)
2350  goto DONE;
2351 
2352  cairo_list_init (&sorted);
2353  while (! cairo_list_is_empty (&ctx->deferred)) {
2354  struct deferred_finish *df;
2356  int depth;
2357 
2358  df = cairo_list_first_entry (&ctx->deferred,
2359  struct deferred_finish,
2360  link);
2361 
2362  depth = 0;
2364  if (operand == &df->operand.link)
2365  break;
2366  depth++;
2367  }
2368 
2369  df->operand.type = depth;
2370 
2371  if (cairo_list_is_empty (&sorted)) {
2372  cairo_list_move (&df->link, &sorted);
2373  } else {
2374  struct deferred_finish *pos;
2375 
2377  &sorted,
2378  link)
2379  {
2380  if (df->operand.type < pos->operand.type)
2381  break;
2382  }
2383  cairo_list_move_tail (&df->link, &pos->link);
2384  }
2385  }
2386 
2387  while (! cairo_list_is_empty (&sorted)) {
2388  struct deferred_finish *df;
2390  int depth;
2391 
2392  df = cairo_list_first_entry (&sorted,
2393  struct deferred_finish,
2394  link);
2395 
2396  depth = 0;
2398  if (operand == &df->operand.link)
2399  break;
2400  depth++;
2401  }
2402 
2403  if (depth == 0) {
2405  "pop\n");
2406  } else if (depth == 1) {
2408  "exch pop\n");
2409  } else {
2411  "%d -1 roll pop\n",
2412  depth);
2413  }
2414 
2415  cairo_list_del (&df->operand.link);
2416  cairo_list_del (&df->link);
2417  free (df);
2418  }
2419 
2420 DONE:
2422 }
2423 
2424 static cairo_int_status_t
2425 _cairo_script_surface_paint (void *abstract_surface,
2427  const cairo_pattern_t *source,
2428  const cairo_clip_t *clip)
2429 {
2430  cairo_script_surface_t *surface = abstract_surface;
2432 
2433  status = active (surface);
2434  if (unlikely (status))
2435  return status;
2436 
2438  if (unlikely (status))
2439  goto BAIL;
2440 
2442  if (unlikely (status))
2443  goto BAIL;
2444 
2446  if (unlikely (status))
2447  goto BAIL;
2448 
2450  if (unlikely (status))
2451  goto BAIL;
2452 
2454  "paint\n");
2455 
2456  inactive (surface);
2457 
2458  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
2459  return _cairo_surface_wrapper_paint (&surface->wrapper,
2460  op, source, clip);
2461  }
2462 
2463  return CAIRO_STATUS_SUCCESS;
2464 
2465 BAIL:
2466  inactive (surface);
2467  return status;
2468 }
2469 
2470 static cairo_int_status_t
2471 _cairo_script_surface_mask (void *abstract_surface,
2473  const cairo_pattern_t *source,
2474  const cairo_pattern_t *mask,
2475  const cairo_clip_t *clip)
2476 {
2477  cairo_script_surface_t *surface = abstract_surface;
2479 
2480  status = active (surface);
2481  if (unlikely (status))
2482  return status;
2483 
2485  if (unlikely (status))
2486  goto BAIL;
2487 
2489  if (unlikely (status))
2490  goto BAIL;
2491 
2493  if (unlikely (status))
2494  goto BAIL;
2495 
2497  if (unlikely (status))
2498  goto BAIL;
2499 
2500  if (_cairo_pattern_equal (source, mask)) {
2501  _cairo_output_stream_puts (to_context (surface)->stream, "/source get");
2502  } else {
2504  if (unlikely (status))
2505  goto BAIL;
2506  }
2507 
2508  assert (surface->cr.current_operator == op);
2509 
2511  " mask\n");
2512 
2513  inactive (surface);
2514 
2515  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
2516  return _cairo_surface_wrapper_mask (&surface->wrapper,
2517  op, source, mask, clip);
2518  }
2519 
2520  return CAIRO_STATUS_SUCCESS;
2521 
2522 BAIL:
2523  inactive (surface);
2524  return status;
2525 }
2526 
2527 static cairo_int_status_t
2528 _cairo_script_surface_stroke (void *abstract_surface,
2530  const cairo_pattern_t *source,
2531  const cairo_path_fixed_t *path,
2532  const cairo_stroke_style_t *style,
2533  const cairo_matrix_t *ctm,
2534  const cairo_matrix_t *ctm_inverse,
2535  double tolerance,
2537  const cairo_clip_t *clip)
2538 {
2539  cairo_script_surface_t *surface = abstract_surface;
2540  cairo_bool_t matrix_updated = FALSE;
2542 
2543  status = active (surface);
2544  if (unlikely (status))
2545  return status;
2546 
2548  if (unlikely (status))
2549  goto BAIL;
2550 
2552  if (unlikely (status))
2553  goto BAIL;
2554 
2555  status = _emit_identity (surface, &matrix_updated);
2556  if (unlikely (status))
2557  goto BAIL;
2558 
2560  if (unlikely (status))
2561  goto BAIL;
2562 
2564  if (unlikely (status))
2565  goto BAIL;
2566 
2567  status = _emit_scaling_matrix (surface, ctm, &matrix_updated);
2568  if (unlikely (status))
2569  goto BAIL;
2570 
2572  if (unlikely (status))
2573  goto BAIL;
2574 
2575  if (_scaling_matrix_equal (&surface->cr.current_ctm,
2576  &surface->cr.current_stroke_matrix))
2577  {
2578  matrix_updated = FALSE;
2579  }
2580  else
2581  {
2582  matrix_updated = TRUE;
2583  surface->cr.current_stroke_matrix = surface->cr.current_ctm;
2584  }
2585 
2586  status = _emit_stroke_style (surface, style, matrix_updated);
2587  if (unlikely (status))
2588  goto BAIL;
2589 
2590  status = _emit_tolerance (surface, tolerance, matrix_updated);
2591  if (unlikely (status))
2592  goto BAIL;
2593 
2595  if (unlikely (status))
2596  goto BAIL;
2597 
2599 
2600  inactive (surface);
2601 
2602  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
2603  return _cairo_surface_wrapper_stroke (&surface->wrapper,
2604  op, source, path,
2605  style,
2606  ctm, ctm_inverse,
2608  clip);
2609  }
2610 
2611  return CAIRO_STATUS_SUCCESS;
2612 
2613 BAIL:
2614  inactive (surface);
2615  return status;
2616 }
2617 
2618 static cairo_int_status_t
2619 _cairo_script_surface_fill (void *abstract_surface,
2621  const cairo_pattern_t *source,
2622  const cairo_path_fixed_t *path,
2623  cairo_fill_rule_t fill_rule,
2624  double tolerance,
2626  const cairo_clip_t *clip)
2627 {
2628  cairo_script_surface_t *surface = abstract_surface;
2629  cairo_bool_t matrix_updated = FALSE;
2631  cairo_box_t box;
2632 
2633  status = active (surface);
2634  if (unlikely (status))
2635  return status;
2636 
2638  if (unlikely (status))
2639  goto BAIL;
2640 
2642  if (unlikely (status))
2643  goto BAIL;
2644 
2645  status = _emit_identity (surface, &matrix_updated);
2646  if (unlikely (status))
2647  goto BAIL;
2648 
2650  if (unlikely (status))
2651  goto BAIL;
2652 
2653  if (! _cairo_path_fixed_is_box (path, &box)) {
2654  status = _emit_fill_rule (surface, fill_rule);
2655  if (unlikely (status))
2656  goto BAIL;
2657  }
2658 
2659  if (path->has_curve_to) {
2660  status = _emit_tolerance (surface, tolerance, matrix_updated);
2661  if (unlikely (status))
2662  goto BAIL;
2663  }
2664 
2667  if (unlikely (status))
2668  goto BAIL;
2669  }
2670 
2672  if (unlikely (status))
2673  goto BAIL;
2674 
2676  if (unlikely (status))
2677  goto BAIL;
2678 
2680 
2681  inactive (surface);
2682 
2683  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
2684  return _cairo_surface_wrapper_fill (&surface->wrapper,
2685  op, source, path,
2686  fill_rule,
2687  tolerance,
2688  antialias,
2689  clip);
2690  }
2691 
2692  return CAIRO_STATUS_SUCCESS;
2693 
2694 BAIL:
2695  inactive (surface);
2696  return status;
2697 }
2698 
2699 static cairo_surface_t *
2700 _cairo_script_surface_snapshot (void *abstract_surface)
2701 {
2702  cairo_script_surface_t *surface = abstract_surface;
2703 
2704  if (_cairo_surface_wrapper_is_active (&surface->wrapper))
2705  return _cairo_surface_wrapper_snapshot (&surface->wrapper);
2706 
2707  return NULL;
2708 }
2709 
2710 static cairo_bool_t
2712 {
2713  return TRUE;
2714 }
2715 
2716 static const char *
2718 {
2719  static const char *names[] = {
2720  "SUBPIXEL_ORDER_DEFAULT", /* CAIRO_SUBPIXEL_ORDER_DEFAULT */
2721  "SUBPIXEL_ORDER_RGB", /* CAIRO_SUBPIXEL_ORDER_RGB */
2722  "SUBPIXEL_ORDER_BGR", /* CAIRO_SUBPIXEL_ORDER_BGR */
2723  "SUBPIXEL_ORDER_VRGB", /* CAIRO_SUBPIXEL_ORDER_VRGB */
2724  "SUBPIXEL_ORDER_VBGR" /* CAIRO_SUBPIXEL_ORDER_VBGR */
2725  };
2726  return names[subpixel_order];
2727 }
2728 static const char *
2730 {
2731  static const char *names[] = {
2732  "HINT_STYLE_DEFAULT", /* CAIRO_HINT_STYLE_DEFAULT */
2733  "HINT_STYLE_NONE", /* CAIRO_HINT_STYLE_NONE */
2734  "HINT_STYLE_SLIGHT", /* CAIRO_HINT_STYLE_SLIGHT */
2735  "HINT_STYLE_MEDIUM", /* CAIRO_HINT_STYLE_MEDIUM */
2736  "HINT_STYLE_FULL" /* CAIRO_HINT_STYLE_FULL */
2737  };
2738  return names[hint_style];
2739 }
2740 static const char *
2742 {
2743  static const char *names[] = {
2744  "HINT_METRICS_DEFAULT", /* CAIRO_HINT_METRICS_DEFAULT */
2745  "HINT_METRICS_OFF", /* CAIRO_HINT_METRICS_OFF */
2746  "HINT_METRICS_ON" /* CAIRO_HINT_METRICS_ON */
2747  };
2748  return names[hint_metrics];
2749 }
2750 
2751 static cairo_status_t
2753  cairo_font_options_t *font_options)
2754 {
2756 
2757  if (cairo_font_options_equal (&surface->cr.current_font_options,
2758  font_options))
2759  {
2760  return CAIRO_STATUS_SUCCESS;
2761  }
2762 
2763  _cairo_output_stream_printf (ctx->stream, "<<");
2764 
2765  if (font_options->antialias != surface->cr.current_font_options.antialias) {
2767  " /antialias //%s",
2768  _antialias_to_string (font_options->antialias));
2769  }
2770 
2771  if (font_options->subpixel_order !=
2772  surface->cr.current_font_options.subpixel_order)
2773  {
2775  " /subpixel-order //%s",
2776  _subpixel_order_to_string (font_options->subpixel_order));
2777  }
2778 
2779  if (font_options->hint_style !=
2780  surface->cr.current_font_options.hint_style)
2781  {
2783  " /hint-style //%s",
2784  _hint_style_to_string (font_options->hint_style));
2785  }
2786 
2787  if (font_options->hint_metrics !=
2788  surface->cr.current_font_options.hint_metrics)
2789  {
2791  " /hint-metrics //%s",
2792  _hint_metrics_to_string (font_options->hint_metrics));
2793  }
2794 
2796  " >> set-font-options\n");
2797 
2798  surface->cr.current_font_options = *font_options;
2799  return CAIRO_STATUS_SUCCESS;
2800 }
2801 
2802 static void
2804  cairo_scaled_font_t *scaled_font)
2805 {
2806  cairo_script_font_t *priv = (cairo_script_font_t *)abstract_private;
2807  cairo_script_context_t *ctx = (cairo_script_context_t *)abstract_private->key;
2809 
2810  status = cairo_device_acquire (&ctx->base);
2811  if (likely (status == CAIRO_STATUS_SUCCESS)) {
2813  "/f%lu undef /sf%lu undef\n",
2814  priv->id,
2815  priv->id);
2816 
2817  _bitmap_release_id (&ctx->font_id, priv->id);
2818  cairo_device_release (&ctx->base);
2819  }
2820 
2821  cairo_list_del (&priv->link);
2822  cairo_list_del (&priv->base.link);
2823  free (priv);
2824 }
2825 
2826 static cairo_script_font_t *
2828 {
2830 }
2831 
2832 static long unsigned
2834 {
2835  return _cairo_script_font_get (ctx, font)->id;
2836 }
2837 
2838 static cairo_status_t
2840  cairo_scaled_font_t *scaled_font)
2841 {
2844  cairo_output_stream_t *base85_stream;
2845  cairo_output_stream_t *zlib_stream;
2846  cairo_status_t status, status2;
2847  unsigned long size;
2848  unsigned int load_flags;
2849  uint32_t len;
2850  uint8_t *buf;
2851 
2852  backend = scaled_font->backend;
2853  if (backend->load_truetype_table == NULL)
2855 
2856  size = 0;
2857  status = backend->load_truetype_table (scaled_font, 0, 0, NULL, &size);
2858  if (unlikely (status))
2859  return status;
2860 
2861  buf = _cairo_malloc (size);
2862  if (unlikely (buf == NULL))
2864 
2865  status = backend->load_truetype_table (scaled_font, 0, 0, buf, &size);
2866  if (unlikely (status)) {
2867  free (buf);
2868  return status;
2869  }
2870 
2871 #if CAIRO_HAS_FT_FONT
2872  load_flags = _cairo_ft_scaled_font_get_load_flags (scaled_font);
2873 #else
2874  load_flags = 0;
2875 #endif
2877  "<< "
2878  "/type 42 "
2879  "/index 0 "
2880  "/flags %d "
2881  "/source <|",
2882  load_flags);
2883 
2884  base85_stream = _cairo_base85_stream_create (ctx->stream);
2885  len = to_be32 (size);
2886  _cairo_output_stream_write (base85_stream, &len, sizeof (len));
2887 
2888  zlib_stream = _cairo_deflate_stream_create (base85_stream);
2889 
2890  _cairo_output_stream_write (zlib_stream, buf, size);
2891  free (buf);
2892 
2893  status2 = _cairo_output_stream_destroy (zlib_stream);
2895  status = status2;
2896 
2897  status2 = _cairo_output_stream_destroy (base85_stream);
2899  status = status2;
2900 
2902  "~> >> font dup /f%lu exch def set-font-face",
2903  _cairo_script_font_id (ctx, scaled_font));
2904 
2905  return status;
2906 }
2907 
2908 static cairo_status_t
2910  cairo_scaled_font_t *scaled_font,
2911  cairo_script_font_t **font_out)
2912 {
2914  cairo_script_font_t *font_private;
2916 
2917  font_private = _cairo_malloc (sizeof (cairo_script_font_t));
2918  if (unlikely (font_private == NULL))
2920 
2921  _cairo_scaled_font_attach_private (scaled_font, &font_private->base, ctx,
2923 
2924  font_private->parent = scaled_font;
2925  font_private->subset_glyph_index = 0;
2926  font_private->has_sfnt = TRUE;
2927 
2928  cairo_list_add (&font_private->link, &ctx->fonts);
2929 
2930  status = _bitmap_next_id (&ctx->font_id,
2931  &font_private->id);
2932  if (unlikely (status)) {
2933  free (font_private);
2934  return status;
2935  }
2936 
2938  if (unlikely (status)) {
2939  free (font_private);
2940  return status;
2941  }
2942 
2943  status = _emit_type42_font (surface, scaled_font);
2945  *font_out = font_private;
2946  return status;
2947  }
2948 
2949  font_private->has_sfnt = FALSE;
2951  "dict\n"
2952  " /type 3 set\n"
2953  " /metrics [%f %f %f %f %f] set\n"
2954  " /glyphs array set\n"
2955  " font dup /f%lu exch def set-font-face",
2956  scaled_font->fs_extents.ascent,
2957  scaled_font->fs_extents.descent,
2958  scaled_font->fs_extents.height,
2959  scaled_font->fs_extents.max_x_advance,
2960  scaled_font->fs_extents.max_y_advance,
2961  font_private->id);
2962 
2963  *font_out = font_private;
2964  return CAIRO_STATUS_SUCCESS;
2965 }
2966 
2967 static cairo_status_t
2969  cairo_scaled_font_t *scaled_font)
2970 {
2974  cairo_bool_t matrix_updated = FALSE;
2976  cairo_script_font_t *font_private;
2977 
2978  cairo_scaled_font_get_ctm (scaled_font, &matrix);
2979  status = _emit_scaling_matrix (surface, &matrix, &matrix_updated);
2980  if (unlikely (status))
2981  return status;
2982 
2983  if (! matrix_updated && surface->cr.current_scaled_font == scaled_font)
2984  return CAIRO_STATUS_SUCCESS;
2985 
2986  surface->cr.current_scaled_font = scaled_font;
2987 
2988  font_private = _cairo_script_font_get (ctx, scaled_font);
2989  if (font_private == NULL) {
2990  cairo_scaled_font_get_font_matrix (scaled_font, &matrix);
2992  if (unlikely (status))
2993  return status;
2994 
2997  if (unlikely (status))
2998  return status;
2999 
3000  status = _emit_scaled_font_init (surface, scaled_font, &font_private);
3001  if (unlikely (status))
3002  return status;
3003 
3006  " /scaled-font get /sf%lu exch def\n",
3007  font_private->id);
3008  } else {
3010  "sf%lu set-scaled-font\n",
3011  font_private->id);
3012  }
3013 
3014  return CAIRO_STATUS_SUCCESS;
3015 }
3016 
3017 static cairo_status_t
3019  cairo_scaled_font_t *scaled_font,
3020  cairo_script_font_t *font_private,
3021  cairo_scaled_glyph_t *scaled_glyph)
3022 {
3026  size_t index;
3027 
3028  index = ++font_private->subset_glyph_index;
3029  scaled_glyph->dev_private_key = ctx;
3030  scaled_glyph->dev_private = (void *) index;
3031 
3033  "%lu <<\n"
3034  " /metrics [%f %f %f %f %f %f]\n"
3035  " /render {\n",
3036  index,
3037  scaled_glyph->fs_metrics.x_bearing,
3038  scaled_glyph->fs_metrics.y_bearing,
3039  scaled_glyph->fs_metrics.width,
3040  scaled_glyph->fs_metrics.height,
3041  scaled_glyph->fs_metrics.x_advance,
3042  scaled_glyph->fs_metrics.y_advance);
3043 
3044  if (! _cairo_matrix_is_identity (&scaled_font->scale_inverse)) {
3046  "[%f %f %f %f %f %f] transform\n",
3047  scaled_font->scale_inverse.xx,
3048  scaled_font->scale_inverse.yx,
3049  scaled_font->scale_inverse.xy,
3050  scaled_font->scale_inverse.yy,
3051  scaled_font->scale_inverse.x0,
3052  scaled_font->scale_inverse.y0);
3053  }
3054 
3055  old_cr = surface->cr;
3058  &surface->base);
3059  surface->cr = old_cr;
3060 
3061  _cairo_output_stream_puts (ctx->stream, "} >> set\n");
3062 
3063  return status;
3064 }
3065 
3066 static cairo_status_t
3068  cairo_scaled_font_t *scaled_font,
3069  cairo_script_font_t *font_private,
3070  cairo_scaled_glyph_t *scaled_glyph)
3071 {
3074  size_t index;
3075 
3076  index = ++font_private->subset_glyph_index;
3077  scaled_glyph->dev_private_key = ctx;
3078  scaled_glyph->dev_private = (void *) index;
3079 
3081  "%lu <<\n"
3082  " /metrics [%f %f %f %f %f %f]\n"
3083  " /render {\n"
3084  "%f %f translate\n",
3085  index,
3086  scaled_glyph->fs_metrics.x_bearing,
3087  scaled_glyph->fs_metrics.y_bearing,
3088  scaled_glyph->fs_metrics.width,
3089  scaled_glyph->fs_metrics.height,
3090  scaled_glyph->fs_metrics.x_advance,
3091  scaled_glyph->fs_metrics.y_advance,
3092  scaled_glyph->fs_metrics.x_bearing,
3093  scaled_glyph->fs_metrics.y_bearing);
3094 
3095  status = _emit_image_surface (surface, scaled_glyph->surface);
3096  if (unlikely (status))
3097  return status;
3098 
3099  _cairo_output_stream_puts (ctx->stream, "pattern ");
3100 
3101  if (! _cairo_matrix_is_identity (&scaled_font->font_matrix)) {
3103  "\n [%f %f %f %f %f %f] set-matrix\n",
3104  scaled_font->font_matrix.xx,
3105  scaled_font->font_matrix.yx,
3106  scaled_font->font_matrix.xy,
3107  scaled_font->font_matrix.yy,
3108  scaled_font->font_matrix.x0,
3109  scaled_font->font_matrix.y0);
3110  }
3112  "mask\n} >> set\n");
3113 
3114  return CAIRO_STATUS_SUCCESS;
3115 }
3116 
3117 static cairo_status_t
3119  cairo_scaled_font_t *scaled_font)
3120 {
3122 
3123  _cairo_output_stream_printf (ctx->stream, "f%lu /glyphs get\n",
3124  _cairo_script_font_id (ctx, scaled_font));
3125 
3126  return CAIRO_STATUS_SUCCESS;
3127 }
3128 
3129 static cairo_status_t
3131  cairo_scaled_font_t *scaled_font,
3133  unsigned int num_glyphs)
3134 {
3136  cairo_script_font_t *font_private;
3138  unsigned int n;
3139  cairo_bool_t have_glyph_prologue = FALSE;
3140 
3141  if (num_glyphs == 0)
3142  return CAIRO_STATUS_SUCCESS;
3143 
3144  font_private = _cairo_script_font_get (ctx, scaled_font);
3145  if (font_private->has_sfnt)
3146  return CAIRO_STATUS_SUCCESS;
3147 
3148  _cairo_scaled_font_freeze_cache (scaled_font);
3149  for (n = 0; n < num_glyphs; n++) {
3150  cairo_scaled_glyph_t *scaled_glyph;
3151 
3152  status = _cairo_scaled_glyph_lookup (scaled_font,
3153  glyphs[n].index,
3155  &scaled_glyph);
3156  if (unlikely (status))
3157  break;
3158 
3159  if (scaled_glyph->dev_private_key == ctx)
3160  continue;
3161 
3162  status = _cairo_scaled_glyph_lookup (scaled_font,
3163  glyphs[n].index,
3165  &scaled_glyph);
3167  break;
3168 
3169  if (status == CAIRO_STATUS_SUCCESS) {
3170  if (! have_glyph_prologue) {
3171  status = _emit_scaled_glyph_prologue (surface, scaled_font);
3172  if (unlikely (status))
3173  break;
3174 
3175  have_glyph_prologue = TRUE;
3176  }
3177 
3179  scaled_font, font_private,
3180  scaled_glyph);
3181  if (unlikely (status))
3182  break;
3183 
3184  continue;
3185  }
3186 
3187  status = _cairo_scaled_glyph_lookup (scaled_font,
3188  glyphs[n].index,
3190  &scaled_glyph);
3192  break;
3193 
3194  if (status == CAIRO_STATUS_SUCCESS) {
3195  if (! have_glyph_prologue) {
3196  status = _emit_scaled_glyph_prologue (surface, scaled_font);
3197  if (unlikely (status))
3198  break;
3199 
3200  have_glyph_prologue = TRUE;
3201  }
3202 
3204  scaled_font,
3205  font_private,
3206  scaled_glyph);
3207  if (unlikely (status))
3208  break;
3209 
3210  continue;
3211  }
3212  }
3213  _cairo_scaled_font_thaw_cache (scaled_font);
3214 
3215  if (have_glyph_prologue) {
3217  }
3218 
3219  return status;
3220 }
3221 
3222 static void
3223 to_octal (int value, char *buf, size_t size)
3224 {
3225  do {
3226  buf[--size] = '0' + (value & 7);
3227  value >>= 3;
3228  } while (size);
3229 }
3230 
3231 static void
3233  const char *utf8, int len)
3234 {
3236  char c;
3237  const char *end;
3238 
3239  _cairo_output_stream_puts (ctx->stream, "(");
3240 
3241  if (utf8 == NULL) {
3242  end = utf8;
3243  } else {
3244  if (len < 0)
3245  len = strlen (utf8);
3246  end = utf8 + len;
3247  }
3248 
3249  while (utf8 < end) {
3250  switch ((c = *utf8++)) {
3251  case '\n':
3252  c = 'n';
3253  goto ESCAPED_CHAR;
3254  case '\r':
3255  c = 'r';
3256  goto ESCAPED_CHAR;
3257  case '\t':
3258  c = 't';
3259  goto ESCAPED_CHAR;
3260  case '\b':
3261  c = 'b';
3262  goto ESCAPED_CHAR;
3263  case '\f':
3264  c = 'f';
3265  goto ESCAPED_CHAR;
3266  case '\\':
3267  case '(':
3268  case ')':
3269 ESCAPED_CHAR:
3270  _cairo_output_stream_printf (ctx->stream, "\\%c", c);
3271  break;
3272  default:
3273  if (isprint (c) || isspace (c)) {
3274  _cairo_output_stream_printf (ctx->stream, "%c", c);
3275  } else {
3276  char buf[4] = { '\\' };
3277 
3278  to_octal (c, buf+1, 3);
3280  }
3281  break;
3282  }
3283  }
3284  _cairo_output_stream_puts (ctx->stream, ")");
3285 }
3286 
3287 static cairo_int_status_t
3290  const cairo_pattern_t *source,
3291  const char *utf8,
3292  int utf8_len,
3294  int num_glyphs,
3295  const cairo_text_cluster_t *clusters,
3296  int num_clusters,
3297  cairo_text_cluster_flags_t backward,
3298  cairo_scaled_font_t *scaled_font,
3299  const cairo_clip_t *clip)
3300 {
3301  cairo_script_surface_t *surface = abstract_surface;
3303  cairo_script_font_t *font_private;
3304  cairo_scaled_glyph_t *scaled_glyph;
3307  double x, y, ix, iy;
3308  int n;
3309  cairo_output_stream_t *base85_stream = NULL;
3310 
3311  status = active (surface);
3312  if (unlikely (status))
3313  return status;
3314 
3316  if (unlikely (status))
3317  goto BAIL;
3318 
3320  if (unlikely (status))
3321  goto BAIL;
3322 
3324  if (unlikely (status))
3325  goto BAIL;
3326 
3327  status = _emit_scaled_font (surface, scaled_font);
3328  if (unlikely (status))
3329  goto BAIL;
3330 
3332  if (unlikely (status))
3333  goto BAIL;
3334 
3335  status = _emit_scaled_glyphs (surface, scaled_font, glyphs, num_glyphs);
3336  if (unlikely (status))
3337  goto BAIL;
3338 
3339  /* (utf8) [cx cy [glyphs]] [clusters] backward show_text_glyphs */
3340  /* [cx cy [glyphs]] show_glyphs */
3341 
3342  if (utf8 != NULL && clusters != NULL) {
3343  _emit_string_literal (surface, utf8, utf8_len);
3344  _cairo_output_stream_puts (ctx->stream, " ");
3345  }
3346 
3347  matrix = surface->cr.current_ctm;
3350 
3351  ix = x = glyphs[0].x;
3352  iy = y = glyphs[0].y;
3353  cairo_matrix_transform_point (&matrix, &ix, &iy);
3354  ix -= scaled_font->font_matrix.x0;
3355  iy -= scaled_font->font_matrix.y0;
3356 
3357  _cairo_scaled_font_freeze_cache (scaled_font);
3358  font_private = _cairo_script_font_get (ctx, scaled_font);
3359 
3361  "[%f %f ",
3362  ix, iy);
3363 
3364  for (n = 0; n < num_glyphs; n++) {
3365  if (font_private->has_sfnt) {
3366  if (glyphs[n].index > 256)
3367  break;
3368  } else {
3369  status = _cairo_scaled_glyph_lookup (scaled_font,
3370  glyphs[n].index,
3372  &scaled_glyph);
3373  if (unlikely (status)) {
3374  _cairo_scaled_font_thaw_cache (scaled_font);
3375  goto BAIL;
3376  }
3377 
3378  if ((size_t) scaled_glyph->dev_private > 256)
3379  break;
3380  }
3381  }
3382 
3383  if (n == num_glyphs) {
3384  _cairo_output_stream_puts (ctx->stream, "<~");
3385  base85_stream = _cairo_base85_stream_create (ctx->stream);
3386  } else
3387  _cairo_output_stream_puts (ctx->stream, "[");
3388 
3389  for (n = 0; n < num_glyphs; n++) {
3390  double dx, dy;
3391 
3392  status = _cairo_scaled_glyph_lookup (scaled_font,
3393  glyphs[n].index,
3395  &scaled_glyph);
3396  if (unlikely (status)) {
3397  _cairo_scaled_font_thaw_cache (scaled_font);
3398  goto BAIL;
3399  }
3400 
3401  if (fabs (glyphs[n].x - x) > 1e-5 || fabs (glyphs[n].y - y) > 1e-5) {
3402  if (fabs (glyphs[n].y - y) < 1e-5) {
3403  if (base85_stream != NULL) {
3404  status = _cairo_output_stream_destroy (base85_stream);
3405  if (unlikely (status)) {
3406  base85_stream = NULL;
3407  break;
3408  }
3409 
3411  "~> %f <~", glyphs[n].x - x);
3412  base85_stream = _cairo_base85_stream_create (ctx->stream);
3413  } else {
3415  " ] %f [ ", glyphs[n].x - x);
3416  }
3417 
3418  x = glyphs[n].x;
3419  } else {
3420  ix = x = glyphs[n].x;
3421  iy = y = glyphs[n].y;
3422  cairo_matrix_transform_point (&matrix, &ix, &iy);
3423  ix -= scaled_font->font_matrix.x0;
3424  iy -= scaled_font->font_matrix.y0;
3425  if (base85_stream != NULL) {
3426  status = _cairo_output_stream_destroy (base85_stream);
3427  if (unlikely (status)) {
3428  base85_stream = NULL;
3429  break;
3430  }
3431 
3433  "~> %f %f <~",
3434  ix, iy);
3435  base85_stream = _cairo_base85_stream_create (ctx->stream);
3436  } else {
3438  " ] %f %f [ ",
3439  ix, iy);
3440  }
3441  }
3442  }
3443  if (base85_stream != NULL) {
3444  uint8_t c;
3445 
3446  if (font_private->has_sfnt)
3447  c = glyphs[n].index;
3448  else
3449  c = (uint8_t) (size_t) scaled_glyph->dev_private;
3450 
3451  _cairo_output_stream_write (base85_stream, &c, 1);
3452  } else {
3453  if (font_private->has_sfnt)
3454  _cairo_output_stream_printf (ctx->stream, " %lu",
3455  glyphs[n].index);
3456  else
3457  _cairo_output_stream_printf (ctx->stream, " %lu",
3458  (size_t) scaled_glyph->dev_private);
3459  }
3460 
3461  dx = scaled_glyph->metrics.x_advance;
3462  dy = scaled_glyph->metrics.y_advance;
3463  cairo_matrix_transform_distance (&scaled_font->ctm, &dx, &dy);
3464  x += dx;
3465  y += dy;
3466  }
3467  _cairo_scaled_font_thaw_cache (scaled_font);
3468 
3469  if (base85_stream != NULL) {
3470  cairo_status_t status2;
3471 
3472  status2 = _cairo_output_stream_destroy (base85_stream);
3474  status = status2;
3475 
3476  _cairo_output_stream_printf (ctx->stream, "~>");
3477  } else {
3478  _cairo_output_stream_puts (ctx->stream, " ]");
3479  }
3480  if (unlikely (status))
3481  return status;
3482 
3483  if (utf8 != NULL && clusters != NULL) {
3484  for (n = 0; n < num_clusters; n++) {
3485  if (clusters[n].num_bytes > UCHAR_MAX ||
3486  clusters[n].num_glyphs > UCHAR_MAX)
3487  {
3488  break;
3489  }
3490  }
3491 
3492  if (n < num_clusters) {
3493  _cairo_output_stream_puts (ctx->stream, "] [ ");
3494  for (n = 0; n < num_clusters; n++) {
3496  "%d %d ",
3497  clusters[n].num_bytes,
3498  clusters[n].num_glyphs);
3499  }
3500  _cairo_output_stream_puts (ctx->stream, "]");
3501  }
3502  else
3503  {
3504  _cairo_output_stream_puts (ctx->stream, "] <~");
3505  base85_stream = _cairo_base85_stream_create (ctx->stream);
3506  for (n = 0; n < num_clusters; n++) {
3507  uint8_t c[2];
3508  c[0] = clusters[n].num_bytes;
3509  c[1] = clusters[n].num_glyphs;
3510  _cairo_output_stream_write (base85_stream, c, 2);
3511  }
3512  status = _cairo_output_stream_destroy (base85_stream);
3513  if (unlikely (status))
3514  goto BAIL;
3515 
3516  _cairo_output_stream_puts (ctx->stream, "~>");
3517  }
3518 
3520  " //%s show-text-glyphs\n",
3521  _direction_to_string (backward));
3522  } else {
3524  "] show-glyphs\n");
3525  }
3526 
3527  inactive (surface);
3528 
3529  if (_cairo_surface_wrapper_is_active (&surface->wrapper)){
3531  op, source,
3532  utf8, utf8_len,
3533  glyphs, num_glyphs,
3534  clusters, num_clusters,
3535  backward,
3536  scaled_font,
3537  clip);
3538  }
3539 
3540  return CAIRO_STATUS_SUCCESS;
3541 
3542 BAIL:
3543  inactive (surface);
3544  return status;
3545 }
3546 
3547 static cairo_bool_t
3548 _cairo_script_surface_get_extents (void *abstract_surface,
3549  cairo_rectangle_int_t *rectangle)
3550 {
3551  cairo_script_surface_t *surface = abstract_surface;
3552 
3553  if (_cairo_surface_wrapper_is_active (&surface->wrapper)) {
3554  return _cairo_surface_wrapper_get_extents (&surface->wrapper,
3555  rectangle);
3556  }
3557 
3558  if (surface->width < 0 || surface->height < 0)
3559  return FALSE;
3560 
3561  rectangle->x = 0;
3562  rectangle->y = 0;
3563  rectangle->width = surface->width;
3564  rectangle->height = surface->height;
3565 
3566  return TRUE;
3567 }
3568 
3569 static const cairo_surface_backend_t
3573 
3575 
3577  NULL, /* create similar image */
3578  NULL, /* map to image */
3579  NULL, /* unmap image */
3580 
3585 
3588 
3590  NULL, /* get_font_options */
3591 
3592  NULL, /* flush */
3593  NULL, /* mark_dirty_rectangle */
3594 
3599  NULL, /* fill/stroke */
3600  NULL, /* glyphs */
3603 };
3604 
3605 static void
3607 {
3608  cr->current_operator = CAIRO_GSTATE_OPERATOR_DEFAULT;
3609  cr->current_fill_rule = CAIRO_GSTATE_FILL_RULE_DEFAULT;
3610  cr->current_tolerance = CAIRO_GSTATE_TOLERANCE_DEFAULT;
3611  cr->current_antialias = CAIRO_ANTIALIAS_DEFAULT;
3612  _cairo_stroke_style_init (&cr->current_style);
3613  _cairo_pattern_init_solid (&cr->current_source.solid,
3615  _cairo_path_fixed_init (&cr->current_path);
3616  cairo_matrix_init_identity (&cr->current_ctm);
3617  cairo_matrix_init_identity (&cr->current_stroke_matrix);
3618  cairo_matrix_init_identity (&cr->current_font_matrix);
3619  _cairo_font_options_init_default (&cr->current_font_options);
3620  cr->current_scaled_font = NULL;
3621  cr->has_clip = FALSE;
3622 }
3623 
3624 static void
3626 {
3627  free (cr->current_style.dash);
3628  cr->current_style.dash = NULL;
3629 
3630  _cairo_pattern_fini (&cr->current_source.base);
3631  _cairo_path_fixed_fini (&cr->current_path);
3632 
3634 }
3635 
3636 static cairo_script_surface_t *
3640  cairo_surface_t *passthrough)
3641 {
3643 
3644  if (unlikely (ctx == NULL))
3646 
3648  if (unlikely (surface == NULL))
3650 
3651  _cairo_surface_init (&surface->base,
3653  &ctx->base,
3654  content,
3655  TRUE); /* is_vector */
3656 
3657  _cairo_surface_wrapper_init (&surface->wrapper, passthrough);
3658 
3661 
3662  surface->width = surface->height = -1;
3663  if (extents) {
3664  surface->width = extents->width;
3665  surface->height = extents->height;
3667  -extents->x, -extents->y);
3668  }
3669 
3670  surface->emitted = FALSE;
3671  surface->defined = FALSE;
3672  surface->active = FALSE;
3673  surface->operand.type = SURFACE;
3674  cairo_list_init (&surface->operand.link);
3675 
3677 
3678  return surface;
3679 }
3680 
3683 
3684  NULL, NULL, /* lock, unlock */
3685 
3686  _device_flush, /* flush */
3687  NULL, /* finish */
3689 };
3690 
3693 {
3695 
3696  ctx = _cairo_malloc (sizeof (cairo_script_context_t));
3697  if (unlikely (ctx == NULL))
3699 
3700  memset (ctx, 0, sizeof (cairo_script_context_t));
3701 
3703 
3704  cairo_list_init (&ctx->operands);
3705  cairo_list_init (&ctx->deferred);
3706  ctx->stream = stream;
3708 
3709  cairo_list_init (&ctx->fonts);
3710  cairo_list_init (&ctx->defines);
3711 
3712  ctx->attach_snapshots = TRUE;
3713 
3714  return &ctx->base;
3715 }
3716 
3717 void
3720 {
3722 
3723  ctx = (cairo_script_context_t *) device;
3724  ctx->attach_snapshots = enable;
3725 }
3726 
3727 static cairo_device_t *
3729 {
3731 
3732  ctx = (cairo_script_context_t *)
3734  if (unlikely (ctx->base.status))
3735  return &ctx->base;
3736 
3737  ctx->owns_stream = TRUE;
3738  _cairo_output_stream_puts (ctx->stream, "%!CairoScript\n");
3739  return &ctx->base;
3740 }
3741 
3742 /**
3743  * cairo_script_create:
3744  * @filename: the name (path) of the file to write the script to
3745  *
3746  * Creates a output device for emitting the script, used when
3747  * creating the individual surfaces.
3748  *
3749  * Return value: a pointer to the newly created device. The caller
3750  * owns the surface and should call cairo_device_destroy() when done
3751  * with it.
3752  *
3753  * This function always returns a valid pointer, but it will return a
3754  * pointer to a "nil" device if an error such as out of memory
3755  * occurs. You can use cairo_device_status() to check for this.
3756  *
3757  * Since: 1.12
3758  **/
3761 {
3764 
3768 
3770 }
3771 
3772 /**
3773  * cairo_script_create_for_stream:
3774  * @write_func: callback function passed the bytes written to the script
3775  * @closure: user data to be passed to the callback
3776  *
3777  * Creates a output device for emitting the script, used when
3778  * creating the individual surfaces.
3779  *
3780  * Return value: a pointer to the newly created device. The caller
3781  * owns the surface and should call cairo_device_destroy() when done
3782  * with it.
3783  *
3784  * This function always returns a valid pointer, but it will return a
3785  * pointer to a "nil" device if an error such as out of memory
3786  * occurs. You can use cairo_device_status() to check for this.
3787  *
3788  * Since: 1.12
3789  **/
3792  void *closure)
3793 {
3796 
3800 
3802 }
3803 
3804 /**
3805  * cairo_script_write_comment:
3806  * @script: the script (output device)
3807  * @comment: the string to emit
3808  * @len:the length of the sting to write, or -1 to use strlen()
3809  *
3810  * Emit a string verbatim into the script.
3811  *
3812  * Since: 1.12
3813  **/
3814 void
3816  const char *comment,
3817  int len)
3818 {
3820 
3821  if (len < 0)
3822  len = strlen (comment);
3823 
3824  _cairo_output_stream_puts (context->stream, "% ");
3826  _cairo_output_stream_puts (context->stream, "\n");
3827 }
3828 
3829 /**
3830  * cairo_script_set_mode:
3831  * @script: The script (output device)
3832  * @mode: the new mode
3833  *
3834  * Change the output mode of the script
3835  *
3836  * Since: 1.12
3837  **/
3838 void
3841 {
3843 
3844  context->mode = mode;
3845 }
3846 
3847 /**
3848  * cairo_script_get_mode:
3849  * @script: The script (output device) to query
3850  *
3851  * Queries the script for its current output mode.
3852  *
3853  * Return value: the current output mode of the script
3854  *
3855  * Since: 1.12
3856  **/
3859 {
3861 
3862  return context->mode;
3863 }
3864 
3865 /**
3866  * cairo_script_surface_create:
3867  * @script: the script (output device)
3868  * @content: the content of the surface
3869  * @width: width in pixels
3870  * @height: height in pixels
3871  *
3872  * Create a new surface that will emit its rendering through @script
3873  *
3874  * Return value: a pointer to the newly created surface. The caller
3875  * owns the surface and should call cairo_surface_destroy() when done
3876  * with it.
3877  *
3878  * This function always returns a valid pointer, but it will return a
3879  * pointer to a "nil" surface if an error such as out of memory
3880  * occurs. You can use cairo_surface_status() to check for this.
3881  *
3882  * Since: 1.12
3883  **/
3887  double width,
3888  double height)
3889 {
3891 
3892  if (unlikely (script->backend->type != CAIRO_DEVICE_TYPE_SCRIPT))
3894 
3895  if (unlikely (script->status))
3896  return _cairo_surface_create_in_error (script->status);
3897 
3898  extents = NULL;
3899  if (width > 0 && height > 0) {
3900  r.x = r.y = 0;
3901  r.width = width;
3902  r.height = height;
3903  extents = &r;
3904  }
3906  content, extents,
3907  NULL)->base;
3908 }
3910 
3911 /**
3912  * cairo_script_surface_create_for_target:
3913  * @script: the script (output device)
3914  * @target: a target surface to wrap
3915  *
3916  * Create a pxoy surface that will render to @target and record
3917  * the operations to @device.
3918  *
3919  * Return value: a pointer to the newly created surface. The caller
3920  * owns the surface and should call cairo_surface_destroy() when done
3921  * with it.
3922  *
3923  * This function always returns a valid pointer, but it will return a
3924  * pointer to a "nil" surface if an error such as out of memory
3925  * occurs. You can use cairo_surface_status() to check for this.
3926  *
3927  * Since: 1.12
3928  **/
3932 {
3935 
3936  if (unlikely (script->backend->type != CAIRO_DEVICE_TYPE_SCRIPT))
3938 
3939  if (unlikely (script->status))
3940  return _cairo_surface_create_in_error (script->status);
3941 
3942  if (unlikely (target->status))
3943  return _cairo_surface_create_in_error (target->status);
3944 
3945  r = NULL;
3947  rect.x = rect.y = 0;
3948  rect.width = extents.width;
3949  rect.height = extents.height;
3950  r= &rect;
3951  }
3953  target->content, r,
3954  target)->base;
3955 }
3956 
3957 /**
3958  * cairo_script_from_recording_surface:
3959  * @script: the script (output device)
3960  * @recording_surface: the recording surface to replay
3961  *
3962  * Converts the record operations in @recording_surface into a script.
3963  *
3964  * Return value: #CAIRO_STATUS_SUCCESS on successful completion or an error code.
3965  *
3966  * Since: 1.12
3967  **/
3970  cairo_surface_t *recording_surface)
3971 {
3975 
3976  if (unlikely (script->backend->type != CAIRO_DEVICE_TYPE_SCRIPT))
3978 
3979  if (unlikely (script->status))
3980  return _cairo_error (script->status);
3981 
3982  if (unlikely (recording_surface->status))
3983  return recording_surface->status;
3984 
3985  if (unlikely (! _cairo_surface_is_recording (recording_surface)))
3987 
3988  extents = NULL;
3989  if (_cairo_recording_surface_get_bounds (recording_surface, &r))
3990  extents = &r;
3991 
3993  recording_surface->content,
3994  extents,
3995  NULL)->base;
3996  if (unlikely (surface->status))
3997  return surface->status;
3998 
3999  status = _cairo_recording_surface_replay (recording_surface, surface);
4001 
4002  return status;
4003 }
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
int ptrdiff_t
Definition: CPAL.d:3845
#define CHAR_BIT
Definition: ChkTeX.h:91
int source[257]
Definition: afm2tfm.c:928
#define font
Definition: aptex-macros.h:175
#define width(a)
Definition: aptex-macros.h:198
#define tolerance
Definition: aptex-macros.h:786
#define depth(a)
Definition: aptex-macros.h:199
#define box(a)
Definition: aptex-macros.h:675
#define height(a)
Definition: aptex-macros.h:200
#define next(a)
Definition: aptex-macros.h:924
#define mode
Definition: aptex-macros.h:510
static char * options
Definition: bmeps.c:236
char * p2
Definition: bmpfont.h:62
char * p1
Definition: bmpfont.h:62
cairo_output_stream_t * _cairo_base85_stream_create(cairo_output_stream_t *output)
#define CAIRO_INT_STATUS_SUCCESS
void _cairo_boxes_fini(cairo_boxes_t *boxes)
Definition: cairo-boxes.c:375
cairo_status_t _cairo_boxes_add(cairo_boxes_t *boxes, cairo_antialias_t antialias, const cairo_box_t *box)
Definition: cairo-boxes.c:184
void _cairo_boxes_init(cairo_boxes_t *boxes)
Definition: cairo-boxes.c:41
#define slim_hidden_def(name)
#define CAIRO_STACK_BUFFER_SIZE
cairo_t * _cairo_default_context_create(void *target)
cairo_output_stream_t * _cairo_deflate_stream_create(cairo_output_stream_t *output)
void _cairo_device_init(cairo_device_t *device, const cairo_device_backend_t *backend)
Definition: cairo-device.c:173
cairo_device_t * _cairo_device_create_in_error(cairo_status_t status)
Definition: cairo-device.c:113
void cairo_device_release(cairo_device_t *device)
Definition: cairo-device.c:445
cairo_status_t cairo_device_acquire(cairo_device_t *device)
Definition: cairo-device.c:414