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)  

class.c
Go to the documentation of this file.
1 /*
2 ** class.c - Class class
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #include <stdarg.h>
8 #include <mruby.h>
9 #include <mruby/array.h>
10 #include <mruby/hash.h>
11 #include <mruby/class.h>
12 #include <mruby/numeric.h>
13 #include <mruby/proc.h>
14 #include <mruby/string.h>
15 #include <mruby/variable.h>
16 #include <mruby/error.h>
17 #include <mruby/data.h>
18 #include <mruby/istruct.h>
19 #include <mruby/opcode.h>
20 #include <mruby/presym.h>
21 
22 union mt_ptr {
23  struct RProc *proc;
25 };
26 
27 struct mt_elem {
28  union mt_ptr ptr;
29  size_t func_p:1;
30  size_t noarg_p:1;
31  mrb_sym key:sizeof(mrb_sym)*8-2;
32 };
33 
34 /* method table structure */
35 typedef struct mt_tbl {
36  size_t size;
37  size_t alloc;
38  struct mt_elem *table;
40 
41 /* Creates the method table. */
42 static mt_tbl*
44 {
45  mt_tbl *t;
46 
47  t = (mt_tbl*)mrb_malloc(mrb, sizeof(mt_tbl));
48  t->size = 0;
49  t->alloc = 0;
50  t->table = NULL;
51 
52  return t;
53 }
54 
55 static struct mt_elem *mt_put(mrb_state *mrb, mt_tbl *t, mrb_sym sym, size_t func_p, size_t noarg_p, union mt_ptr ptr);
56 
57 static void
59 {
60  size_t old_alloc = t->alloc;
61  size_t new_alloc = old_alloc+1;
62  struct mt_elem *old_table = t->table;
63 
64  khash_power2(new_alloc);
65  if (old_alloc == new_alloc) return;
66 
67  t->alloc = new_alloc;
68  t->size = 0;
69  t->table = (struct mt_elem*)mrb_calloc(mrb, sizeof(struct mt_elem), new_alloc);
70 
71  for (size_t i = 0; i < old_alloc; i++) {
72  struct mt_elem *slot = &old_table[i];
73 
74  /* key = 0 means empty or deleted */
75  if (slot->key != 0) {
76  mt_put(mrb, t, slot->key, slot->func_p, slot->noarg_p, slot->ptr);
77  }
78  }
79  mrb_free(mrb, old_table);
80 }
81 
82 #define slot_empty_p(slot) ((slot)->key == 0 && (slot)->func_p == 0)
83 
84 /* Set the value for the symbol in the method table. */
85 static struct mt_elem*
86 mt_put(mrb_state *mrb, mt_tbl *t, mrb_sym sym, size_t func_p, size_t noarg_p, union mt_ptr ptr)
87 {
88  size_t hash, pos, start;
89  struct mt_elem *dslot = NULL;
90 
91  if (t->alloc == 0) {
92  mt_rehash(mrb, t);
93  }
94  hash = kh_int_hash_func(mrb, sym);
95  start = pos = hash & (t->alloc-1);
96  for (;;) {
97  struct mt_elem *slot = &t->table[pos];
98 
99  if (slot->key == sym) {
100  slot->func_p = func_p;
101  slot->noarg_p = noarg_p;
102  slot->ptr = ptr;
103  return slot;
104  }
105  else if (slot->key == 0) { /* empty or deleted */
106  if (slot->func_p == 0) { /* empty */
107  t->size++;
108  slot->key = sym;
109  slot->func_p = func_p;
110  slot->noarg_p = noarg_p;
111  slot->ptr = ptr;
112  return slot;
113  }
114  else if (!dslot) { /* deleted */
115  dslot = slot;
116  }
117  }
118  pos = (pos+1) & (t->alloc-1);
119  if (pos == start) { /* not found */
120  if (dslot) {
121  t->size++;
122  dslot->key = sym;
123  dslot->func_p = func_p;
124  dslot->noarg_p = noarg_p;
125  dslot->ptr = ptr;
126  return dslot;
127  }
128  /* no room */
129  mt_rehash(mrb, t);
130  start = pos = hash & (t->alloc-1);
131  }
132  }
133 }
134 
135 /* Get a value for a symbol from the method table. */
136 static struct mt_elem*
138 {
139  size_t hash, pos, start;
140 
141  if (t == NULL) return NULL;
142  if (t->alloc == 0) return NULL;
143  if (t->size == 0) return NULL;
144 
145  hash = kh_int_hash_func(mrb, sym);
146  start = pos = hash & (t->alloc-1);
147  for (;;) {
148  struct mt_elem *slot = &t->table[pos];
149 
150  if (slot->key == sym) {
151  return slot;
152  }
153  else if (slot_empty_p(slot)) {
154  return NULL;
155  }
156  pos = (pos+1) & (t->alloc-1);
157  if (pos == start) { /* not found */
158  return NULL;
159  }
160  }
161 }
162 
163 /* Deletes the value for the symbol from the method table. */
164 static mrb_bool
166 {
167  size_t hash, pos, start;
168 
169  if (t == NULL) return FALSE;
170  if (t->alloc == 0) return FALSE;
171  if (t->size == 0) return FALSE;
172 
173  hash = kh_int_hash_func(mrb, sym);
174  start = pos = hash & (t->alloc-1);
175  for (;;) {
176  struct mt_elem *slot = &t->table[pos];
177 
178  if (slot->key == sym) {
179  t->size--;
180  slot->key = 0;
181  slot->func_p = 1;
182  return TRUE;
183  }
184  else if (slot_empty_p(slot)) {
185  return FALSE;
186  }
187  pos = (pos+1) & (t->alloc-1);
188  if (pos == start) { /* not found */
189  return FALSE;
190  }
191  }
192 }
193 
194 /* Copy the method table. */
195 static struct mt_tbl*
197 {
198  mt_tbl *t2;
199  size_t i;
200 
201  if (t == NULL) return NULL;
202  if (t->alloc == 0) return NULL;
203  if (t->size == 0) return NULL;
204 
205  t2 = mt_new(mrb);
206  for (i=0; i<t->alloc; i++) {
207  struct mt_elem *slot = &t->table[i];
208 
209  if (slot->key) {
210  mt_put(mrb, t2, slot->key, slot->func_p, slot->noarg_p, slot->ptr);
211  }
212  }
213  return t2;
214 }
215 
216 /* Free memory of the method table. */
217 static void
219 {
220  mrb_free(mrb, t->table);
221  mrb_free(mrb, t);
222 }
223 
224 MRB_API void
226 {
227  mt_tbl *t = c->mt;
228  size_t i;
229 
230  if (t == NULL) return;
231  if (t->alloc == 0) return;
232  if (t->size == 0) return;
233 
234  for (i=0; i<t->alloc; i++) {
235  struct mt_elem *slot = &t->table[i];
236 
237  if (slot->key) {
238  mrb_method_t m;
239 
240  if (slot->func_p) {
241  MRB_METHOD_FROM_FUNC(m, slot->ptr.func);
242  }
243  else {
244  MRB_METHOD_FROM_PROC(m, slot->ptr.proc);
245  }
246  if (slot->noarg_p) {
248  }
249 
250  if (fn(mrb, slot->key, m, p) != 0)
251  return;
252  }
253  }
254  return;
255 }
256 
257 void
259 {
260  mt_tbl *t = c->mt;
261  size_t i;
262 
263  if (t == NULL) return;
264  if (t->alloc == 0) return;
265  if (t->size == 0) return;
266 
267  for (i=0; i<t->alloc; i++) {
268  struct mt_elem *slot = &t->table[i];
269 
270  if (slot->key && !slot->func_p) { /* Proc pointer */
271  struct RProc *p = slot->ptr.proc;
272  mrb_gc_mark(mrb, (struct RBasic*)p);
273  }
274  }
275  return;
276 }
277 
278 size_t
280 {
281  struct mt_tbl *h = c->mt;
282 
283  if (!h) return 0;
284  return h->size;
285 }
286 
287 void
289 {
290  if (c->mt) mt_free(mrb, c->mt);
291 }
292 
293 void
294 mrb_class_name_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
295 {
296  mrb_value name;
297  mrb_sym nsym = MRB_SYM(__classname__);
298 
299  if (mrb_obj_iv_defined(mrb, (struct RObject*)c, nsym)) return;
300  if (outer == NULL || outer == mrb->object_class) {
301  name = mrb_symbol_value(id);
302  }
303  else {
304  name = mrb_class_path(mrb, outer);
305  if (mrb_nil_p(name)) { /* unnamed outer class */
306  if (outer != mrb->object_class && outer != c) {
307  mrb_obj_iv_set_force(mrb, (struct RObject*)c, MRB_SYM(__outer__),
308  mrb_obj_value(outer));
309  }
310  return;
311  }
312  else {
313  mrb_int len;
314  const char *n = mrb_sym_name_len(mrb, id, &len);
315 
316  mrb_str_cat_lit(mrb, name, "::");
317  mrb_str_cat(mrb, name, n, len);
318  }
319  }
320  mrb_obj_iv_set_force(mrb, (struct RObject*)c, nsym, name);
321 }
322 
323 mrb_bool
325 {
326  return len > 0 && ISUPPER(name[0]) && mrb_ident_p(name+1, len-1);
327 }
328 
329 static void
330 setup_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
331 {
332  mrb_class_name_class(mrb, outer, c, id);
333  mrb_obj_iv_set(mrb, (struct RObject*)outer, id, mrb_obj_value(c));
334 }
335 
336 #define make_metaclass(mrb, c) prepare_singleton_class((mrb), (struct RBasic*)(c))
337 
338 static void
340 {
341  struct RClass *sc, *c;
342 
343  if (o->c->tt == MRB_TT_SCLASS) return;
344  sc = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_SCLASS, mrb->class_class);
345  sc->flags |= MRB_FL_CLASS_IS_INHERITED;
346  sc->mt = mt_new(mrb);
347  sc->iv = 0;
348  if (o->tt == MRB_TT_CLASS) {
349  c = (struct RClass*)o;
350  if (!c->super) {
351  sc->super = mrb->class_class;
352  }
353  else {
354  sc->super = c->super->c;
355  }
356  }
357  else if (o->tt == MRB_TT_SCLASS) {
358  c = (struct RClass*)o;
359  while (c->super->tt == MRB_TT_ICLASS)
360  c = c->super;
361  make_metaclass(mrb, c->super);
362  sc->super = c->super->c;
363  }
364  else {
365  sc->super = o->c;
366  prepare_singleton_class(mrb, (struct RBasic*)sc);
367  }
368  o->c = sc;
369  mrb_field_write_barrier(mrb, (struct RBasic*)o, (struct RBasic*)sc);
370  mrb_field_write_barrier(mrb, (struct RBasic*)sc, (struct RBasic*)o);
371  mrb_obj_iv_set(mrb, (struct RObject*)sc, MRB_SYM(__attached__), mrb_obj_value(o));
372  sc->flags |= o->flags & MRB_FL_OBJ_IS_FROZEN;
373 }
374 
375 static mrb_value
377 {
378  mrb_value path = mrb_class_path(mrb, c);
379  if (mrb_nil_p(path)) {
380  path = c->tt == MRB_TT_MODULE ? mrb_str_new_lit(mrb, "#<Module:") :
381  mrb_str_new_lit(mrb, "#<Class:");
382  mrb_str_cat_str(mrb, path, mrb_ptr_to_str(mrb, c));
383  mrb_str_cat_lit(mrb, path, ">");
384  }
385  return path;
386 }
387 
388 static struct RClass*
389 class_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
390 {
391  mrb_value c = mrb_const_get(mrb, mrb_obj_value(klass), id);
392 
394  return mrb_class_ptr(c);
395 }
396 
397 static struct RClass*
398 module_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
399 {
400  mrb_value c = mrb_const_get(mrb, mrb_obj_value(klass), id);
401 
403  return mrb_class_ptr(c);
404 }
405 
406 static mrb_bool
408 {
409  switch (mrb_type(obj)) {
410  case MRB_TT_CLASS:
411  case MRB_TT_SCLASS:
412  case MRB_TT_MODULE:
413  return TRUE;
414  default:
415  return FALSE;
416  }
417 }
418 
419 static void
421 {
422  if (!class_ptr_p(obj)) {
423  mrb_raisef(mrb, E_TYPE_ERROR, "%!v is not a class/module", obj);
424  }
425 }
426 
427 static struct RClass*
429 {
430  struct RClass *m;
431 
432  if (mrb_const_defined_at(mrb, mrb_obj_value(outer), name)) {
433  return module_from_sym(mrb, outer, name);
434  }
435  m = mrb_module_new(mrb);
436  setup_class(mrb, outer, m, name);
437 
438  return m;
439 }
440 
441 MRB_API struct RClass*
443 {
444  return define_module(mrb, name, mrb->object_class);
445 }
446 
447 MRB_API struct RClass*
448 mrb_define_module(mrb_state *mrb, const char *name)
449 {
450  return define_module(mrb, mrb_intern_cstr(mrb, name), mrb->object_class);
451 }
452 
453 struct RClass*
455 {
456  check_if_class_or_module(mrb, outer);
457  if (mrb_const_defined_at(mrb, outer, id)) {
458  mrb_value old = mrb_const_get(mrb, outer, id);
459 
460  if (!mrb_module_p(old)) {
461  mrb_raisef(mrb, E_TYPE_ERROR, "%!v is not a module", old);
462  }
463  return mrb_class_ptr(old);
464  }
465  return define_module(mrb, id, mrb_class_ptr(outer));
466 }
467 
468 MRB_API struct RClass*
470 {
471  struct RClass * c = define_module(mrb, name, outer);
472 
473  setup_class(mrb, outer, c, name);
474  return c;
475 }
476 
477 MRB_API struct RClass*
478 mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name)
479 {
480  mrb_sym id = mrb_intern_cstr(mrb, name);
481  struct RClass * c = define_module(mrb, id, outer);
482 
483  setup_class(mrb, outer, c, id);
484  return c;
485 }
486 
487 static struct RClass*
489 {
491  return c;
492 }
493 
494 static struct RClass*
495 define_class(mrb_state *mrb, mrb_sym name, struct RClass *super, struct RClass *outer)
496 {
497  struct RClass * c;
498 
499  if (mrb_const_defined_at(mrb, mrb_obj_value(outer), name)) {
500  c = class_from_sym(mrb, outer, name);
502  if (super && mrb_class_real(c->super) != super) {
503  mrb_raisef(mrb, E_TYPE_ERROR, "superclass mismatch for Class %n (%C not %C)",
504  name, c->super, super);
505  }
506  return c;
507  }
508 
509  c = mrb_class_new(mrb, super);
510  setup_class(mrb, outer, c, name);
511 
512  return c;
513 }
514 
515 MRB_API struct RClass*
517 {
518  if (!super) {
519  mrb_warn(mrb, "no super class for '%n', Object assumed", name);
520  }
521  return define_class(mrb, name, super, mrb->object_class);
522 }
523 
524 MRB_API struct RClass*
525 mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super)
526 {
527  return mrb_define_class_id(mrb, mrb_intern_cstr(mrb, name), super);
528 }
529 
531 #ifndef MRB_NO_METHOD_CACHE
532 static void mc_clear(mrb_state *mrb);
533 #else
534 #define mc_clear(mrb)
535 #endif
536 
537 static void
538 mrb_class_inherited(mrb_state *mrb, struct RClass *super, struct RClass *klass)
539 {
540  mrb_value s;
541  mrb_sym mid;
542 
543  if (!super)
544  super = mrb->object_class;
546  s = mrb_obj_value(super);
547  mrb_mc_clear_by_class(mrb, klass);
548  mid = MRB_SYM(inherited);
549  if (!mrb_func_basic_p(mrb, s, mid, mrb_bob_init)) {
550  mrb_value c = mrb_obj_value(klass);
551  mrb_funcall_argv(mrb, s, mid, 1, &c);
552  }
553 }
554 
555 struct RClass*
557 {
558  struct RClass *s;
559  struct RClass *c;
560 
561  if (!mrb_nil_p(super)) {
562  if (!mrb_class_p(super)) {
563  mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%!v given)", super);
564  }
565  s = mrb_class_ptr(super);
566  }
567  else {
568  s = 0;
569  }
570  check_if_class_or_module(mrb, outer);
571  if (mrb_const_defined_at(mrb, outer, id)) {
572  mrb_value old = mrb_const_get(mrb, outer, id);
573 
574  if (!mrb_class_p(old)) {
575  mrb_raisef(mrb, E_TYPE_ERROR, "%!v is not a class", old);
576  }
577  c = mrb_class_ptr(old);
578  if (s) {
579  /* check super class */
580  if (mrb_class_real(c->super) != s) {
581  mrb_raisef(mrb, E_TYPE_ERROR, "superclass mismatch for class %v", old);
582  }
583  }
584  return c;
585  }
586  c = define_class(mrb, id, s, mrb_class_ptr(outer));
587  mrb_class_inherited(mrb, mrb_class_real(c->super), c);
588 
589  return c;
590 }
591 
593 mrb_class_defined(mrb_state *mrb, const char *name)
594 {
596  if (!sym) return FALSE;
597  return mrb_const_defined(mrb, mrb_obj_value(mrb->object_class), sym);
598 }
599 
602 {
603  return mrb_const_defined(mrb, mrb_obj_value(mrb->object_class), name);
604 }
605 
607 mrb_class_defined_under(mrb_state *mrb, struct RClass *outer, const char *name)
608 {
610  if (!sym) return FALSE;
611  return mrb_const_defined_at(mrb, mrb_obj_value(outer), sym);
612 }
613 
616 {
617  return mrb_const_defined_at(mrb, mrb_obj_value(outer), name);
618 }
619 
620 MRB_API struct RClass*
621 mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
622 {
623  return class_from_sym(mrb, outer, mrb_intern_cstr(mrb, name));
624 }
625 
626 MRB_API struct RClass*
628 {
629  return class_from_sym(mrb, outer, name);
630 }
631 
632 MRB_API struct RClass*
633 mrb_class_get(mrb_state *mrb, const char *name)
634 {
635  return mrb_class_get_under(mrb, mrb->object_class, name);
636 }
637 
638 MRB_API struct RClass*
640 {
641  return mrb_class_get_under_id(mrb, mrb->object_class, name);
642 }
643 
644 MRB_API struct RClass*
646 {
647  struct RClass *exc, *e;
649 
650  if (!mrb_class_p(c)) {
651  mrb_raise(mrb, mrb->eException_class, "exception corrupted");
652  }
653  exc = e = mrb_class_ptr(c);
654 
655  while (e) {
656  if (e == mrb->eException_class)
657  return exc;
658  e = e->super;
659  }
660  return mrb->eException_class;
661 }
662 
663 MRB_API struct RClass*
664 mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
665 {
666  return module_from_sym(mrb, outer, mrb_intern_cstr(mrb, name));
667 }
668 
669 MRB_API struct RClass*
671 {
672  return module_from_sym(mrb, outer, name);
673 }
674 
675 MRB_API struct RClass*
676 mrb_module_get(mrb_state *mrb, const char *name)
677 {
678  return mrb_module_get_under(mrb, mrb->object_class, name);
679 }
680 
681 MRB_API struct RClass*
683 {
684  return mrb_module_get_under_id(mrb, mrb->object_class, name);
685 }
686 
687 /*!
688  * Defines a class under the namespace of \a outer.
689  * \param outer a class which contains the new class.
690  * \param name name of the new class
691  * \param super a class from which the new class will derive.
692  * NULL means \c Object class.
693  * \return the created class
694  * \throw TypeError if the constant name \a name is already taken but
695  * the constant is not a \c Class.
696  * \throw NameError if the class is already defined but the class can not
697  * be reopened because its superclass is not \a super.
698  * \post top-level constant named \a name refers the returned class.
699  *
700  * \note if a class named \a name is already defined and its superclass is
701  * \a super, the function just returns the defined class.
702  */
703 MRB_API struct RClass*
705 {
706  struct RClass * c;
707 
708 #if 0
709  if (!super) {
710  mrb_warn(mrb, "no super class for '%C::%n', Object assumed", outer, id);
711  }
712 #endif
713  c = define_class(mrb, name, super, outer);
714  setup_class(mrb, outer, c, name);
715  return c;
716 }
717 
718 MRB_API struct RClass*
719 mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super)
720 {
721  return mrb_define_class_under_id(mrb, outer, mrb_intern_cstr(mrb, name), super);
722 }
723 
724 MRB_API void
726 {
727  mt_tbl *h;
728  union mt_ptr ptr;
729 
731  h = c->mt;
732  mrb_check_frozen(mrb, c);
733  if (!h) h = c->mt = mt_new(mrb);
734  if (MRB_METHOD_PROC_P(m)) {
735  struct RProc *p = MRB_METHOD_PROC(m);
736 
737  ptr.proc = p;
738  if (p) {
739  p->flags |= MRB_PROC_SCOPE;
740  p->c = NULL;
741  mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)p);
742  if (!MRB_PROC_ENV_P(p)) {
744  }
745  }
746  }
747  else {
748  ptr.func = MRB_METHOD_FUNC(m);
749  }
751  mc_clear(mrb);
752 }
753 
754 MRB_API void
756 {
757  mrb_method_t m;
758  int ai = mrb_gc_arena_save(mrb);
759 
761 #ifndef MRB_USE_METHOD_T_STRUCT
763 #endif
764  if (aspec == MRB_ARGS_NONE()) {
766  }
767  mrb_define_method_raw(mrb, c, mid, m);
768  mrb_gc_arena_restore(mrb, ai);
769 }
770 
771 MRB_API void
772 mrb_define_method(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
773 {
774  mrb_define_method_id(mrb, c, mrb_intern_cstr(mrb, name), func, aspec);
775 }
776 
777 /* a function to raise NotImplementedError with current method name */
778 MRB_API void
780 {
781  mrb_callinfo *ci = mrb->c->ci;
782 
783  if (ci->mid) {
784  mrb_raisef(mrb, E_NOTIMP_ERROR, "%n() function is unimplemented on this machine", ci->mid);
785  }
786 }
787 
788 /* a function to be replacement of unimplemented method */
791 {
792  mrb_notimplement(mrb);
793  /* not reached */
794  return mrb_nil_value();
795 }
796 
797 static mrb_value
799 {
801  return val;
802 }
803 
804 static mrb_value
806 {
808  return val;
809 }
810 
811 #define to_sym(mrb, ss) mrb_obj_to_sym(mrb, ss)
812 
815 {
816  mrb_int argc = mrb->c->ci->argc;
817 
818  if (argc < 0) {
819  struct RArray *a = mrb_ary_ptr(mrb->c->ci->stack[1]);
820 
821  argc = ARY_LEN(a);
822  }
823  return argc;
824 }
825 
826 MRB_API const mrb_value*
828 {
829  mrb_int argc = mrb->c->ci->argc;
830  mrb_value *array_argv = mrb->c->ci->stack + 1;
831  if (argc < 0) {
832  struct RArray *a = mrb_ary_ptr(*array_argv);
833 
834  array_argv = ARY_PTR(a);
835  }
836  return array_argv;
837 }
838 
841 {
842  mrb_int argc = mrb->c->ci->argc;
843  mrb_value *array_argv = mrb->c->ci->stack + 1;
844  if (argc < 0) {
845  struct RArray *a = mrb_ary_ptr(*array_argv);
846 
847  argc = ARY_LEN(a);
848  array_argv = ARY_PTR(a);
849  }
850  if (argc != 1) {
851  mrb_argnum_error(mrb, argc, 1, 1);
852  }
853  return array_argv[0];
854 }
855 
856 void mrb_hash_check_kdict(mrb_state *mrb, mrb_value self);
857 
858 /*
859  retrieve arguments from mrb_state.
860 
861  mrb_get_args(mrb, format, ...)
862 
863  returns number of arguments parsed.
864 
865  format specifiers:
866 
867  string mruby type C type note
868  ----------------------------------------------------------------------------------------------
869  o: Object [mrb_value]
870  C: Class/Module [mrb_value]
871  S: String [mrb_value] when ! follows, the value may be nil
872  A: Array [mrb_value] when ! follows, the value may be nil
873  H: Hash [mrb_value] when ! follows, the value may be nil
874  s: String [const char*,mrb_int] Receive two arguments; s! gives (NULL,0) for nil
875  z: String [const char*] NUL terminated string; z! gives NULL for nil
876  a: Array [const mrb_value*,mrb_int] Receive two arguments; a! gives (NULL,0) for nil
877  c: Class/Module [strcut RClass*]
878  f: Integer/Float [mrb_float]
879  i: Integer/Float [mrb_int]
880  b: boolean [mrb_bool]
881  n: String/Symbol [mrb_sym]
882  d: data [void*,mrb_data_type const] 2nd argument will be used to check data type so it won't be modified; when ! follows, the value may be nil
883  I: inline struct [void*]
884  &: block [mrb_value] &! raises exception if no block given
885  *: rest argument [const mrb_value*,mrb_int] The rest of the arguments as an array; *! avoid copy of the stack
886  |: optional Following arguments are optional
887  ?: optional given [mrb_bool] true if preceding argument (optional) is given
888  ':': keyword args [mrb_kwargs const] Get keyword arguments
889  */
891 mrb_get_args(mrb_state *mrb, const char *format, ...)
892 {
893  const char *fmt = format;
894  char c;
895  mrb_int i = 0;
896  va_list ap;
897  mrb_int argc = mrb->c->ci->argc;
898  mrb_value *array_argv = mrb->c->ci->stack+1;
899  mrb_bool argv_on_stack = argc >= 0;
900  mrb_bool opt = FALSE;
901  mrb_bool opt_skip = TRUE;
902  mrb_bool given = TRUE;
903  mrb_value kdict;
904  mrb_bool reqkarg = FALSE;
905  int argc_min = 0, argc_max = 0;
906 
907  if (!argv_on_stack) {
908  struct RArray *a = mrb_ary_ptr(*array_argv);
909  array_argv = ARY_PTR(a);
910  argc = ARY_LEN(a);
911  }
912  va_start(ap, format);
913 
914 #define ARGV array_argv
915 
916  while ((c = *fmt++)) {
917  switch (c) {
918  case '|':
919  opt = TRUE;
920  break;
921  case '*':
922  opt_skip = FALSE;
923  argc_max = -1;
924  if (!reqkarg) reqkarg = strchr(fmt, ':') ? TRUE : FALSE;
925  goto check_exit;
926  case '!':
927  break;
928  case ':':
929  reqkarg = TRUE;
930  /* fall through */
931  case '&': case '?':
932  if (opt) opt_skip = FALSE;
933  break;
934  default:
935  if (!opt) argc_min++;
936  argc_max++;
937  break;
938  }
939  }
940 
941  check_exit:
942  if (reqkarg && argc > argc_min && mrb_hash_p(kdict = ARGV[argc - 1])) {
943  mrb_hash_check_kdict(mrb, kdict);
944  argc --;
945  }
946  else {
947  kdict = mrb_nil_value();
948  }
949 
950  opt = FALSE;
951  i = 0;
952  while ((c = *format++)) {
953  mrb_value *argv = ARGV;
954  mrb_bool altmode;
955 
956  switch (c) {
957  case '|': case '*': case '&': case '?': case ':':
958  break;
959  default:
960  if (argc <= i) {
961  if (opt) {
962  given = FALSE;
963  }
964  else {
965  mrb_argnum_error(mrb, argc, argc_min, argc_max);
966  }
967  }
968  break;
969  }
970 
971  if (*format == '!') {
972  format ++;
973  altmode = TRUE;
974  }
975  else {
976  altmode = FALSE;
977  }
978 
979  switch (c) {
980  case 'o':
981  {
982  mrb_value *p;
983 
984  p = va_arg(ap, mrb_value*);
985  if (i < argc) {
986  *p = argv[i++];
987  }
988  }
989  break;
990  case 'C':
991  {
992  mrb_value *p;
993 
994  p = va_arg(ap, mrb_value*);
995  if (i < argc) {
996  mrb_value ss;
997 
998  ss = argv[i++];
999  if (!class_ptr_p(ss)) {
1000  mrb_raisef(mrb, E_TYPE_ERROR, "%v is not class/module", ss);
1001  }
1002  *p = ss;
1003  }
1004  }
1005  break;
1006  case 'c':
1007  {
1008  struct RClass **p;
1009 
1010  p = va_arg(ap, struct RClass**);
1011  if (i < argc) {
1012  mrb_value ss;
1013 
1014  ss = argv[i++];
1015  if (!class_ptr_p(ss)) {
1016  mrb_raisef(mrb, E_TYPE_ERROR, "%v is not class/module", ss);
1017  }
1018  *p = mrb_class_ptr(ss);
1019  }
1020  }
1021  break;
1022  case 'S':
1023  {
1024  mrb_value *p;
1025 
1026  p = va_arg(ap, mrb_value*);
1027  if (i < argc) {
1028  *p = argv[i++];
1029  if (!(altmode && mrb_nil_p(*p))) {
1030  mrb_to_str(mrb, *p);
1031  }
1032  }
1033  }
1034  break;
1035  case 'A':
1036  {
1037  mrb_value *p;
1038 
1039  p = va_arg(ap, mrb_value*);
1040  if (i < argc) {
1041  *p = argv[i++];
1042  if (!(altmode && mrb_nil_p(*p))) {
1043  *p = to_ary(mrb, *p);
1044  }
1045  }
1046  }
1047  break;
1048  case 'H':
1049  {
1050  mrb_value *p;
1051 
1052  p = va_arg(ap, mrb_value*);
1053  if (i < argc) {
1054  *p = argv[i++];
1055  if (!(altmode && mrb_nil_p(*p))) {
1056  *p = to_hash(mrb, *p);
1057  }
1058  }
1059  }
1060  break;
1061  case 's':
1062  {
1063  mrb_value ss;
1064  const char **ps = 0;
1065  mrb_int *pl = 0;
1066 
1067  ps = va_arg(ap, const char**);
1068  pl = va_arg(ap, mrb_int*);
1069  if (i < argc) {
1070  ss = argv[i++];
1071  if (altmode && mrb_nil_p(ss)) {
1072  *ps = NULL;
1073  *pl = 0;
1074  }
1075  else {
1076  mrb_to_str(mrb, ss);
1077  *ps = RSTRING_PTR(ss);
1078  *pl = RSTRING_LEN(ss);
1079  }
1080  }
1081  }
1082  break;
1083  case 'z':
1084  {
1085  mrb_value ss;
1086  const char **ps;
1087 
1088  ps = va_arg(ap, const char**);
1089  if (i < argc) {
1090  ss = argv[i++];
1091  if (altmode && mrb_nil_p(ss)) {
1092  *ps = NULL;
1093  }
1094  else {
1095  mrb_to_str(mrb, ss);
1096  *ps = RSTRING_CSTR(mrb, ss);
1097  }
1098  }
1099  }
1100  break;
1101  case 'a':
1102  {
1103  mrb_value aa;
1104  struct RArray *a;
1105  const mrb_value **pb;
1106  mrb_int *pl;
1107 
1108  pb = va_arg(ap, const mrb_value**);
1109  pl = va_arg(ap, mrb_int*);
1110  if (i < argc) {
1111  aa = argv[i++];
1112  if (altmode && mrb_nil_p(aa)) {
1113  *pb = 0;
1114  *pl = 0;
1115  }
1116  else {
1117  aa = to_ary(mrb, aa);
1118  a = mrb_ary_ptr(aa);
1119  *pb = ARY_PTR(a);
1120  *pl = ARY_LEN(a);
1121  }
1122  }
1123  }
1124  break;
1125  case 'I':
1126  {
1127  void* *p;
1128  mrb_value ss;
1129 
1130  p = va_arg(ap, void**);
1131  if (i < argc) {
1132  ss = argv[i++];
1133  if (!mrb_istruct_p(ss))
1134  {
1135  mrb_raisef(mrb, E_TYPE_ERROR, "%v is not inline struct", ss);
1136  }
1137  *p = mrb_istruct_ptr(ss);
1138  }
1139  }
1140  break;
1141 #ifndef MRB_NO_FLOAT
1142  case 'f':
1143  {
1144  mrb_float *p;
1145 
1146  p = va_arg(ap, mrb_float*);
1147  if (i < argc) {
1148  *p = mrb_to_flo(mrb, argv[i++]);
1149  }
1150  }
1151  break;
1152 #endif
1153  case 'i':
1154  {
1155  mrb_int *p;
1156 
1157  p = va_arg(ap, mrb_int*);
1158  if (i < argc) {
1159  *p = mrb_integer(mrb_to_int(mrb, argv[i++]));
1160  }
1161  }
1162  break;
1163  case 'b':
1164  {
1165  mrb_bool *boolp = va_arg(ap, mrb_bool*);
1166 
1167  if (i < argc) {
1168  mrb_value b = argv[i++];
1169  *boolp = mrb_test(b);
1170  }
1171  }
1172  break;
1173  case 'n':
1174  {
1175  mrb_sym *symp;
1176 
1177  symp = va_arg(ap, mrb_sym*);
1178  if (i < argc) {
1179  mrb_value ss;
1180 
1181  ss = argv[i++];
1182  *symp = to_sym(mrb, ss);
1183  }
1184  }
1185  break;
1186  case 'd':
1187  {
1188  void** datap;
1189  struct mrb_data_type const* type;
1190 
1191  datap = va_arg(ap, void**);
1192  type = va_arg(ap, struct mrb_data_type const*);
1193  if (i < argc) {
1194  mrb_value dd = argv[i++];
1195  if (altmode && mrb_nil_p(dd)) {
1196  *datap = 0;
1197  }
1198  else {
1199  *datap = mrb_data_get_ptr(mrb, dd, type);
1200  }
1201  }
1202  }
1203  break;
1204 
1205  case '&':
1206  {
1207  mrb_value *p, *bp;
1208 
1209  p = va_arg(ap, mrb_value*);
1210  if (mrb->c->ci->argc < 0) {
1211  bp = mrb->c->ci->stack + 2;
1212  }
1213  else {
1214  bp = mrb->c->ci->stack + mrb->c->ci->argc + 1;
1215  }
1216  if (altmode && mrb_nil_p(*bp)) {
1217  mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
1218  }
1219  *p = *bp;
1220  }
1221  break;
1222  case '|':
1223  if (opt_skip && i == argc) goto finish;
1224  opt = TRUE;
1225  break;
1226  case '?':
1227  {
1228  mrb_bool *p;
1229 
1230  p = va_arg(ap, mrb_bool*);
1231  *p = given;
1232  }
1233  break;
1234 
1235  case '*':
1236  {
1237  const mrb_value **var;
1238  mrb_int *pl;
1239  mrb_bool nocopy = (altmode || !argv_on_stack) ? TRUE : FALSE;
1240 
1241  var = va_arg(ap, const mrb_value**);
1242  pl = va_arg(ap, mrb_int*);
1243  if (argc > i) {
1244  *pl = argc-i;
1245  if (*pl > 0) {
1246  if (nocopy) {
1247  *var = argv+i;
1248  }
1249  else {
1251  RARRAY(args)->c = NULL;
1252  *var = RARRAY_PTR(args);
1253  }
1254  }
1255  i = argc;
1256  }
1257  else {
1258  *pl = 0;
1259  *var = NULL;
1260  }
1261  }
1262  break;
1263 
1264  case ':':
1265  {
1266  mrb_value ksrc = mrb_hash_p(kdict) ? mrb_hash_dup(mrb, kdict) : mrb_hash_new(mrb);
1267  const mrb_kwargs *kwargs = va_arg(ap, const mrb_kwargs*);
1268  mrb_value *rest;
1269 
1270  if (kwargs == NULL) {
1271  rest = NULL;
1272  }
1273  else {
1274  uint32_t kwnum = kwargs->num;
1275  uint32_t required = kwargs->required;
1276  const mrb_sym *kname = kwargs->table;
1277  mrb_value *values = kwargs->values;
1278  uint32_t j;
1279  const uint32_t keyword_max = 40;
1280 
1281  if (kwnum > keyword_max || required > kwnum) {
1282  mrb_raise(mrb, E_ARGUMENT_ERROR, "keyword number is too large");
1283  }
1284 
1285  for (j = required; j > 0; j --, kname ++, values ++) {
1287  if (!mrb_hash_key_p(mrb, ksrc, k)) {
1288  mrb_raisef(mrb, E_ARGUMENT_ERROR, "missing keyword: %n", *kname);
1289  }
1290  *values = mrb_hash_delete_key(mrb, ksrc, k);
1291  mrb_gc_protect(mrb, *values);
1292  }
1293 
1294  for (j = kwnum - required; j > 0; j --, kname ++, values ++) {
1296  if (mrb_hash_key_p(mrb, ksrc, k)) {
1297  *values = mrb_hash_delete_key(mrb, ksrc, k);
1298  mrb_gc_protect(mrb, *values);
1299  }
1300  else {
1301  *values = mrb_undef_value();
1302  }
1303  }
1304 
1305  rest = kwargs->rest;
1306  }
1307 
1308  if (rest) {
1309  *rest = ksrc;
1310  }
1311  else if (!mrb_hash_empty_p(mrb, ksrc)) {
1312  ksrc = mrb_hash_keys(mrb, ksrc);
1313  ksrc = RARRAY_PTR(ksrc)[0];
1314  mrb_raisef(mrb, E_ARGUMENT_ERROR, "unknown keyword: %v", ksrc);
1315  }
1316  }
1317  break;
1318 
1319  default:
1320  mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid argument specifier %c", c);
1321  break;
1322  }
1323  }
1324 
1325 #undef ARGV
1326 
1327  if (!c && argc > i) {
1328  mrb_argnum_error(mrb, argc, argc_min, argc_max);
1329  }
1330 
1331 finish:
1332  va_end(ap);
1333  return i;
1334 }
1335 
1336 static struct RClass*
1338 {
1339  struct RClass *c;
1340 
1341  c = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_CLASS, mrb->class_class);
1342  if (super) {
1343  c->super = super;
1344  mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)super);
1345  }
1346  else {
1347  c->super = mrb->object_class;
1348  }
1349  c->mt = mt_new(mrb);
1350  return c;
1351 }
1352 
1353 static void
1355 {
1356  if (!mod->mt) {
1357  mod->mt = mt_new(mrb);
1358  }
1359 }
1360 
1361 static struct RClass*
1363 {
1364  struct RClass *ic = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, mrb->class_class);
1365  if (m->tt == MRB_TT_ICLASS) {
1366  m = m->c;
1367  }
1369  ic->iv = m->iv;
1370  ic->mt = m->mt;
1371  ic->super = super;
1372  if (m->tt == MRB_TT_ICLASS) {
1373  ic->c = m->c;
1374  }
1375  else {
1376  ic->c = m;
1377  }
1378  return ic;
1379 }
1380 
1381 static int
1382 include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, struct RClass *m, int search_super)
1383 {
1384  struct RClass *p, *ic;
1385  void *klass_mt = find_origin(c)->mt;
1386 
1387  while (m) {
1388  int original_seen = FALSE;
1389  int superclass_seen = FALSE;
1390 
1391  if (c == ins_pos) original_seen = TRUE;
1392  if (m->flags & MRB_FL_CLASS_IS_PREPENDED)
1393  goto skip;
1394 
1395  if (klass_mt && klass_mt == m->mt)
1396  return -1;
1397 
1398  p = c->super;
1399  while (p) {
1400  if (c == p) original_seen = TRUE;
1401  if (p->tt == MRB_TT_ICLASS) {
1402  if (p->mt == m->mt) {
1403  if (!superclass_seen && original_seen) {
1404  ins_pos = p; /* move insert point */
1405  }
1406  goto skip;
1407  }
1408  } else if (p->tt == MRB_TT_CLASS) {
1409  if (!search_super) break;
1410  superclass_seen = TRUE;
1411  }
1412  p = p->super;
1413  }
1414 
1415  ic = include_class_new(mrb, m, ins_pos->super);
1416  m->flags |= MRB_FL_CLASS_IS_INHERITED;
1417  ins_pos->super = ic;
1418  mrb_field_write_barrier(mrb, (struct RBasic*)ins_pos, (struct RBasic*)ic);
1419  ins_pos = ic;
1420  skip:
1421  m = m->super;
1422  }
1423  mc_clear(mrb);
1424  return 0;
1425 }
1426 
1427 static int
1428 fix_include_module(mrb_state *mrb, struct RBasic *obj, void *data)
1429 {
1430  struct RClass **m = (struct RClass**)data;
1431 
1432  if (obj->tt == MRB_TT_ICLASS && obj->c == m[0] && (obj->flags & MRB_FL_CLASS_IS_ORIGIN) == 0) {
1433  struct RClass *ic = (struct RClass*)obj;
1434  include_module_at(mrb, ic, ic, m[1], 1);
1435  }
1436  return MRB_EACH_OBJ_OK;
1437 }
1438 
1439 MRB_API void
1440 mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
1441 {
1442  mrb_check_frozen(mrb, c);
1443  if (include_module_at(mrb, c, find_origin(c), m, 1) < 0) {
1444  mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected");
1445  }
1446  if (c->tt == MRB_TT_MODULE && (c->flags & MRB_FL_CLASS_IS_INHERITED)) {
1447  struct RClass *data[2];
1448  data[0] = c;
1449  data[1] = m;
1451  }
1452 }
1453 
1454 static int
1455 fix_prepend_module(mrb_state *mrb, struct RBasic *obj, void *data)
1456 {
1457  struct RClass **m = (struct RClass**)data;
1458  struct RClass *c = (struct RClass*)obj;
1459 
1460  if (c->tt == MRB_TT_CLASS || c->tt == MRB_TT_MODULE) {
1461  struct RClass *p = c->super;
1462  struct RClass *ins_pos = c;
1463  while (p) {
1464  if (c == m[0]) break;
1465  if (p == m[0]->super->c) {
1466  ins_pos = c;
1467  }
1468  if (p->tt == MRB_TT_CLASS) break;
1469  if (p->c == m[0]) {
1470  include_module_at(mrb, ins_pos, ins_pos, m[1], 0);
1471  break;
1472  }
1473  c = p;
1474  p = p->super;
1475  }
1476  }
1477  return MRB_EACH_OBJ_OK;
1478 }
1479 
1480 MRB_API void
1481 mrb_prepend_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
1482 {
1483  struct RClass *origin;
1484 
1485  mrb_check_frozen(mrb, c);
1486  if (!(c->flags & MRB_FL_CLASS_IS_PREPENDED)) {
1487  struct RClass *c0;
1488 
1489  if (c->tt == MRB_TT_ICLASS) {
1490  c0 = c->c;
1491  }
1492  else {
1493  c0 = c;
1494  }
1495  origin = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, c0);
1497  origin->super = c->super;
1498  c->super = origin;
1499  origin->mt = c->mt;
1500  c->mt = NULL;
1501  origin->iv = c->iv;
1502  mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)origin);
1503  c->flags |= MRB_FL_CLASS_IS_PREPENDED;
1504  }
1505  if (include_module_at(mrb, c, c, m, 0) < 0) {
1506  mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic prepend detected");
1507  }
1508  if (c->tt == MRB_TT_MODULE &&
1510  struct RClass *data[2];
1511  data[0] = c;
1512  data[1] = m;
1514  }
1515 }
1516 
1517 static mrb_value
1519 {
1520  struct RClass *c;
1521 
1523  mrb_get_args(mrb, "c", &c);
1525  return mod;
1526 }
1527 
1528 static mrb_value
1530 {
1531  struct RClass *c;
1532 
1534  mrb_get_args(mrb, "c", &c);
1536  return mod;
1537 }
1538 
1539 /* 15.2.2.4.28 */
1540 /*
1541  * call-seq:
1542  * mod.include?(module) -> true or false
1543  *
1544  * Returns <code>true</code> if <i>module</i> is included in
1545  * <i>mod</i> or one of <i>mod</i>'s ancestors.
1546  *
1547  * module A
1548  * end
1549  * class B
1550  * include A
1551  * end
1552  * class C < B
1553  * end
1554  * B.include?(A) #=> true
1555  * C.include?(A) #=> true
1556  * A.include?(A) #=> false
1557  */
1558 static mrb_value
1560 {
1561  mrb_value mod2;
1562  struct RClass *c = mrb_class_ptr(mod);
1563 
1564  mrb_get_args(mrb, "C", &mod2);
1565  mrb_check_type(mrb, mod2, MRB_TT_MODULE);
1566 
1567  while (c) {
1568  if (c->tt == MRB_TT_ICLASS) {
1569  if (c->c == mrb_class_ptr(mod2)) return mrb_true_value();
1570  }
1571  c = c->super;
1572  }
1573  return mrb_false_value();
1574 }
1575 
1576 static mrb_value
1578 {
1579  mrb_value result;
1580  struct RClass *c = mrb_class_ptr(self);
1581  result = mrb_ary_new(mrb);
1582  while (c) {
1583  if (c->tt == MRB_TT_ICLASS) {
1584  mrb_ary_push(mrb, result, mrb_obj_value(c->c));
1585  }
1586  else if (!(c->flags & MRB_FL_CLASS_IS_PREPENDED)) {
1588  }
1589  c = c->super;
1590  }
1591 
1592  return result;
1593 }
1594 
1595 static mrb_value
1597 {
1598  mrb_value obj = mrb_get_arg1(mrb);
1599 
1602  return mod;
1603 }
1604 
1605 static mrb_value
1607 {
1608  mrb_value b;
1609  struct RClass *m = mrb_class_ptr(mod);
1610  boot_initmod(mrb, m); /* bootstrap a newly initialized module */
1611  mrb_get_args(mrb, "|&", &b);
1612  if (!mrb_nil_p(b)) {
1613  mrb_yield_with_class(mrb, b, 1, &mod, mod, m);
1614  }
1615  return mod;
1616 }
1617 
1618 /* implementation of module_eval/class_eval */
1620 
1621 static mrb_value
1623 {
1624  return mod;
1625 }
1626 
1627 /* returns mrb_class_ptr(mrb_singleton_class()) */
1628 /* except that it return NULL for immediate values */
1629 MRB_API struct RClass*
1631 {
1632  struct RBasic *obj;
1633 
1634  switch (mrb_type(v)) {
1635  case MRB_TT_FALSE:
1636  if (mrb_nil_p(v))
1637  return mrb->nil_class;
1638  return mrb->false_class;
1639  case MRB_TT_TRUE:
1640  return mrb->true_class;
1641  case MRB_TT_CPTR:
1642  case MRB_TT_SYMBOL:
1643  case MRB_TT_INTEGER:
1644 #ifndef MRB_NO_FLOAT
1645  case MRB_TT_FLOAT:
1646 #endif
1647  return NULL;
1648  default:
1649  break;
1650  }
1651  obj = mrb_basic_ptr(v);
1652  prepare_singleton_class(mrb, obj);
1653  return obj->c;
1654 }
1655 
1658 {
1659  struct RClass *c = mrb_singleton_class_ptr(mrb, v);
1660 
1661  if (c == NULL) {
1662  mrb_raise(mrb, E_TYPE_ERROR, "can't define singleton");
1663  }
1664  return mrb_obj_value(c);
1665 }
1666 
1667 MRB_API void
1669 {
1670  prepare_singleton_class(mrb, (struct RBasic*)o);
1671  mrb_define_method_id(mrb, o->c, mrb_intern_cstr(mrb, name), func, aspec);
1672 }
1673 
1674 MRB_API void
1676 {
1677  prepare_singleton_class(mrb, (struct RBasic*)o);
1678  mrb_define_method_id(mrb, o->c, name, func, aspec);
1679 }
1680 
1681 MRB_API void
1683 {
1684  mrb_define_singleton_method(mrb, (struct RObject*)c, name, func, aspec);
1685 }
1686 
1687 MRB_API void
1689 {
1690  mrb_define_singleton_method_id(mrb, (struct RObject*)c, name, func, aspec);
1691 }
1692 
1693 MRB_API void
1695 {
1696  mrb_define_class_method_id(mrb, c, name, func, aspec);
1697  mrb_define_method_id(mrb, c, name, func, aspec);
1698 }
1699 
1700 MRB_API void
1702 {
1704 }
1705 
1706 #ifndef MRB_NO_METHOD_CACHE
1707 static void
1709 {
1710  memset(mrb->cache, 0, MRB_METHOD_CACHE_SIZE*sizeof(mrb->cache[0]));
1711 }
1712 
1713 void
1715 {
1716  struct mrb_cache_entry *mc = mrb->cache;
1717  int i;
1718 
1719  if (c->flags & MRB_FL_CLASS_IS_INHERITED) {
1720  mc_clear(mrb);
1721  return;
1722  }
1723  for (i=0; i<MRB_METHOD_CACHE_SIZE; i++) {
1724  if (mc[i].c == c) mc[i].c = 0;
1725  }
1726 }
1727 #endif
1728 
1731 {
1732  mrb_method_t m;
1733  struct RClass *c = *cp;
1734 #ifndef MRB_NO_METHOD_CACHE
1735  struct RClass *oc = c;
1736  int h = kh_int_hash_func(mrb, ((intptr_t)oc) ^ mid) & (MRB_METHOD_CACHE_SIZE-1);
1737  struct mrb_cache_entry *mc = &mrb->cache[h];
1738 
1739  if (mc->c == c && mc->mid == mid) {
1740  *cp = mc->c0;
1741  return mc->m;
1742  }
1743 #endif
1744 
1745  while (c) {
1746  mt_tbl *h = c->mt;
1747 
1748  if (h) {
1749  struct mt_elem *e = mt_get(mrb, h, mid);
1750  if (e) {
1751  if (e->ptr.proc == 0) break;
1752  *cp = c;
1753  if (e->func_p) {
1754  MRB_METHOD_FROM_FUNC(m, e->ptr.func);
1755  }
1756  else {
1757  MRB_METHOD_FROM_PROC(m, e->ptr.proc);
1758  }
1759  if (e->noarg_p) {
1761  }
1762 #ifndef MRB_NO_METHOD_CACHE
1763  mc->c = oc;
1764  mc->c0 = c;
1765  mc->mid = mid;
1766  mc->m = m;
1767 #endif
1768  return m;
1769  }
1770  }
1771  c = c->super;
1772  }
1774  return m; /* no method */
1775 }
1776 
1779 {
1780  mrb_method_t m;
1781 
1782  m = mrb_method_search_vm(mrb, &c, mid);
1783  if (MRB_METHOD_UNDEF_P(m)) {
1784  mrb_name_error(mrb, mid, "undefined method '%n' for class %C", mid, c);
1785  }
1786  return m;
1787 }
1788 
1789 #define ONSTACK_ALLOC_MAX 32
1790 
1791 static mrb_sym
1792 prepare_name_common(mrb_state *mrb, mrb_sym sym, const char *prefix, const char *suffix)
1793 {
1794  char onstack[ONSTACK_ALLOC_MAX];
1795  mrb_int sym_len;
1796  const char *sym_str = mrb_sym_name_len(mrb, sym, &sym_len);
1797  size_t prefix_len = prefix ? strlen(prefix) : 0;
1798  size_t suffix_len = suffix ? strlen(suffix) : 0;
1799  size_t name_len = sym_len + prefix_len + suffix_len;
1800  char *buf = name_len > sizeof(onstack) ? (char *)mrb_alloca(mrb, name_len) : onstack;
1801  char *p = buf;
1802 
1803  if (prefix_len > 0) {
1804  memcpy(p, prefix, prefix_len);
1805  p += prefix_len;
1806  }
1807 
1808  memcpy(p, sym_str, sym_len);
1809  p += sym_len;
1810 
1811  if (suffix_len > 0) {
1812  memcpy(p, suffix, suffix_len);
1813  p += suffix_len;
1814  }
1815 
1816  return mrb_intern(mrb, buf, name_len);
1817 }
1818 
1819 static mrb_value
1821 {
1822  sym = prepare_name_common(mrb, sym, "@", NULL);
1823  mrb_iv_name_sym_check(mrb, sym);
1824  return mrb_symbol_value(sym);
1825 }
1826 
1827 static mrb_sym
1829 {
1830  return prepare_name_common(mrb, sym, NULL, "=");
1831 }
1832 
1833 static mrb_value
1835 {
1836  struct RClass *c = mrb_class_ptr(mod);
1837  const mrb_value *argv;
1838  mrb_int argc, i;
1839  int ai;
1840 
1841  mrb_get_args(mrb, "*", &argv, &argc);
1842  ai = mrb_gc_arena_save(mrb);
1843  for (i=0; i<argc; i++) {
1844  mrb_value name;
1845  mrb_sym method;
1846  struct RProc *p;
1847  mrb_method_t m;
1848 
1849  method = to_sym(mrb, argv[i]);
1850  name = prepare_ivar_name(mrb, method);
1851  if (access_name) {
1852  method = access_name(mrb, method);
1853  }
1854 
1855  p = mrb_proc_new_cfunc_with_env(mrb, accessor, 1, &name);
1857  mrb_define_method_raw(mrb, c, method, m);
1858  mrb_gc_arena_restore(mrb, ai);
1859  }
1860  return mrb_nil_value();
1861 }
1862 
1863 static mrb_value
1865 {
1867  return mrb_iv_get(mrb, obj, to_sym(mrb, name));
1868 }
1869 
1870 static mrb_value
1872 {
1873  return mod_attr_define(mrb, mod, attr_reader, NULL);
1874 }
1875 
1876 static mrb_value
1878 {
1880  mrb_value val = mrb_get_arg1(mrb);
1881 
1882  mrb_iv_set(mrb, obj, to_sym(mrb, name), val);
1883  return val;
1884 }
1885 
1886 static mrb_value
1888 {
1890 }
1891 
1892 static mrb_value
1894 {
1895  struct RClass *c = mrb_class_ptr(cv);
1896  struct RObject *o;
1897  enum mrb_vtype ttype = MRB_INSTANCE_TT(c);
1898 
1899  if (c->tt == MRB_TT_SCLASS)
1900  mrb_raise(mrb, E_TYPE_ERROR, "can't create instance of singleton class");
1901 
1902  if (ttype == 0) ttype = MRB_TT_OBJECT;
1903  if (ttype <= MRB_TT_CPTR) {
1904  mrb_raisef(mrb, E_TYPE_ERROR, "can't create instance of %v", cv);
1905  }
1906  o = (struct RObject*)mrb_obj_alloc(mrb, ttype, c);
1907  return mrb_obj_value(o);
1908 }
1909 
1910 /*
1911  * call-seq:
1912  * class.new(args, ...) -> obj
1913  *
1914  * Creates a new object of <i>class</i>'s class, then
1915  * invokes that object's <code>initialize</code> method,
1916  * passing it <i>args</i>. This is the method that ends
1917  * up getting called whenever an object is constructed using
1918  * `.new`.
1919  *
1920  */
1921 
1922 mrb_value
1924 {
1925  mrb_value obj, blk;
1926  const mrb_value *argv;
1927  mrb_int argc;
1928  mrb_sym init;
1929 
1930  mrb_get_args(mrb, "*!&", &argv, &argc, &blk);
1931  obj = mrb_instance_alloc(mrb, cv);
1932  init = MRB_SYM(initialize);
1933  if (!mrb_func_basic_p(mrb, obj, init, mrb_bob_init)) {
1934  mrb_funcall_with_block(mrb, obj, init, argc, argv, blk);
1935  }
1936  return obj;
1937 }
1938 
1941 {
1942  mrb_value obj;
1943  mrb_sym mid;
1944 
1945  obj = mrb_instance_alloc(mrb, mrb_obj_value(c));
1946  mid = MRB_SYM(initialize);
1947  if (!mrb_func_basic_p(mrb, obj, mid, mrb_bob_init)) {
1948  mrb_funcall_argv(mrb, obj, mid, argc, argv);
1949  }
1950  return obj;
1951 }
1952 
1953 static mrb_value
1955 {
1956  mrb_value a, b;
1957 
1958  mrb_get_args(mrb, "|C&", &a, &b);
1959  if (!mrb_nil_p(b)) {
1960  mrb_yield_with_class(mrb, b, 1, &c, c, mrb_class_ptr(c));
1961  }
1962  return c;
1963 }
1964 
1965 static mrb_value
1967 {
1968  mrb_int n;
1969  mrb_value super, blk;
1971  mrb_sym mid;
1972 
1973  n = mrb_get_args(mrb, "|C&", &super, &blk);
1974  if (n == 0) {
1975  super = mrb_obj_value(mrb->object_class);
1976  }
1978  mid = MRB_SYM(initialize);
1981  }
1982  else {
1983  mrb_funcall_with_block(mrb, new_class, mid, n, &super, blk);
1984  }
1986  return new_class;
1987 }
1988 
1989 static mrb_value
1991 {
1992  struct RClass *c;
1993 
1994  c = mrb_class_ptr(klass);
1995  c = find_origin(c)->super;
1996  while (c && c->tt == MRB_TT_ICLASS) {
1997  c = find_origin(c)->super;
1998  }
1999  if (!c) return mrb_nil_value();
2000  return mrb_obj_value(c);
2001 }
2002 
2003 static mrb_value
2005 {
2006  return mrb_nil_value();
2007 }
2008 
2009 static mrb_value
2011 {
2012  return mrb_bool_value(!mrb_test(cv));
2013 }
2014 
2015 /* 15.3.1.3.1 */
2016 /* 15.3.1.3.10 */
2017 /* 15.3.1.3.11 */
2018 /*
2019  * call-seq:
2020  * obj == other -> true or false
2021  * obj.equal?(other) -> true or false
2022  * obj.eql?(other) -> true or false
2023  *
2024  * Equality---At the <code>Object</code> level, <code>==</code> returns
2025  * <code>true</code> only if <i>obj</i> and <i>other</i> are the
2026  * same object. Typically, this method is overridden in descendant
2027  * classes to provide class-specific meaning.
2028  *
2029  * Unlike <code>==</code>, the <code>equal?</code> method should never be
2030  * overridden by subclasses: it is used to determine object identity
2031  * (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same
2032  * object as <code>b</code>).
2033  *
2034  * The <code>eql?</code> method returns <code>true</code> if
2035  * <i>obj</i> and <i>anObject</i> have the same value. Used by
2036  * <code>Hash</code> to test members for equality. For objects of
2037  * class <code>Object</code>, <code>eql?</code> is synonymous with
2038  * <code>==</code>. Subclasses normally continue this tradition, but
2039  * there are exceptions. <code>Numeric</code> types, for example,
2040  * perform type conversion across <code>==</code>, but not across
2041  * <code>eql?</code>, so:
2042  *
2043  * 1 == 1.0 #=> true
2044  * 1.eql? 1.0 #=> false
2045  */
2046 mrb_value
2048 {
2049  mrb_value arg = mrb_get_arg1(mrb);
2050 
2051  return mrb_bool_value(mrb_obj_equal(mrb, self, arg));
2052 }
2053 
2056 {
2057  mrb_method_t m;
2058 
2059  m = mrb_method_search_vm(mrb, &c, mid);
2060  if (MRB_METHOD_UNDEF_P(m)) {
2061  return FALSE;
2062  }
2063  return TRUE;
2064 }
2065 
2068 {
2069  return mrb_obj_respond_to(mrb, mrb_class(mrb, obj), mid);
2070 }
2071 
2074 {
2075  mrb_value path;
2076  mrb_sym nsym = MRB_SYM(__classname__);
2077 
2078  path = mrb_obj_iv_get(mrb, (struct RObject*)c, nsym);
2079  if (mrb_nil_p(path)) {
2080  /* no name (yet) */
2081  return mrb_class_find_path(mrb, c);
2082  }
2083  else if (mrb_symbol_p(path)) {
2084  /* toplevel class/module */
2085  return mrb_sym_str(mrb, mrb_symbol(path));
2086  }
2087  return mrb_str_dup(mrb, path);
2088 }
2089 
2090 MRB_API struct RClass*
2092 {
2093  if (cl == 0) return NULL;
2094  while ((cl->tt == MRB_TT_SCLASS) || (cl->tt == MRB_TT_ICLASS)) {
2095  cl = cl->super;
2096  if (cl == 0) return NULL;
2097  }
2098  return cl;
2099 }
2100 
2101 MRB_API const char*
2103 {
2104  mrb_value name;
2105 
2106  if (c == NULL) return NULL;
2107  name = class_name_str(mrb, c);
2108  return RSTRING_PTR(name);
2109 }
2110 
2111 MRB_API const char*
2113 {
2114  return mrb_class_name(mrb, mrb_obj_class(mrb, obj));
2115 }
2116 
2117 /*!
2118  * Ensures a class can be derived from super.
2119  *
2120  * \param super a reference to an object.
2121  * \exception TypeError if \a super is not a Class or \a super is a singleton class.
2122  */
2123 static void
2125 {
2126  if (super->tt != MRB_TT_CLASS) {
2127  mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%C given)", super);
2128  }
2129  if (super->tt == MRB_TT_SCLASS) {
2130  mrb_raise(mrb, E_TYPE_ERROR, "can't make subclass of singleton class");
2131  }
2132  if (super == mrb->class_class) {
2133  mrb_raise(mrb, E_TYPE_ERROR, "can't make subclass of Class");
2134  }
2135 }
2136 
2137 /*!
2138  * Creates a new class.
2139  * \param super a class from which the new class derives.
2140  * \exception TypeError \a super is not inheritable.
2141  * \exception TypeError \a super is the Class class.
2142  */
2143 MRB_API struct RClass*
2145 {
2146  struct RClass *c;
2147 
2148  if (super) {
2150  }
2151  c = boot_defclass(mrb, super);
2152  if (super) {
2154  }
2155  make_metaclass(mrb, c);
2156 
2157  return c;
2158 }
2159 
2160 /*!
2161  * Creates a new module.
2162  */
2163 MRB_API struct RClass*
2165 {
2166  struct RClass *m = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_MODULE, mrb->module_class);
2167  boot_initmod(mrb, m);
2168  return m;
2169 }
2170 
2171 /*
2172  * call-seq:
2173  * obj.class => class
2174  *
2175  * Returns the class of <i>obj</i>, now preferred over
2176  * <code>Object#type</code>, as an object's type in Ruby is only
2177  * loosely tied to that object's class. This method must always be
2178  * called with an explicit receiver, as <code>class</code> is also a
2179  * reserved word in Ruby.
2180  *
2181  * 1.class #=> Integer
2182  * self.class #=> Object
2183  */
2184 
2185 MRB_API struct RClass*
2187 {
2188  return mrb_class_real(mrb_class(mrb, obj));
2189 }
2190 
2191 MRB_API void
2193 {
2194  mrb_method_t m = mrb_method_search(mrb, c, b);
2195 
2196  if (!MRB_METHOD_CFUNC_P(m)) {
2197  struct RProc *p = MRB_METHOD_PROC(m);
2198 
2199  if (MRB_PROC_ENV_P(p)) {
2200  MRB_PROC_ENV(p)->mid = b;
2201  }
2202  else {
2203  struct RClass *tc = MRB_PROC_TARGET_CLASS(p);
2204  struct REnv *e = (struct REnv*)mrb_obj_alloc(mrb, MRB_TT_ENV, NULL);
2205 
2206  e->mid = b;
2207  if (tc) {
2208  e->c = tc;
2209  mrb_field_write_barrier(mrb, (struct RBasic*)e, (struct RBasic*)tc);
2210  }
2211  p->e.env = e;
2212  p->flags |= MRB_PROC_ENVSET;
2213  }
2214  }
2215  mrb_define_method_raw(mrb, c, a, m);
2216 }
2217 
2218 /*!
2219  * Defines an alias of a method.
2220  * \param mrb the mruby state
2221  * \param klass the class which the original method belongs to
2222  * \param name1 a new name for the method
2223  * \param name2 the original name of the method
2224  */
2225 MRB_API void
2226 mrb_define_alias(mrb_state *mrb, struct RClass *klass, const char *name1, const char *name2)
2227 {
2228  mrb_alias_method(mrb, klass, mrb_intern_cstr(mrb, name1), mrb_intern_cstr(mrb, name2));
2229 }
2230 
2231 MRB_API void
2233 {
2234  mrb_alias_method(mrb, klass, a, b);
2235 }
2236 
2237 /*
2238  * call-seq:
2239  * mod.to_s -> string
2240  *
2241  * Return a string representing this module or class. For basic
2242  * classes and modules, this is the name. For singletons, we
2243  * show information on the thing we're attached to as well.
2244  */
2245 
2246 mrb_value
2248 {
2249  if (mrb_sclass_p(klass)) {
2250  mrb_value v = mrb_iv_get(mrb, klass, MRB_SYM(__attached__));
2251  mrb_value str = mrb_str_new_lit(mrb, "#<Class:");
2252 
2253  if (class_ptr_p(v)) {
2254  mrb_str_cat_str(mrb, str, mrb_inspect(mrb, v));
2255  }
2256  else {
2257  mrb_str_cat_str(mrb, str, mrb_any_to_s(mrb, v));
2258  }
2259  return mrb_str_cat_lit(mrb, str, ">");
2260  }
2261  else {
2262  return class_name_str(mrb, mrb_class_ptr(klass));
2263  }
2264 }
2265 
2266 static mrb_value
2268 {
2269  struct RClass *c = mrb_class_ptr(mod);
2270  mrb_sym new_name, old_name;
2271 
2272  mrb_get_args(mrb, "nn", &new_name, &old_name);
2273  mrb_alias_method(mrb, c, new_name, old_name);
2274  return mod;
2275 }
2276 
2277 static void
2279 {
2280  mrb_method_t m;
2281 
2283  mrb_define_method_raw(mrb, c, a, m);
2284 }
2285 
2286 MRB_API void
2288 {
2289  if (!mrb_obj_respond_to(mrb, c, a)) {
2290  mrb_name_error(mrb, a, "undefined method '%n' for class '%C'", a, c);
2291  }
2292  undef_method(mrb, c, a);
2293 }
2294 
2295 MRB_API void
2296 mrb_undef_method(mrb_state *mrb, struct RClass *c, const char *name)
2297 {
2298  undef_method(mrb, c, mrb_intern_cstr(mrb, name));
2299 }
2300 
2301 MRB_API void
2303 {
2305 }
2306 
2307 MRB_API void
2308 mrb_undef_class_method(mrb_state *mrb, struct RClass *c, const char *name)
2309 {
2311 }
2312 
2313 MRB_API void
2315 {
2316  mt_tbl *h;
2317 
2319  h = c->mt;
2320 
2321  if (h && mt_del(mrb, h, mid)) return;
2322  mrb_name_error(mrb, mid, "method '%n' not defined in %C", mid, c);
2323 }
2324 
2325 static mrb_value
2327 {
2328  struct RClass *c = mrb_class_ptr(mod);
2329  mrb_int argc;
2330  const mrb_value *argv;
2331 
2332  mrb_get_args(mrb, "*", &argv, &argc);
2333  while (argc--) {
2334  mrb_undef_method_id(mrb, c, to_sym(mrb, *argv));
2335  argv++;
2336  }
2337  return mrb_nil_value();
2338 }
2339 
2340 static void
2342 {
2343  mrb_int len;
2344  const char *name = mrb_sym_name_len(mrb, id, &len);
2345  if (!mrb_const_name_p(mrb, name, len)) {
2346  mrb_name_error(mrb, id, "wrong constant name %n", id);
2347  }
2348 }
2349 
2350 static mrb_value
2352 {
2353  mrb_sym id;
2354  mrb_bool inherit = TRUE;
2355 
2356  mrb_get_args(mrb, "n|b", &id, &inherit);
2357  check_const_name_sym(mrb, id);
2358  if (inherit) {
2359  return mrb_bool_value(mrb_const_defined(mrb, mod, id));
2360  }
2361  return mrb_bool_value(mrb_const_defined_at(mrb, mod, id));
2362 }
2363 
2364 static mrb_value
2366 {
2367  check_const_name_sym(mrb, id);
2368  return mrb_const_get(mrb, mod, id);
2369 }
2370 
2371 static mrb_value
2373 {
2374  mrb_value path = mrb_get_arg1(mrb);
2375  mrb_sym id;
2376  char *ptr;
2377  mrb_int off, end, len;
2378 
2379  if (mrb_symbol_p(path)) {
2380  /* const get with symbol */
2381  id = mrb_symbol(path);
2382  return mrb_const_get_sym(mrb, mod, id);
2383  }
2384 
2385  /* const get with class path string */
2387  ptr = RSTRING_PTR(path);
2388  len = RSTRING_LEN(path);
2389  off = 0;
2390 
2391  while (off < len) {
2392  end = mrb_str_index_lit(mrb, path, "::", off);
2393  end = (end == -1) ? len : end;
2394  id = mrb_intern(mrb, ptr+off, end-off);
2395  mod = mrb_const_get_sym(mrb, mod, id);
2396  if (end == len)
2397  off = end;
2398  else {
2399  off = end + 2;
2400  if (off == len) { /* trailing "::" */
2401  mrb_name_error(mrb, id, "wrong constant name '%v'", path);
2402  }
2403  }
2404  }
2405 
2406  return mod;
2407 }
2408 
2409 static mrb_value
2411 {
2412  mrb_sym id;
2413  mrb_value value;
2414 
2415  mrb_get_args(mrb, "no", &id, &value);
2416  check_const_name_sym(mrb, id);
2417  mrb_const_set(mrb, mod, id, value);
2418  return value;
2419 }
2420 
2421 static mrb_value
2423 {
2424  mrb_sym id;
2425  mrb_value val;
2426 
2427  mrb_get_args(mrb, "n", &id);
2428  check_const_name_sym(mrb, id);
2429  val = mrb_iv_remove(mrb, mod, id);
2430  if (mrb_undef_p(val)) {
2431  mrb_name_error(mrb, id, "constant %n not defined", id);
2432  }
2433  return val;
2434 }
2435 
2436 static mrb_value
2438 {
2439  mrb_sym sym;
2440 
2441  mrb_get_args(mrb, "n", &sym);
2442 
2443  if (mrb_class_real(mrb_class_ptr(mod)) != mrb->object_class) {
2444  mrb_name_error(mrb, sym, "uninitialized constant %v::%n", mod, sym);
2445  }
2446  else {
2447  mrb_name_error(mrb, sym, "uninitialized constant %n", sym);
2448  }
2449  /* not reached */
2450  return mrb_nil_value();
2451 }
2452 
2453 /* 15.2.2.4.34 */
2454 /*
2455  * call-seq:
2456  * mod.method_defined?(symbol) -> true or false
2457  *
2458  * Returns +true+ if the named method is defined by
2459  * _mod_ (or its included modules and, if _mod_ is a class,
2460  * its ancestors). Public and protected methods are matched.
2461  *
2462  * module A
2463  * def method1() end
2464  * end
2465  * class B
2466  * def method2() end
2467  * end
2468  * class C < B
2469  * include A
2470  * def method3() end
2471  * end
2472  *
2473  * A.method_defined? :method1 #=> true
2474  * C.method_defined? "method1" #=> true
2475  * C.method_defined? "method2" #=> true
2476  * C.method_defined? "method3" #=> true
2477  * C.method_defined? "method4" #=> false
2478  */
2479 
2480 static mrb_value
2482 {
2483  mrb_sym id;
2484 
2485  mrb_get_args(mrb, "n", &id);
2487 }
2488 
2489 mrb_value
2491 {
2492  struct RProc *p;
2493  mrb_method_t m;
2494  mrb_sym mid;
2496  mrb_value blk;
2497 
2498  mrb_get_args(mrb, "n|o&", &mid, &proc, &blk);
2499  switch (mrb_type(proc)) {
2500  case MRB_TT_PROC:
2501  blk = proc;
2502  break;
2503  case MRB_TT_UNDEF:
2504  /* ignored */
2505  break;
2506  default:
2507  mrb_raisef(mrb, E_TYPE_ERROR, "wrong argument type %T (expected Proc)", proc);
2508  break;
2509  }
2510  if (mrb_nil_p(blk)) {
2511  mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
2512  }
2513  p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
2514  mrb_proc_copy(p, mrb_proc_ptr(blk));
2515  p->flags |= MRB_PROC_STRICT;
2517  mrb_define_method_raw(mrb, c, mid, m);
2518  return mrb_symbol_value(mid);
2519 }
2520 
2521 static mrb_value
2523 {
2524  return mrb_mod_define_method_m(mrb, mrb_class_ptr(self));
2525 }
2526 
2527 static mrb_value
2529 {
2530  return mrb_mod_define_method_m(mrb, mrb->object_class);
2531 }
2532 
2533 static mrb_value
2535 {
2536  mrb_value obj = mrb_get_arg1(mrb);
2537  mrb_bool eqq;
2538 
2539  eqq = mrb_obj_is_kind_of(mrb, obj, mrb_class_ptr(mod));
2540 
2541  return mrb_bool_value(eqq);
2542 }
2543 
2544 static mrb_value
2546 {
2547  mrb_value mod = mrb_obj_clone(mrb, self);
2549  return mod;
2550 }
2551 
2552 static mrb_value
2554 {
2555  const mrb_value *argv;
2556  mrb_int argc, i;
2557  mrb_sym mid;
2558  mrb_method_t m;
2559  struct RClass *rclass;
2560  int ai;
2561 
2563 
2564  mrb_get_args(mrb, "*", &argv, &argc);
2565  if (argc == 0) {
2566  /* set MODFUNC SCOPE if implemented */
2567  return mod;
2568  }
2569 
2570  /* set PRIVATE method visibility if implemented */
2571  /* mrb_mod_dummy_visibility(mrb, mod); */
2572 
2573  for (i=0; i<argc; i++) {
2575 
2576  mid = mrb_symbol(argv[i]);
2577  rclass = mrb_class_ptr(mod);
2578  m = mrb_method_search(mrb, rclass, mid);
2579 
2580  prepare_singleton_class(mrb, (struct RBasic*)rclass);
2581  ai = mrb_gc_arena_save(mrb);
2582  mrb_define_method_raw(mrb, rclass->c, mid, m);
2583  mrb_gc_arena_restore(mrb, ai);
2584  }
2585 
2586  return mod;
2587 }
2588 
2589 static struct RClass*
2591 {
2592  struct RClass *klass = mrb_basic_ptr(obj)->c;
2593 
2594  if (klass->tt != MRB_TT_SCLASS)
2595  return klass;
2596  else {
2597  /* copy singleton(unnamed) class */
2598  struct RClass *clone = (struct RClass*)mrb_obj_alloc(mrb, klass->tt, mrb->class_class);
2599 
2600  switch (mrb_type(obj)) {
2601  case MRB_TT_CLASS:
2602  case MRB_TT_SCLASS:
2603  break;
2604  default:
2605  clone->c = mrb_singleton_class_clone(mrb, mrb_obj_value(klass));
2606  break;
2607  }
2608  clone->super = klass->super;
2609  if (klass->iv) {
2610  mrb_iv_copy(mrb, mrb_obj_value(clone), mrb_obj_value(klass));
2611  mrb_obj_iv_set(mrb, (struct RObject*)clone, MRB_SYM(__attached__), obj);
2612  }
2613  if (klass->mt) {
2614  clone->mt = mt_copy(mrb, klass->mt);
2615  }
2616  else {
2617  clone->mt = mt_new(mrb);
2618  }
2619  clone->tt = MRB_TT_SCLASS;
2620  return clone;
2621  }
2622 }
2623 
2624 static void
2626 {
2627  struct RClass *dc = mrb_class_ptr(dst);
2628  struct RClass *sc = mrb_class_ptr(src);
2629  /* if the origin is not the same as the class, then the origin and
2630  the current class need to be copied */
2631  if (sc->flags & MRB_FL_CLASS_IS_PREPENDED) {
2632  struct RClass *c0 = sc->super;
2633  struct RClass *c1 = dc;
2634 
2635  /* copy prepended iclasses */
2636  while (!(c0->flags & MRB_FL_CLASS_IS_ORIGIN)) {
2637  c1->super = mrb_class_ptr(mrb_obj_dup(mrb, mrb_obj_value(c0)));
2638  c1 = c1->super;
2639  c0 = c0->super;
2640  }
2641  c1->super = mrb_class_ptr(mrb_obj_dup(mrb, mrb_obj_value(c0)));
2642  c1->super->flags |= MRB_FL_CLASS_IS_ORIGIN;
2643  }
2644  if (sc->mt) {
2645  dc->mt = mt_copy(mrb, sc->mt);
2646  }
2647  else {
2648  dc->mt = mt_new(mrb);
2649  }
2650  dc->super = sc->super;
2652 }
2653 
2654 /* 15.3.1.3.16 */
2655 static mrb_value
2657 {
2658  mrb_value orig = mrb_get_arg1(mrb);
2659 
2660  if (mrb_obj_equal(mrb, self, orig)) return self;
2661  if ((mrb_type(self) != mrb_type(orig)) || (mrb_obj_class(mrb, self) != mrb_obj_class(mrb, orig))) {
2662  mrb_raise(mrb, E_TYPE_ERROR, "initialize_copy should take same class object");
2663  }
2664  return self;
2665 }
2666 
2667 static void
2669 {
2670  switch (mrb_type(obj)) {
2671  case MRB_TT_ICLASS:
2672  copy_class(mrb, dest, obj);
2673  return;
2674  case MRB_TT_CLASS:
2675  case MRB_TT_MODULE:
2676  copy_class(mrb, dest, obj);
2677  mrb_iv_copy(mrb, dest, obj);
2678  mrb_iv_remove(mrb, dest, MRB_SYM(__classname__));
2679  break;
2680  case MRB_TT_OBJECT:
2681  case MRB_TT_SCLASS:
2682  case MRB_TT_HASH:
2683  case MRB_TT_DATA:
2684  case MRB_TT_EXCEPTION:
2685  mrb_iv_copy(mrb, dest, obj);
2686  break;
2687  case MRB_TT_ISTRUCT:
2688  mrb_istruct_copy(dest, obj);
2689  break;
2690 
2691  default:
2692  break;
2693  }
2694  if (!mrb_func_basic_p(mrb, dest, MRB_SYM(initialize_copy), mrb_obj_init_copy)) {
2695  mrb_funcall_id(mrb, dest, MRB_SYM(initialize_copy), 1, obj);
2696  }
2697 }
2698 
2699 /* 15.3.1.3.8 */
2700 /*
2701  * call-seq:
2702  * obj.clone -> an_object
2703  *
2704  * Produces a shallow copy of <i>obj</i>---the instance variables of
2705  * <i>obj</i> are copied, but not the objects they reference. Copies
2706  * the frozen state of <i>obj</i>. See also the discussion
2707  * under <code>Object#dup</code>.
2708  *
2709  * class Klass
2710  * attr_accessor :str
2711  * end
2712  * s1 = Klass.new #=> #<Klass:0x401b3a38>
2713  * s1.str = "Hello" #=> "Hello"
2714  * s2 = s1.clone #=> #<Klass:0x401b3998 @str="Hello">
2715  * s2.str[1,4] = "i" #=> "i"
2716  * s1.inspect #=> "#<Klass:0x401b3a38 @str=\"Hi\">"
2717  * s2.inspect #=> "#<Klass:0x401b3998 @str=\"Hi\">"
2718  *
2719  * This method may have class-specific behavior. If so, that
2720  * behavior will be documented under the #+initialize_copy+ method of
2721  * the class.
2722  *
2723  * Some Class(True False Nil Symbol Integer Float) Object cannot clone.
2724  */
2727 {
2728  struct RObject *p;
2729  mrb_value clone;
2730 
2731  if (mrb_immediate_p(self)) {
2732  return self;
2733  }
2734  if (mrb_sclass_p(self)) {
2735  mrb_raise(mrb, E_TYPE_ERROR, "can't clone singleton class");
2736  }
2737  p = (struct RObject*)mrb_obj_alloc(mrb, mrb_type(self), mrb_obj_class(mrb, self));
2738  p->c = mrb_singleton_class_clone(mrb, self);
2739  mrb_field_write_barrier(mrb, (struct RBasic*)p, (struct RBasic*)p->c);
2740  clone = mrb_obj_value(p);
2741  init_copy(mrb, clone, self);
2742  p->flags |= mrb_obj_ptr(self)->flags & MRB_FL_OBJ_IS_FROZEN;
2743 
2744  return clone;
2745 }
2746 
2747 /* 15.3.1.3.9 */
2748 /*
2749  * call-seq:
2750  * obj.dup -> an_object
2751  *
2752  * Produces a shallow copy of <i>obj</i>---the instance variables of
2753  * <i>obj</i> are copied, but not the objects they reference.
2754  * <code>dup</code> copies the frozen state of <i>obj</i>. See also
2755  * the discussion under <code>Object#clone</code>. In general,
2756  * <code>clone</code> and <code>dup</code> may have different semantics
2757  * in descendant classes. While <code>clone</code> is used to duplicate
2758  * an object, including its internal state, <code>dup</code> typically
2759  * uses the class of the descendant object to create the new instance.
2760  *
2761  * This method may have class-specific behavior. If so, that
2762  * behavior will be documented under the #+initialize_copy+ method of
2763  * the class.
2764  */
2765 
2768 {
2769  struct RBasic *p;
2770  mrb_value dup;
2771 
2772  if (mrb_immediate_p(obj)) {
2773  return obj;
2774  }
2775  if (mrb_sclass_p(obj)) {
2776  mrb_raise(mrb, E_TYPE_ERROR, "can't dup singleton class");
2777  }
2778  p = mrb_obj_alloc(mrb, mrb_type(obj), mrb_obj_class(mrb, obj));
2779  dup = mrb_obj_value(p);
2780  init_copy(mrb, dup, obj);
2781 
2782  return dup;
2783 }
2784 
2785 /* implementation of __id__ */
2787 /* implementation of instance_eval */
2789 
2790 static mrb_value
2792 {
2793  return mrb_str_new_lit(mrb, "main");
2794 }
2795 
2796 static const mrb_code new_iseq[] = {
2797  OP_ENTER, 0x0, 0x10, 0x1, /* OP_ENTER 0:0:1:0:0:0:1 */
2798  OP_LOADSELF, 0x3, /* OP_LOADSELF R3 */
2799  OP_SEND, 0x3, 0x0, 0x0, /* OP_SEND R3 :allocate 0 */
2800  OP_MOVE, 0x0, 0x3, /* OP_MOVE R0 R3 */
2801  OP_MOVE, 0x4, 0x1, /* OP_MOVE R4 R1 */
2802  OP_MOVE, 0x5, 0x2, /* OP_MOVE R5 R2 */
2803  OP_SENDVB, 0x3, 0x1, /* OP_SENDVB R4 :initialize */
2804  OP_RETURN, 0x0 /* OP_RETURN R0 */
2805 };
2806 
2808 
2810  3, 6, 0, MRB_IREP_STATIC,
2812  sizeof(new_iseq), 0, 2, 0, 0,
2813 };
2814 
2815 static void
2816 init_class_new(mrb_state *mrb, struct RClass *cls)
2817 {
2818  struct RProc *p;
2819  mrb_method_t m;
2820 
2822  p = mrb_proc_new(mrb, &new_irep);
2824  mrb_define_method_raw(mrb, cls, MRB_SYM(new), m);
2825 }
2826 
2827 /* implementation of #send method */
2829 
2830 void
2832 {
2833  struct RClass *bob; /* BasicObject */
2834  struct RClass *obj; /* Object */
2835  struct RClass *mod; /* Module */
2836  struct RClass *cls; /* Class */
2837 
2838  /* boot class hierarchy */
2839  bob = boot_defclass(mrb, 0);
2840  obj = boot_defclass(mrb, bob); mrb->object_class = obj;
2841  mod = boot_defclass(mrb, obj); mrb->module_class = mod;/* obj -> mod */
2842  cls = boot_defclass(mrb, mod); mrb->class_class = cls; /* obj -> cls */
2843  /* fix-up loose ends */
2844  bob->c = obj->c = mod->c = cls->c = cls;
2845  make_metaclass(mrb, bob);
2846  make_metaclass(mrb, obj);
2847  make_metaclass(mrb, mod);
2848  make_metaclass(mrb, cls);
2849 
2850  /* name basic classes */
2851  mrb_define_const_id(mrb, bob, MRB_SYM(BasicObject), mrb_obj_value(bob));
2852  mrb_define_const_id(mrb, obj, MRB_SYM(Object), mrb_obj_value(obj));
2853  mrb_define_const_id(mrb, obj, MRB_SYM(Module), mrb_obj_value(mod));
2854  mrb_define_const_id(mrb, obj, MRB_SYM(Class), mrb_obj_value(cls));
2855 
2856  /* name each classes */
2857  mrb_class_name_class(mrb, NULL, bob, MRB_SYM(BasicObject));
2858  mrb_class_name_class(mrb, NULL, obj, MRB_SYM(Object)); /* 15.2.1 */
2859  mrb_class_name_class(mrb, NULL, mod, MRB_SYM(Module)); /* 15.2.2 */
2860  mrb_class_name_class(mrb, NULL, cls, MRB_SYM(Class)); /* 15.2.3 */
2861 
2862  mrb->proc_class = mrb_define_class(mrb, "Proc", mrb->object_class); /* 15.2.17 */
2864 
2866  mrb_define_method(mrb, bob, "initialize", mrb_bob_init, MRB_ARGS_NONE());
2867  mrb_define_method(mrb, bob, "!", mrb_bob_not, MRB_ARGS_NONE());
2868  mrb_define_method(mrb, bob, "==", mrb_obj_equal_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.1 */
2869  mrb_define_method(mrb, bob, "__id__", mrb_obj_id_m, MRB_ARGS_NONE()); /* 15.3.1.3.4 */
2870  mrb_define_method(mrb, bob, "__send__", mrb_f_send, MRB_ARGS_REQ(1)|MRB_ARGS_REST()|MRB_ARGS_BLOCK()); /* 15.3.1.3.5 */
2871  mrb_define_method(mrb, bob, "equal?", mrb_obj_equal_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.11 */
2872  mrb_define_method(mrb, bob, "instance_eval", mrb_obj_instance_eval, MRB_ARGS_OPT(1)|MRB_ARGS_BLOCK()); /* 15.3.1.3.18 */
2873 
2875  mrb_define_method(mrb, cls, "allocate", mrb_instance_alloc, MRB_ARGS_NONE());
2876  mrb_define_method(mrb, cls, "superclass", mrb_class_superclass, MRB_ARGS_NONE()); /* 15.2.3.3.4 */
2877  mrb_define_method(mrb, cls, "initialize", mrb_class_initialize, MRB_ARGS_OPT(1)); /* 15.2.3.3.1 */
2878  mrb_define_method(mrb, cls, "inherited", mrb_bob_init, MRB_ARGS_REQ(1));
2879 
2880  init_class_new(mrb, cls);
2881 
2883  mrb_define_method(mrb, mod, "extend_object", mrb_mod_extend_object, MRB_ARGS_REQ(1)); /* 15.2.2.4.25 */
2884  mrb_define_method(mrb, mod, "extended", mrb_bob_init, MRB_ARGS_REQ(1)); /* 15.2.2.4.26 */
2885  mrb_define_method(mrb, mod, "prepended", mrb_bob_init, MRB_ARGS_REQ(1));
2886  mrb_define_method(mrb, mod, "prepend_features", mrb_mod_prepend_features, MRB_ARGS_REQ(1));
2887  mrb_define_method(mrb, mod, "include?", mrb_mod_include_p, MRB_ARGS_REQ(1)); /* 15.2.2.4.28 */
2888  mrb_define_method(mrb, mod, "append_features", mrb_mod_append_features, MRB_ARGS_REQ(1)); /* 15.2.2.4.10 */
2889  mrb_define_method(mrb, mod, "class_eval", mrb_mod_module_eval, MRB_ARGS_ANY()); /* 15.2.2.4.15 */
2890  mrb_define_method(mrb, mod, "included", mrb_bob_init, MRB_ARGS_REQ(1)); /* 15.2.2.4.29 */
2891  mrb_define_method(mrb, mod, "initialize", mrb_mod_initialize, MRB_ARGS_NONE()); /* 15.2.2.4.31 */
2892  mrb_define_method(mrb, mod, "module_eval", mrb_mod_module_eval, MRB_ARGS_ANY()); /* 15.2.2.4.35 */
2893  mrb_define_method(mrb, mod, "module_function", mrb_mod_module_function, MRB_ARGS_ANY());
2894  mrb_define_method(mrb, mod, "private", mrb_mod_dummy_visibility, MRB_ARGS_ANY()); /* 15.2.2.4.36 */
2895  mrb_define_method(mrb, mod, "protected", mrb_mod_dummy_visibility, MRB_ARGS_ANY()); /* 15.2.2.4.37 */
2896  mrb_define_method(mrb, mod, "public", mrb_mod_dummy_visibility, MRB_ARGS_ANY()); /* 15.2.2.4.38 */
2897  mrb_define_method(mrb, mod, "attr_reader", mrb_mod_attr_reader, MRB_ARGS_ANY()); /* 15.2.2.4.13 */
2898  mrb_define_method(mrb, mod, "attr_writer", mrb_mod_attr_writer, MRB_ARGS_ANY()); /* 15.2.2.4.14 */
2899  mrb_define_method(mrb, mod, "to_s", mrb_mod_to_s, MRB_ARGS_NONE());
2900  mrb_define_method(mrb, mod, "inspect", mrb_mod_to_s, MRB_ARGS_NONE());
2901  mrb_define_method(mrb, mod, "alias_method", mrb_mod_alias, MRB_ARGS_ANY()); /* 15.2.2.4.8 */
2902  mrb_define_method(mrb, mod, "ancestors", mrb_mod_ancestors, MRB_ARGS_NONE()); /* 15.2.2.4.9 */
2903  mrb_define_method(mrb, mod, "undef_method", mrb_mod_undef, MRB_ARGS_ANY()); /* 15.2.2.4.41 */
2904  mrb_define_method(mrb, mod, "const_defined?", mrb_mod_const_defined, MRB_ARGS_ARG(1,1)); /* 15.2.2.4.20 */
2905  mrb_define_method(mrb, mod, "const_get", mrb_mod_const_get, MRB_ARGS_REQ(1)); /* 15.2.2.4.21 */
2906  mrb_define_method(mrb, mod, "const_set", mrb_mod_const_set, MRB_ARGS_REQ(2)); /* 15.2.2.4.23 */
2907  mrb_define_method(mrb, mod, "remove_const", mrb_mod_remove_const, MRB_ARGS_REQ(1)); /* 15.2.2.4.40 */
2908  mrb_define_method(mrb, mod, "const_missing", mrb_mod_const_missing, MRB_ARGS_REQ(1));
2909  mrb_define_method(mrb, mod, "method_defined?", mrb_mod_method_defined, MRB_ARGS_REQ(1)); /* 15.2.2.4.34 */
2910  mrb_define_method(mrb, mod, "define_method", mod_define_method, MRB_ARGS_ARG(1,1));
2911  mrb_define_method(mrb, mod, "===", mrb_mod_eqq, MRB_ARGS_REQ(1)); /* 15.2.2.4.7 */
2913 
2914  mrb_undef_method(mrb, cls, "append_features");
2915  mrb_undef_method(mrb, cls, "prepend_features");
2916  mrb_undef_method(mrb, cls, "extend_object");
2917  mrb_undef_method(mrb, cls, "module_function");
2918 
2919  mrb->top_self = (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mrb->object_class);
2922  mrb_define_singleton_method(mrb, mrb->top_self, "define_method", top_define_method, MRB_ARGS_ARG(1,1));
2923 }
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
bp
Definition: action.c:1035
cp
Definition: action.c:1035
#define sc
Definition: aptex-macros.h:57
#define type(a)
Definition: aptex-macros.h:171
#define name
#define hash
Definition: aptex.h:388
double mod(double, int)
Definition: axohelp.c:326
#define mrb_symbol(o)
Definition: boxing_nan.h:72
#define mrb_integer(o)
Definition: boxing_nan.h:71
#define mrb_module_p(o)
Definition: boxing_word.h:160
#define mrb_class_p(o)
Definition: boxing_word.h:159
#define mrb_symbol_p(o)
Definition: boxing_word.h:143
#define mrb_undef_p(o)
Definition: boxing_word.h:145
#define mrb_immediate_p(o)
Definition: boxing_word.h:117
#define mrb_nil_p(o)
Definition: boxing_word.h:146
#define mrb_sclass_p(o)
Definition: boxing_word.h:162
#define mrb_hash_p(o)
Definition: boxing_word.h:154
#define mrb_istruct_p(o)
Definition: boxing_word.h:168
MRB_INLINE enum mrb_vtype mrb_type(mrb_value o)
Definition: boxing_word.h:195
#define static
Definition: Object.h:84
#define MRB_FL_CLASS_IS_INHERITED
Definition: class.h:71
#define MRB_SET_INSTANCE_TT(c, tt)
Definition: class.h:73
#define MRB_CLASS_ORIGIN(c)
Definition: class.h:63
#define MRB_FL_CLASS_IS_PREPENDED
Definition: class.h:61
#define mrb_class_ptr(v)
Definition: class.h:24
static struct RClass * mrb_class(mrb_state *mrb, mrb_value v)
Definition: class.h:27
#define MRB_FL_CLASS_IS_ORIGIN
Definition: class.h:62
#define MRB_INSTANCE_TT(c)
Definition: class.h:74
mrb_value mrb_class_find_path(mrb_state *, struct RClass *)
Definition: variable.c:1094
int() mrb_mt_foreach_func(mrb_state *, mrb_sym, mrb_method_t, void *)
Definition: class.h:103
#define n
Definition: t4ht.c:1290
#define nsym(x)
Definition: codegen.c:727
#define b
Definition: jpegint.h:372
#define ap
void * mrb_data_get_ptr(mrb_state *mrb, mrb_value, const mrb_data_type *)
Definition: etc.c:58
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define MRB_PRESYM_DEFINE_VAR_AND_INITER(name, size,...)
Definition: disable.h:61
#define MRB_SYM(name)
Definition: disable.h:20
#define MRB_PRESYM_INIT_SYMBOLS(mrb, name)
Definition: disable.h:68
static int id
Definition: bifont.c:66
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
#define skip(p, c)
Definition: ptexmac.h:70
static void initialize(void)
Definition: dvidvi.c:542
struct rect data
Definition: dvipdfm.c:64
void mrb_objspace_each_objects(struct mrb_state *mrb, mrb_each_object_callback *callback, void *data)
Definition: gc.c:1588
#define MRB_EACH_OBJ_OK
Definition: gc.h:20
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define MRB_IREP_STATIC
Definition: irep.h:84
static void mrb_istruct_copy(mrb_value dest, mrb_value src)
Definition: istruct.h:43
static void * mrb_istruct_ptr(mrb_value object)
Definition: istruct.h:38
#define kh_int_hash_func(mrb, key)
Definition: khash.h:267
#define khash_power2(v)
Definition: khash.h:41
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
#define const
Definition: ftzconf.h:91
unsigned int uint32_t
Definition: stdint.h:80
signed int intptr_t
Definition: stdint.h:118
#define buf
#define ISUPPER(c)
Definition: c-ctype.h:41
static const unsigned char cv[]
Definition: nkf.c:555
#define dest
int dup()
const int * pos
Definition: combiners.h:905
static luaL_Reg func[]
Definition: except.c:32
mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c)
Definition: object.c:485
void * mrb_calloc(mrb_state *, size_t, size_t)
Definition: gc.c:268
void mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt,...)
Definition: error.c:410
#define E_TYPE_ERROR
Definition: mruby.h:1308
struct RBasic * mrb_obj_alloc(mrb_state *, enum mrb_vtype, struct RClass *)
Definition: gc.c:535
void mrb_argnum_error(mrb_state *mrb, mrb_int argc, int min, int max)
Definition: error.c:547
mrb_value mrb_to_str(mrb_state *mrb, mrb_value val)
Definition: object.c:594
void mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt,...)
Definition: error.c:400
void mrb_gc_protect(mrb_state *mrb, mrb_value obj)
Definition: gc.c:471
mrb_value mrb_funcall_id(mrb_state *mrb, mrb_value val, mrb_sym mid, mrb_int argc,...)
Definition: vm.c:337
void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
Definition: object.c:400
mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj)
Definition: object.c:442
mrb_value mrb_funcall_argv(mrb_state *mrb, mrb_value val, mrb_sym name, mrb_int argc, const mrb_value *argv)
Definition: vm.c:481
#define MRB_ARGS_ARG(n1, n2)
Definition: mruby.h:855
#define mrb_str_new_lit(mrb, lit)
Definition: mruby.h:1136
uint8_t mrb_code
Definition: mruby.h:122
static void mrb_gc_arena_restore(mrb_state *mrb, int idx)
Definition: mruby.h:1239
static int mrb_gc_arena_save(mrb_state *mrb)
Definition: mruby.h:1233
#define MRB_METHOD_CACHE_SIZE
Definition: mruby.h:191
mrb_value mrb_inspect(mrb_state *mrb, mrb_value obj)
Definition: object.c:655
#define E_NOTIMP_ERROR
Definition: mruby.h:1320
#define MRB_ARGS_OPT(n)
Definition: mruby.h:845
mrb_bool mrb_func_basic_p(mrb_state *mrb, mrb_value obj, mrb_sym mid, mrb_func_t func)
Definition: kernel.c:19
#define mrb_assert(p)
Definition: mruby.h:65
void mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg)
Definition: error.c:214
#define MRB_ARGS_ANY()
Definition: mruby.h:874
mrb_bool mrb_obj_equal(mrb_state *mrb, mrb_value a, mrb_value b)
Definition: object.c:39
void mrb_free(mrb_state *, void *)
Definition: gc.c:288
#define MRB_ARGS_NONE()
Definition: mruby.h:879
#define MRB_ARGS_REQ(n)
Definition: mruby.h:837
void mrb_field_write_barrier(mrb_state *, struct RBasic *, struct RBasic *)
Definition: gc.c:1345
#define MRB_ARGS_REST()
Definition: mruby.h:858
mrb_value mrb_funcall_with_block(mrb_state *mrb, mrb_value val, mrb_sym name, mrb_int argc, const mrb_value *argv, mrb_value block)
Definition: vm.c:380
#define MRB_ARGS_BLOCK()
Definition: mruby.h:869
void mrb_define_const_id(mrb_state *mrb, struct RClass *cla, mrb_sym name, mrb_value val)
Definition: variable.c:864
static void mrb_check_frozen(mrb_state *mrb, void *o)
Definition: mruby.h:1348
void * mrb_malloc(mrb_state *, size_t)
Definition: gc.c:256
const char * mrb_sym_name_len(mrb_state *, mrb_sym, mrb_int *)
Definition: symbol.c:328
void mrb_gc_mark(mrb_state *, struct RBasic *)
Definition: gc.c:786
mrb_value mrb_to_int(mrb_state *mrb, mrb_value val)
Definition: object.c:510
uintptr_t mrb_method_t
Definition: mruby.h:206
mrb_sym mrb_intern_check_cstr(mrb_state *, const char *)
Definition: symbol.c:276
mrb_value mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c)
Definition: vm.c:670
void * mrb_alloca(mrb_state *mrb, size_t)
Definition: gc.c:294
mrb_sym mrb_intern(mrb_state *, const char *, size_t)
Definition: symbol.c:233
mrb_value mrb_sym_str(mrb_state *, mrb_sym)
Definition: symbol.c:584
void mrb_warn(mrb_state *mrb, const char *fmt,...)
Definition: error.c:422
#define E_ARGUMENT_ERROR
Definition: mruby.h:1310
mrb_value(* mrb_func_t)(struct mrb_state *mrb, mrb_value self)
Definition: mruby.h:203
string fn
Definition: fc-lang.py:335
dictionary off
Definition: fc-lang.py:226
std::pair< const Segment *const, const Slot *const > dslot
Definition: debug.h:45
mrb_float mrb_to_flo(mrb_state *mrb, mrb_value x)
Definition: numeric.c:36
#define MRB_UNSET_FROZEN_FLAG(o)
Definition: object.h:27
#define mrb_obj_ptr(v)
Definition: object.h:34
#define MRB_FL_OBJ_IS_FROZEN
Definition: object.h:24
#define mrb_basic_ptr(v)
Definition: object.h:22
struct _proc * proc
Definition: obx.h:95
union value value
Definition: obx.h:44
int k
Definition: otp-parser.c:70
static int format
Definition: pbmclean.c:15
static bool ps
Definition: pdftocairo.cc:91
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 init[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 src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF ptr
#define t2
const char * suffix
Definition: pkg_icu.cpp:27
logical rest[4800]
Definition: pmxab.c:91
bstring c int memset(void *s, int c, int length)
slotref slot
Definition: opcodes.h:237
#define ARY_LEN(a)
Definition: array.h:68
mrb_value mrb_ary_new(mrb_state *mrb)
Definition: array.c:53
#define mrb_ary_ptr(v)
Definition: array.h:49
#define RARRAY_PTR(a)
Definition: array.h:71
mrb_value mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)
Definition: array.c:94
#define ARY_PTR(a)
Definition: array.h:69
#define RARRAY(v)
Definition: array.h:51
void mrb_ary_push(mrb_state *mrb, mrb_value array, mrb_value value)
Definition: array.c:495
#define MRB_API
Definition: common.h:73
mrb_value mrb_hash_keys(mrb_state *mrb, mrb_value hash)
Definition: hash.c:1595
mrb_value mrb_hash_dup(mrb_state *mrb, mrb_value hash)
Definition: hash.c:1165
mrb_value mrb_hash_new(mrb_state *mrb)
Definition: hash.c:1071
mrb_bool mrb_hash_key_p(mrb_state *mrb, mrb_value hash, mrb_value key)
Definition: hash.c:1649
mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
Definition: hash.c:1431
mrb_bool mrb_hash_empty_p(mrb_state *mrb, mrb_value self)
Definition: hash.c:1560
#define mrb_intern_cstr(mrb, name)
Definition: scanning.h:14
struct RProc * mrb_proc_new_cfunc_with_env(mrb_state *mrb, mrb_func_t func, mrb_int argc, const mrb_value *argv)
Definition: proc.c:132
#define MRB_METHOD_CFUNC_P(m)
Definition: proc.h:131
#define MRB_PROC_ENVSET
Definition: proc.h:70
#define MRB_PROC_SCOPE
Definition: proc.h:84
#define MRB_METHOD_PROC(m)
Definition: proc.h:114
#define mrb_proc_ptr(v)
Definition: proc.h:87
#define MRB_PROC_TARGET_CLASS(p)
Definition: proc.h:73
#define MRB_METHOD_FUNC_P(m)
Definition: proc.h:107
#define MRB_METHOD_NOARG_P(m)
Definition: proc.h:108
#define MRB_PROC_SET_TARGET_CLASS(p, tc)
Definition: proc.h:74
#define MRB_METHOD_FUNC(m)
Definition: proc.h:110
#define MRB_PROC_ENV_P(p)
Definition: proc.h:71
#define MRB_METHOD_FROM_FUNC(m, fn)
Definition: proc.h:111
#define MRB_METHOD_UNDEF_P(m)
Definition: proc.h:115
#define MRB_METHOD_NOARG_SET(m)
Definition: proc.h:109
mrb_value mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx)
Definition: proc.c:166
struct RProc * mrb_proc_new(mrb_state *, const mrb_irep *)
Definition: proc.c:37
#define MRB_METHOD_FROM_PROC(m, pr)
Definition: proc.h:112
#define MRB_METHOD_PROC_P(m)
Definition: proc.h:113
#define MRB_PROC_STRICT
Definition: proc.h:66
#define MRB_PROC_ENV(p)
Definition: proc.h:72
void mrb_proc_copy(struct RProc *a, struct RProc *b)
Definition: proc.c:187
mrb_bool mrb_const_defined_at(mrb_state *mrb, mrb_value mod, mrb_sym id)
Definition: variable.c:1018
void mrb_const_set(mrb_state *, mrb_value, mrb_sym, mrb_value)
Definition: variable.c:837
mrb_bool mrb_const_defined(mrb_state *, mrb_value, mrb_sym)
Definition: variable.c:1012
void mrb_obj_iv_set_force(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
Definition: variable.c:331
void mrb_iv_copy(mrb_state *mrb, mrb_value dst, mrb_value src)
Definition: variable.c:440
mrb_bool mrb_ident_p(const char *s, mrb_int len)
Definition: variable.c:1134
mrb_value mrb_iv_get(mrb_state *mrb, mrb_value obj, mrb_sym sym)
Definition: variable.c:320
mrb_value mrb_const_get(mrb_state *, mrb_value, mrb_sym)
Definition: variable.c:794
void mrb_iv_name_sym_check(mrb_state *mrb, mrb_sym sym)
Definition: variable.c:432
void mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
Definition: variable.c:342
mrb_bool mrb_obj_iv_defined(mrb_state *mrb, struct RObject *obj, mrb_sym sym)
Definition: variable.c:400
mrb_value mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym)
Definition: variable.c:508
mrb_value mrb_obj_iv_get(mrb_state *mrb, struct RObject *obj, mrb_sym sym)
Definition: variable.c:310
void mrb_iv_set(mrb_state *mrb, mrb_value obj, mrb_sym sym, mrb_value v)
Definition: variable.c:389
static void kname(Proto *p, int pc, int c, const char **name)
Definition: ldebug.c:356
#define ttype(o)
Definition: lobject.h:133
@ OP_RETURN
Definition: lopcodes.h:218
@ OP_MOVE
Definition: lopcodes.h:171
#define str(s)
Definition: sh6.c:399
ShellFileEnvironment e
Definition: sh6.c:388
static mrb_value mrb_mod_append_features(mrb_state *mrb, mrb_value mod)
Definition: class.c:1529
static void mrb_check_inheritable(mrb_state *mrb, struct RClass *super)
Definition: class.c:2124
void mrb_gc_free_mt(mrb_state *mrb, struct RClass *c)
Definition: class.c:288
void mrb_define_method_raw(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_method_t m)
Definition: class.c:725
static mrb_sym prepare_writer_name(mrb_state *mrb, mrb_sym sym)
Definition: class.c:1828
static void mc_clear(mrb_state *mrb)
Definition: class.c:1708
static void check_if_class_or_module(mrb_state *mrb, mrb_value obj)
Definition: class.c:420
static struct RClass * boot_defclass(mrb_state *mrb, struct RClass *super)
Definition: class.c:1337
mrb_int mrb_get_argc(mrb_state *mrb)
Definition: class.c:814
static void boot_initmod(mrb_state *mrb, struct RClass *mod)
Definition: class.c:1354
const mrb_value * mrb_get_argv(mrb_state *mrb)
Definition: class.c:827
mrb_method_t mrb_method_search_vm(mrb_state *mrb, struct RClass **cp, mrb_sym mid)
Definition: class.c:1730
static struct RClass * define_module(mrb_state *mrb, mrb_sym name, struct RClass *outer)
Definition: class.c:428
void mrb_undef_method_id(mrb_state *mrb, struct RClass *c, mrb_sym a)
Definition: class.c:2287
struct RClass * mrb_define_module_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name)
Definition: class.c:469
mrb_value mrb_f_send(mrb_state *mrb, mrb_value self)
Definition: vm.c:533
static mrb_value mrb_mod_prepend_features(mrb_state *mrb, mrb_value mod)
Definition: class.c:1518
#define to_sym(mrb, ss)
Definition: class.c:811
static mrb_value prepare_ivar_name(mrb_state *mrb, mrb_sym sym)
Definition: class.c:1820
mrb_value mrb_mod_to_s(mrb_state *mrb, mrb_value klass)
Definition: class.c:2247
static mrb_value mrb_mod_remove_const(mrb_state *mrb, mrb_value mod)
Definition: class.c:2422
struct RClass * mrb_module_new(mrb_state *mrb)
Definition: class.c:2164
static mrb_value mrb_mod_dup(mrb_state *mrb, mrb_value self)
Definition: class.c:2545
#define ONSTACK_ALLOC_MAX
Definition: class.c:1789
void mrb_class_name_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
Definition: class.c:294
static mrb_value mrb_mod_alias(mrb_state *mrb, mrb_value mod)
Definition: class.c:2267
static struct RClass * include_class_new(mrb_state *mrb, struct RClass *m, struct RClass *super)
Definition: class.c:1362
void mrb_define_method(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:772
void mrb_define_class_method_id(mrb_state *mrb, struct RClass *c, mrb_sym name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1688
static mrb_value mrb_class_superclass(mrb_state *mrb, mrb_value klass)
Definition: class.c:1990
static mrb_value mod_attr_define(mrb_state *mrb, mrb_value mod, mrb_value(*accessor)(mrb_state *, mrb_value), mrb_sym(*access_name)(mrb_state *, mrb_sym))
Definition: class.c:1834
static const mrb_sym new_syms[]
Definition: class.c:2807
mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj)
Definition: class.c:2767
static mrb_value mrb_mod_const_defined(mrb_state *mrb, mrb_value mod)
Definition: class.c:2351
struct RClass * mrb_module_get_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name)
Definition: class.c:670
void mrb_define_singleton_method_id(mrb_state *mrb, struct RObject *o, mrb_sym name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1675
static struct RClass * define_class(mrb_state *mrb, mrb_sym name, struct RClass *super, struct RClass *outer)
Definition: class.c:495
static mrb_value mrb_bob_init(mrb_state *mrb, mrb_value)
Definition: class.c:2004
void mrb_define_alias_id(mrb_state *mrb, struct RClass *klass, mrb_sym a, mrb_sym b)
Definition: class.c:2232
mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv)
Definition: class.c:1940
static void undef_method(mrb_state *mrb, struct RClass *c, mrb_sym a)
Definition: class.c:2278
void mrb_alias_method(mrb_state *mrb, struct RClass *c, mrb_sym a, mrb_sym b)
Definition: class.c:2192
void mrb_mc_clear_by_class(mrb_state *mrb, struct RClass *c)
Definition: class.c:1714
static mrb_value mrb_class_new_class(mrb_state *mrb, mrb_value cv)
Definition: class.c:1966
void mrb_define_module_function(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1701
mrb_value mrb_notimplement_m(mrb_state *mrb, mrb_value self)
Definition: class.c:790
static void mrb_class_inherited(mrb_state *mrb, struct RClass *super, struct RClass *klass)
Definition: class.c:538
struct RClass * mrb_define_class_id(mrb_state *mrb, mrb_sym name, struct RClass *super)
Definition: class.c:516
mrb_value mrb_class_path(mrb_state *mrb, struct RClass *c)
Definition: class.c:2073
#define make_metaclass(mrb, c)
Definition: class.c:336
struct RClass * mrb_module_get_id(mrb_state *mrb, mrb_sym name)
Definition: class.c:682
struct RClass * mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super)
Definition: class.c:525
static int include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, struct RClass *m, int search_super)
Definition: class.c:1382
static mrb_value mod_define_method(mrb_state *mrb, mrb_value self)
Definition: class.c:2522
void mrb_init_class(mrb_state *mrb)
Definition: class.c:2831
mrb_int mrb_get_args(mrb_state *mrb, const char *format,...)
Definition: class.c:891
static mt_tbl * mt_new(mrb_state *mrb)
Definition: class.c:43
static mrb_value attr_reader(mrb_state *mrb, mrb_value obj)
Definition: class.c:1864
static mrb_value mrb_bob_not(mrb_state *mrb, mrb_value cv)
Definition: class.c:2010
void mrb_undef_class_method_id(mrb_state *mrb, struct RClass *c, mrb_sym name)
Definition: class.c:2302
static struct RClass * module_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
Definition: class.c:398
struct mt_tbl mt_tbl
static void mt_free(mrb_state *mrb, mt_tbl *t)
Definition: class.c:218
static mrb_value mrb_mod_attr_writer(mrb_state *mrb, mrb_value mod)
Definition: class.c:1887
static void copy_class(mrb_state *mrb, mrb_value dst, mrb_value src)
Definition: class.c:2625
static mrb_value mrb_instance_alloc(mrb_state *mrb, mrb_value cv)
Definition: class.c:1893
static mrb_value mrb_mod_include_p(mrb_state *mrb, mrb_value mod)
Definition: class.c:1559
mrb_value mrb_obj_instance_eval(mrb_state *, mrb_value)
Definition: vm.c:659
static mrb_value class_name_str(mrb_state *mrb, struct RClass *c)
Definition: class.c:376
mrb_bool mrb_class_defined_under(mrb_state *mrb, struct RClass *outer, const char *name)
Definition: class.c:607
mrb_value mrb_get_arg1(mrb_state *mrb)
Definition: class.c:840
static void setup_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
Definition: class.c:330
struct RClass * mrb_class_get(mrb_state *mrb, const char *name)
Definition: class.c:633
static void init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
Definition: class.c:2668
void mrb_define_module_function_id(mrb_state *mrb, struct RClass *c, mrb_sym name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1694
void mrb_gc_mark_mt(mrb_state *mrb, struct RClass *c)
Definition: class.c:258
struct RClass * mrb_class_get_id(mrb_state *mrb, mrb_sym name)
Definition: class.c:639
static mrb_value mrb_class_initialize(mrb_state *mrb, mrb_value c)
Definition: class.c:1954
static mrb_value attr_writer(mrb_state *mrb, mrb_value obj)
Definition: class.c:1877
static const mrb_irep new_irep
Definition: class.c:2809
mrb_bool mrb_class_defined_id(mrb_state *mrb, mrb_sym name)
Definition: class.c:601
static int fix_include_module(mrb_state *mrb, struct RBasic *obj, void *data)
Definition: class.c:1428
static mrb_value mrb_mod_const_get(mrb_state *mrb, mrb_value mod)
Definition: class.c:2372
static mrb_value mrb_const_get_sym(mrb_state *mrb, mrb_value mod, mrb_sym id)
Definition: class.c:2365
void mrb_define_class_method(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1682
size_t mrb_gc_mark_mt_size(mrb_state *mrb, struct RClass *c)
Definition: class.c:279
struct RClass * mrb_class_get_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name)
Definition: class.c:627
static mrb_value mrb_mod_dummy_visibility(mrb_state *mrb, mrb_value mod)
Definition: class.c:1622
static mrb_value mrb_mod_const_set(mrb_state *mrb, mrb_value mod)
Definition: class.c:2410
static mrb_value top_define_method(mrb_state *mrb, mrb_value self)
Definition: class.c:2528
static void check_const_name_sym(mrb_state *mrb, mrb_sym id)
Definition: class.c:2341
mrb_bool mrb_class_defined(mrb_state *mrb, const char *name)
Definition: class.c:593
struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super)
Definition: class.c:719
struct RClass * mrb_exc_get_id(mrb_state *mrb, mrb_sym name)
Definition: class.c:645
struct RClass * mrb_module_get(mrb_state *mrb, const char *name)
Definition: class.c:676
static struct RClass * find_origin(struct RClass *c)
Definition: class.c:488
void mrb_undef_class_method(mrb_state *mrb, struct RClass *c, const char *name)
Definition: class.c:2308
void mrb_remove_method(mrb_state *mrb, struct RClass *c, mrb_sym mid)
Definition: class.c:2314
struct RClass * mrb_vm_define_module(mrb_state *mrb, mrb_value outer, mrb_sym id)
Definition: class.c:454
mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv)
Definition: class.c:1923
static mrb_value inspect_main(mrb_state *mrb, mrb_value mod)
Definition: class.c:2791
static mrb_value mrb_mod_initialize(mrb_state *mrb, mrb_value mod)
Definition: class.c:1606
static mrb_value mrb_mod_undef(mrb_state *mrb, mrb_value mod)
Definition: class.c:2326
mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid)
Definition: class.c:2067
static void init_class_new(mrb_state *mrb, struct RClass *cls)
Definition: class.c:2816
static struct mt_elem * mt_put(mrb_state *mrb, mt_tbl *t, mrb_sym sym, size_t func_p, size_t noarg_p, union mt_ptr ptr)
Definition: class.c:86
mrb_bool mrb_class_defined_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name)
Definition: class.c:615
mrb_bool mrb_const_name_p(mrb_state *mrb, const char *name, mrb_int len)
Definition: class.c:324
void mrb_define_alias(mrb_state *mrb, struct RClass *klass, const char *name1, const char *name2)
Definition: class.c:2226
void mrb_mt_foreach(mrb_state *mrb, struct RClass *c, mrb_mt_foreach_func *fn, void *p)
Definition: class.c:225
struct RClass * mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id)
Definition: class.c:556
const char * mrb_class_name(mrb_state *mrb, struct RClass *c)
Definition: class.c:2102
mrb_value mrb_mod_define_method_m(mrb_state *mrb, struct RClass *c)
Definition: class.c:2490
static mrb_value mrb_mod_method_defined(mrb_state *mrb, mrb_value mod)
Definition: class.c:2481
#define slot_empty_p(slot)
Definition: class.c:82
static mrb_value to_ary(mrb_state *mrb, mrb_value val)
Definition: class.c:798
static mrb_sym prepare_name_common(mrb_state *mrb, mrb_sym sym, const char *prefix, const char *suffix)
Definition: class.c:1792
void mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:755
struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super)
Definition: class.c:2144
mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self)
Definition: class.c:2726
static mrb_value mrb_mod_ancestors(mrb_state *mrb, mrb_value self)
Definition: class.c:1577
static int fix_prepend_module(mrb_state *mrb, struct RBasic *obj, void *data)
Definition: class.c:1455
static void mt_rehash(mrb_state *mrb, mt_tbl *t)
Definition: class.c:58
mrb_method_t mrb_method_search(mrb_state *mrb, struct RClass *c, mrb_sym mid)
Definition: class.c:1778
mrb_value mrb_singleton_class(mrb_state *mrb, mrb_value v)
Definition: class.c:1657
struct RClass * mrb_obj_class(mrb_state *mrb, mrb_value obj)
Definition: class.c:2186
struct RClass * mrb_define_class_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name, struct RClass *super)
Definition: class.c:704
#define ARGV
static mrb_bool mt_del(mrb_state *mrb, mt_tbl *t, mrb_sym sym)
Definition: class.c:165
struct RClass * mrb_define_module_id(mrb_state *mrb, mrb_sym name)
Definition: class.c:442
static const mrb_code new_iseq[]
Definition: class.c:2796
mrb_value mrb_obj_equal_m(mrb_state *mrb, mrb_value self)
Definition: class.c:2047
static mrb_value mrb_mod_const_missing(mrb_state *mrb, mrb_value mod)
Definition: class.c:2437
static mrb_value to_hash(mrb_state *mrb, mrb_value val)
Definition: class.c:805
static mrb_bool class_ptr_p(mrb_value obj)
Definition: class.c:407
static mrb_value mrb_mod_extend_object(mrb_state *mrb, mrb_value mod)
Definition: class.c:1596
struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
Definition: class.c:621
mrb_bool mrb_obj_respond_to(mrb_state *mrb, struct RClass *c, mrb_sym mid)
Definition: class.c:2055
static struct RClass * class_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
Definition: class.c:389
void mrb_prepend_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
Definition: class.c:1481
struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name)
Definition: class.c:478
const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj)
Definition: class.c:2112
static mrb_value mrb_mod_eqq(mrb_state *mrb, mrb_value mod)
Definition: class.c:2534
void mrb_notimplement(mrb_state *mrb)
Definition: class.c:779
static struct mt_tbl * mt_copy(mrb_state *mrb, mt_tbl *t)
Definition: class.c:196
struct RClass * mrb_singleton_class_ptr(mrb_state *mrb, mrb_value v)
Definition: class.c:1630
static mrb_value mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
Definition: class.c:2656
static mrb_value mrb_mod_module_function(mrb_state *mrb, mrb_value mod)
Definition: class.c:2553
static struct RClass * mrb_singleton_class_clone(mrb_state *mrb, mrb_value obj)
Definition: class.c:2590
void mrb_hash_check_kdict(mrb_state *mrb, mrb_value self)
Definition: hash.c:1156
struct RClass * mrb_class_real(struct RClass *cl)
Definition: class.c:2091
mrb_value mrb_obj_id_m(mrb_state *mrb, mrb_value self)
Definition: kernel.c:98
void mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
Definition: class.c:1440
static void prepare_singleton_class(mrb_state *mrb, struct RBasic *o)
Definition: class.c:339
void mrb_undef_method(mrb_state *mrb, struct RClass *c, const char *name)
Definition: class.c:2296
struct RClass * mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
Definition: class.c:664
struct RClass * mrb_define_module(mrb_state *mrb, const char *name)
Definition: class.c:448
void mrb_define_singleton_method(mrb_state *mrb, struct RObject *o, const char *name, mrb_func_t func, mrb_aspec aspec)
Definition: class.c:1668
static struct mt_elem * mt_get(mrb_state *mrb, mt_tbl *t, mrb_sym sym)
Definition: class.c:137
mrb_value mrb_mod_module_eval(mrb_state *, mrb_value)
Definition: vm.c:627
static mrb_value mrb_mod_attr_reader(mrb_state *mrb, mrb_value mod)
Definition: class.c:1871
mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len)
Definition: string.c:2669
#define mrb_str_index_lit(mrb, str, lit, off)
Definition: string.h:128
#define RSTRING_CSTR(mrb, s)
Definition: string.h:106
#define mrb_str_cat_lit(mrb, str, lit)
Definition: string.h:417
#define RSTRING_LEN(s)
Definition: string.h:102
#define RSTRING_PTR(s)
Definition: string.h:100
mrb_value mrb_ensure_string_type(mrb_state *mrb, mrb_value str)
Definition: object.c:607
mrb_value mrb_str_dup(mrb_state *mrb, mrb_value str)
Definition: string.c:1095
mrb_value mrb_ptr_to_str(mrb_state *mrb, void *p)
Definition: string.c:1932
mrb_value mrb_str_cat_str(mrb_state *mrb, mrb_value str, mrb_value str2)
Definition: string.c:2720
Definition: array.h:32
Definition: object.h:19
uint32_t flags
Definition: object.h:20
enum mrb_vtype tt
Definition: object.h:20
struct RClass * c
Definition: object.h:20
Definition: class.h:17
struct RClass * super
Definition: class.h:21
struct mt_tbl * mt
Definition: class.h:20
struct iv_tbl * iv
Definition: class.h:19
Definition: proc.h:18
Definition: object.h:30
struct RClass * c
Definition: object.h:31
Definition: proc.h:41
Definition: obx.h:103
Definition: usprintf.c:39
Definition: ttf.h:33
Definition: mruby.h:218
struct RClass * c
Definition: mruby.h:219
mrb_sym mid
Definition: mruby.h:220
struct RClass * c0
Definition: mruby.h:219
mrb_method_t m
Definition: mruby.h:221
mrb_sym mid
Definition: mruby.h:152
mrb_value * stack
Definition: mruby.h:156
int16_t argc
Definition: mruby.h:153
mrb_callinfo * ci
Definition: mruby.h:178
Definition: irep.h:56
const mrb_sym * table
Definition: mruby.h:962
uint32_t num
Definition: mruby.h:960
uint32_t required
Definition: mruby.h:961
mrb_value * rest
Definition: mruby.h:964
mrb_value * values
Definition: mruby.h:963
struct RClass * class_class
Definition: mruby.h:243
struct RClass * module_class
Definition: mruby.h:244
struct RClass * true_class
Definition: mruby.h:255
struct mrb_context * c
Definition: mruby.h:235
struct RClass * object_class
Definition: mruby.h:242
struct RClass * false_class
Definition: mruby.h:256
struct RClass * eException_class
Definition: mruby.h:284
struct RObject * top_self
Definition: mruby.h:241
struct RClass * proc_class
Definition: mruby.h:245
struct mrb_cache_entry cache[(1<< 8)]
Definition: mruby.h:264
struct RClass * nil_class
Definition: mruby.h:257
Definition: class.c:27
mrb_sym key
Definition: class.c:31
size_t func_p
Definition: class.c:29
size_t noarg_p
Definition: class.c:30
union mt_ptr ptr
Definition: class.c:28
Definition: class.c:35
size_t size
Definition: class.c:36
struct mt_elem * table
Definition: class.c:38
size_t alloc
Definition: class.c:37
Definition: tpic.c:45
Definition: dvips.h:235
Definition: strexpr.c:21
Definition: sh.h:1782
pointer path
Definition: t1imager.h:36
#define c1
Definition: t1io.c:52
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
char fmt[256]
Definition: tex4ht.c:3925
val
Definition: tex4ht.c:3227
m
Definition: tex4ht.c:3990
Definition: class.c:22
struct RProc * proc
Definition: class.c:23
mrb_func_t func
Definition: class.c:24
Definition: obx.h:51
@ start
Definition: preamble.c:52
#define mrb_test(o)
Definition: value.h:265
static mrb_value mrb_true_value(void)
Definition: value.h:352
int32_t mrb_int
Definition: value.h:35
uint32_t mrb_sym
Definition: value.h:23
static mrb_value mrb_false_value(void)
Definition: value.h:342
static mrb_value mrb_nil_value(void)
Definition: value.h:332
static mrb_value mrb_bool_value(mrb_bool boolean)
Definition: value.h:360
double mrb_float
Definition: value.h:85
mrb_vtype
Definition: value.h:107
@ MRB_TT_EXCEPTION
Definition: value.h:126
@ MRB_TT_UNDEF
Definition: value.h:113
@ MRB_TT_DATA
Definition: value.h:128
@ MRB_TT_TRUE
Definition: value.h:109
@ MRB_TT_SCLASS
Definition: value.h:120
@ MRB_TT_CLASS
Definition: value.h:117
@ MRB_TT_OBJECT
Definition: value.h:116
@ MRB_TT_FALSE
Definition: value.h:108
@ MRB_TT_MODULE
Definition: value.h:118
@ MRB_TT_HASH
Definition: value.h:123
@ MRB_TT_SYMBOL
Definition: value.h:112
@ MRB_TT_CPTR
Definition: value.h:114
@ MRB_TT_ICLASS
Definition: value.h:119
@ MRB_TT_ARRAY
Definition: value.h:122
@ MRB_TT_FLOAT
Definition: value.h:110
@ MRB_TT_PROC
Definition: value.h:121
@ MRB_TT_INTEGER
Definition: value.h:111
@ MRB_TT_ENV
Definition: value.h:127
@ MRB_TT_ISTRUCT
Definition: value.h:130
static mrb_value mrb_undef_value(void)
Definition: value.h:368
static mrb_value mrb_symbol_value(mrb_sym i)
Definition: value.h:309
static mrb_value mrb_obj_value(void *p)
Definition: value.h:317
#define va_start(pvar)
Definition: varargs.h:30
#define va_arg(pvar, type)
Definition: varargs.h:35
#define va_end(pvar)
Definition: varargs.h:38
char * va_list
Definition: varargs.h:22
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269
static node * new_class(parser_state *p, node *c, node *s, node *b)
Definition: y.tab.c:776
#define sym(x)
Definition: y.tab.c:133
#define end(cp)
Definition: zic.c:71