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)  

hb-ot-layout-gsubgpos.hh
Go to the documentation of this file.
1 /*
2  * Copyright © 2007,2008,2009,2010 Red Hat, Inc.
3  * Copyright © 2010,2012 Google, Inc.
4  *
5  * This is part of HarfBuzz, a text shaping library.
6  *
7  * Permission is hereby granted, without written agreement and without
8  * license or royalty fees, to use, copy, modify, and distribute this
9  * software and its documentation for any purpose, provided that the
10  * above copyright notice and the following two paragraphs appear in
11  * all copies of this software.
12  *
13  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17  * DAMAGE.
18  *
19  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24  *
25  * Red Hat Author(s): Behdad Esfahbod
26  * Google Author(s): Behdad Esfahbod
27  */
28 
29 #ifndef HB_OT_LAYOUT_GSUBGPOS_HH
30 #define HB_OT_LAYOUT_GSUBGPOS_HH
31 
32 #include "hb.hh"
33 #include "hb-buffer.hh"
34 #include "hb-map.hh"
35 #include "hb-set.hh"
36 #include "hb-ot-map.hh"
37 #include "hb-ot-layout-common.hh"
39 
40 
41 namespace OT {
42 
43 
44 struct hb_intersects_context_t :
45  hb_dispatch_context_t<hb_intersects_context_t, bool>
46 {
47  template <typename T>
48  return_t dispatch (const T &obj) { return obj.intersects (this->glyphs); }
49  static return_t default_return_value () { return false; }
50  bool stop_sublookup_iteration (return_t r) const { return r; }
51 
52  const hb_set_t *glyphs;
53 
54  hb_intersects_context_t (const hb_set_t *glyphs_) :
55  glyphs (glyphs_) {}
56 };
57 
58 struct hb_closure_context_t :
59  hb_dispatch_context_t<hb_closure_context_t>
60 {
61  typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
62  template <typename T>
63  return_t dispatch (const T &obj) { obj.closure (this); return hb_empty_t (); }
64  static return_t default_return_value () { return hb_empty_t (); }
65  void recurse (unsigned int lookup_index)
66  {
68  return;
69 
71  recurse_func (this, lookup_index);
73  }
74 
77 
78  bool should_visit_lookup (unsigned int lookup_index)
79  {
81  return false;
82 
83  if (is_lookup_done (lookup_index))
84  return false;
85 
86  done_lookups->set (lookup_index, glyphs->get_population ());
87  return true;
88  }
89 
90  bool is_lookup_done (unsigned int lookup_index)
91  {
92  if (done_lookups->in_error ())
93  return true;
94 
95  /* Have we visited this lookup with the current set of glyphs? */
96  return done_lookups->get (lookup_index) == glyphs->get_population ();
97  }
98 
99  hb_face_t *face;
100  hb_set_t *glyphs;
101  hb_set_t output[1];
103  unsigned int nesting_level_left;
104 
106  hb_set_t *glyphs_,
107  hb_map_t *done_lookups_,
108  unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
109  face (face_),
110  glyphs (glyphs_),
112  nesting_level_left (nesting_level_left_),
113  done_lookups (done_lookups_),
114  lookup_count (0)
115  {}
116 
118 
120 
121  void flush ()
122  {
123  hb_set_del_range (output, face->get_num_glyphs (), hb_set_get_max (output)); /* Remove invalid glyphs. */
126  }
127 
128  private:
130  unsigned int lookup_count;
131 };
132 
133 struct hb_closure_lookups_context_t :
134  hb_dispatch_context_t<hb_closure_lookups_context_t>
135 {
136  typedef return_t (*recurse_func_t) (hb_closure_lookups_context_t *c, unsigned lookup_index);
137  template <typename T>
138  return_t dispatch (const T &obj) { obj.closure_lookups (this); return hb_empty_t (); }
139  static return_t default_return_value () { return hb_empty_t (); }
140  void recurse (unsigned lookup_index)
141  {
143  return;
144 
145  /* Return if new lookup was recursed to before. */
146  if (is_lookup_visited (lookup_index))
147  return;
148 
149  set_lookup_visited (lookup_index);
151  recurse_func (this, lookup_index);
153  }
154 
155  void set_lookup_visited (unsigned lookup_index)
156  { visited_lookups->add (lookup_index); }
157 
158  void set_lookup_inactive (unsigned lookup_index)
159  { inactive_lookups->add (lookup_index); }
160 
162  { return lookup_count > HB_MAX_LOOKUP_INDICES; }
163 
164  bool is_lookup_visited (unsigned lookup_index)
165  {
167  return true;
168 
169  if (visited_lookups->in_error ())
170  return true;
171 
172  return visited_lookups->has (lookup_index);
173  }
174 
175  hb_face_t *face;
176  const hb_set_t *glyphs;
178  unsigned int nesting_level_left;
179 
181  const hb_set_t *glyphs_,
182  hb_set_t *visited_lookups_,
183  hb_set_t *inactive_lookups_,
184  unsigned nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
185  face (face_),
186  glyphs (glyphs_),
188  nesting_level_left (nesting_level_left_),
189  visited_lookups (visited_lookups_),
190  inactive_lookups (inactive_lookups_),
191  lookup_count (0) {}
192 
194 
195  private:
198  unsigned int lookup_count;
199 };
200 
201 struct hb_would_apply_context_t :
202  hb_dispatch_context_t<hb_would_apply_context_t, bool>
203 {
204  template <typename T>
205  return_t dispatch (const T &obj) { return obj.would_apply (this); }
206  static return_t default_return_value () { return false; }
207  bool stop_sublookup_iteration (return_t r) const { return r; }
208 
209  hb_face_t *face;
210  const hb_codepoint_t *glyphs;
211  unsigned int len;
212  bool zero_context;
213 
215  const hb_codepoint_t *glyphs_,
216  unsigned int len_,
217  bool zero_context_) :
218  face (face_),
219  glyphs (glyphs_),
220  len (len_),
221  zero_context (zero_context_) {}
222 };
223 
224 struct hb_collect_glyphs_context_t :
225  hb_dispatch_context_t<hb_collect_glyphs_context_t>
226 {
227  typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index);
228  template <typename T>
229  return_t dispatch (const T &obj) { obj.collect_glyphs (this); return hb_empty_t (); }
230  static return_t default_return_value () { return hb_empty_t (); }
231  void recurse (unsigned int lookup_index)
232  {
234  return;
235 
236  /* Note that GPOS sets recurse_func to nullptr already, so it doesn't get
237  * past the previous check. For GSUB, we only want to collect the output
238  * glyphs in the recursion. If output is not requested, we can go home now.
239  *
240  * Note further, that the above is not exactly correct. A recursed lookup
241  * is allowed to match input that is not matched in the context, but that's
242  * not how most fonts are built. It's possible to relax that and recurse
243  * with all sets here if it proves to be an issue.
244  */
245 
246  if (output == hb_set_get_empty ())
247  return;
248 
249  /* Return if new lookup was recursed to before. */
250  if (recursed_lookups->has (lookup_index))
251  return;
252 
253  hb_set_t *old_before = before;
254  hb_set_t *old_input = input;
255  hb_set_t *old_after = after;
257 
259  recurse_func (this, lookup_index);
261 
262  before = old_before;
263  input = old_input;
264  after = old_after;
265 
266  recursed_lookups->add (lookup_index);
267  }
268 
269  hb_face_t *face;
270  hb_set_t *before;
271  hb_set_t *input;
272  hb_set_t *after;
273  hb_set_t *output;
276  unsigned int nesting_level_left;
277 
279  hb_set_t *glyphs_before, /* OUT. May be NULL */
280  hb_set_t *glyphs_input, /* OUT. May be NULL */
281  hb_set_t *glyphs_after, /* OUT. May be NULL */
282  hb_set_t *glyphs_output, /* OUT. May be NULL */
283  unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
284  face (face_),
285  before (glyphs_before ? glyphs_before : hb_set_get_empty ()),
286  input (glyphs_input ? glyphs_input : hb_set_get_empty ()),
287  after (glyphs_after ? glyphs_after : hb_set_get_empty ()),
288  output (glyphs_output ? glyphs_output : hb_set_get_empty ()),
291  nesting_level_left (nesting_level_left_) {}
293 
295 };
296 
297 
298 
299 template <typename set_t>
300 struct hb_collect_coverage_context_t :
301  hb_dispatch_context_t<hb_collect_coverage_context_t<set_t>, const Coverage &>
302 {
303  typedef const Coverage &return_t; // Stoopid that we have to dupe this here.
304  template <typename T>
305  return_t dispatch (const T &obj) { return obj.get_coverage (); }
306  static return_t default_return_value () { return Null (Coverage); }
308  {
309  r.collect_coverage (set);
310  return false;
311  }
312 
314  set (set_) {}
315 
316  set_t *set;
317 };
318 
319 
320 struct hb_ot_apply_context_t :
321  hb_dispatch_context_t<hb_ot_apply_context_t, bool, HB_DEBUG_APPLY>
322 {
323  struct matcher_t
324  {
326  lookup_props (0),
327  ignore_zwnj (false),
328  ignore_zwj (false),
329  mask (-1),
330 #define arg1(arg) (arg) /* Remove the macro to see why it's needed! */
331  syllable arg1(0),
332 #undef arg1
334  match_data (nullptr) {}
335 
336  typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data);
337 
338  void set_ignore_zwnj (bool ignore_zwnj_) { ignore_zwnj = ignore_zwnj_; }
339  void set_ignore_zwj (bool ignore_zwj_) { ignore_zwj = ignore_zwj_; }
340  void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; }
341  void set_mask (hb_mask_t mask_) { mask = mask_; }
342  void set_syllable (uint8_t syllable_) { syllable = syllable_; }
343  void set_match_func (match_func_t match_func_,
344  const void *match_data_)
345  { match_func = match_func_; match_data = match_data_; }
346 
347  enum may_match_t {
348  MATCH_NO,
349  MATCH_YES,
351  };
352 
354  const HBUINT16 *glyph_data) const
355  {
356  if (!(info.mask & mask) ||
357  (syllable && syllable != info.syllable ()))
358  return MATCH_NO;
359 
360  if (match_func)
361  return match_func (info.codepoint, *glyph_data, match_data) ? MATCH_YES : MATCH_NO;
362 
363  return MATCH_MAYBE;
364  }
365 
366  enum may_skip_t {
367  SKIP_NO,
368  SKIP_YES,
369  SKIP_MAYBE
370  };
371 
373  const hb_glyph_info_t &info) const
374  {
375  if (!c->check_glyph_property (&info, lookup_props))
376  return SKIP_YES;
377 
381  return SKIP_MAYBE;
382 
383  return SKIP_NO;
384  }
385 
386  protected:
387  unsigned int lookup_props;
388  bool ignore_zwnj;
389  bool ignore_zwj;
390  hb_mask_t mask;
393  const void *match_data;
394  };
395 
396  struct skipping_iterator_t
397  {
398  void init (hb_ot_apply_context_t *c_, bool context_match = false)
399  {
400  c = c_;
401  match_glyph_data = nullptr;
402  matcher.set_match_func (nullptr, nullptr);
404  /* Ignore ZWNJ if we are matching GPOS, or matching GSUB context and asked to. */
405  matcher.set_ignore_zwnj (c->table_index == 1 || (context_match && c->auto_zwnj));
406  /* Ignore ZWJ if we are matching context, or asked to. */
407  matcher.set_ignore_zwj (context_match || c->auto_zwj);
408  matcher.set_mask (context_match ? -1 : c->lookup_mask);
409  }
410  void set_lookup_props (unsigned int lookup_props)
411  {
413  }
415  const void *match_data_,
416  const HBUINT16 glyph_data[])
417  {
418  matcher.set_match_func (match_func_, match_data_);
419  match_glyph_data = glyph_data;
420  }
421 
422  void reset (unsigned int start_index_,
423  unsigned int num_items_)
424  {
425  idx = start_index_;
426  num_items = num_items_;
427  end = c->buffer->len;
428  matcher.set_syllable (start_index_ == c->buffer->idx ? c->buffer->cur().syllable () : 0);
429  }
430 
431  void reject ()
432  {
433  num_items++;
435  }
436 
439  { return matcher.may_skip (c, info); }
440 
441  bool next ()
442  {
443  assert (num_items > 0);
444  while (idx + num_items < end)
445  {
446  idx++;
447  const hb_glyph_info_t &info = c->buffer->info[idx];
448 
451  continue;
452 
454  if (match == matcher_t::MATCH_YES ||
457  {
458  num_items--;
460  return true;
461  }
462 
463  if (skip == matcher_t::SKIP_NO)
464  return false;
465  }
466  return false;
467  }
468  bool prev ()
469  {
470  assert (num_items > 0);
471  while (idx > num_items - 1)
472  {
473  idx--;
474  const hb_glyph_info_t &info = c->buffer->out_info[idx];
475 
478  continue;
479 
481  if (match == matcher_t::MATCH_YES ||
484  {
485  num_items--;
487  return true;
488  }
489 
490  if (skip == matcher_t::SKIP_NO)
491  return false;
492  }
493  return false;
494  }
495 
496  unsigned int idx;
497  protected:
500  const HBUINT16 *match_glyph_data;
501 
502  unsigned int num_items;
503  unsigned int end;
504  };
505 
506 
507  const char *get_name () { return "APPLY"; }
509  template <typename T>
510  return_t dispatch (const T &obj) { return obj.apply (this); }
511  static return_t default_return_value () { return false; }
512  bool stop_sublookup_iteration (return_t r) const { return r; }
513  return_t recurse (unsigned int sub_lookup_index)
514  {
515  if (unlikely (nesting_level_left == 0 || !recurse_func || buffer->max_ops-- <= 0))
516  return default_return_value ();
517 
519  bool ret = recurse_func (this, sub_lookup_index);
521  return ret;
522  }
523 
524  skipping_iterator_t iter_input, iter_context;
525 
526  hb_font_t *font;
527  hb_face_t *face;
530  const GDEF &gdef;
531  const VariationStore &var_store;
532 
535  unsigned int table_index; /* GSUB/GPOS */
536  unsigned int lookup_index;
537  unsigned int lookup_props;
538  unsigned int nesting_level_left;
539 
540  bool has_glyph_classes;
541  bool auto_zwnj;
542  bool auto_zwj;
543  bool random;
544 
546 
547 
548  hb_ot_apply_context_t (unsigned int table_index_,
549  hb_font_t *font_,
550  hb_buffer_t *buffer_) :
551  iter_input (), iter_context (),
552  font (font_), face (font->face), buffer (buffer_),
554  gdef (
555 #ifndef HB_NO_OT_LAYOUT
556  *face->table.GDEF->table
557 #else
558  Null (GDEF)
559 #endif
560  ),
561  var_store (gdef.get_var_store ()),
562  direction (buffer_->props.direction),
563  lookup_mask (1),
564  table_index (table_index_),
565  lookup_index ((unsigned int) -1),
566  lookup_props (0),
569  auto_zwnj (true),
570  auto_zwj (true),
571  random (false),
572  random_state (1) { init_iters (); }
573 
574  void init_iters ()
575  {
576  iter_input.init (this, false);
577  iter_context.init (this, true);
578  }
579 
581  void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; init_iters (); }
582  void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; init_iters (); }
583  void set_random (bool random_) { random = random_; }
585  void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; }
586  void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; init_iters (); }
587 
589  {
590  /* http://www.cplusplus.com/reference/random/minstd_rand/ */
591  random_state = random_state * 48271 % 2147483647;
592  return random_state;
593  }
594 
596  unsigned int glyph_props,
597  unsigned int match_props) const
598  {
599  /* If using mark filtering sets, the high short of
600  * match_props has the set index.
601  */
602  if (match_props & LookupFlag::UseMarkFilteringSet)
603  return gdef.mark_set_covers (match_props >> 16, glyph);
604 
605  /* The second byte of match_props has the meaning
606  * "ignore marks of attachment type different than
607  * the attachment type specified."
608  */
609  if (match_props & LookupFlag::MarkAttachmentType)
611 
612  return true;
613  }
614 
616  unsigned int match_props) const
617  {
618  hb_codepoint_t glyph = info->codepoint;
620 
621  /* Not covered, if, for example, glyph class is ligature and
622  * match_props includes LookupFlags::IgnoreLigatures
623  */
624  if (glyph_props & match_props & LookupFlag::IgnoreFlags)
625  return false;
626 
628  return match_properties_mark (glyph, glyph_props, match_props);
629 
630  return true;
631  }
632 
634  unsigned int class_guess = 0,
635  bool ligature = false,
636  bool component = false) const
637  {
638  unsigned int add_in = _hb_glyph_info_get_glyph_props (&buffer->cur()) &
641  if (ligature)
642  {
644  /* In the only place that the MULTIPLIED bit is used, Uniscribe
645  * seems to only care about the "last" transformation between
646  * Ligature and Multiple substitutions. Ie. if you ligate, expand,
647  * and ligate again, it forgives the multiplication and acts as
648  * if only ligation happened. As such, clear MULTIPLIED bit.
649  */
650  add_in &= ~~HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED;
651  }
652  if (component)
656  else if (class_guess)
657  _hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | class_guess);
658  }
659 
661  {
663  buffer->replace_glyph (glyph_index);
664  }
666  {
668  buffer->cur().codepoint = glyph_index;
669  }
671  unsigned int class_guess) const
672  {
673  _set_glyph_props (glyph_index, class_guess, true);
674  buffer->replace_glyph (glyph_index);
675  }
677  unsigned int class_guess) const
678  {
679  _set_glyph_props (glyph_index, class_guess, false, true);
680  buffer->output_glyph (glyph_index);
681  }
682 };
683 
684 
685 struct hb_get_subtables_context_t :
686  hb_dispatch_context_t<hb_get_subtables_context_t>
687 {
688  template <typename Type>
689  static inline bool apply_to (const void *obj, OT::hb_ot_apply_context_t *c)
690  {
691  const Type *typed_obj = (const Type *) obj;
692  return typed_obj->apply (c);
693  }
694 
695  typedef bool (*hb_apply_func_t) (const void *obj, OT::hb_ot_apply_context_t *c);
696 
697  struct hb_applicable_t
698  {
699  template <typename T>
700  void init (const T &obj_, hb_apply_func_t apply_func_)
701  {
702  obj = &obj_;
703  apply_func = apply_func_;
704  digest.init ();
705  obj_.get_coverage ().collect_coverage (&digest);
706  }
707 
709  {
710  return digest.may_have (c->buffer->cur().codepoint) && apply_func (obj, c);
711  }
712 
713  private:
714  const void *obj;
717  };
718 
720 
721  /* Dispatch interface. */
722  template <typename T>
723  return_t dispatch (const T &obj)
724  {
725  hb_applicable_t *entry = array.push();
726  entry->init (obj, apply_to<T>);
727  return hb_empty_t ();
728  }
729  static return_t default_return_value () { return hb_empty_t (); }
730 
732  array (array_) {}
733 
734  array_t &array;
735 };
736 
737 
738 
739 
740 typedef bool (*intersects_func_t) (const hb_set_t *glyphs, const HBUINT16 &value, const void *data);
741 typedef void (*collect_glyphs_func_t) (hb_set_t *glyphs, const HBUINT16 &value, const void *data);
742 typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data);
743 
744 struct ContextClosureFuncs
745 {
747 };
748 struct ContextCollectGlyphsFuncs
749 {
751 };
752 struct ContextApplyFuncs
753 {
755 };
756 
757 
758 static inline bool intersects_glyph (const hb_set_t *glyphs, const HBUINT16 &value, const void *data HB_UNUSED)
759 {
760  return glyphs->has (value);
761 }
762 static inline bool intersects_class (const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
763 {
764  const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
765  return class_def.intersects_class (glyphs, value);
766 }
767 static inline bool intersects_coverage (const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
768 {
770  return (data+coverage).intersects (glyphs);
771 }
772 
773 static inline bool array_is_subset_of (const hb_set_t *glyphs,
774  unsigned int count,
775  const HBUINT16 values[],
776  intersects_func_t intersects_func,
777  const void *intersects_data)
778 {
779  for (const HBUINT16 &_ : + hb_iter (values, count))
780  if (!intersects_func (glyphs, _, intersects_data)) return false;
781  return true;
782 }
783 
784 
785 static inline void collect_glyph (hb_set_t *glyphs, const HBUINT16 &value, const void *data HB_UNUSED)
786 {
787  glyphs->add (value);
788 }
789 static inline void collect_class (hb_set_t *glyphs, const HBUINT16 &value, const void *data)
790 {
791  const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
792  class_def.collect_class (glyphs, value);
793 }
794 static inline void collect_coverage (hb_set_t *glyphs, const HBUINT16 &value, const void *data)
795 {
798 }
800  hb_set_t *glyphs,
801  unsigned int count,
802  const HBUINT16 values[],
803  collect_glyphs_func_t collect_func,
804  const void *collect_data)
805 {
806  return
807  + hb_iter (values, count)
808  | hb_apply ([&] (const HBUINT16 &_) { collect_func (glyphs, _, collect_data); })
809  ;
810 }
811 
812 
813 static inline bool match_glyph (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data HB_UNUSED)
814 {
815  return glyph_id == value;
816 }
817 static inline bool match_class (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
818 {
819  const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
820  return class_def.get_class (glyph_id) == value;
821 }
822 static inline bool match_coverage (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
823 {
825  return (data+coverage).get_coverage (glyph_id) != NOT_COVERED;
826 }
827 
829  unsigned int count, /* Including the first glyph (not matched) */
830  const HBUINT16 input[], /* Array of input values--start with second glyph */
831  match_func_t match_func,
832  const void *match_data)
833 {
834  if (count != c->len)
835  return false;
836 
837  for (unsigned int i = 1; i < count; i++)
838  if (likely (!match_func (c->glyphs[i], input[i - 1], match_data)))
839  return false;
840 
841  return true;
842 }
843 static inline bool match_input (hb_ot_apply_context_t *c,
844  unsigned int count, /* Including the first glyph (not matched) */
845  const HBUINT16 input[], /* Array of input values--start with second glyph */
846  match_func_t match_func,
847  const void *match_data,
848  unsigned int *end_offset,
849  unsigned int match_positions[HB_MAX_CONTEXT_LENGTH],
850  unsigned int *p_total_component_count = nullptr)
851 {
852  TRACE_APPLY (nullptr);
853 
855 
856  hb_buffer_t *buffer = c->buffer;
857 
858  hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
859  skippy_iter.reset (buffer->idx, count - 1);
860  skippy_iter.set_match_func (match_func, match_data, input);
861 
862  /*
863  * This is perhaps the trickiest part of OpenType... Remarks:
864  *
865  * - If all components of the ligature were marks, we call this a mark ligature.
866  *
867  * - If there is no GDEF, and the ligature is NOT a mark ligature, we categorize
868  * it as a ligature glyph.
869  *
870  * - Ligatures cannot be formed across glyphs attached to different components
871  * of previous ligatures. Eg. the sequence is LAM,SHADDA,LAM,FATHA,HEH, and
872  * LAM,LAM,HEH form a ligature, leaving SHADDA,FATHA next to eachother.
873  * However, it would be wrong to ligate that SHADDA,FATHA sequence.
874  * There are a couple of exceptions to this:
875  *
876  * o If a ligature tries ligating with marks that belong to it itself, go ahead,
877  * assuming that the font designer knows what they are doing (otherwise it can
878  * break Indic stuff when a matra wants to ligate with a conjunct,
879  *
880  * o If two marks want to ligate and they belong to different components of the
881  * same ligature glyph, and said ligature glyph is to be ignored according to
882  * mark-filtering rules, then allow.
883  * https://github.com/harfbuzz/harfbuzz/issues/545
884  */
885 
886  unsigned int total_component_count = 0;
887  total_component_count += _hb_glyph_info_get_lig_num_comps (&buffer->cur());
888 
889  unsigned int first_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
890  unsigned int first_lig_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
891 
892  enum {
893  LIGBASE_NOT_CHECKED,
894  LIGBASE_MAY_NOT_SKIP,
895  LIGBASE_MAY_SKIP
896  } ligbase = LIGBASE_NOT_CHECKED;
897 
898  match_positions[0] = buffer->idx;
899  for (unsigned int i = 1; i < count; i++)
900  {
901  if (!skippy_iter.next ()) return_trace (false);
902 
903  match_positions[i] = skippy_iter.idx;
904 
905  unsigned int this_lig_id = _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]);
906  unsigned int this_lig_comp = _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]);
907 
908  if (first_lig_id && first_lig_comp)
909  {
910  /* If first component was attached to a previous ligature component,
911  * all subsequent components should be attached to the same ligature
912  * component, otherwise we shouldn't ligate them... */
913  if (first_lig_id != this_lig_id || first_lig_comp != this_lig_comp)
914  {
915  /* ...unless, we are attached to a base ligature and that base
916  * ligature is ignorable. */
917  if (ligbase == LIGBASE_NOT_CHECKED)
918  {
919  bool found = false;
920  const auto *out = buffer->out_info;
921  unsigned int j = buffer->out_len;
922  while (j && _hb_glyph_info_get_lig_id (&out[j - 1]) == first_lig_id)
923  {
924  if (_hb_glyph_info_get_lig_comp (&out[j - 1]) == 0)
925  {
926  j--;
927  found = true;
928  break;
929  }
930  j--;
931  }
932 
934  ligbase = LIGBASE_MAY_SKIP;
935  else
936  ligbase = LIGBASE_MAY_NOT_SKIP;
937  }
938 
939  if (ligbase == LIGBASE_MAY_NOT_SKIP)
940  return_trace (false);
941  }
942  }
943  else
944  {
945  /* If first component was NOT attached to a previous ligature component,
946  * all subsequent components should also NOT be attached to any ligature
947  * component, unless they are attached to the first component itself! */
948  if (this_lig_id && this_lig_comp && (this_lig_id != first_lig_id))
949  return_trace (false);
950  }
951 
952  total_component_count += _hb_glyph_info_get_lig_num_comps (&buffer->info[skippy_iter.idx]);
953  }
954 
955  *end_offset = skippy_iter.idx - buffer->idx + 1;
956 
957  if (p_total_component_count)
958  *p_total_component_count = total_component_count;
959 
960  return_trace (true);
961 }
962 static inline bool ligate_input (hb_ot_apply_context_t *c,
963  unsigned int count, /* Including the first glyph */
964  const unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
965  unsigned int match_length,
966  hb_codepoint_t lig_glyph,
967  unsigned int total_component_count)
968 {
969  TRACE_APPLY (nullptr);
970 
971  hb_buffer_t *buffer = c->buffer;
972 
973  buffer->merge_clusters (buffer->idx, buffer->idx + match_length);
974 
975  /* - If a base and one or more marks ligate, consider that as a base, NOT
976  * ligature, such that all following marks can still attach to it.
977  * https://github.com/harfbuzz/harfbuzz/issues/1109
978  *
979  * - If all components of the ligature were marks, we call this a mark ligature.
980  * If it *is* a mark ligature, we don't allocate a new ligature id, and leave
981  * the ligature to keep its old ligature id. This will allow it to attach to
982  * a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
983  * and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a
984  * ligature id and component value of 2. Then if SHADDA,FATHA form a ligature
985  * later, we don't want them to lose their ligature id/component, otherwise
986  * GPOS will fail to correctly position the mark ligature on top of the
987  * LAM,LAM,HEH ligature. See:
988  * https://bugzilla.gnome.org/show_bug.cgi?id=676343
989  *
990  * - If a ligature is formed of components that some of which are also ligatures
991  * themselves, and those ligature components had marks attached to *their*
992  * components, we have to attach the marks to the new ligature component
993  * positions! Now *that*'s tricky! And these marks may be following the
994  * last component of the whole sequence, so we should loop forward looking
995  * for them and update them.
996  *
997  * Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a
998  * 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature
999  * id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature
1000  * form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to
1001  * the new ligature with a component value of 2.
1002  *
1003  * This in fact happened to a font... See:
1004  * https://bugzilla.gnome.org/show_bug.cgi?id=437633
1005  */
1006 
1007  bool is_base_ligature = _hb_glyph_info_is_base_glyph (&buffer->info[match_positions[0]]);
1008  bool is_mark_ligature = _hb_glyph_info_is_mark (&buffer->info[match_positions[0]]);
1009  for (unsigned int i = 1; i < count; i++)
1010  if (!_hb_glyph_info_is_mark (&buffer->info[match_positions[i]]))
1011  {
1012  is_base_ligature = false;
1013  is_mark_ligature = false;
1014  break;
1015  }
1016  bool is_ligature = !is_base_ligature && !is_mark_ligature;
1017 
1018  unsigned int klass = is_ligature ? HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE : 0;
1019  unsigned int lig_id = is_ligature ? _hb_allocate_lig_id (buffer) : 0;
1020  unsigned int last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
1021  unsigned int last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
1022  unsigned int components_so_far = last_num_components;
1023 
1024  if (is_ligature)
1025  {
1026  _hb_glyph_info_set_lig_props_for_ligature (&buffer->cur(), lig_id, total_component_count);
1028  {
1030  }
1031  }
1032  c->replace_glyph_with_ligature (lig_glyph, klass);
1033 
1034  for (unsigned int i = 1; i < count; i++)
1035  {
1036  while (buffer->idx < match_positions[i] && buffer->successful)
1037  {
1038  if (is_ligature)
1039  {
1040  unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
1041  if (this_comp == 0)
1042  this_comp = last_num_components;
1043  unsigned int new_lig_comp = components_so_far - last_num_components +
1044  hb_min (this_comp, last_num_components);
1045  _hb_glyph_info_set_lig_props_for_mark (&buffer->cur(), lig_id, new_lig_comp);
1046  }
1047  buffer->next_glyph ();
1048  }
1049 
1050  last_lig_id = _hb_glyph_info_get_lig_id (&buffer->cur());
1051  last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
1052  components_so_far += last_num_components;
1053 
1054  /* Skip the base glyph */
1055  buffer->idx++;
1056  }
1057 
1058  if (!is_mark_ligature && last_lig_id)
1059  {
1060  /* Re-adjust components for any marks following. */
1061  for (unsigned i = buffer->idx; i < buffer->len; ++i)
1062  {
1063  if (last_lig_id != _hb_glyph_info_get_lig_id (&buffer->info[i])) break;
1064 
1065  unsigned this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]);
1066  if (!this_comp) break;
1067 
1068  unsigned new_lig_comp = components_so_far - last_num_components +
1069  hb_min (this_comp, last_num_components);
1070  _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp);
1071  }
1072  }
1073  return_trace (true);
1074 }
1075 
1077  unsigned int count,
1078  const HBUINT16 backtrack[],
1079  match_func_t match_func,
1080  const void *match_data,
1081  unsigned int *match_start)
1082 {
1083  TRACE_APPLY (nullptr);
1084 
1085  hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
1086  skippy_iter.reset (c->buffer->backtrack_len (), count);
1087  skippy_iter.set_match_func (match_func, match_data, backtrack);
1088 
1089  for (unsigned int i = 0; i < count; i++)
1090  if (!skippy_iter.prev ())
1091  return_trace (false);
1092 
1093  *match_start = skippy_iter.idx;
1094 
1095  return_trace (true);
1096 }
1097 
1099  unsigned int count,
1100  const HBUINT16 lookahead[],
1101  match_func_t match_func,
1102  const void *match_data,
1103  unsigned int offset,
1104  unsigned int *end_index)
1105 {
1106  TRACE_APPLY (nullptr);
1107 
1108  hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
1109  skippy_iter.reset (c->buffer->idx + offset - 1, count);
1110  skippy_iter.set_match_func (match_func, match_data, lookahead);
1111 
1112  for (unsigned int i = 0; i < count; i++)
1113  if (!skippy_iter.next ())
1114  return_trace (false);
1115 
1116  *end_index = skippy_iter.idx + 1;
1117 
1118  return_trace (true);
1119 }
1120 
1121 
1122 
1123 struct LookupRecord
1124 {
1126  const hb_map_t *lookup_map) const
1127  {
1128  TRACE_SERIALIZE (this);
1129  auto *out = c->embed (*this);
1130  if (unlikely (!out)) return_trace (nullptr);
1131 
1132  out->lookupListIndex = hb_map_get (lookup_map, lookupListIndex);
1133  return_trace (out);
1134  }
1135 
1137  {
1138  TRACE_SANITIZE (this);
1139  return_trace (c->check_struct (this));
1140  }
1141 
1142  HBUINT16 sequenceIndex; /* Index into current glyph
1143  * sequence--first glyph = 0 */
1144  HBUINT16 lookupListIndex; /* Lookup to apply to that
1145  * position--zero--based */
1146  public:
1148 };
1149 
1150 template <typename context_t>
1151 static inline void recurse_lookups (context_t *c,
1152  unsigned int lookupCount,
1153  const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */)
1154 {
1155  for (unsigned int i = 0; i < lookupCount; i++)
1156  c->recurse (lookupRecord[i].lookupListIndex);
1157 }
1158 
1159 static inline bool apply_lookup (hb_ot_apply_context_t *c,
1160  unsigned int count, /* Including the first glyph */
1161  unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
1162  unsigned int lookupCount,
1163  const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
1164  unsigned int match_length)
1165 {
1166  TRACE_APPLY (nullptr);
1167 
1168  hb_buffer_t *buffer = c->buffer;
1169  int end;
1170 
1171  /* All positions are distance from beginning of *output* buffer.
1172  * Adjust. */
1173  {
1174  unsigned int bl = buffer->backtrack_len ();
1175  end = bl + match_length;
1176 
1177  int delta = bl - buffer->idx;
1178  /* Convert positions to new indexing. */
1179  for (unsigned int j = 0; j < count; j++)
1180  match_positions[j] += delta;
1181  }
1182 
1183  for (unsigned int i = 0; i < lookupCount && buffer->successful; i++)
1184  {
1185  unsigned int idx = lookupRecord[i].sequenceIndex;
1186  if (idx >= count)
1187  continue;
1188 
1189  /* Don't recurse to ourself at same position.
1190  * Note that this test is too naive, it doesn't catch longer loops. */
1191  if (idx == 0 && lookupRecord[i].lookupListIndex == c->lookup_index)
1192  continue;
1193 
1194  if (unlikely (!buffer->move_to (match_positions[idx])))
1195  break;
1196 
1197  if (unlikely (buffer->max_ops <= 0))
1198  break;
1199 
1200  unsigned int orig_len = buffer->backtrack_len () + buffer->lookahead_len ();
1201  if (!c->recurse (lookupRecord[i].lookupListIndex))
1202  continue;
1203 
1204  unsigned int new_len = buffer->backtrack_len () + buffer->lookahead_len ();
1205  int delta = new_len - orig_len;
1206 
1207  if (!delta)
1208  continue;
1209 
1210  /* Recursed lookup changed buffer len. Adjust.
1211  *
1212  * TODO:
1213  *
1214  * Right now, if buffer length increased by n, we assume n new glyphs
1215  * were added right after the current position, and if buffer length
1216  * was decreased by n, we assume n match positions after the current
1217  * one where removed. The former (buffer length increased) case is
1218  * fine, but the decrease case can be improved in at least two ways,
1219  * both of which are significant:
1220  *
1221  * - If recursed-to lookup is MultipleSubst and buffer length
1222  * decreased, then it's current match position that was deleted,
1223  * NOT the one after it.
1224  *
1225  * - If buffer length was decreased by n, it does not necessarily
1226  * mean that n match positions where removed, as there might
1227  * have been marks and default-ignorables in the sequence. We
1228  * should instead drop match positions between current-position
1229  * and current-position + n instead.
1230  *
1231  * It should be possible to construct tests for both of these cases.
1232  */
1233 
1234  end += delta;
1235  if (end <= int (match_positions[idx]))
1236  {
1237  /* End might end up being smaller than match_positions[idx] if the recursed
1238  * lookup ended up removing many items, more than we have had matched.
1239  * Just never rewind end back and get out of here.
1240  * https://bugs.chromium.org/p/chromium/issues/detail?id=659496 */
1241  end = match_positions[idx];
1242  /* There can't be any further changes. */
1243  break;
1244  }
1245 
1246  unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */
1247 
1248  if (delta > 0)
1249  {
1251  break;
1252  }
1253  else
1254  {
1255  /* NOTE: delta is negative. */
1256  delta = hb_max (delta, (int) next - (int) count);
1257  next -= delta;
1258  }
1259 
1260  /* Shift! */
1261  memmove (match_positions + next + delta, match_positions + next,
1262  (count - next) * sizeof (match_positions[0]));
1263  next += delta;
1264  count += delta;
1265 
1266  /* Fill in new entries. */
1267  for (unsigned int j = idx + 1; j < next; j++)
1268  match_positions[j] = match_positions[j - 1] + 1;
1269 
1270  /* And fixup the rest. */
1271  for (; next < count; next++)
1272  match_positions[next] += delta;
1273  }
1274 
1275  buffer->move_to (end);
1276 
1277  return_trace (true);
1278 }
1279 
1280 
1281 
1282 /* Contextual lookups */
1283 
1284 struct ContextClosureLookupContext
1285 {
1286  ContextClosureFuncs funcs;
1287  const void *intersects_data;
1288 };
1289 
1290 struct ContextCollectGlyphsLookupContext
1291 {
1292  ContextCollectGlyphsFuncs funcs;
1293  const void *collect_data;
1294 };
1295 
1296 struct ContextApplyLookupContext
1297 {
1298  ContextApplyFuncs funcs;
1299  const void *match_data;
1300 };
1301 
1302 static inline bool context_intersects (const hb_set_t *glyphs,
1303  unsigned int inputCount, /* Including the first glyph (not matched) */
1304  const HBUINT16 input[], /* Array of input values--start with second glyph */
1305  ContextClosureLookupContext &lookup_context)
1306 {
1307  return array_is_subset_of (glyphs,
1308  inputCount ? inputCount - 1 : 0, input,
1309  lookup_context.funcs.intersects, lookup_context.intersects_data);
1310 }
1311 
1313  unsigned int inputCount, /* Including the first glyph (not matched) */
1314  const HBUINT16 input[], /* Array of input values--start with second glyph */
1315  unsigned int lookupCount,
1316  const LookupRecord lookupRecord[],
1317  ContextClosureLookupContext &lookup_context)
1318 {
1319  if (context_intersects (c->glyphs,
1320  inputCount, input,
1321  lookup_context))
1322  recurse_lookups (c,
1323  lookupCount, lookupRecord);
1324 }
1325 
1327  unsigned int inputCount, /* Including the first glyph (not matched) */
1328  const HBUINT16 input[], /* Array of input values--start with second glyph */
1329  unsigned int lookupCount,
1330  const LookupRecord lookupRecord[],
1331  ContextCollectGlyphsLookupContext &lookup_context)
1332 {
1333  collect_array (c, c->input,
1334  inputCount ? inputCount - 1 : 0, input,
1335  lookup_context.funcs.collect, lookup_context.collect_data);
1336  recurse_lookups (c,
1337  lookupCount, lookupRecord);
1338 }
1339 
1341  unsigned int inputCount, /* Including the first glyph (not matched) */
1342  const HBUINT16 input[], /* Array of input values--start with second glyph */
1343  unsigned int lookupCount HB_UNUSED,
1344  const LookupRecord lookupRecord[] HB_UNUSED,
1345  ContextApplyLookupContext &lookup_context)
1346 {
1347  return would_match_input (c,
1348  inputCount, input,
1349  lookup_context.funcs.match, lookup_context.match_data);
1350 }
1352  unsigned int inputCount, /* Including the first glyph (not matched) */
1353  const HBUINT16 input[], /* Array of input values--start with second glyph */
1354  unsigned int lookupCount,
1355  const LookupRecord lookupRecord[],
1356  ContextApplyLookupContext &lookup_context)
1357 {
1358  unsigned int match_length = 0;
1359  unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
1360  return match_input (c,
1361  inputCount, input,
1362  lookup_context.funcs.match, lookup_context.match_data,
1363  &match_length, match_positions)
1364  && (c->buffer->unsafe_to_break (c->buffer->idx, c->buffer->idx + match_length),
1365  apply_lookup (c,
1366  inputCount, match_positions,
1367  lookupCount, lookupRecord,
1368  match_length));
1369 }
1370 
1371 struct Rule
1372 {
1373  bool intersects (const hb_set_t *glyphs, ContextClosureLookupContext &lookup_context) const
1374  {
1375  return context_intersects (glyphs,
1376  inputCount, inputZ.arrayZ,
1377  lookup_context);
1378  }
1379 
1381  {
1382  if (unlikely (c->lookup_limit_exceeded ())) return;
1383 
1384  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1385  (inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
1387  inputCount, inputZ.arrayZ,
1388  lookupCount, lookupRecord.arrayZ,
1389  lookup_context);
1390  }
1391 
1393  {
1394  if (unlikely (c->lookup_limit_exceeded ())) return;
1395 
1396  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1397  (inputZ.as_array (inputCount ? inputCount - 1 : 0));
1398  recurse_lookups (c, lookupCount, lookupRecord.arrayZ);
1399  }
1400 
1402  ContextCollectGlyphsLookupContext &lookup_context) const
1403  {
1404  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1405  (inputZ.as_array (inputCount ? inputCount - 1 : 0));
1407  inputCount, inputZ.arrayZ,
1408  lookupCount, lookupRecord.arrayZ,
1409  lookup_context);
1410  }
1411 
1413  ContextApplyLookupContext &lookup_context) const
1414  {
1415  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1416  (inputZ.as_array (inputCount ? inputCount - 1 : 0));
1417  return context_would_apply_lookup (c,
1418  inputCount, inputZ.arrayZ,
1419  lookupCount, lookupRecord.arrayZ,
1420  lookup_context);
1421  }
1422 
1424  ContextApplyLookupContext &lookup_context) const
1425  {
1426  TRACE_APPLY (this);
1427  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1428  (inputZ.as_array (inputCount ? inputCount - 1 : 0));
1429  return_trace (context_apply_lookup (c, inputCount, inputZ.arrayZ, lookupCount, lookupRecord.arrayZ, lookup_context));
1430  }
1431 
1433  const hb_map_t *input_mapping, /* old->new glyphid or class mapping */
1434  const hb_map_t *lookup_map) const
1435  {
1436  TRACE_SERIALIZE (this);
1437  auto *out = c->start_embed (this);
1438  if (unlikely (!c->extend_min (out))) return_trace (false);
1439 
1440  out->inputCount = inputCount;
1441  out->lookupCount = lookupCount;
1442 
1443  const hb_array_t<const HBUINT16> input = inputZ.as_array (inputCount - 1);
1444  for (const auto org : input)
1445  {
1446  HBUINT16 d;
1447  d = input_mapping->get (org);
1448  c->copy (d);
1449  }
1450 
1451  const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
1452  (inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
1453  for (unsigned i = 0; i < (unsigned) lookupCount; i++)
1454  c->copy (lookupRecord[i], lookup_map);
1455 
1456  return_trace (true);
1457  }
1458 
1460  const hb_map_t *lookup_map,
1461  const hb_map_t *klass_map = nullptr) const
1462  {
1463  TRACE_SUBSET (this);
1464 
1465  const hb_array_t<const HBUINT16> input = inputZ.as_array ((inputCount ? inputCount - 1 : 0));
1466  if (!input.length) return_trace (false);
1467 
1468  const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
1469  if (!hb_all (input, mapping)) return_trace (false);
1470  return_trace (serialize (c->serializer, mapping, lookup_map));
1471  }
1472 
1473  public:
1475  {
1476  TRACE_SANITIZE (this);
1478  lookupCount.sanitize (c) &&
1479  c->check_range (inputZ.arrayZ,
1480  inputZ.item_size * (inputCount ? inputCount - 1 : 0) +
1482  }
1483 
1484  protected:
1485  HBUINT16 inputCount; /* Total number of glyphs in input
1486  * glyph sequence--includes the first
1487  * glyph */
1488  HBUINT16 lookupCount; /* Number of LookupRecords */
1490  inputZ; /* Array of match inputs--start with
1491  * second glyph */
1492 /*UnsizedArrayOf<LookupRecord>
1493  lookupRecordX;*/ /* Array of LookupRecords--in
1494  * design order */
1495  public:
1497 };
1498 
1499 struct RuleSet
1500 {
1502  ContextClosureLookupContext &lookup_context) const
1503  {
1504  return
1505  + hb_iter (rule)
1506  | hb_map (hb_add (this))
1507  | hb_map ([&] (const Rule &_) { return _.intersects (glyphs, lookup_context); })
1508  | hb_any
1509  ;
1510  }
1511 
1513  ContextClosureLookupContext &lookup_context) const
1514  {
1515  if (unlikely (c->lookup_limit_exceeded ())) return;
1516 
1517  return
1518  + hb_iter (rule)
1519  | hb_map (hb_add (this))
1520  | hb_apply ([&] (const Rule &_) { _.closure (c, lookup_context); })
1521  ;
1522  }
1523 
1525  {
1526  if (unlikely (c->lookup_limit_exceeded ())) return;
1527 
1528  return
1529  + hb_iter (rule)
1530  | hb_map (hb_add (this))
1531  | hb_apply ([&] (const Rule &_) { _.closure_lookups (c); })
1532  ;
1533  }
1534 
1536  ContextCollectGlyphsLookupContext &lookup_context) const
1537  {
1538  return
1539  + hb_iter (rule)
1540  | hb_map (hb_add (this))
1541  | hb_apply ([&] (const Rule &_) { _.collect_glyphs (c, lookup_context); })
1542  ;
1543  }
1544 
1546  ContextApplyLookupContext &lookup_context) const
1547  {
1548  return
1549  + hb_iter (rule)
1550  | hb_map (hb_add (this))
1551  | hb_map ([&] (const Rule &_) { return _.would_apply (c, lookup_context); })
1552  | hb_any
1553  ;
1554  }
1555 
1557  ContextApplyLookupContext &lookup_context) const
1558  {
1559  TRACE_APPLY (this);
1560  return_trace (
1561  + hb_iter (rule)
1562  | hb_map (hb_add (this))
1563  | hb_map ([&] (const Rule &_) { return _.apply (c, lookup_context); })
1564  | hb_any
1565  )
1566  ;
1567  }
1568 
1570  const hb_map_t *lookup_map,
1571  const hb_map_t *klass_map = nullptr) const
1572  {
1573  TRACE_SUBSET (this);
1574 
1575  auto snap = c->serializer->snapshot ();
1576  auto *out = c->serializer->start_embed (*this);
1577  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1578 
1579  for (const OffsetTo<Rule>& _ : rule)
1580  {
1581  if (!_) continue;
1582  auto *o = out->rule.serialize_append (c->serializer);
1583  if (unlikely (!o)) continue;
1584 
1585  auto o_snap = c->serializer->snapshot ();
1586  if (!o->serialize_subset (c, _, this, lookup_map, klass_map))
1587  {
1588  out->rule.pop ();
1589  c->serializer->revert (o_snap);
1590  }
1591  }
1592 
1593  bool ret = bool (out->rule);
1594  if (!ret) c->serializer->revert (snap);
1595 
1596  return_trace (ret);
1597  }
1598 
1600  {
1601  TRACE_SANITIZE (this);
1602  return_trace (rule.sanitize (c, this));
1603  }
1604 
1605  protected:
1607  rule; /* Array of Rule tables
1608  * ordered by preference */
1609  public:
1611 };
1612 
1613 
1614 struct ContextFormat1
1615 {
1616  bool intersects (const hb_set_t *glyphs) const
1617  {
1618  struct ContextClosureLookupContext lookup_context = {
1619  {intersects_glyph},
1620  nullptr
1621  };
1622 
1623  return
1624  + hb_zip (this+coverage, ruleSet)
1625  | hb_filter (*glyphs, hb_first)
1626  | hb_map (hb_second)
1627  | hb_map (hb_add (this))
1628  | hb_map ([&] (const RuleSet &_) { return _.intersects (glyphs, lookup_context); })
1629  | hb_any
1630  ;
1631  }
1632 
1634  {
1635  struct ContextClosureLookupContext lookup_context = {
1636  {intersects_glyph},
1637  nullptr
1638  };
1639 
1640  + hb_zip (this+coverage, ruleSet)
1641  | hb_filter (*c->glyphs, hb_first)
1642  | hb_map (hb_second)
1643  | hb_map (hb_add (this))
1644  | hb_apply ([&] (const RuleSet &_) { _.closure (c, lookup_context); })
1645  ;
1646  }
1647 
1649  {
1650  + hb_iter (ruleSet)
1651  | hb_map (hb_add (this))
1652  | hb_apply ([&] (const RuleSet &_) { _.closure_lookups (c); })
1653  ;
1654  }
1655 
1657 
1659  {
1660  (this+coverage).collect_coverage (c->input);
1661 
1662  struct ContextCollectGlyphsLookupContext lookup_context = {
1663  {collect_glyph},
1664  nullptr
1665  };
1666 
1667  + hb_iter (ruleSet)
1668  | hb_map (hb_add (this))
1669  | hb_apply ([&] (const RuleSet &_) { _.collect_glyphs (c, lookup_context); })
1670  ;
1671  }
1672 
1674  {
1675  const RuleSet &rule_set = this+ruleSet[(this+coverage).get_coverage (c->glyphs[0])];
1676  struct ContextApplyLookupContext lookup_context = {
1677  {match_glyph},
1678  nullptr
1679  };
1680  return rule_set.would_apply (c, lookup_context);
1681  }
1682 
1683  const Coverage &get_coverage () const { return this+coverage; }
1684 
1686  {
1687  TRACE_APPLY (this);
1688  unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
1689  if (likely (index == NOT_COVERED))
1690  return_trace (false);
1691 
1692  const RuleSet &rule_set = this+ruleSet[index];
1693  struct ContextApplyLookupContext lookup_context = {
1694  {match_glyph},
1695  nullptr
1696  };
1697  return_trace (rule_set.apply (c, lookup_context));
1698  }
1699 
1701  {
1702  TRACE_SUBSET (this);
1703  const hb_set_t &glyphset = *c->plan->glyphset ();
1704  const hb_map_t &glyph_map = *c->plan->glyph_map;
1705 
1706  auto *out = c->serializer->start_embed (*this);
1707  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1708  out->format = format;
1709 
1710  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
1712  + hb_zip (this+coverage, ruleSet)
1713  | hb_filter (glyphset, hb_first)
1714  | hb_filter (subset_offset_array (c, out->ruleSet, this, lookup_map), hb_second)
1715  | hb_map (hb_first)
1716  | hb_map (glyph_map)
1717  | hb_sink (new_coverage)
1718  ;
1719 
1720  out->coverage.serialize (c->serializer, out)
1721  .serialize (c->serializer, new_coverage.iter ());
1722  return_trace (bool (new_coverage));
1723  }
1724 
1726  {
1727  TRACE_SANITIZE (this);
1728  return_trace (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
1729  }
1730 
1731  protected:
1732  HBUINT16 format; /* Format identifier--format = 1 */
1734  coverage; /* Offset to Coverage table--from
1735  * beginning of table */
1737  ruleSet; /* Array of RuleSet tables
1738  * ordered by Coverage Index */
1739  public:
1741 };
1742 
1743 
1744 struct ContextFormat2
1745 {
1746  bool intersects (const hb_set_t *glyphs) const
1747  {
1748  if (!(this+coverage).intersects (glyphs))
1749  return false;
1750 
1751  const ClassDef &class_def = this+classDef;
1752 
1753  struct ContextClosureLookupContext lookup_context = {
1754  {intersects_class},
1755  &class_def
1756  };
1757 
1758  return
1759  + hb_iter (ruleSet)
1760  | hb_map (hb_add (this))
1761  | hb_enumerate
1763  { return class_def.intersects_class (glyphs, p.first) &&
1764  p.second.intersects (glyphs, lookup_context); })
1765  | hb_any
1766  ;
1767  }
1768 
1770  {
1771  if (!(this+coverage).intersects (c->glyphs))
1772  return;
1773 
1774  const ClassDef &class_def = this+classDef;
1775 
1776  struct ContextClosureLookupContext lookup_context = {
1777  {intersects_class},
1778  &class_def
1779  };
1780 
1781  return
1782  + hb_enumerate (ruleSet)
1783  | hb_filter ([&] (unsigned _)
1784  { return class_def.intersects_class (c->glyphs, _); },
1785  hb_first)
1786  | hb_map (hb_second)
1787  | hb_map (hb_add (this))
1788  | hb_apply ([&] (const RuleSet &_) { _.closure (c, lookup_context); })
1789  ;
1790  }
1791 
1793  {
1794  + hb_iter (ruleSet)
1795  | hb_map (hb_add (this))
1796  | hb_apply ([&] (const RuleSet &_) { _.closure_lookups (c); })
1797  ;
1798  }
1799 
1801 
1803  {
1804  (this+coverage).collect_coverage (c->input);
1805 
1806  const ClassDef &class_def = this+classDef;
1807  struct ContextCollectGlyphsLookupContext lookup_context = {
1808  {collect_class},
1809  &class_def
1810  };
1811 
1812  + hb_iter (ruleSet)
1813  | hb_map (hb_add (this))
1814  | hb_apply ([&] (const RuleSet &_) { _.collect_glyphs (c, lookup_context); })
1815  ;
1816  }
1817 
1819  {
1820  const ClassDef &class_def = this+classDef;
1821  unsigned int index = class_def.get_class (c->glyphs[0]);
1822  const RuleSet &rule_set = this+ruleSet[index];
1823  struct ContextApplyLookupContext lookup_context = {
1824  {match_class},
1825  &class_def
1826  };
1827  return rule_set.would_apply (c, lookup_context);
1828  }
1829 
1830  const Coverage &get_coverage () const { return this+coverage; }
1831 
1833  {
1834  TRACE_APPLY (this);
1835  unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
1836  if (likely (index == NOT_COVERED)) return_trace (false);
1837 
1838  const ClassDef &class_def = this+classDef;
1839  index = class_def.get_class (c->buffer->cur().codepoint);
1840  const RuleSet &rule_set = this+ruleSet[index];
1841  struct ContextApplyLookupContext lookup_context = {
1842  {match_class},
1843  &class_def
1844  };
1845  return_trace (rule_set.apply (c, lookup_context));
1846  }
1847 
1849  {
1850  TRACE_SUBSET (this);
1851  auto *out = c->serializer->start_embed (*this);
1852  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
1853  out->format = format;
1854  if (unlikely (!out->coverage.serialize_subset (c, coverage, this)))
1855  return_trace (false);
1856 
1857  hb_map_t klass_map;
1858  out->classDef.serialize_subset (c, classDef, this, &klass_map);
1859 
1860  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
1861  bool ret = true;
1862  int non_zero_index = 0, index = 0;
1863  for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&> _ : + hb_enumerate (ruleSet)
1864  | hb_filter (klass_map, hb_first))
1865  {
1866  auto *o = out->ruleSet.serialize_append (c->serializer);
1867  if (unlikely (!o))
1868  {
1869  ret = false;
1870  break;
1871  }
1872 
1873  if (o->serialize_subset (c, _.second, this, lookup_map, &klass_map))
1874  non_zero_index = index;
1875 
1876  index++;
1877  }
1878 
1879  if (!ret) return_trace (ret);
1880 
1881  //prune empty trailing ruleSets
1882  --index;
1883  while (index > non_zero_index)
1884  {
1885  out->ruleSet.pop ();
1886  index--;
1887  }
1888 
1889  return_trace (bool (out->ruleSet));
1890  }
1891 
1893  {
1894  TRACE_SANITIZE (this);
1895  return_trace (coverage.sanitize (c, this) && classDef.sanitize (c, this) && ruleSet.sanitize (c, this));
1896  }
1897 
1898  protected:
1899  HBUINT16 format; /* Format identifier--format = 2 */
1901  coverage; /* Offset to Coverage table--from
1902  * beginning of table */
1904  classDef; /* Offset to glyph ClassDef table--from
1905  * beginning of table */
1907  ruleSet; /* Array of RuleSet tables
1908  * ordered by class */
1909  public:
1911 };
1912 
1913 
1914 struct ContextFormat3
1915 {
1916  bool intersects (const hb_set_t *glyphs) const
1917  {
1918  if (!(this+coverageZ[0]).intersects (glyphs))
1919  return false;
1920 
1921  struct ContextClosureLookupContext lookup_context = {
1923  this
1924  };
1925  return context_intersects (glyphs,
1926  glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
1927  lookup_context);
1928  }
1929 
1931  {
1932  if (!(this+coverageZ[0]).intersects (c->glyphs))
1933  return;
1934 
1935  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
1936  struct ContextClosureLookupContext lookup_context = {
1938  this
1939  };
1941  glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
1942  lookupCount, lookupRecord,
1943  lookup_context);
1944  }
1945 
1947  {
1948  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
1949  recurse_lookups (c, lookupCount, lookupRecord);
1950  }
1951 
1953 
1955  {
1956  (this+coverageZ[0]).collect_coverage (c->input);
1957 
1958  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
1959  struct ContextCollectGlyphsLookupContext lookup_context = {
1960  {collect_coverage},
1961  this
1962  };
1963 
1965  glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
1966  lookupCount, lookupRecord,
1967  lookup_context);
1968  }
1969 
1971  {
1972  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
1973  struct ContextApplyLookupContext lookup_context = {
1974  {match_coverage},
1975  this
1976  };
1977  return context_would_apply_lookup (c,
1978  glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
1979  lookupCount, lookupRecord,
1980  lookup_context);
1981  }
1982 
1983  const Coverage &get_coverage () const { return this+coverageZ[0]; }
1984 
1986  {
1987  TRACE_APPLY (this);
1988  unsigned int index = (this+coverageZ[0]).get_coverage (c->buffer->cur().codepoint);
1989  if (likely (index == NOT_COVERED)) return_trace (false);
1990 
1991  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
1992  struct ContextApplyLookupContext lookup_context = {
1993  {match_coverage},
1994  this
1995  };
1996  return_trace (context_apply_lookup (c, glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1), lookupCount, lookupRecord, lookup_context));
1997  }
1998 
2000  {
2001  TRACE_SUBSET (this);
2002  auto *out = c->serializer->start_embed (this);
2003  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2004 
2005  out->format = format;
2006  out->glyphCount = glyphCount;
2007  out->lookupCount = lookupCount;
2008 
2009  auto coverages = coverageZ.as_array (glyphCount);
2010 
2011  for (const OffsetTo<Coverage>& offset : coverages)
2012  {
2013  auto *o = c->serializer->allocate_size<OffsetTo<Coverage>> (OffsetTo<Coverage>::static_size);
2014  if (unlikely (!o)) return_trace (false);
2015  if (!o->serialize_subset (c, offset, this)) return_trace (false);
2016  }
2017 
2018  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2019  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
2020  for (unsigned i = 0; i < (unsigned) lookupCount; i++)
2021  c->serializer->copy (lookupRecord[i], lookup_map);
2022 
2023  return_trace (true);
2024  }
2025 
2027  {
2028  TRACE_SANITIZE (this);
2029  if (!c->check_struct (this)) return_trace (false);
2030  unsigned int count = glyphCount;
2031  if (!count) return_trace (false); /* We want to access coverageZ[0] freely. */
2032  if (!c->check_array (coverageZ.arrayZ, count)) return_trace (false);
2033  for (unsigned int i = 0; i < count; i++)
2034  if (!coverageZ[i].sanitize (c, this)) return_trace (false);
2035  const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
2036  return_trace (c->check_array (lookupRecord, lookupCount));
2037  }
2038 
2039  protected:
2040  HBUINT16 format; /* Format identifier--format = 3 */
2041  HBUINT16 glyphCount; /* Number of glyphs in the input glyph
2042  * sequence */
2043  HBUINT16 lookupCount; /* Number of LookupRecords */
2045  coverageZ; /* Array of offsets to Coverage
2046  * table in glyph sequence order */
2047 /*UnsizedArrayOf<LookupRecord>
2048  lookupRecordX;*/ /* Array of LookupRecords--in
2049  * design order */
2050  public:
2052 };
2053 
2054 struct Context
2055 {
2056  template <typename context_t, typename ...Ts>
2057  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
2058  {
2059  TRACE_DISPATCH (this, u.format);
2060  if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
2061  switch (u.format) {
2062  case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
2063  case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
2064  case 3: return_trace (c->dispatch (u.format3, hb_forward<Ts> (ds)...));
2065  default:return_trace (c->default_return_value ());
2066  }
2067  }
2068 
2069  protected:
2070  union {
2071  HBUINT16 format; /* Format identifier */
2075  } u;
2076 };
2077 
2078 
2079 /* Chaining Contextual lookups */
2080 
2081 struct ChainContextClosureLookupContext
2082 {
2083  ContextClosureFuncs funcs;
2084  const void *intersects_data[3];
2085 };
2086 
2087 struct ChainContextCollectGlyphsLookupContext
2088 {
2089  ContextCollectGlyphsFuncs funcs;
2090  const void *collect_data[3];
2091 };
2092 
2093 struct ChainContextApplyLookupContext
2094 {
2095  ContextApplyFuncs funcs;
2096  const void *match_data[3];
2097 };
2098 
2099 static inline bool chain_context_intersects (const hb_set_t *glyphs,
2100  unsigned int backtrackCount,
2101  const HBUINT16 backtrack[],
2102  unsigned int inputCount, /* Including the first glyph (not matched) */
2103  const HBUINT16 input[], /* Array of input values--start with second glyph */
2104  unsigned int lookaheadCount,
2105  const HBUINT16 lookahead[],
2106  ChainContextClosureLookupContext &lookup_context)
2107 {
2108  return array_is_subset_of (glyphs,
2109  backtrackCount, backtrack,
2110  lookup_context.funcs.intersects, lookup_context.intersects_data[0])
2112  inputCount ? inputCount - 1 : 0, input,
2113  lookup_context.funcs.intersects, lookup_context.intersects_data[1])
2115  lookaheadCount, lookahead,
2116  lookup_context.funcs.intersects, lookup_context.intersects_data[2]);
2117 }
2118 
2120  unsigned int backtrackCount,
2121  const HBUINT16 backtrack[],
2122  unsigned int inputCount, /* Including the first glyph (not matched) */
2123  const HBUINT16 input[], /* Array of input values--start with second glyph */
2124  unsigned int lookaheadCount,
2125  const HBUINT16 lookahead[],
2126  unsigned int lookupCount,
2127  const LookupRecord lookupRecord[],
2128  ChainContextClosureLookupContext &lookup_context)
2129 {
2130  if (chain_context_intersects (c->glyphs,
2131  backtrackCount, backtrack,
2132  inputCount, input,
2133  lookaheadCount, lookahead,
2134  lookup_context))
2135  recurse_lookups (c,
2136  lookupCount, lookupRecord);
2137 }
2138 
2140  unsigned int backtrackCount,
2141  const HBUINT16 backtrack[],
2142  unsigned int inputCount, /* Including the first glyph (not matched) */
2143  const HBUINT16 input[], /* Array of input values--start with second glyph */
2144  unsigned int lookaheadCount,
2145  const HBUINT16 lookahead[],
2146  unsigned int lookupCount,
2147  const LookupRecord lookupRecord[],
2149 {
2150  collect_array (c, c->before,
2151  backtrackCount, backtrack,
2152  lookup_context.funcs.collect, lookup_context.collect_data[0]);
2153  collect_array (c, c->input,
2154  inputCount ? inputCount - 1 : 0, input,
2155  lookup_context.funcs.collect, lookup_context.collect_data[1]);
2156  collect_array (c, c->after,
2157  lookaheadCount, lookahead,
2158  lookup_context.funcs.collect, lookup_context.collect_data[2]);
2159  recurse_lookups (c,
2160  lookupCount, lookupRecord);
2161 }
2162 
2164  unsigned int backtrackCount,
2165  const HBUINT16 backtrack[] HB_UNUSED,
2166  unsigned int inputCount, /* Including the first glyph (not matched) */
2167  const HBUINT16 input[], /* Array of input values--start with second glyph */
2168  unsigned int lookaheadCount,
2169  const HBUINT16 lookahead[] HB_UNUSED,
2170  unsigned int lookupCount HB_UNUSED,
2171  const LookupRecord lookupRecord[] HB_UNUSED,
2172  ChainContextApplyLookupContext &lookup_context)
2173 {
2174  return (c->zero_context ? !backtrackCount && !lookaheadCount : true)
2175  && would_match_input (c,
2176  inputCount, input,
2177  lookup_context.funcs.match, lookup_context.match_data[1]);
2178 }
2179 
2181  unsigned int backtrackCount,
2182  const HBUINT16 backtrack[],
2183  unsigned int inputCount, /* Including the first glyph (not matched) */
2184  const HBUINT16 input[], /* Array of input values--start with second glyph */
2185  unsigned int lookaheadCount,
2186  const HBUINT16 lookahead[],
2187  unsigned int lookupCount,
2188  const LookupRecord lookupRecord[],
2189  ChainContextApplyLookupContext &lookup_context)
2190 {
2191  unsigned int start_index = 0, match_length = 0, end_index = 0;
2192  unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
2193  return match_input (c,
2194  inputCount, input,
2195  lookup_context.funcs.match, lookup_context.match_data[1],
2196  &match_length, match_positions)
2197  && match_backtrack (c,
2198  backtrackCount, backtrack,
2199  lookup_context.funcs.match, lookup_context.match_data[0],
2200  &start_index)
2201  && match_lookahead (c,
2202  lookaheadCount, lookahead,
2203  lookup_context.funcs.match, lookup_context.match_data[2],
2204  match_length, &end_index)
2205  && (c->buffer->unsafe_to_break_from_outbuffer (start_index, end_index),
2206  apply_lookup (c,
2207  inputCount, match_positions,
2208  lookupCount, lookupRecord,
2209  match_length));
2210 }
2211 
2212 struct ChainRule
2213 {
2214  bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
2215  {
2216  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2217  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2220  input.lenP1, input.arrayZ,
2221  lookahead.len, lookahead.arrayZ,
2222  lookup_context);
2223  }
2224 
2226  ChainContextClosureLookupContext &lookup_context) const
2227  {
2228  if (unlikely (c->lookup_limit_exceeded ())) return;
2229 
2230  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2231  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2232  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2235  input.lenP1, input.arrayZ,
2236  lookahead.len, lookahead.arrayZ,
2237  lookup.len, lookup.arrayZ,
2238  lookup_context);
2239  }
2240 
2242  {
2243  if (unlikely (c->lookup_limit_exceeded ())) return;
2244 
2245  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2246  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2247  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2248  recurse_lookups (c, lookup.len, lookup.arrayZ);
2249  }
2250 
2252  ChainContextCollectGlyphsLookupContext &lookup_context) const
2253  {
2254  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2255  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2256  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2259  input.lenP1, input.arrayZ,
2260  lookahead.len, lookahead.arrayZ,
2261  lookup.len, lookup.arrayZ,
2262  lookup_context);
2263  }
2264 
2266  ChainContextApplyLookupContext &lookup_context) const
2267  {
2268  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2269  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2270  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2273  input.lenP1, input.arrayZ,
2274  lookahead.len, lookahead.arrayZ, lookup.len,
2275  lookup.arrayZ, lookup_context);
2276  }
2277 
2279  {
2280  TRACE_APPLY (this);
2281  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2282  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2283  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2286  input.lenP1, input.arrayZ,
2287  lookahead.len, lookahead.arrayZ, lookup.len,
2288  lookup.arrayZ, lookup_context));
2289  }
2290 
2291  template<typename Iterator,
2292  hb_requires (hb_is_iterator (Iterator))>
2294  HBUINT16 len,
2295  Iterator it) const
2296  {
2297  c->copy (len);
2298  for (const auto g : it)
2299  {
2300  HBUINT16 gid;
2301  gid = g;
2302  c->copy (gid);
2303  }
2304  }
2305 
2307  const hb_map_t *lookup_map,
2308  const hb_map_t *backtrack_map,
2309  const hb_map_t *input_map = nullptr,
2310  const hb_map_t *lookahead_map = nullptr) const
2311  {
2312  TRACE_SERIALIZE (this);
2313  auto *out = c->start_embed (this);
2314  if (unlikely (!out)) return_trace (nullptr);
2315 
2316  const hb_map_t *mapping = backtrack_map;
2318  | hb_map (mapping));
2319 
2320  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2321  if (input_map) mapping = input_map;
2322  serialize_array (c, input.lenP1, + input.iter ()
2323  | hb_map (mapping));
2324 
2325  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2326  if (lookahead_map) mapping = lookahead_map;
2327  serialize_array (c, lookahead.len, + lookahead.iter ()
2328  | hb_map (mapping));
2329 
2330  const ArrayOf<LookupRecord> &lookupRecord = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2331  HBUINT16 lookupCount;
2332  lookupCount = lookupRecord.len;
2333  if (!c->copy (lookupCount)) return_trace (nullptr);
2334 
2335  for (unsigned i = 0; i < (unsigned) lookupCount; i++)
2336  if (!c->copy (lookupRecord[i], lookup_map)) return_trace (nullptr);
2337 
2338  return_trace (out);
2339  }
2340 
2342  const hb_map_t *lookup_map,
2343  const hb_map_t *backtrack_map = nullptr,
2344  const hb_map_t *input_map = nullptr,
2345  const hb_map_t *lookahead_map = nullptr) const
2346  {
2347  TRACE_SUBSET (this);
2348 
2349  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2350  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2351 
2352  if (!backtrack_map)
2353  {
2354  const hb_set_t &glyphset = *c->plan->glyphset ();
2355  if (!hb_all (backtrack, glyphset) ||
2356  !hb_all (input, glyphset) ||
2357  !hb_all (lookahead, glyphset))
2358  return_trace (false);
2359 
2360  copy (c->serializer, lookup_map, c->plan->glyph_map);
2361  }
2362  else
2363  {
2364  if (!hb_all (backtrack, backtrack_map) ||
2365  !hb_all (input, input_map) ||
2366  !hb_all (lookahead, lookahead_map))
2367  return_trace (false);
2368 
2369  copy (c->serializer, lookup_map, backtrack_map, input_map, lookahead_map);
2370  }
2371 
2372  return_trace (true);
2373  }
2374 
2376  {
2377  TRACE_SANITIZE (this);
2378  if (!backtrack.sanitize (c)) return_trace (false);
2379  const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
2380  if (!input.sanitize (c)) return_trace (false);
2381  const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
2382  if (!lookahead.sanitize (c)) return_trace (false);
2383  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2384  return_trace (lookup.sanitize (c));
2385  }
2386 
2387  protected:
2389  backtrack; /* Array of backtracking values
2390  * (to be matched before the input
2391  * sequence) */
2393  inputX; /* Array of input values (start with
2394  * second glyph) */
2396  lookaheadX; /* Array of lookahead values's (to be
2397  * matched after the input sequence) */
2399  lookupX; /* Array of LookupRecords--in
2400  * design order) */
2401  public:
2403 };
2404 
2405 struct ChainRuleSet
2406 {
2407  bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
2408  {
2409  return
2410  + hb_iter (rule)
2411  | hb_map (hb_add (this))
2412  | hb_map ([&] (const ChainRule &_) { return _.intersects (glyphs, lookup_context); })
2413  | hb_any
2414  ;
2415  }
2417  {
2418  if (unlikely (c->lookup_limit_exceeded ())) return;
2419 
2420  return
2421  + hb_iter (rule)
2422  | hb_map (hb_add (this))
2423  | hb_apply ([&] (const ChainRule &_) { _.closure (c, lookup_context); })
2424  ;
2425  }
2426 
2428  {
2429  if (unlikely (c->lookup_limit_exceeded ())) return;
2430 
2431  return
2432  + hb_iter (rule)
2433  | hb_map (hb_add (this))
2434  | hb_apply ([&] (const ChainRule &_) { _.closure_lookups (c); })
2435  ;
2436  }
2437 
2439  {
2440  return
2441  + hb_iter (rule)
2442  | hb_map (hb_add (this))
2443  | hb_apply ([&] (const ChainRule &_) { _.collect_glyphs (c, lookup_context); })
2444  ;
2445  }
2446 
2448  {
2449  return
2450  + hb_iter (rule)
2451  | hb_map (hb_add (this))
2452  | hb_map ([&] (const ChainRule &_) { return _.would_apply (c, lookup_context); })
2453  | hb_any
2454  ;
2455  }
2456 
2458  {
2459  TRACE_APPLY (this);
2460  return_trace (
2461  + hb_iter (rule)
2462  | hb_map (hb_add (this))
2463  | hb_map ([&] (const ChainRule &_) { return _.apply (c, lookup_context); })
2464  | hb_any
2465  )
2466  ;
2467  }
2468 
2470  const hb_map_t *lookup_map,
2471  const hb_map_t *backtrack_klass_map = nullptr,
2472  const hb_map_t *input_klass_map = nullptr,
2473  const hb_map_t *lookahead_klass_map = nullptr) const
2474  {
2475  TRACE_SUBSET (this);
2476 
2477  auto snap = c->serializer->snapshot ();
2478  auto *out = c->serializer->start_embed (*this);
2479  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2480 
2481  for (const OffsetTo<ChainRule>& _ : rule)
2482  {
2483  if (!_) continue;
2484  auto *o = out->rule.serialize_append (c->serializer);
2485  if (unlikely (!o)) continue;
2486 
2487  auto o_snap = c->serializer->snapshot ();
2488  if (!o->serialize_subset (c, _, this,
2489  lookup_map,
2490  backtrack_klass_map,
2491  input_klass_map,
2492  lookahead_klass_map))
2493  {
2494  out->rule.pop ();
2495  c->serializer->revert (o_snap);
2496  }
2497  }
2498 
2499  bool ret = bool (out->rule);
2500  if (!ret) c->serializer->revert (snap);
2501 
2502  return_trace (ret);
2503  }
2504 
2506  {
2507  TRACE_SANITIZE (this);
2508  return_trace (rule.sanitize (c, this));
2509  }
2510 
2511  protected:
2513  rule; /* Array of ChainRule tables
2514  * ordered by preference */
2515  public:
2517 };
2518 
2519 struct ChainContextFormat1
2520 {
2521  bool intersects (const hb_set_t *glyphs) const
2522  {
2523  struct ChainContextClosureLookupContext lookup_context = {
2524  {intersects_glyph},
2525  {nullptr, nullptr, nullptr}
2526  };
2527 
2528  return
2529  + hb_zip (this+coverage, ruleSet)
2530  | hb_filter (*glyphs, hb_first)
2531  | hb_map (hb_second)
2532  | hb_map (hb_add (this))
2533  | hb_map ([&] (const ChainRuleSet &_) { return _.intersects (glyphs, lookup_context); })
2534  | hb_any
2535  ;
2536  }
2537 
2539  {
2540  struct ChainContextClosureLookupContext lookup_context = {
2541  {intersects_glyph},
2542  {nullptr, nullptr, nullptr}
2543  };
2544 
2545  + hb_zip (this+coverage, ruleSet)
2546  | hb_filter (*c->glyphs, hb_first)
2547  | hb_map (hb_second)
2548  | hb_map (hb_add (this))
2549  | hb_apply ([&] (const ChainRuleSet &_) { _.closure (c, lookup_context); })
2550  ;
2551  }
2552 
2554  {
2555  + hb_iter (ruleSet)
2556  | hb_map (hb_add (this))
2557  | hb_apply ([&] (const ChainRuleSet &_) { _.closure_lookups (c); })
2558  ;
2559  }
2560 
2562 
2564  {
2565  (this+coverage).collect_coverage (c->input);
2566 
2567  struct ChainContextCollectGlyphsLookupContext lookup_context = {
2568  {collect_glyph},
2569  {nullptr, nullptr, nullptr}
2570  };
2571 
2572  + hb_iter (ruleSet)
2573  | hb_map (hb_add (this))
2574  | hb_apply ([&] (const ChainRuleSet &_) { _.collect_glyphs (c, lookup_context); })
2575  ;
2576  }
2577 
2579  {
2580  const ChainRuleSet &rule_set = this+ruleSet[(this+coverage).get_coverage (c->glyphs[0])];
2581  struct ChainContextApplyLookupContext lookup_context = {
2582  {match_glyph},
2583  {nullptr, nullptr, nullptr}
2584  };
2585  return rule_set.would_apply (c, lookup_context);
2586  }
2587 
2588  const Coverage &get_coverage () const { return this+coverage; }
2589 
2591  {
2592  TRACE_APPLY (this);
2593  unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
2594  if (likely (index == NOT_COVERED)) return_trace (false);
2595 
2596  const ChainRuleSet &rule_set = this+ruleSet[index];
2597  struct ChainContextApplyLookupContext lookup_context = {
2598  {match_glyph},
2599  {nullptr, nullptr, nullptr}
2600  };
2601  return_trace (rule_set.apply (c, lookup_context));
2602  }
2603 
2605  {
2606  TRACE_SUBSET (this);
2607  const hb_set_t &glyphset = *c->plan->glyphset ();
2608  const hb_map_t &glyph_map = *c->plan->glyph_map;
2609 
2610  auto *out = c->serializer->start_embed (*this);
2611  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2612  out->format = format;
2613 
2614  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
2616  + hb_zip (this+coverage, ruleSet)
2617  | hb_filter (glyphset, hb_first)
2618  | hb_filter (subset_offset_array (c, out->ruleSet, this, lookup_map), hb_second)
2619  | hb_map (hb_first)
2620  | hb_map (glyph_map)
2621  | hb_sink (new_coverage)
2622  ;
2623 
2624  out->coverage.serialize (c->serializer, out)
2625  .serialize (c->serializer, new_coverage.iter ());
2626  return_trace (bool (new_coverage));
2627  }
2628 
2630  {
2631  TRACE_SANITIZE (this);
2632  return_trace (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
2633  }
2634 
2635  protected:
2636  HBUINT16 format; /* Format identifier--format = 1 */
2638  coverage; /* Offset to Coverage table--from
2639  * beginning of table */
2641  ruleSet; /* Array of ChainRuleSet tables
2642  * ordered by Coverage Index */
2643  public:
2645 };
2646 
2647 struct ChainContextFormat2
2648 {
2649  bool intersects (const hb_set_t *glyphs) const
2650  {
2651  if (!(this+coverage).intersects (glyphs))
2652  return false;
2653 
2654  const ClassDef &backtrack_class_def = this+backtrackClassDef;
2655  const ClassDef &input_class_def = this+inputClassDef;
2656  const ClassDef &lookahead_class_def = this+lookaheadClassDef;
2657 
2658  struct ChainContextClosureLookupContext lookup_context = {
2659  {intersects_class},
2660  {&backtrack_class_def,
2661  &input_class_def,
2662  &lookahead_class_def}
2663  };
2664 
2665  return
2666  + hb_iter (ruleSet)
2667  | hb_map (hb_add (this))
2668  | hb_enumerate
2670  { return input_class_def.intersects_class (glyphs, p.first) &&
2671  p.second.intersects (glyphs, lookup_context); })
2672  | hb_any
2673  ;
2674  }
2676  {
2677  if (!(this+coverage).intersects (c->glyphs))
2678  return;
2679 
2680  const ClassDef &backtrack_class_def = this+backtrackClassDef;
2681  const ClassDef &input_class_def = this+inputClassDef;
2682  const ClassDef &lookahead_class_def = this+lookaheadClassDef;
2683 
2684  struct ChainContextClosureLookupContext lookup_context = {
2685  {intersects_class},
2686  {&backtrack_class_def,
2687  &input_class_def,
2688  &lookahead_class_def}
2689  };
2690 
2691  return
2692  + hb_enumerate (ruleSet)
2693  | hb_filter ([&] (unsigned _)
2694  { return input_class_def.intersects_class (c->glyphs, _); },
2695  hb_first)
2696  | hb_map (hb_second)
2697  | hb_map (hb_add (this))
2698  | hb_apply ([&] (const ChainRuleSet &_) { _.closure (c, lookup_context); })
2699  ;
2700  }
2701 
2703  {
2704  + hb_iter (ruleSet)
2705  | hb_map (hb_add (this))
2706  | hb_apply ([&] (const ChainRuleSet &_) { _.closure_lookups (c); })
2707  ;
2708  }
2709 
2711 
2713  {
2714  (this+coverage).collect_coverage (c->input);
2715 
2716  const ClassDef &backtrack_class_def = this+backtrackClassDef;
2717  const ClassDef &input_class_def = this+inputClassDef;
2718  const ClassDef &lookahead_class_def = this+lookaheadClassDef;
2719 
2720  struct ChainContextCollectGlyphsLookupContext lookup_context = {
2721  {collect_class},
2722  {&backtrack_class_def,
2723  &input_class_def,
2724  &lookahead_class_def}
2725  };
2726 
2727  + hb_iter (ruleSet)
2728  | hb_map (hb_add (this))
2729  | hb_apply ([&] (const ChainRuleSet &_) { _.collect_glyphs (c, lookup_context); })
2730  ;
2731  }
2732 
2734  {
2735  const ClassDef &backtrack_class_def = this+backtrackClassDef;
2736  const ClassDef &input_class_def = this+inputClassDef;
2737  const ClassDef &lookahead_class_def = this+lookaheadClassDef;
2738 
2739  unsigned int index = input_class_def.get_class (c->glyphs[0]);
2740  const ChainRuleSet &rule_set = this+ruleSet[index];
2741  struct ChainContextApplyLookupContext lookup_context = {
2742  {match_class},
2743  {&backtrack_class_def,
2744  &input_class_def,
2745  &lookahead_class_def}
2746  };
2747  return rule_set.would_apply (c, lookup_context);
2748  }
2749 
2750  const Coverage &get_coverage () const { return this+coverage; }
2751 
2753  {
2754  TRACE_APPLY (this);
2755  unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
2756  if (likely (index == NOT_COVERED)) return_trace (false);
2757 
2758  const ClassDef &backtrack_class_def = this+backtrackClassDef;
2759  const ClassDef &input_class_def = this+inputClassDef;
2760  const ClassDef &lookahead_class_def = this+lookaheadClassDef;
2761 
2762  index = input_class_def.get_class (c->buffer->cur().codepoint);
2763  const ChainRuleSet &rule_set = this+ruleSet[index];
2764  struct ChainContextApplyLookupContext lookup_context = {
2765  {match_class},
2766  {&backtrack_class_def,
2767  &input_class_def,
2768  &lookahead_class_def}
2769  };
2770  return_trace (rule_set.apply (c, lookup_context));
2771  }
2772 
2774  {
2775  TRACE_SUBSET (this);
2776  auto *out = c->serializer->start_embed (*this);
2777  if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
2778  out->format = format;
2779  out->coverage.serialize_subset (c, coverage, this);
2780 
2781  hb_map_t backtrack_klass_map;
2782  out->backtrackClassDef.serialize_subset (c, backtrackClassDef, this, &backtrack_klass_map);
2783  if (unlikely (!c->serializer->check_success (!backtrack_klass_map.in_error ())))
2784  return_trace (false);
2785 
2786  // subset inputClassDef based on glyphs survived in Coverage subsetting
2787  hb_map_t input_klass_map;
2788  out->inputClassDef.serialize_subset (c, inputClassDef, this, &input_klass_map);
2789  if (unlikely (!c->serializer->check_success (!input_klass_map.in_error ())))
2790  return_trace (false);
2791 
2792  hb_map_t lookahead_klass_map;
2793  out->lookaheadClassDef.serialize_subset (c, lookaheadClassDef, this, &lookahead_klass_map);
2794  if (unlikely (!c->serializer->check_success (!lookahead_klass_map.in_error ())))
2795  return_trace (false);
2796 
2797  unsigned non_zero_index = 0, index = 0;
2798  bool ret = true;
2799  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
2800  for (const OffsetTo<ChainRuleSet>& _ : + hb_enumerate (ruleSet)
2801  | hb_filter (input_klass_map, hb_first)
2802  | hb_map (hb_second))
2803  {
2804  auto *o = out->ruleSet.serialize_append (c->serializer);
2805  if (unlikely (!o))
2806  {
2807  ret = false;
2808  break;
2809  }
2810  if (o->serialize_subset (c, _, this,
2811  lookup_map,
2812  &backtrack_klass_map,
2813  &input_klass_map,
2814  &lookahead_klass_map))
2815  non_zero_index = index;
2816 
2817  index++;
2818  }
2819 
2820  if (!ret) return_trace (ret);
2821 
2822  //prune empty trailing ruleSets
2823  --index;
2824  while (index > non_zero_index)
2825  {
2826  out->ruleSet.pop ();
2827  index--;
2828  }
2829 
2830  return_trace (bool (out->ruleSet));
2831  }
2832 
2834  {
2835  TRACE_SANITIZE (this);
2836  return_trace (coverage.sanitize (c, this) &&
2837  backtrackClassDef.sanitize (c, this) &&
2838  inputClassDef.sanitize (c, this) &&
2839  lookaheadClassDef.sanitize (c, this) &&
2840  ruleSet.sanitize (c, this));
2841  }
2842 
2843  protected:
2844  HBUINT16 format; /* Format identifier--format = 2 */
2846  coverage; /* Offset to Coverage table--from
2847  * beginning of table */
2849  backtrackClassDef; /* Offset to glyph ClassDef table
2850  * containing backtrack sequence
2851  * data--from beginning of table */
2853  inputClassDef; /* Offset to glyph ClassDef
2854  * table containing input sequence
2855  * data--from beginning of table */
2857  lookaheadClassDef; /* Offset to glyph ClassDef table
2858  * containing lookahead sequence
2859  * data--from beginning of table */
2861  ruleSet; /* Array of ChainRuleSet tables
2862  * ordered by class */
2863  public:
2865 };
2866 
2867 struct ChainContextFormat3
2868 {
2869  bool intersects (const hb_set_t *glyphs) const
2870  {
2871  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2872 
2873  if (!(this+input[0]).intersects (glyphs))
2874  return false;
2875 
2876  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2877  struct ChainContextClosureLookupContext lookup_context = {
2879  {this, this, this}
2880  };
2882  backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
2883  input.len, (const HBUINT16 *) input.arrayZ + 1,
2884  lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
2885  lookup_context);
2886  }
2887 
2889  {
2890  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2891 
2892  if (!(this+input[0]).intersects (c->glyphs))
2893  return;
2894 
2895  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2896  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2897  struct ChainContextClosureLookupContext lookup_context = {
2899  {this, this, this}
2900  };
2902  backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
2903  input.len, (const HBUINT16 *) input.arrayZ + 1,
2904  lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
2905  lookup.len, lookup.arrayZ,
2906  lookup_context);
2907  }
2908 
2910  {
2911  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2912  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2913  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2914  recurse_lookups (c, lookup.len, lookup.arrayZ);
2915  }
2916 
2918 
2920  {
2921  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2922 
2923  (this+input[0]).collect_coverage (c->input);
2924 
2925  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2926  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2927  struct ChainContextCollectGlyphsLookupContext lookup_context = {
2928  {collect_coverage},
2929  {this, this, this}
2930  };
2932  backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
2933  input.len, (const HBUINT16 *) input.arrayZ + 1,
2934  lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
2935  lookup.len, lookup.arrayZ,
2936  lookup_context);
2937  }
2938 
2940  {
2941  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2942  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2943  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2944  struct ChainContextApplyLookupContext lookup_context = {
2945  {match_coverage},
2946  {this, this, this}
2947  };
2949  backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
2950  input.len, (const HBUINT16 *) input.arrayZ + 1,
2951  lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
2952  lookup.len, lookup.arrayZ, lookup_context);
2953  }
2954 
2955  const Coverage &get_coverage () const
2956  {
2957  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2958  return this+input[0];
2959  }
2960 
2962  {
2963  TRACE_APPLY (this);
2964  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
2965 
2966  unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
2967  if (likely (index == NOT_COVERED)) return_trace (false);
2968 
2969  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
2970  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
2971  struct ChainContextApplyLookupContext lookup_context = {
2972  {match_coverage},
2973  {this, this, this}
2974  };
2976  backtrack.len, (const HBUINT16 *) backtrack.arrayZ,
2977  input.len, (const HBUINT16 *) input.arrayZ + 1,
2978  lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
2979  lookup.len, lookup.arrayZ, lookup_context));
2980  }
2981 
2982  template<typename Iterator,
2983  hb_requires (hb_is_iterator (Iterator))>
2984  bool serialize_coverage_offsets (hb_subset_context_t *c, Iterator it, const void* base) const
2985  {
2986  TRACE_SERIALIZE (this);
2987  auto *out = c->serializer->start_embed<OffsetArrayOf<Coverage>> ();
2988 
2989  if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size))) return_trace (false);
2990 
2991  + it
2993  ;
2994 
2995  return_trace (out->len);
2996  }
2997 
2999  {
3000  TRACE_SUBSET (this);
3001 
3002  auto *out = c->serializer->start_embed (this);
3003  if (unlikely (!out)) return_trace (false);
3004  if (unlikely (!c->serializer->embed (this->format))) return_trace (false);
3005 
3006  if (!serialize_coverage_offsets (c, backtrack.iter (), this))
3007  return_trace (false);
3008 
3009  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
3010  if (!serialize_coverage_offsets (c, input.iter (), this))
3011  return_trace (false);
3012 
3013  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
3014  if (!serialize_coverage_offsets (c, lookahead.iter (), this))
3015  return_trace (false);
3016 
3017  const ArrayOf<LookupRecord> &lookupRecord = StructAfter<ArrayOf<LookupRecord>> (lookahead);
3018  HBUINT16 lookupCount;
3019  lookupCount = lookupRecord.len;
3020  if (!c->serializer->copy (lookupCount)) return_trace (false);
3021 
3022  const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
3023  for (unsigned i = 0; i < (unsigned) lookupCount; i++)
3024  if (!c->serializer->copy (lookupRecord[i], lookup_map)) return_trace (false);
3025 
3026  return_trace (true);
3027  }
3028 
3030  {
3031  TRACE_SANITIZE (this);
3032  if (!backtrack.sanitize (c, this)) return_trace (false);
3033  const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
3034  if (!input.sanitize (c, this)) return_trace (false);
3035  if (!input.len) return_trace (false); /* To be consistent with Context. */
3036  const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
3037  if (!lookahead.sanitize (c, this)) return_trace (false);
3038  const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
3039  return_trace (lookup.sanitize (c));
3040  }
3041 
3042  protected:
3043  HBUINT16 format; /* Format identifier--format = 3 */
3045  backtrack; /* Array of coverage tables
3046  * in backtracking sequence, in glyph
3047  * sequence order */
3049  inputX ; /* Array of coverage
3050  * tables in input sequence, in glyph
3051  * sequence order */
3053  lookaheadX; /* Array of coverage tables
3054  * in lookahead sequence, in glyph
3055  * sequence order */
3057  lookupX; /* Array of LookupRecords--in
3058  * design order) */
3059  public:
3061 };
3062 
3063 struct ChainContext
3064 {
3065  template <typename context_t, typename ...Ts>
3066  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
3067  {
3068  TRACE_DISPATCH (this, u.format);
3069  if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
3070  switch (u.format) {
3071  case 1: return_trace (c->dispatch (u.format1, hb_forward<Ts> (ds)...));
3072  case 2: return_trace (c->dispatch (u.format2, hb_forward<Ts> (ds)...));
3073  case 3: return_trace (c->dispatch (u.format3, hb_forward<Ts> (ds)...));
3074  default:return_trace (c->default_return_value ());
3075  }
3076  }
3077 
3078  protected:
3079  union {
3080  HBUINT16 format; /* Format identifier */
3084  } u;
3085 };
3086 
3087 
3088 template <typename T>
3089 struct ExtensionFormat1
3090 {
3091  unsigned int get_type () const { return extensionLookupType; }
3092 
3093  template <typename X>
3094  const X& get_subtable () const
3095  { return this + reinterpret_cast<const LOffsetTo<typename T::SubTable> &> (extensionOffset); }
3096 
3097  template <typename context_t, typename ...Ts>
3098  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
3099  {
3100  TRACE_DISPATCH (this, format);
3101  if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ());
3102  return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type (), hb_forward<Ts> (ds)...));
3103  }
3104 
3106  { dispatch (c); }
3107 
3108  /* This is called from may_dispatch() above with hb_sanitize_context_t. */
3110  {
3111  TRACE_SANITIZE (this);
3112  return_trace (c->check_struct (this) &&
3113  extensionLookupType != T::SubTable::Extension);
3114  }
3115 
3116  protected:
3117  HBUINT16 format; /* Format identifier. Set to 1. */
3118  HBUINT16 extensionLookupType; /* Lookup type of subtable referenced
3119  * by ExtensionOffset (i.e. the
3120  * extension subtable). */
3121  Offset32 extensionOffset; /* Offset to the extension subtable,
3122  * of lookup type subtable. */
3123  public:
3125 };
3126 
3127 template <typename T>
3128 struct Extension
3129 {
3130  unsigned int get_type () const
3131  {
3132  switch (u.format) {
3133  case 1: return u.format1.get_type ();
3134  default:return 0;
3135  }
3136  }
3137  template <typename X>
3138  const X& get_subtable () const
3139  {
3140  switch (u.format) {
3141  case 1: return u.format1.template get_subtable<typename T::SubTable> ();
3142  default:return Null (typename T::SubTable);
3143  }
3144  }
3145 
3146  template <typename context_t, typename ...Ts>
3147  typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
3148  {
3149  TRACE_DISPATCH (this, u.format);
3150  if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
3151  switch (u.format) {
3152  case 1: return_trace (u.format1.dispatch (c, hb_forward<Ts> (ds)...));
3153  default:return_trace (c->default_return_value ());
3154  }
3155  }
3156 
3157  protected:
3158  union {
3159  HBUINT16 format; /* Format identifier */
3161  } u;
3162 };
3163 
3164 
3165 /*
3166  * GSUB/GPOS Common
3167  */
3168 
3169 struct hb_ot_layout_lookup_accelerator_t
3170 {
3171  template <typename TLookup>
3172  void init (const TLookup &lookup)
3173  {
3174  digest.init ();
3175  lookup.collect_coverage (&digest);
3176 
3177  subtables.init ();
3178  OT::hb_get_subtables_context_t c_get_subtables (subtables);
3179  lookup.dispatch (&c_get_subtables);
3180  }
3181  void fini () { subtables.fini (); }
3182 
3184  { return digest.may_have (g); }
3185 
3187  {
3188  for (unsigned int i = 0; i < subtables.length; i++)
3189  if (subtables[i].apply (c))
3190  return true;
3191  return false;
3192  }
3193 
3194  private:
3197 };
3198 
3199 struct GSUBGPOS
3200 {
3201  bool has_data () const { return version.to_int (); }
3202  unsigned int get_script_count () const
3203  { return (this+scriptList).len; }
3204  const Tag& get_script_tag (unsigned int i) const
3205  { return (this+scriptList).get_tag (i); }
3206  unsigned int get_script_tags (unsigned int start_offset,
3207  unsigned int *script_count /* IN/OUT */,
3208  hb_tag_t *script_tags /* OUT */) const
3209  { return (this+scriptList).get_tags (start_offset, script_count, script_tags); }
3210  const Script& get_script (unsigned int i) const
3211  { return (this+scriptList)[i]; }
3212  bool find_script_index (hb_tag_t tag, unsigned int *index) const
3213  { return (this+scriptList).find_index (tag, index); }
3214 
3215  unsigned int get_feature_count () const
3216  { return (this+featureList).len; }
3217  hb_tag_t get_feature_tag (unsigned int i) const
3218  { return i == Index::NOT_FOUND_INDEX ? HB_TAG_NONE : (this+featureList).get_tag (i); }
3219  unsigned int get_feature_tags (unsigned int start_offset,
3220  unsigned int *feature_count /* IN/OUT */,
3221  hb_tag_t *feature_tags /* OUT */) const
3222  { return (this+featureList).get_tags (start_offset, feature_count, feature_tags); }
3223  const Feature& get_feature (unsigned int i) const
3224  { return (this+featureList)[i]; }
3225  bool find_feature_index (hb_tag_t tag, unsigned int *index) const
3226  { return (this+featureList).find_index (tag, index); }
3227 
3228  unsigned int get_lookup_count () const
3229  { return (this+lookupList).len; }
3230  const Lookup& get_lookup (unsigned int i) const
3231  { return (this+lookupList)[i]; }
3232 
3233  bool find_variations_index (const int *coords, unsigned int num_coords,
3234  unsigned int *index) const
3235  {
3236 #ifdef HB_NO_VAR
3238  return false;
3239 #endif
3240  return (version.to_int () >= 0x00010001u ? this+featureVars : Null (FeatureVariations))
3241  .find_index (coords, num_coords, index);
3242  }
3244  unsigned int variations_index) const
3245  {
3246 #ifndef HB_NO_VAR
3247  if (FeatureVariations::NOT_FOUND_INDEX != variations_index &&
3248  version.to_int () >= 0x00010001u)
3249  {
3250  const Feature *feature = (this+featureVars).find_substitute (variations_index,
3251  feature_index);
3252  if (feature)
3253  return *feature;
3254  }
3255 #endif
3256  return get_feature (feature_index);
3257  }
3258 
3259  void feature_variation_collect_lookups (const hb_set_t *feature_indexes,
3260  hb_set_t *lookup_indexes /* OUT */) const
3261  {
3262 #ifndef HB_NO_VAR
3263  if (version.to_int () >= 0x00010001u)
3264  (this+featureVars).collect_lookups (feature_indexes, lookup_indexes);
3265 #endif
3266  }
3267 
3268  template <typename TLookup>
3270  const hb_set_t *glyphs,
3271  hb_set_t *lookup_indexes /* IN/OUT */) const
3272  {
3273  hb_set_t visited_lookups, inactive_lookups;
3274  OT::hb_closure_lookups_context_t c (face, glyphs, &visited_lookups, &inactive_lookups);
3275 
3276  for (unsigned lookup_index : + hb_iter (lookup_indexes))
3277  reinterpret_cast<const TLookup &> (get_lookup (lookup_index)).closure_lookups (&c, lookup_index);
3278 
3279  hb_set_union (lookup_indexes, &visited_lookups);
3280  hb_set_subtract (lookup_indexes, &inactive_lookups);
3281  }
3282 
3283  template <typename TLookup>
3285  {
3286  TRACE_SUBSET (this);
3287  auto *out = c->subset_context->serializer->embed (*this);
3288  if (unlikely (!out)) return_trace (false);
3289 
3290  typedef LookupOffsetList<TLookup> TLookupList;
3291  reinterpret_cast<OffsetTo<TLookupList> &> (out->lookupList)
3292  .serialize_subset (c->subset_context,
3293  reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList),
3294  this,
3295  c);
3296 
3297  reinterpret_cast<OffsetTo<RecordListOfFeature> &> (out->featureList)
3298  .serialize_subset (c->subset_context,
3299  reinterpret_cast<const OffsetTo<RecordListOfFeature> &> (featureList),
3300  this,
3301  c);
3302 
3303  out->scriptList.serialize_subset (c->subset_context,
3304  scriptList,
3305  this,
3306  c);
3307 
3308 #ifndef HB_NO_VAR
3309  if (version.to_int () >= 0x00010001u)
3310  {
3311  bool ret = out->featureVars.serialize_subset (c->subset_context, featureVars, this, c);
3312  if (!ret)
3313  {
3314  out->version.major = 1;
3315  out->version.minor = 0;
3316  }
3317  }
3318 #endif
3319 
3320  return_trace (true);
3321  }
3322 
3323  void closure_features (const hb_map_t *lookup_indexes, /* IN */
3324  hb_set_t *feature_indexes /* OUT */) const
3325  {
3326  unsigned int feature_count = hb_min (get_feature_count (), (unsigned) HB_MAX_FEATURES);
3327  for (unsigned i = 0; i < feature_count; i++)
3328  {
3329  const Feature& f = get_feature (i);
3330  if ((!f.featureParams.is_null ()) || f.intersects_lookup_indexes (lookup_indexes))
3331  feature_indexes->add (i);
3332  }
3333 #ifndef HB_NO_VAR
3334  if (version.to_int () >= 0x00010001u)
3335  (this+featureVars).closure_features (lookup_indexes, feature_indexes);
3336 #endif
3337  }
3338 
3339  unsigned int get_size () const
3340  {
3341  return min_size +
3342  (version.to_int () >= 0x00010001u ? featureVars.static_size : 0);
3343  }
3344 
3345  template <typename TLookup>
3347  {
3348  TRACE_SANITIZE (this);
3349  typedef OffsetListOf<TLookup> TLookupList;
3350  if (unlikely (!(version.sanitize (c) &&
3351  likely (version.major == 1) &&
3352  scriptList.sanitize (c, this) &&
3353  featureList.sanitize (c, this) &&
3354  reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList).sanitize (c, this))))
3355  return_trace (false);
3356 
3357 #ifndef HB_NO_VAR
3358  if (unlikely (!(version.to_int () < 0x00010001u || featureVars.sanitize (c, this))))
3359  return_trace (false);
3360 #endif
3361 
3362  return_trace (true);
3363  }
3364 
3365  template <typename T>
3366  struct accelerator_t
3367  {
3369  {
3371  if (unlikely (this->table->is_blocklisted (this->table.get_blob (), face)))
3372  {
3373  hb_blob_destroy (this->table.get_blob ());
3374  this->table = hb_blob_get_empty ();
3375  }
3376 
3377  this->lookup_count = table->get_lookup_count ();
3378 
3380  if (unlikely (!this->accels))
3381  {
3382  this->lookup_count = 0;
3383  this->table.destroy ();
3384  this->table = hb_blob_get_empty ();
3385  }
3386 
3387  for (unsigned int i = 0; i < this->lookup_count; i++)
3388  this->accels[i].init (table->get_lookup (i));
3389  }
3390 
3391  void fini ()
3392  {
3393  for (unsigned int i = 0; i < this->lookup_count; i++)
3394  this->accels[i].fini ();
3395  free (this->accels);
3396  this->table.destroy ();
3397  }
3398 
3400  unsigned int lookup_count;
3402  };
3403 
3404  protected:
3405  FixedVersion<>version; /* Version of the GSUB/GPOS table--initially set
3406  * to 0x00010000u */
3408  scriptList; /* ScriptList table */
3410  featureList; /* FeatureList table */
3412  lookupList; /* LookupList table */
3414  featureVars; /* Offset to Feature Variations
3415  table--from beginning of table
3416  * (may be NULL). Introduced
3417  * in version 0x00010001. */
3418  public:
3420 };
3421 
3422 
3423 } /* namespace OT */
3424 
3425 
3426 #endif /* HB_OT_LAYOUT_GSUBGPOS_HH */
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
static double snap(double x)
#define match
Definition: aptex-macros.h:359
#define count(a)
Definition: aptex-macros.h:781
#define next(a)
Definition: aptex-macros.h:924
#define define(p, t, e)
#define bool
Definition: autosp.c:101
Definition: rule.hpp:20
feature
Definition: control.c:37
#define free(a)
Definition: decNumber.cpp:310
void glyphs(int opcode)
Definition: disdvi.c:775
#define skip(p, c)
Definition: ptexmac.h:70
#define info
Definition: dviinfo.c:42
struct rect data
Definition: dvipdfm.c:64
static int feature_index(lua_State *L)
Definition: feature.c:34
#define T
Definition: fmt.h:20
static void
Definition: fpif.c:118
#define _(String)
Definition: ftxerr18.c:64
mpz_t * f
Definition: gen-fib.c:34
#define c(n)
Definition: gpos-common.c:150
#define d(n)
Definition: gpos-common.c:151
int base
Definition: gsftopk.c:1502
#define memmove(d, s, n)
Definition: gsftopk.c:65
FILE * out
Definition: hbf2gf.c:286
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define likely(x)
Definition: jbig2arith.cc:115
#define unlikely(x)
Definition: jbig2arith.cc:116
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
FT_UInt idx
Definition: cffcmap.c:135
FT_Face face
Definition: cffdrivr.c:659
else
Definition: ftgrays.c:1658
#define true
Definition: ftrandom.c:51
#define false
Definition: ftrandom.c:52
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
voidp calloc()
pdf_obj * entry
Definition: pdfdoc.c:64
static int ret
Definition: convert.c:72
#define input
Definition: cpascal.h:53
static luaL_Reg func[]
Definition: except.c:32
static int lookahead
Definition: mkind.c:83
Definition: hb-iter.hh:336
static void collect_class(hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static void chain_context_collect_glyphs_lookup(hb_collect_glyphs_context_t *c, unsigned int backtrackCount, const HBUINT16 backtrack[], unsigned int inputCount, const HBUINT16 input[], unsigned int lookaheadCount, const HBUINT16 lookahead[], unsigned int lookupCount, const LookupRecord lookupRecord[], ChainContextCollectGlyphsLookupContext &lookup_context)
static bool ligate_input(hb_ot_apply_context_t *c, unsigned int count, const unsigned int match_positions[64], unsigned int match_length, hb_codepoint_t lig_glyph, unsigned int total_component_count)
void(* collect_glyphs_func_t)(hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool context_would_apply_lookup(hb_would_apply_context_t *c, unsigned int inputCount, const HBUINT16 input[], unsigned int lookupCount, const LookupRecord lookupRecord[], ContextApplyLookupContext &lookup_context)
static bool intersects_glyph(const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool context_intersects(const hb_set_t *glyphs, unsigned int inputCount, const HBUINT16 input[], ContextClosureLookupContext &lookup_context)
static bool intersects_coverage(const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool would_match_input(hb_would_apply_context_t *c, unsigned int count, const HBUINT16 input[], match_func_t match_func, const void *match_data)
static bool array_is_subset_of(const hb_set_t *glyphs, unsigned int count, const HBUINT16 values[], intersects_func_t intersects_func, const void *intersects_data)
static bool match_backtrack(hb_ot_apply_context_t *c, unsigned int count, const HBUINT16 backtrack[], match_func_t match_func, const void *match_data, unsigned int *match_start)
IntType< uint16_t, 2 > HBUINT16
static bool match_coverage(hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
static bool chain_context_would_apply_lookup(hb_would_apply_context_t *c, unsigned int backtrackCount, const HBUINT16 backtrack[], unsigned int inputCount, const HBUINT16 input[], unsigned int lookaheadCount, const HBUINT16 lookahead[], unsigned int lookupCount, const LookupRecord lookupRecord[], ChainContextApplyLookupContext &lookup_context)
static bool context_apply_lookup(hb_ot_apply_context_t *c, unsigned int inputCount, const HBUINT16 input[], unsigned int lookupCount, const LookupRecord lookupRecord[], ContextApplyLookupContext &lookup_context)
static void context_collect_glyphs_lookup(hb_collect_glyphs_context_t *c, unsigned int inputCount, const HBUINT16 input[], unsigned int lookupCount, const LookupRecord lookupRecord[], ContextCollectGlyphsLookupContext &lookup_context)
static void recurse_lookups(context_t *c, unsigned int lookupCount, const LookupRecord lookupRecord[])
static void chain_context_closure_lookup(hb_closure_context_t *c, unsigned int backtrackCount, const HBUINT16 backtrack[], unsigned int inputCount, const HBUINT16 input[], unsigned int lookaheadCount, const HBUINT16 lookahead[], unsigned int lookupCount, const LookupRecord lookupRecord[], ChainContextClosureLookupContext &lookup_context)
static void collect_coverage(hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool match_input(hb_ot_apply_context_t *c, unsigned int count, const HBUINT16 input[], match_func_t match_func, const void *match_data, unsigned int *end_offset, unsigned int match_positions[64], unsigned int *p_total_component_count=nullptr)
bool(* intersects_func_t)(const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool match_glyph(hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
static void collect_array(hb_collect_glyphs_context_t *c, hb_set_t *glyphs, unsigned int count, const HBUINT16 values[], collect_glyphs_func_t collect_func, const void *collect_data)
static bool match_lookahead(hb_ot_apply_context_t *c, unsigned int count, const HBUINT16 lookahead[], match_func_t match_func, const void *match_data, unsigned int offset, unsigned int *end_index)
struct OT::@1078 subset_offset_array
static bool chain_context_apply_lookup(hb_ot_apply_context_t *c, unsigned int backtrackCount, const HBUINT16 backtrack[], unsigned int inputCount, const HBUINT16 input[], unsigned int lookaheadCount, const HBUINT16 lookahead[], unsigned int lookupCount, const LookupRecord lookupRecord[], ChainContextApplyLookupContext &lookup_context)
static auto end(Iterable &&iterable) -> decltype((hb_iter(iterable).end()))
Definition: hb-iter.hh:344
bool(* match_func_t)(hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
static void context_closure_lookup(hb_closure_context_t *c, unsigned int inputCount, const HBUINT16 input[], unsigned int lookupCount, const LookupRecord lookupRecord[], ContextClosureLookupContext &lookup_context)
static void collect_glyph(hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool intersects_class(const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
static bool chain_context_intersects(const hb_set_t *glyphs, unsigned int backtrackCount, const HBUINT16 backtrack[], unsigned int inputCount, const HBUINT16 input[], unsigned int lookaheadCount, const HBUINT16 lookahead[], ChainContextClosureLookupContext &lookup_context)
static bool match_class(hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
static bool apply_lookup(hb_ot_apply_context_t *c, unsigned int count, unsigned int match_positions[64], unsigned int lookupCount, const LookupRecord lookupRecord[], unsigned int match_length)
union value value
Definition: obx.h:44
static int delta
Definition: pbmtolj.c:36
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
#define index(s, c)
Definition: plain2.h:351
#define X
Definition: ppmforge.c:73
int g
Definition: ppmqvga.c:68
int r
Definition: ppmqvga.c:68
static int offset
Definition: ppmtogif.c:642
struct @1025 hb_max
struct @1028 hb_add
struct @1022 hb_first
struct @1024 hb_min
struct @1023 hb_second
hb_blob_t * hb_blob_get_empty()
Definition: hb-blob.cc:190
void hb_blob_destroy(hb_blob_t *blob)
Definition: hb-blob.cc:226
uint32_t hb_codepoint_t
Definition: hb-common.h:106
uint32_t hb_mask_t
Definition: hb-common.h:122
uint32_t hb_tag_t
Definition: hb-common.h:147
#define HB_TAG_NONE
Definition: hb-common.h:165
hb_direction_t
Definition: hb-common.h:193
#define TRACE_SERIALIZE(this)
Definition: hb-debug.hh:426
#define TRACE_SANITIZE(this)
Definition: hb-debug.hh:414
#define TRACE_DISPATCH(this, format)
Definition: hb-debug.hh:455
#define TRACE_APPLY(this)
Definition: hb-debug.hh:402
#define return_trace(RET)
Definition: hb-debug.hh:349
#define TRACE_SUBSET(this)
Definition: hb-debug.hh:438
struct @1054 hb_sink
#define hb_is_iterator(Iter)
Definition: hb-iter.hh:265
struct @1058 hb_any
struct @1057 hb_all
struct @1039 hb_iter
struct @1044 hb_filter
struct @1046 hb_zip
struct @1047 hb_apply
struct @1041 hb_map
struct @1051 hb_enumerate
#define DEFINE_SIZE_MIN(size)
#define DEFINE_SIZE_STATIC(size)
Definition: hb-machinery.hh:98
#define DEFINE_SIZE_ARRAY(size, array)
hb_codepoint_t hb_map_get(const hb_map_t *map, hb_codepoint_t key)
Definition: hb-map.cc:204
#define hb_requires(Cond)
Definition: hb-meta.hh:59
#define Null(Type)
Definition: hb-null.hh:94
#define HB_MAX_LOOKUP_INDICES
#define HB_MAX_NESTING_LEVEL
#define HB_MAX_FEATURES
#define HB_MAX_CONTEXT_LENGTH
#define NOT_COVERED
#define HB_OT_TAG_GSUB
Definition: hb-ot-layout.h:43
#define glyph_props()
static bool _hb_glyph_info_is_zwj(const hb_glyph_info_t *info)
static bool _hb_glyph_info_is_base_glyph(const hb_glyph_info_t *info)
static void _hb_glyph_info_set_general_category(hb_glyph_info_t *info, hb_unicode_general_category_t gen_cat)
static void _hb_glyph_info_set_glyph_props(hb_glyph_info_t *info, unsigned int props)
static void _hb_glyph_info_set_lig_props_for_mark(hb_glyph_info_t *info, unsigned int lig_id, unsigned int lig_comp)
static bool _hb_glyph_info_is_default_ignorable_and_not_hidden(const hb_glyph_info_t *info)
static unsigned int _hb_glyph_info_get_glyph_props(const hb_glyph_info_t *info)
static unsigned int _hb_glyph_info_get_lig_id(const hb_glyph_info_t *info)
static unsigned int _hb_glyph_info_get_lig_comp(const hb_glyph_info_t *info)
static hb_unicode_general_category_t _hb_glyph_info_get_general_category(const hb_glyph_info_t *info)
static unsigned int _hb_glyph_info_get_lig_num_comps(const hb_glyph_info_t *info)
static void _hb_glyph_info_set_lig_props_for_ligature(hb_glyph_info_t *info, unsigned int lig_id, unsigned int lig_num_comps)
static bool _hb_glyph_info_is_zwnj(const hb_glyph_info_t *info)
static uint8_t _hb_allocate_lig_id(hb_buffer_t *buffer)
@ HB_OT_LAYOUT_GLYPH_PROPS_MARK
Definition: hb-ot-layout.hh:81
@ HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED
Definition: hb-ot-layout.hh:84
@ HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE
Definition: hb-ot-layout.hh:88
@ HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED
Definition: hb-ot-layout.hh:86
@ HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
Definition: hb-ot-layout.hh:80
@ HB_OT_LAYOUT_GLYPH_PROPS_LIGATED
Definition: hb-ot-layout.hh:85
static bool _hb_glyph_info_is_mark(const hb_glyph_info_t *info)
#define glyph_index()
hb_set_t * hb_set_get_empty()
Definition: hb-set.cc:74
hb_codepoint_t hb_set_get_max(const hb_set_t *set)
Definition: hb-set.cc:471
void hb_set_union(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:356
hb_set_t * hb_set_create()
Definition: hb-set.cc:52
void hb_set_subtract(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:388
void hb_set_destroy(hb_set_t *set)
Definition: hb-set.cc:106
void hb_set_del_range(hb_set_t *set, hb_codepoint_t first, hb_codepoint_t last)
Definition: hb-set.cc:286
void hb_set_clear(hb_set_t *set)
Definition: hb-set.cc:184
@ HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER
Definition: hb-unicode.h:98
@ HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
Definition: hb-unicode.h:103
#define HB_UNUSED
Definition: hb.hh:260
#define mask(n)
Definition: lbitlib.c:93
#define arg1(arg)
bool
Definition: hb-null.hh:81
bool sanitize(hb_sanitize_context_t *c, Ts &&... ds) const
Type arrayZ[1]
iter_t iter() const
bool apply(hb_ot_apply_context_t *c) const
void collect_variation_indices(hb_collect_variation_indices_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
void closure(hb_closure_context_t *c) const
bool would_apply(hb_would_apply_context_t *c) const
OffsetArrayOf< ChainRuleSet > ruleSet
bool subset(hb_subset_context_t *c) const
const Coverage & get_coverage() const
void closure_lookups(hb_closure_lookups_context_t *c) const
void collect_glyphs(hb_collect_glyphs_context_t *c) const
bool intersects(const hb_set_t *glyphs) const
void closure(hb_closure_context_t *c) const
bool intersects(const hb_set_t *glyphs) const
void closure_lookups(hb_closure_lookups_context_t *c) const
const Coverage & get_coverage() const
OffsetArrayOf< ChainRuleSet > ruleSet
bool apply(hb_ot_apply_context_t *c) const
OffsetTo< ClassDef > inputClassDef