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)  

slnunico.c
Go to the documentation of this file.
1 /*
2 * Selene Unicode/UTF-8
3 * This additions
4 * Copyright (c) 2005 Malete Partner, Berlin, partner@malete.org
5 * Available under "Lua 5.0 license", see http://www.lua.org/license.html#5
6 * $Id: slnunico.c,v 1.5 2006/07/26 17:20:04 paul Exp $
7 *
8 * contains code from
9 ** lstrlib.c,v 1.109 2004/12/01 15:46:06 roberto Exp
10 ** Standard library for string operations and pattern-matching
11 ** See Copyright Notice in lua.h
12 *
13 * uses the udata table and a couple of expressions from Tcl 8.4.x UTF-8
14 * which comes with the following license.terms:
15 
16 This software is copyrighted by the Regents of the University of
17 California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
18 Corporation and other parties. The following terms apply to all files
19 associated with the software unless explicitly disclaimed in
20 individual files.
21 
22 The authors hereby grant permission to use, copy, modify, distribute,
23 and license this software and its documentation for any purpose, provided
24 that existing copyright notices are retained in all copies and that this
25 notice is included verbatim in any distributions. No written agreement,
26 license, or royalty fee is required for any of the authorized uses.
27 Modifications to this software may be copyrighted by their authors
28 and need not follow the licensing terms described here, provided that
29 the new terms are clearly indicated on the first page of each file where
30 they apply.
31 
32 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
33 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
34 ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
35 DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
36 POSSIBILITY OF SUCH DAMAGE.
37 
38 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
39 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
40 FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
41 IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
42 NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
43 MODIFICATIONS.
44 
45 GOVERNMENT USE: If you are acquiring this software on behalf of the
46 U.S. government, the Government shall have only "Restricted Rights"
47 in the software and related documentation as defined in the Federal
48 Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
49 are acquiring the software on behalf of the Department of Defense, the
50 software shall be classified as "Commercial Computer Software" and the
51 Government shall have only "Restricted Rights" as defined in Clause
52 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
53 authors grant the U.S. Government and others acting in its behalf
54 permission to use and distribute the software in accordance with the
55 terms specified in this license.
56 
57 (end of Tcl license terms)
58 */
59 
60 /*
61 According to http://ietf.org/rfc/rfc3629.txt we support up to 4-byte
62 (21 bit) sequences encoding the UTF-16 reachable 0-0x10FFFF.
63 Any byte not part of a 2-4 byte sequence in that range decodes to itself.
64 Ill formed (non-shortest) "C0 80" will be decoded as two code points C0 and 80,
65 not code point 0; see security considerations in the RFC.
66 However, UTF-16 surrogates (D800-DFFF) are accepted.
67 
68 See http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
69 for default grapheme clusters.
70 Lazy westerners we are (and lacking the Hangul_Syllable_Type data),
71 we care for base char + Grapheme_Extend, but not for Hangul syllable sequences.
72 
73 For http://unicode.org/Public/UNIDATA/UCD.html#Grapheme_Extend
74 we use Mn (NON_SPACING_MARK) + Me (ENCLOSING_MARK),
75 ignoring the 18 mostly south asian Other_Grapheme_Extend (16 Mc, 2 Cf) from
76 http://www.unicode.org/Public/UNIDATA/PropList.txt
77 */
78 
79 #include <ctype.h>
80 #include <stddef.h>
81 #include <stdio.h>
82 #include <stdlib.h>
83 #include <string.h>
84 #include <stdint.h>
85 
86 #define lstrlib_c
87 #define LUA_LIB
88 
89 #include "lua.h"
90 
91 #ifdef LuajitTeX
92 #include "lua/lauxlib_bridge.h"
93 #else
94 #include "lauxlib.h"
95 #endif
96 #include "lualib.h"
97 
98 #ifndef SLN_UNICODENAME /* unless set it luaconf */
99 # define SLN_UNICODENAME "unicode"
100 #endif
101 
102 #define LUA_MAXCAPTURES 32
103 #if defined(LUA_USELONGLONG)
104 
105 #define LUA_INTFRMLEN "ll"
106 #define LUA_INTFRM_T long long
107 
108 #else
109 
110 #define LUA_INTFRMLEN "l"
111 #define LUA_INTFRM_T long
112 
113 #endif
114 
115 /*
116 UTF-8 Bit Distribution pag 103 Unicode 5.0
117 First byte Lenght
118 00..7f 1 byte
119 c0..df 2 bytes
120 e0..ef 3 bytes
121 f0..f7 4 bytes
122 */
123 #define U8_LENGTH(c) ((unsigned char)(c)<=0x7f ? 1 : ((unsigned char)(c)<=0xdf ? 2 : ((unsigned char)(c)<=0xef ? 3 : ((unsigned char)(c)<=0xf7 ? 4:-1))))
124 
125 #include "slnudata.c"
126 #define charinfo(c) (~0xFFFF&(c) ? 0 : GetUniCharInfo(c)) /* BMP only */
127 #define charcat(c) (UNICODE_CATEGORY_MASK & charinfo(c))
128 #define Grapheme_Extend(code) \
129  (1 & (((1<<NON_SPACING_MARK)|(1<<ENCLOSING_MARK)) >> charcat(code)))
130 
131 enum { /* operation modes */
132  MODE_ASCII, /* single byte 7bit */
133  MODE_LATIN, /* single byte 8859-1 */
134  MODE_UTF8, /* UTF-8 by code points */
135  MODE_GRAPH /* UTF-8 by grapheme clusters */
136 #define MODE_MBYTE(mode) (~1&(mode))
137 };
138 
139 
140 /* macro to `unsign' a character */
141 #define uchar(c) ((unsigned char)(c))
142 
143 typedef const unsigned char cuc; /* it's just toooo long :) */
144 
145 
146 static void utf8_enco (luaL_Buffer *b, unsigned c)
147 {
148  if (0x80 > c) {
149  luaL_addchar(b, c);
150  return;
151  }
152  if (0x800 > c)
153  luaL_addchar(b, 0xC0|(c>>6));
154  else {
155  if (0x10000 > c)
156  luaL_addchar(b, 0xE0|(c>>12));
157  else {
158  luaL_addchar(b, 0xF0|(c>>18));
159  luaL_addchar(b, 0x80|(0x3F&(c>>12)));
160  }
161  luaL_addchar(b, 0x80|(0x3F&(c>>6)));
162  }
163  luaL_addchar(b, 0x80|(0x3F&c));
164 } /* utf8_enco */
165 
166 
167 /* end must be > *pp */
168 static unsigned utf8_deco (const char **pp, const char *end)
169 {
170  register cuc *p = (cuc*)*pp, * const e = (cuc*)end;
171  unsigned first = *p, code;
172 
173  *pp = (const char*)++p; /* eat one */
174  /* check ASCII, dangling cont., non-shortest or not continued */
175  if (0xC2 > first || e == p || 0x80 != (0xC0&*p)) return first;
176  code = 0x3F&*p++; /* save 1st cont. */
177  /* check 2 byte (5+6 = 11 bit) sequence up to 0x7FF */
178  if (0xE0 > first) { /* any >= C2 is valid */
179  code |= (0x1F&first)<<6;
180  goto seq;
181  }
182  if (e != p && 0x80 == (0xC0&*p)) { /* is continued */
183  code = code<<6 | (0x3F&*p++); /* save 2nd */
184  if (0xF0 > first) { /* 3 byte (4+6+6 = 16 bit) seq -- want 2nd cont. */
185  if ( 0xF800&(code |= (0x0F&first)<<12) /* >0x7FF: not non-shortest */
186  /* && 0xD800 != (0xD800 & code) -- nah, let surrogates pass */
187  )
188  goto seq;
189  } else if (e != p && 0x80 == (0xC0&*p) /* check 3rd */
190  /* catch 0xF4 < first and other out-of-bounds */
191  /* TH: add the 256 out-of-range glyphs in 'plane 18' */
192  && 0x110100 > (code = (0x0F&first)<<18 | code<<6 | (0x3F&*p++))
193  && 0xFFFF < code /* not a 16 bitty */
194  )
195  goto seq;
196  }
197  return first;
198 seq:
199  *pp = (const char*)p;
200  return code;
201 } /* utf8_deco */
202 
203 
204 /* reverse decode before pp > start */
205 static unsigned utf8_oced (const char **pp, const char *start)
206 {
207  register cuc *p = (cuc*)*pp, * const s = (cuc*)start;
208  unsigned last = *--p, code;
209 
210  *pp = (const char*)p; /* eat one */
211  /* check non-continuer or at the edge */
212  if (0x80 != (0xC0&last) || s == p) return last;
213  code = 0x3F&last; /* save last cont. */
214  if (0xC0 == (0xE0&*--p)) { /* preceeded by 2 byte seq starter */
215  if (0xC2 <= *p) { code |= (0x1F&*p)<<6; goto seq; }
216  } else if (0x80 == (0xC0&*p) && s<p) {
217  code |= (0x3F&*p)<<6;
218  if (0xE0 == (0xF0&*--p)) { /* 3 byte starter */
219  if (0xF800&(code |= (0x0F&*p)<<12)) goto seq;
220  } else if (0x80 == (0xC0&*p) && s<=--p /* valid 4 byte ? */
221  /* TH: add the 256 out-of-range glyphs in 'plane 18' */
222  && 0x110100 > (code |= (0x0F&*p)<<18 | (0x3F&p[1])<<12)
223  && 0xFFFF < code
224  )
225  goto seq;
226  }
227  return last;
228 seq:
229  *pp = (const char*)p;
230  return code;
231 } /* utf8_oced */
232 
233 
234 /* skip over Grapheme_Extend codes */
235 static void utf8_graphext (const char **pp, const char *end)
236 {
237  const char *p = *pp;
238  for (; p < end; *pp=p) {
239  unsigned code = utf8_deco(&p, end);
240  if (!Grapheme_Extend(code)) break;
241  }
242 } /* utf8_graphext */
243 
244 
245 static int utf8_count (const char **pp, int bytes, int graph, int max)
246 {
247  const char *const end = *pp+bytes;
248  int count = 0;
249  while (*pp < end && count != max) {
250  unsigned code = utf8_deco(pp, end);
251  count++;
252  if (!graph) continue;
253  if (Grapheme_Extend(code) && 1<count) count--; /* uncount */
254  }
255  if (graph && count == max) /* gather more extending */
256  utf8_graphext(pp, end);
257  return count;
258 } /* utf8_count */
259 
260 
261 
262 static int unic_len (lua_State *L) {
263  size_t l;
264  const char *s = luaL_checklstring(L, 1, &l);
266  if (MODE_MBYTE(mode)) l = (size_t)utf8_count(&s, l, mode-2, -1);
267  lua_pushinteger(L, l);
268  return 1;
269 }
270 
271 
272 static ptrdiff_t posrelat (ptrdiff_t pos, size_t len) {
273  /* relative string position: negative means back from end */
274  return (pos>=0) ? pos : (ptrdiff_t)len+pos+1;
275 }
276 
277 
278 static int unic_sub (lua_State *L) {
279  size_t l;
280  const char *s = luaL_checklstring(L, 1, &l), *p, *e=s+l;
282  ptrdiff_t end = luaL_optinteger(L, 3, -1);
284 
285  if (MODE_MBYTE(mode)) { p=s; l = (size_t)utf8_count(&p, l, mode-2, -1); }
286  start = posrelat(start, l);
287  end = posrelat(end, l);
288  if (start < 1) start = 1;
289  if (end > (ptrdiff_t)l) end = (ptrdiff_t)l;
290  if (start > end)
291  lua_pushliteral(L, "");
292  else {
293  l = end - --start; /* #units */
294  if (!(MODE_MBYTE(mode))) /* single byte */
295  s += start;
296  else {
297  if (start) utf8_count(&s, e-s, mode-2, start); /* skip */
298  p = s;
299  utf8_count(&p, e-p, mode-2, l);
300  l = p-s;
301  }
302  lua_pushlstring(L, s, l);
303  }
304  return 1;
305 }
306 
307 
308 static int str_reverse (lua_State *L) { /* TODO? whatfor? */
309  size_t l;
310  luaL_Buffer b;
311  const char *s = luaL_checklstring(L, 1, &l), *p = s+l, *q;
313 
314  luaL_buffinit(L, &b);
315  if (!mb)
316  while (s < p--) luaL_addchar(&b, *p);
317  else {
318  unsigned code;
319  while (s < p) {
320  q = p;
321  code = utf8_oced(&p, s);
322  if (MODE_GRAPH == mode)
323  while (Grapheme_Extend(code) && p>s) code = utf8_oced(&p, s);
324  luaL_addlstring(&b, p, q-p);
325  }
326  }
327  luaL_pushresult(&b);
328  return 1;
329 }
330 
331 
332 
333 static int unic_lower (lua_State *L) {
334  size_t l;
335  luaL_Buffer b;
336  const char *s = luaL_checklstring(L, 1, &l), * const e=s+l;
338  luaL_buffinit(L, &b);
339  while (s < e) {
340  unsigned c = mb ? utf8_deco(&s, e) : uchar(*s++);
341  int info = charinfo(c);
342  if (GetCaseType(info)&0x02 && (mode || !(0x80&c))) c += GetDelta(info);
343  if (mb) utf8_enco(&b, c); else luaL_addchar(&b, c);
344  }
345  luaL_pushresult(&b);
346  return 1;
347 }
348 
349 
350 static int unic_upper (lua_State *L) {
351  size_t l;
352  luaL_Buffer b;
353  const char *s = luaL_checklstring(L, 1, &l), * const e=s+l;
355  luaL_buffinit(L, &b);
356  while (s < e) {
357  unsigned c = mb ? utf8_deco(&s, e) : uchar(*s++);
358  int info = charinfo(c);
359  if (GetCaseType(info)&0x04 && (mode || !(0x80&c))) c -= GetDelta(info);
360  if (mb) utf8_enco(&b, c); else luaL_addchar(&b, c);
361  }
362  luaL_pushresult(&b);
363  return 1;
364 }
365 
366 
367 static int str_rep (lua_State *L) {
368  size_t l;
369  luaL_Buffer b;
370  const char *s = luaL_checklstring(L, 1, &l);
371  int n = luaL_checkint(L, 2);
372  luaL_buffinit(L, &b);
373  while (n-- > 0)
374  luaL_addlstring(&b, s, l);
375  luaL_pushresult(&b);
376  return 1;
377 }
378 
379 
380 static int unic_byte (lua_State *L) {
381  size_t l;
382  ptrdiff_t posi, pose;
383  const char *s = luaL_checklstring(L, 1, &l), *p, *e=s+l;
384  int n, mode = lua_tointeger(L, lua_upvalueindex(1)), mb = MODE_MBYTE(mode);
385 
386  if (mb) { p=s; l = (size_t)utf8_count(&p, l, mode-2, -1); }
387  posi = posrelat(luaL_optinteger(L, 2, 1), l);
388  pose = posrelat(luaL_optinteger(L, 3, posi), l);
389  if (posi <= 0) posi = 1;
390  if ((size_t)pose > l) pose = l;
391  if (0 >= (n = pose - --posi)) return 0; /* empty interval */
392  if (!mb)
393  e = (s += posi) + n;
394  else {
395  if (posi) utf8_count(&s, e-s, mode-2, posi); /* skip */
396  p=s;
397  utf8_count(&p, e-s, mode-2, n);
398  e=p;
399  }
400  /* byte count is upper bound on #elements */
401  luaL_checkstack(L, e-s, "string slice too long");
402  for (n=0; s<e; n++)
403  lua_pushinteger(L, mb ? utf8_deco(&s, e) : uchar(*s++));
404  return n;
405 }
406 
407 
408 static int unic_char (lua_State *L) {
409  int i, n = lua_gettop(L); /* number of arguments */
411  /* TH: add the 256 out-of-range glyphs in 'plane 18' */
412  unsigned lim = mb ? 0x110100 : 0x100;
413 
414  luaL_Buffer b;
415  luaL_buffinit(L, &b);
416  for (i=1; i<=n; i++) {
417  unsigned c = luaL_checkint(L, i);
418  luaL_argcheck(L, lim > c, i, "invalid value");
419  if (mb) utf8_enco(&b, c); else luaL_addchar(&b, c);
420  }
421  luaL_pushresult(&b);
422  return 1;
423 }
424 
425 
426 static int writer (lua_State *L, const void* b, size_t size, void* B) {
427  (void)L;
428  luaL_addlstring((luaL_Buffer*) B, (const char *)b, size);
429  return 0;
430 }
431 
432 
433 static int str_dump (lua_State *L) {
434  luaL_Buffer b;
436  lua_settop(L, 1);
437  luaL_buffinit(L,&b);
438 #if defined(LuajitTeX)
439  if (lua_dump(L, writer, &b) != 0)
440 #else
441  if (lua_dump(L, writer, &b,0) != 0)
442 #endif
443  luaL_error(L, "unable to dump given function");
444  luaL_pushresult(&b);
445  return 1;
446 }
447 
448 
449 
450 /*
451 ** {======================================================
452 ** PATTERN MATCHING
453 ** =======================================================
454 * find/gfind(_aux) -> match, push_captures
455 * gsub -> match, add_s (-> push_captures)
456 * push_captures, add_s -> push_onecapture
457 * match ->
458 * start/end_capture -> match,
459 * match_capture, matchbalance, classend -> -,
460 * min/max_expand -> match, singlematch
461 * singlematch -> matchbracketclass, match_class,
462 * matchbracketclass -> match_class -> -,
463 */
464 
465 
466 #define CAP_UNFINISHED (-1)
467 #define CAP_POSITION (-2)
468 
469 typedef struct MatchState {
470  const char *src_init; /* init of source string */
471  const char *src_end; /* end (`\0') of source string */
472  lua_State *L;
473  int level; /* total number of captures (finished or unfinished) */
474  int mode;
475  int mb;
476  struct {
477  const char *init;
478  ptrdiff_t len;
481 
482 
483 #define L_ESC '%'
484 #define SPECIALS "^$*+?.([%-"
485 
486 
487 static int check_capture (MatchState *ms, int l) {
488  l -= '1';
489  if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED)
490  return luaL_error(ms->L, "invalid capture index");
491  return l;
492 }
493 
494 
495 static int capture_to_close (MatchState *ms)
496 {
497  int level = ms->level;
498  for (level--; level>=0; level--)
499  if (ms->capture[level].len == CAP_UNFINISHED) return level;
500  return luaL_error(ms->L, "invalid pattern capture");
501 }
502 
503 
504 static const char *classend (MatchState *ms, const char *p)
505 {
506  switch (*p) {
507  case L_ESC:
508  if (!*++p) luaL_error(ms->L, "malformed pattern (ends with " LUA_QL("%%") ")");
509  break;
510  case '[':
511  /* if (*p == '^') p++; -- no effect */
512  do { /* look for a `]' */
513  if (!*p) luaL_error(ms->L, "malformed pattern (missing " LUA_QL("]") ")");
514  if (L_ESC == *(p++) && *p) p++; /* skip escapes (e.g. `%]') */
515  } while (']' != *p);
516  break;
517  default:
518  if (!ms->mb) break;
519  utf8_deco(&p, p+4);
520  return p;
521  }
522  return p+1;
523 } /* classend */
524 
525 
526 /*
527  * The following macros are used for fast character category tests. The
528  * x_BITS values are shifted right by the category value to determine whether
529  * the given category is included in the set.
530  */
531 
532 #define LETTER_BITS ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) \
533  | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1 << OTHER_LETTER))
534 
535 #define DIGIT_BITS (1 << DECIMAL_DIGIT_NUMBER)
536 
537 #define NUMBER_BITS (1 << DECIMAL_DIGIT_NUMBER) \
538  | (1 << LETTER_NUMBER) | (1 << OTHER_NUMBER)
539 
540 #define SPACE_BITS ((1 << SPACE_SEPARATOR) | (1 << LINE_SEPARATOR) \
541  | (1 << PARAGRAPH_SEPARATOR))
542 
543 #define CONNECTOR_BITS (1 << CONNECTOR_PUNCTUATION)
544 
545 #define PUNCT_BITS ((1 << CONNECTOR_PUNCTUATION) | \
546  (1 << DASH_PUNCTUATION) | (1 << OPEN_PUNCTUATION) | \
547  (1 << CLOSE_PUNCTUATION) | (1 << INITIAL_QUOTE_PUNCTUATION) | \
548  (1 << FINAL_QUOTE_PUNCTUATION) | (1 << OTHER_PUNCTUATION))
549 
550 
551 /* character c matches class cl. undefined for cl not ascii */
552 static int match_class (int c, int cl, int mode)
553 {
554  int msk, res;
555  switch (0x20|cl /*tolower*/) {
556  case 'a' : msk = LETTER_BITS; break;
557  case 'c' : msk = 1<<CONTROL; break;
558  case 'x' : /* hexdigits */
559  if (0x40==(~0x3f&c)/*64-127*/ && 1&(0x7e/*a-f*/>>(0x1f&c))) goto matched;
560  case 'd' : msk = 1<<DECIMAL_DIGIT_NUMBER; mode=0;/* ASCII only */ break;
561  case 'l' : msk = 1<<LOWERCASE_LETTER; break;
562  case 'n' : msk = NUMBER_BITS; break; /* new */
563  case 'p' : msk = PUNCT_BITS; break;
564  case 's' :
565 #define STDSPACE /* standard "space" controls 9-13 */ \
566  (1<<9/*TAB*/|1<<10/*LF*/|1<<11/*VT*/|1<<12/*FF*/|1<<13/*CR*/)
567  if (!(~0x1f & c) && 1&(STDSPACE >> c)) goto matched;
568  msk = SPACE_BITS;
569  break;
570  case 'u' : msk = 1<<UPPERCASE_LETTER; break;
571  /*
572  this is not compatible to lua 5.1, where %w is just a letter or a digit
573  case 'w' : msk = LETTER_BITS|NUMBER_BITS|CONNECTOR_BITS; break;
574  */
575  case 'w' : msk = LETTER_BITS|NUMBER_BITS; break;
576  case 'z' : if (!c) goto matched; msk = 0; break;
577  default: return cl == c;
578  }
579  res = 1 & (msk >> charcat(c));
580  if (!mode && 0x80&c) res = 0;
581  if (0) {
582 matched:
583  res = 1;
584  }
585  return 0x20&cl /*islower*/ ? res : !res;
586 } /* match_class */
587 
588 
589 /* decode single byte or UTF-8 seq; advance *s */
590 static unsigned deco (const MatchState *ms, const char **s, const char *e)
591 {
592  return ms->mb ? utf8_deco(s, e) : *(unsigned char*)(*s)++;
593 }
594 
595 /* s must be < ms->src_end, p < ep */
596 static const char *singlematch (const MatchState *ms,
597  const char *s, const char *p, const char *ep)
598 {
599  int neg = 0;
600  unsigned c1, c2;
601  unsigned c;
602 #ifdef OPTIMIZE_SIZE
603  c = deco(ms, &s, ms->src_end);
604 #else
605  if (!ms->mb || !(0x80&*s))
606  c = *(unsigned char*)s++;
607  else
608  c = utf8_deco(&s, ms->src_end);
609 #endif
610 
611  switch (*p) {
612  case L_ESC:
613  if (match_class(c, uchar(p[1]), ms->mode)) {
614  case '.': /* the all class */
615 #ifndef OPTIMIZE_SIZE
616  if (MODE_GRAPH != ms->mode) return s; /* common fast path */
617 #endif
618  goto matched_class;
619  }
620  s = 0;
621  break;
622  default:
623 #ifdef OPTIMIZE_SIZE
624  c1 = deco(ms, &p, ep);
625 #else
626  if (!ms->mb || !(0x80&*p))
627  c1 = *(unsigned char*)p++;
628  else
629  c1 = utf8_deco(&p, ep);
630 #endif
631  if (c != c1) s = 0;
632  break;
633  case '[': /* matchbracketclass */
634  ep--; /* now on the ']' */
635  if ((neg = '^' == *++p)) p++; /* skip the `^' */
636  while (p < ep) {
637  if (*p == L_ESC) {
638  if (match_class(c, uchar(*++p), ms->mode)) goto matched_class_in_brack;
639  p++;
640  continue;
641  }
642  c1 = deco(ms, &p, ep);
643  /* in lua-5.1 and 5.1.1 a trailing '-' is allowed
644  dynasm.lua relies on this
645  */
646  if ( ep <= p + 1 || '-' != *p ) {
647  const char *op = p, *es;
648  if (MODE_GRAPH == ms->mode) utf8_graphext(&p, ep);
649  if (c != c1) continue;
650  if (MODE_GRAPH != ms->mode) goto matched;
651  /* comp grapheme extension */
652  es = s;
653  utf8_graphext(&es, ms->src_end);
654  if (es-s == p-op && (es==s || !memcmp(s, op, es-s))) goto matched;
655  continue;
656 
657  }
658  ++p;
659  /* range c1-c2 -- no extend support in range bounds... */
660  /* if (ep == ++p) break; see above */ /* bugger - trailing dash */
661  c2 = deco(ms, &p, ep);
662  if (c2 < c1) { unsigned swap=c1; c1=c2; c2=swap; }
663  if (c1 <= c && c <= c2) goto matched_class_in_brack; /* ...but extend match */
664  }
665  /* not matched */
666  neg = !neg;
667  matched:
668  if (neg) s = 0;
669  /* matchbracketclass */
670  }
671  return s;
672 matched_class_in_brack: /* matched %something or range in [] */
673  if (neg)
674  s = 0;
675  else {
676 matched_class: /* matched %something or . */
677  if (MODE_GRAPH == ms->mode) utf8_graphext(&s, ms->src_end);
678  }
679  return s;
680 }
681 
682 
683 static const char *match (MatchState *ms, const char *s, const char *p);
684 
685 
686 static const char *matchbalance (MatchState *ms, const char *s,
687  const char *p) {
688  if (*p == 0 || *(p+1) == 0)
689  luaL_error(ms->L, "unbalanced pattern");
690  if (*s != *p) return NULL;
691  else {
692  int b = *p;
693  int e = *(p+1);
694  int cont = 1;
695  while (++s < ms->src_end) {
696  if (*s == e) {
697  if (--cont == 0) return s+1;
698  }
699  else if (*s == b) cont++;
700  }
701  }
702  return NULL; /* string ends out of balance */
703 }
704 
705 
706 static const char *max_expand (MatchState *ms,
707  const char *s, const char *p, const char *ep)
708 {
709  const char *sp = s, *es;
710  while (sp<ms->src_end && (es = singlematch(ms, sp, p, ep)))
711  sp = es;
712  /* keeps trying to match with the maximum repetitions */
713  while (sp>=s) {
714  const char *res = match(ms, sp, ep+1);
715  if (res || sp==s) return res;
716  if (!ms->mb)
717  sp--; /* else didn't match; reduce 1 repetition to try again */
718  else {
719  unsigned code = utf8_oced(&sp, s);
720  if (MODE_GRAPH == ms->mode)
721  while (Grapheme_Extend(code) && sp>s) code = utf8_oced(&sp, s);
722  }
723  }
724  return NULL;
725 }
726 
727 
728 static const char *min_expand (MatchState *ms,
729  const char *s, const char *p, const char *ep)
730 {
731  do {
732  const char *res = match(ms, s, ep+1);
733  if (res) return res;
734  if (s >= ms->src_end) break;
735  } while ((s = singlematch(ms, s, p, ep))); /* try with one more repetition */
736  return NULL;
737 }
738 
739 
740 static const char *start_capture (MatchState *ms, const char *s,
741  const char *p, int what) {
742  const char *res;
743  int level = ms->level;
744  if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
745  ms->capture[level].init = s;
746  ms->capture[level].len = what;
747  ms->level = level+1;
748  if ((res=match(ms, s, p)) == NULL) /* match failed? */
749  ms->level--; /* undo capture */
750  return res;
751 }
752 
753 
754 static const char *end_capture (MatchState *ms, const char *s,
755  const char *p) {
756  int l = capture_to_close(ms);
757  const char *res;
758  ms->capture[l].len = s - ms->capture[l].init; /* close capture */
759  if ((res = match(ms, s, p)) == NULL) /* match failed? */
760  ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
761  return res;
762 }
763 
764 
765 static const char *match_capture (MatchState *ms, const char *s, int l) {
766  size_t len;
767  l = check_capture(ms, l);
768  len = ms->capture[l].len;
769  if ((size_t)(ms->src_end-s) >= len &&
770  memcmp(ms->capture[l].init, s, len) == 0)
771  return s+len;
772  else return NULL;
773 }
774 
775 
776 static const char *match (MatchState *ms, const char *s, const char *p) {
777  init: /* using goto's to optimize tail recursion */
778  switch (*p) {
779  case '(': { /* start capture */
780  if (*(p+1) == ')') /* position capture? */
781  return start_capture(ms, s, p+2, CAP_POSITION);
782  else
783  return start_capture(ms, s, p+1, CAP_UNFINISHED);
784  }
785  case ')': { /* end capture */
786  return end_capture(ms, s, p+1);
787  }
788  case L_ESC: {
789  switch (*(p+1)) {
790  case 'b': { /* balanced string? */
791  s = matchbalance(ms, s, p+2);
792  if (s == NULL) return NULL;
793  p+=4; goto init; /* else return match(ms, s, p+4); */
794  }
795 #if 0 /* TODO */
796  case 'f': { /* frontier? */
797  const char *ep; char previous;
798  p += 2;
799  if (*p != '[')
800  luaL_error(ms->L, "missing " LUA_QL("[") " after "
801  LUA_QL("%%f") " in pattern" );
802  luaL_error(ms->L, "missing `[' after `%%f' in pattern");
803  ep = classend(ms, p); /* points to what is next */
804  /* with UTF-8, getting the previous is more complicated */
805  previous = (s == ms->src_init) ? '\0' : *(s-1);
806  /* use singlematch to apply all necessary magic */
807  if (singlematch(uchar(previous), p, ep-1) ||
808  !singlematch(uchar(*s), p, ep-1)) return NULL;
809  p=ep; goto init; /* else return match(ms, s, ep); */
810  }
811 #endif
812  default: {
813  if (isdigit(uchar(*(p+1)))) { /* capture results (%0-%9)? */
814  s = match_capture(ms, s, uchar(*(p+1)));
815  if (s == NULL) return NULL;
816  p+=2; goto init; /* else return match(ms, s, p+2) */
817  }
818  goto dflt; /* case default */
819  }
820  }
821  }
822  case '\0': { /* end of pattern */
823  return s; /* match succeeded */
824  }
825  case '$': {
826  if (*(p+1) == '\0') /* is the `$' the last char in pattern? */
827  return (s == ms->src_end) ? s : NULL; /* check end of string */
828  else goto dflt; /* ??? */
829  }
830  default: dflt: { /* it is a pattern item */
831  const char *ep = classend(ms, p); /* points to what is next */
832  const char *es = 0;
833  if (s < ms->src_end) es = singlematch(ms, s, p, ep);
834  switch (*ep) {
835  case '?': { /* optional */
836  const char *res;
837  if (es && (res=match(ms, es, ep+1))) return res;
838  p=ep+1; goto init; /* else return match(ms, s, ep+1); */
839  }
840  case '*': { /* 0 or more repetitions */
841  return max_expand(ms, s, p, ep);
842  }
843  case '+': { /* 1 or more repetitions */
844  return (es ? max_expand(ms, es, p, ep) : NULL);
845  }
846  case '-': { /* 0 or more repetitions (minimum) */
847  return min_expand(ms, s, p, ep);
848  }
849  default: {
850  if (!es) return NULL;
851  s=es; p=ep; goto init; /* else return match(ms, s+1, ep); */
852  }
853  }
854  }
855  }
856 }
857 
858 
859 
860 static const char *lmemfind (const char *s1, size_t l1,
861  const char *s2, size_t l2) {
862  if (l2 == 0) return s1; /* empty strings are everywhere */
863  else if (l2 > l1) return NULL; /* avoids a negative `l1' */
864  else {
865  const char *init; /* to search for a `*s2' inside `s1' */
866  l2--; /* 1st char will be checked by `memchr' */
867  l1 = l1-l2; /* `s2' cannot be found after that */
868  while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) {
869  init++; /* 1st char is already checked */
870  if (memcmp(init, s2+1, l2) == 0)
871  return init-1;
872  else { /* correct `l1' and `s1' to try again */
873  l1 -= init-s1;
874  s1 = init;
875  }
876  }
877  return NULL; /* not found */
878  }
879 }
880 
881 
882 static void push_onecapture (MatchState *ms, int i, const char *s,
883  const char *e )
884 {
885  if (i >= ms->level) {
886  if (i == 0) /* ms->level == 0, too */
887  lua_pushlstring(ms->L, s, e - s); /* add whole match */
888  else
889  luaL_error(ms->L, "invalid capture index");
890  }
891  else {
892  ptrdiff_t l = ms->capture[i].len;
893  if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture");
894  if (l == CAP_POSITION)
895  lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);
896  else
897  lua_pushlstring(ms->L, ms->capture[i].init, l);
898  }
899 }
900 
901 
902 static int push_captures (MatchState *ms, const char *s, const char *e) {
903  int i;
904  int nlevels = (ms->level == 0 && s) ? 1 : ms->level;
905  luaL_checkstack(ms->L, nlevels, "too many captures");
906  for ( i = 0; i < nlevels; i++ )
907  push_onecapture( ms, i, s, e );
908  return nlevels; /* number of strings pushed */
909 }
910 
911 
912 static int unic_find_aux (lua_State *L, int find) {
913  size_t l1, l2;
914  const char *s = luaL_checklstring(L, 1, &l1);
915  const char *p = luaL_checklstring(L, 2, &l2);
916  ptrdiff_t init = posrelat(luaL_optinteger(L, 3, 1), l1) - 1;
917  if (init < 0) init = 0;
918  else if ((size_t)(init) > l1) init = (ptrdiff_t)l1;
919  if (find && (lua_toboolean(L, 4) || /* explicit request? */
920  strpbrk(p, SPECIALS) == NULL)) { /* or no special characters? */
921  /* do a plain search */
922  const char *s2 = lmemfind(s+init, l1-init, p, l2);
923  if (s2) {
924  lua_pushinteger(L, s2-s+1);
925  lua_pushinteger(L, s2-s+l2);
926  return 2;
927  }
928  }
929  else {
930  MatchState ms;
931  int anchor = (*p == '^') ? (p++, 1) : 0;
932  const char *s1=s+init;
933  unsigned char u8_lenght = U8_LENGTH( (unsigned char)s[0] );
934  ms.L = L;
935  ms.src_init = s;
936  ms.src_end = s+l1;
938  ms.mb = MODE_MBYTE(ms.mode);
939 
940 
941  /* LS/HH : patch for tracker issue 869, concerning "%s" match of à; the old code */
942  /* increments by 1 on a failure and can end up in the middle of an utf sequence */
943  /* so this was a major bug. */
944 
945  do {
946  const char *res;
947  ms.level = 0;
948  if ((res=match(&ms, s1, p)) != NULL) {
949  if (find) {
950  lua_pushinteger(L, s1-s+1); /* start */
951  lua_pushinteger(L, res-s); /* end */
952  return push_captures(&ms, NULL, 0) + 2;
953  } else
954  return push_captures(&ms, s1, res);
955  }
956  s1 = s1 + (ms.mode > MODE_LATIN ? U8_LENGTH( uchar(s1[0])) : 1) ;
957  } while (s1 < ms.src_end && !anchor);
958  }
959  lua_pushnil(L); /* not found */
960  return 1;
961 }
962 
963 static int unic_find (lua_State *L) {
964  return unic_find_aux(L, 1);
965 }
966 
967 
968 static int unic_match (lua_State *L) {
969  return unic_find_aux(L, 0);
970 }
971 
972 
973 
974 static int gmatch_aux (lua_State *L) {
975  MatchState ms;
976  size_t ls;
977  const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls);
978  const char *p = lua_tostring(L, lua_upvalueindex(2));
979  const char *src;
980  ms.L = L;
981  ms.src_init = s;
982  ms.src_end = s+ls;
984  ms.mb = MODE_MBYTE(ms.mode);
985  for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3));
986  src <= ms.src_end;
987  src++)
988  {
989  const char *e;
990  ms.level = 0;
991  if ((e = match(&ms, src, p)) != NULL) {
992  lua_Integer newstart = e-s;
993  if (e == src) newstart++; /* empty match? go at least one position */
994  lua_pushinteger(L, newstart);
996  return push_captures(&ms, src, e);
997  }
998  }
999  return 0; /* not found */
1000 }
1001 
1002 
1003 
1004 static int gmatch (lua_State *L) {
1005  luaL_checkstring(L, 1);
1006  luaL_checkstring(L, 2);
1007  lua_settop(L, 2);
1008  lua_pushinteger(L, 0);
1011  return 1;
1012 }
1013 
1014 static int gfind_nodef (lua_State *L) {
1015  return luaL_error(L, LUA_QL("string.gfind") " was renamed to "
1016  LUA_QL("string.gmatch"));
1017 }
1018 
1019 
1020 static void add_s (MatchState *ms, luaL_Buffer *b,
1021  const char *s, const char *e)
1022 {
1023  size_t l, i;
1024  const char *news = lua_tolstring(ms->L, 3, &l);
1025  for (i = 0; i < l; i++) {
1026  if (news[i] != L_ESC)
1027  luaL_addchar(b, news[i]);
1028  else {
1029  i++; /* skip ESC */
1030  if (!isdigit(uchar(news[i])))
1031  luaL_addchar(b, news[i]);
1032  else if (news[i] == '0')
1033  luaL_addlstring(b, s, e - s);
1034  else {
1035  push_onecapture(ms, news[i] - '1', s, e);
1036  luaL_addvalue(b); /* add capture to accumulated result */
1037  }
1038  }
1039  }
1040 }
1041 
1042 static void add_value (MatchState *ms, luaL_Buffer *b, const char *s,
1043  const char *e)
1044 {
1045  lua_State *L = ms->L;
1046  switch (lua_type(L, 3)) {
1047  case LUA_TNUMBER:
1048  case LUA_TSTRING: {
1049  add_s(ms, b, s, e);
1050  return;
1051  }
1052  case LUA_TFUNCTION: {
1053  int n;
1054  lua_pushvalue(L, 3);
1055  n = push_captures(ms, s, e);
1056  lua_call(L, n, 1);
1057  break;
1058  }
1059  case LUA_TTABLE: {
1060  push_onecapture(ms, 0, s, e);
1061  lua_gettable(L, 3);
1062  break;
1063  }
1064  default: {
1065  luaL_argerror(L, 3, "string/function/table expected");
1066  return;
1067  }
1068  }
1069  if (!lua_toboolean(L, -1)) { /* nil or false? */
1070  lua_pop(L, 1);
1071  lua_pushlstring(L, s, e - s); /* keep original text */
1072  }
1073  else if (!lua_isstring(L, -1))
1074  luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));
1075  luaL_addvalue(b); /* add result to accumulator */
1076 }
1077 
1078 static int unic_gsub (lua_State *L) {
1079  size_t srcl;
1080  const char *src = luaL_checklstring(L, 1, &srcl);
1081  const char *p = luaL_checkstring(L, 2);
1082  int max_s = luaL_optint(L, 4, srcl+1);
1083  int anchor = (*p == '^') ? (p++, 1) : 0;
1084  int n = 0;
1085  MatchState ms;
1086  luaL_Buffer b;
1087  luaL_buffinit(L, &b);
1088  ms.L = L;
1089  ms.src_init = src;
1090  ms.src_end = src+srcl;
1092  ms.mb = MODE_MBYTE(ms.mode);
1093  while (n < max_s) {
1094  const char *e;
1095  ms.level = 0;
1096  e = match(&ms, src, p);
1097  if (e) {
1098  n++;
1099  add_value(&ms, &b, src, e);
1100  }
1101  if (e && e>src) /* non empty match? */
1102  src = e; /* skip it */
1103  else if (src < ms.src_end)
1104  luaL_addchar(&b, *src++);
1105  else break;
1106  if (anchor) break;
1107  }
1108  luaL_addlstring(&b, src, ms.src_end-src);
1109  luaL_pushresult(&b);
1110  lua_pushinteger(L, n); /* number of substitutions */
1111  return 2;
1112 }
1113 
1114 /* }====================================================== */
1115 
1116 
1117 /* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */
1118 #define MAX_ITEM 512
1119 /* valid flags in a format specification */
1120 #define FLAGS "-+ #0"
1121 /*
1122 ** maximum size of each format specification (such as '%-099.99d')
1123 ** (+10 accounts for %99.99x plus margin of error)
1124 */
1125 #define MAX_FORMAT (sizeof(FLAGS) + sizeof(LUA_INTFRMLEN) + 10)
1126 
1127 
1128 static void addquoted (lua_State *L, luaL_Buffer *b, int arg) {
1129  size_t l;
1130  const char *s = luaL_checklstring(L, arg, &l);
1131  luaL_addchar(b, '"');
1132  while (l--) {
1133  switch (*s) {
1134  case '"': case '\\': case '\n': {
1135  luaL_addchar(b, '\\');
1136  luaL_addchar(b, *s);
1137  break;
1138  }
1139  case '\r': {
1140  luaL_addlstring(b, "\\r", 2);
1141  break;
1142  }
1143  case '\0': {
1144  luaL_addlstring(b, "\\000", 4);
1145  break;
1146  }
1147  default: {
1148  luaL_addchar(b, *s);
1149  break;
1150  }
1151  }
1152  s++;
1153  }
1154  luaL_addchar(b, '"');
1155 }
1156 
1157 
1158 static const char *scanformat (lua_State *L, const char *strfrmt, char *form,
1159  int *hasprecision)
1160 {
1161  const char *p = strfrmt;
1162  while (strchr(FLAGS, *p)) p++; /* skip flags */
1163  if ((size_t)(p - strfrmt) >= sizeof(FLAGS))
1164  luaL_error(L, "invalid format (repeated flags)");
1165  if (isdigit(uchar(*p))) p++; /* skip width */
1166  if (isdigit(uchar(*p))) p++; /* (2 digits at most) */
1167  if (*p == '.') {
1168  p++;
1169  *hasprecision = 1;
1170  if (isdigit(uchar(*p))) p++; /* skip precision */
1171  if (isdigit(uchar(*p))) p++; /* (2 digits at most) */
1172  }
1173  if (isdigit(uchar(*p)))
1174  luaL_error(L, "invalid format (width or precision too long)");
1175  form[0] = L_ESC;
1176  strncpy(form+1, strfrmt, p-strfrmt+1);
1177  form[p-strfrmt+2] = 0;
1178  return p;
1179 }
1180 
1181 static void addintlen (char *form) {
1182  size_t l = strlen(form);
1183  char spec = form[l - 1];
1184  strcpy(form + l - 1, LUA_INTFRMLEN);
1185  form[l + sizeof(LUA_INTFRMLEN) - 2] = spec;
1186  form[l + sizeof(LUA_INTFRMLEN) - 1] = '\0';
1187 }
1188 
1189 static int str_format (lua_State *L) {
1190  int arg = 1;
1191  size_t sfl;
1192  const char *strfrmt = luaL_checklstring(L, arg, &sfl);
1193  const char *strfrmt_end = strfrmt+sfl;
1194  luaL_Buffer b;
1195  luaL_buffinit(L, &b);
1196  while (strfrmt < strfrmt_end) {
1197  if (*strfrmt != L_ESC)
1198  luaL_addchar(&b, *strfrmt++);
1199  else if (*++strfrmt == L_ESC)
1200  luaL_addchar(&b, *strfrmt++); /* %% */
1201  else { /* format item */
1202  char form[MAX_FORMAT]; /* to store the format (`%...') */
1203  char buff[MAX_ITEM]; /* to store the formatted item */
1204  int hasprecision = 0;
1205  arg++;
1206  strfrmt = scanformat(L, strfrmt, form, &hasprecision);
1207  switch (*strfrmt++) {
1208  case 'c': {
1209 #ifdef LUA_USE_SNPRINTF
1210  snprintf( buff, MAX_ITEM, form,
1211  (int) luaL_checknumber( L, arg ) );
1212 #else
1213  sprintf(buff, form, (int) luaL_checknumber( L, arg ) );
1214 #endif
1215  break;
1216  }
1217  case 'd': case 'i': {
1218  addintlen( form );
1219 #ifdef LUA_USE_SNPRINTF
1220  snprintf( buff, MAX_ITEM, form,
1221  (LUA_INTFRM_T) luaL_checknumber(L, arg) );
1222 #else
1223  sprintf(buff, form,
1224  (LUA_INTFRM_T) luaL_checknumber(L, arg) );
1225 #endif
1226  break;
1227  }
1228  case 'o': case 'u': case 'x': case 'X': {
1229  addintlen( form );
1230 #ifdef LUA_USE_SNPRINTF
1231  snprintf(buff, MAX_ITEM, form,
1232  (unsigned LUA_INTFRM_T) luaL_checknumber(L, arg) );
1233 #else
1234  sprintf(buff, form,
1235  (unsigned LUA_INTFRM_T) luaL_checknumber(L, arg) );
1236 #endif
1237  break;
1238  }
1239  case 'e': case 'E': case 'f':
1240  case 'g': case 'G': {
1241 #ifndef LUA_NUMBER_DOUBLE
1242  luaL_argerror( L, 1, "double formatting not supported" );
1243 #else
1244 # ifdef __dietlibc__
1245 # warning "double formatting is broken in dietlibc"
1246 # endif
1247 # ifdef LUA_USE_SNPRINTF
1248  snprintf(buff, MAX_ITEM, form,
1249  (double) luaL_checknumber(L, arg) );
1250 # else
1251  sprintf(buff, form, (double) luaL_checknumber(L, arg) );
1252 # endif
1253 #endif
1254  break;
1255  }
1256  case 'q': {
1257  addquoted(L, &b, arg);
1258  continue; /* skip the `addsize' at the end */
1259  }
1260  case 's': {
1261  size_t l;
1262  const char *s = luaL_checklstring(L, arg, &l);
1263  if (!hasprecision && l >= 100) {
1264  /* no precision and string is too long to be formatted;
1265  keep original string */
1266  lua_pushvalue(L, arg);
1267  luaL_addvalue(&b);
1268  continue; /* skip the `addsize' at the end */
1269  }
1270  else {
1271 #ifdef LUA_USE_SNPRINTF
1272  snprintf(buff, MAX_ITEM, form, s);
1273 #else
1274  sprintf(buff, form, s);
1275 #endif
1276  break;
1277  }
1278  }
1279  default: { /* also treat cases `pnLlh' */
1280  return luaL_error(L, "invalid option " LUA_QL("%%%c") " to "
1281  LUA_QL("format"), *(strfrmt - 1));
1282  }
1283  }
1285  }
1286  }
1287  luaL_pushresult(&b);
1288  return 1;
1289 }
1290 
1291 #ifdef WANT_EXT_MATCH
1292 static struct { const char *k; int v; } unicflags[] = {
1293  { "ASCII", MODE_ASCII }
1294  ,{ "LATIN", MODE_LATIN }
1295  ,{ "UTF8", MODE_UTF8 }
1296  ,{ "GRAPH", MODE_GRAPH }
1297 };
1298 #define unicflags_sz ( sizeof( unicflags ) / sizeof( unicflags[0] ) )
1299 
1300 /*
1301  allow direkt match calls from c
1302 */
1303 int ext_uni_match ( void *state, const char *s, size_t n,
1304  const char *p, int init, int mode )
1305 {
1306  lua_State *L = state;
1307  MatchState ms;
1308  int anchor = (*p == '^') ? (p++, 1) : 0;
1309  const char *s1;
1310  int i = posrelat( init, n ) - 1;
1311  if (i < 0) i = 0;
1312  else if ((size_t)(i) > n) i = (ptrdiff_t)n;
1313  s1 = s + i;
1314  ms.L = L;
1315  ms.src_init = s;
1316  ms.src_end = s + n;
1317  ms.mode = mode;
1318  ms.mb = MODE_MBYTE(mode);
1319  do {
1320  const char *res;
1321  ms.level = 0;
1322  if ( ( res=match(&ms, s1, p)) != NULL )
1323  return 1;
1324  } while ( s1++ < ms.src_end && !anchor );
1325  return 0;
1326 }
1327 #endif
1328 
1329 static const luaL_Reg uniclib[] = {
1330  {"byte", unic_byte}, /* no cluster ! */
1331  {"char", unic_char},
1332  {"dump", str_dump},
1333  {"find", unic_find}, /* cluster */
1334  {"format", str_format},
1335  {"gfind", gfind_nodef},
1336  {"gmatch", gmatch}, /* cluster */
1337  {"gsub", unic_gsub}, /* cluster */
1338  {"len", unic_len}, /* cluster/byte opt. */
1339  {"lower", unic_lower},
1340  {"match", unic_match}, /* cluster */
1341  {"rep", str_rep},
1342  {"reverse", str_reverse},
1343  {"sub", unic_sub}, /* cluster/byte opt. */
1344  {"upper", unic_upper},
1345  {NULL, NULL}
1346 };
1347 
1348 #if defined( SLNUNICODE_AS_STRING ) && defined( STRING_WITH_METAT )
1349 static void createmetatable (lua_State *L) {
1350  lua_newtable(L); /* create metatable for strings */
1351  lua_pushliteral(L, ""); /* dummy string */
1352  lua_pushvalue(L, -2);
1353  lua_setmetatable(L, -2); /* set string metatable */
1354  lua_pop(L, 1); /* pop dummy string */
1355  lua_pushvalue(L, -2); /* string library... */
1356  lua_setfield(L, -2, "__index"); /* ...is the __index metamethod */
1357  lua_pop(L, 1); /* pop metatable */
1358 }
1359 #endif
1360 
1361 /*
1362 ** Open string library
1363 */
1365  /* register unicode itself so require("unicode") works */
1367  uniclib + (sizeof uniclib/sizeof uniclib[0] - 1), 0); /* empty func list */
1368  lua_pop(L, 1);
1370  lua_newtable(L);
1372  luaL_setfuncs(L, uniclib, 1);
1373  lua_setfield(L, -2, "ascii");
1374 
1375  lua_newtable(L);
1377  luaL_setfuncs(L, uniclib, 1);
1378  lua_setfield(L, -2, "latin1");
1379 
1380  lua_newtable(L);
1381  lua_pushinteger(L, MODE_GRAPH);
1382  luaL_setfuncs(L, uniclib, 1);
1383  lua_setfield(L, -2, "grapheme");
1384 
1385  lua_newtable(L);
1387  luaL_setfuncs(L, uniclib, 1);
1388  lua_setfield(L, -2, "utf8");
1389 
1390 #ifdef WANT_EXT_MATCH
1391  {
1392  unsigned i;
1393  const char *ln = SLN_UNICODENAME ".mode";
1394  luaL_findtable( L, LUA_REGISTRYINDEX, "_LOADED", 1 );
1395  lua_getfield( L, -1, ln );
1396  if ( !lua_istable(L, -1 ) ) {
1397  lua_pop( L, 1 );
1398  if ( luaL_findtable( L, LUA_GLOBALSINDEX, ln, unicflags_sz ) )
1399  luaL_error( L, "name conflict for module " LUA_QS, ln );
1400  lua_pushvalue( L, -1 );
1401  lua_setfield( L, -3, ln );
1402  }
1403  lua_remove( L, -2 );
1404  for( i = 0; unicflags_sz > i; ++i ) {
1405  lua_pushnumber( L, unicflags[i].v );
1406  lua_setfield( L, -2, unicflags[i].k );
1407  }
1408  }
1409 #endif
1410  return 1;
1411 }
1412 
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
int ptrdiff_t
Definition: CPAL.d:3845
q
Definition: afm2pl.c:2287
int level
Definition: afm2pl.c:1694
int code
Definition: aftopl.c:52
#define state
Definition: aptex-macros.h:996
#define count(a)
Definition: aptex-macros.h:781
#define mode
Definition: aptex-macros.h:510
char *__cdecl strpbrk(char const *_Str, char const *_Control)
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
int v
Definition: dviconv.c:10
char * strncpy()
char * strcpy()
static SIGNED_PAIR max_s
Definition: dvicore.c:57
#define info
Definition: dviinfo.c:42
static void
Definition: fpif.c:118
mpz_t pp
Definition: gen-psqr.c:108
#define s
Definition: afcover.h:80
static char buff[2 *10240]
Definition: genind.c:46
#define c(n)
Definition: gpos-common.c:150
#define strchr
Definition: gsftopk.c:59
#define memcmp(s1, s2, n)
Definition: gsftopk.c:66
#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
static int find(DIR *dp, char *name)
Definition: dirent.c:25
#define sprintf
Definition: snprintf.c:44
#define isdigit(c)
Definition: snprintf.c:177
#define snprintf
Definition: snprintf.c:41
const int * pos
Definition: combiners.h:905
#define size_t
Definition: glob.c:257
char * memchr(char *s, int c, size_t n) const
Definition: memchr.c:58
int k
Definition: otp-parser.c:70
#define max(a, b)
Definition: pbmto4425.c:11
#define res(length)
Definition: picttoppm.c:287
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
static int32_t last
Definition: ppagelist.c:29
static int32_t first
Definition: ppagelist.c:29
#define B(x, y)
static int size
Definition: ppmlabel.c:24
static long bytes
Definition: psutil.c:35
static const char * luaL_findtable(lua_State *L, int idx, const char *fname, int szhint)
Definition: minilua.c:6029
#define luaL_optint(L, n, d)
Definition: minilua.c:5858
#define luaL_checkint(L, n)
Definition: minilua.c:5857
void() luaL_openlib(lua_State *L, const char *libname, const luaL_Reg *l, int nup)
Definition: lib_aux.c:128
#define lua_getglobal(L, s)
Definition: lua.h:280
#define LUA_GLOBALSINDEX
Definition: lua.h:38
void lua_pushcclosure(lua_State *L, lua_CFunction fn, int n)
Definition: lapi.c:532
int lua_setmetatable(lua_State *L, int objindex)
Definition: lapi.c:846
int lua_dump(lua_State *L, lua_Writer writer, void *data, int strip)
Definition: lapi.c:1016
int lua_gettop(lua_State *L)
Definition: lapi.c:167
int lua_isstring(lua_State *L, int idx)
Definition: lapi.c:283
void lua_pushinteger(lua_State *L, lua_Integer n)
Definition: lapi.c:466
void lua_setfield(lua_State *L, int idx, const char *k)
Definition: lapi.c:777
void lua_pushnumber(lua_State *L, lua_Number n)
Definition: lapi.c:458
void lua_pushvalue(lua_State *L, int idx)
Definition: lapi.c:237
int lua_type(lua_State *L, int idx)
Definition: lapi.c:251
void lua_pushnil(lua_State *L)
Definition: lapi.c:450
void lua_settop(lua_State *L, int idx)
Definition: lapi.c:172
const char * lua_tolstring(lua_State *L, int idx, size_t *len)
Definition: lapi.c:373
int lua_getfield(lua_State *L, int idx, const char *k)
Definition: lapi.c:622
int lua_gettable(lua_State *L, int idx)
Definition: lapi.c:612
int lua_toboolean(lua_State *L, int idx)
Definition: lapi.c:367
const char * lua_pushlstring(lua_State *L, const char *s, size_t len)
Definition: lapi.c:479
int luaL_argerror(lua_State *L, int arg, const char *extramsg)
Definition: lauxlib.c:164
int luaL_error(lua_State *L, const char *fmt,...)
Definition: lauxlib.c:223
void luaL_pushresult(luaL_Buffer *B)
Definition: lauxlib.c:542
lua_Integer luaL_checkinteger(lua_State *L, int arg)
Definition: lauxlib.c:430
const char * luaL_checklstring(lua_State *L, int arg, size_t *len)
Definition: lauxlib.c:390
void luaL_checkstack(lua_State *L, int space, const char *msg)
Definition: lauxlib.c:368
lua_Number luaL_checknumber(lua_State *L, int arg)
Definition: lauxlib.c:408
void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup)
Definition: lauxlib.c:934
void luaL_addvalue(luaL_Buffer *B)
Definition: lauxlib.c:558
lua_Integer luaL_optinteger(lua_State *L, int arg, lua_Integer def)
Definition: lauxlib.c:440
void luaL_checktype(lua_State *L, int arg, int t)
Definition: lauxlib.c:378
void luaL_buffinit(lua_State *L, luaL_Buffer *B)
Definition: lauxlib.c:569
void luaL_addlstring(luaL_Buffer *B, const char *s, size_t l)
Definition: lauxlib.c:528
#define luaL_typename(L, i)
Definition: lauxlib.h:127
#define luaL_argcheck(L, cond, arg, extramsg)
Definition: lauxlib.h:122
#define luaL_addchar(B, c)
Definition: lauxlib.h:157
#define luaL_checkstring(L, n)
Definition: lauxlib.h:124
static void createmetatable(lua_State *L)
Definition: lstrlib.c:1564
#define lua_replace(L, idx)
Definition: lua.h:372
#define lua_tointeger(L, i)
Definition: lua.h:341
#define lua_istable(L, n)
Definition: lua.h:352
#define LUA_TTABLE
Definition: lua.h:68
#define LUA_REGISTRYINDEX
Definition: lua.h:41
LUA_INTEGER lua_Integer
Definition: lua.h:92
#define lua_pushliteral(L, s)
Definition: lua.h:360
#define LUA_TSTRING
Definition: lua.h:67
#define lua_remove(L, idx)
Definition: lua.h:370
#define LUA_TNUMBER
Definition: lua.h:66
#define lua_call(L, n, r)
Definition: lua.h:273
#define lua_newtable(L)
Definition: lua.h:345
#define lua_pop(L, n)
Definition: lua.h:343
#define lua_upvalueindex(i)
Definition: lua.h:42
#define lua_tostring(L, i)
Definition: lua.h:365
#define LUA_TFUNCTION
Definition: lua.h:69
#define LUA_QS
Definition: luaconf.h:778
#define LUALIB_API
Definition: luaconf.h:265
#define LUA_QL(x)
Definition: luaconf.h:777
#define swap(sp)
Definition: interp.c:123
ShellFileEnvironment e
Definition: sh6.c:388
#define GetDelta(info)
Definition: slnudata.c:938
@ UPPERCASE_LETTER
Definition: slnudata.c:899
@ LOWERCASE_LETTER
Definition: slnudata.c:900
@ DECIMAL_DIGIT_NUMBER
Definition: slnudata.c:907
@ CONTROL
Definition: slnudata.c:913
#define GetCaseType(info)
Definition: slnudata.c:936
static int unic_char(lua_State *L)
Definition: slnunico.c:408
static unsigned utf8_oced(const char **pp, const char *start)
Definition: slnunico.c:205
#define LUA_INTFRMLEN
Definition: slnunico.c:110
static int match_class(int c, int cl, int mode)
Definition: slnunico.c:552
static int unic_sub(lua_State *L)
Definition: slnunico.c:278
static void utf8_enco(luaL_Buffer *b, unsigned c)
Definition: slnunico.c:146
static void push_onecapture(MatchState *ms, int i, const char *s, const char *e)
Definition: slnunico.c:882
#define MAX_ITEM
Definition: slnunico.c:1118
#define SPECIALS
Definition: slnunico.c:484
static const char * start_capture(MatchState *ms, const char *s, const char *p, int what)
Definition: slnunico.c:740
@ MODE_UTF8
Definition: slnunico.c:134
@ MODE_LATIN
Definition: slnunico.c:133
@ MODE_ASCII
Definition: slnunico.c:132
#define MAX_FORMAT
Definition: slnunico.c:1125
static const char * min_expand(MatchState *ms, const char *s, const char *p, const char *ep)
Definition: slnunico.c:728
static const char * scanformat(lua_State *L, const char *strfrmt, char *form, int *hasprecision)
Definition: slnunico.c:1158
#define CAP_UNFINISHED
Definition: slnunico.c:466
static int str_reverse(lua_State *L)
Definition: slnunico.c:308
static const char * match(MatchState *ms, const char *s, const char *p)
Definition: slnunico.c:776
static int capture_to_close(MatchState *ms)
Definition: slnunico.c:495
#define L_ESC
Definition: slnunico.c:483
#define uchar(c)
Definition: slnunico.c:141
static int unic_find_aux(lua_State *L, int find)
Definition: slnunico.c:912
#define FLAGS
Definition: slnunico.c:1120
static const char * singlematch(const MatchState *ms, const char *s, const char *p, const char *ep)
Definition: slnunico.c:596
static const luaL_Reg uniclib[]
Definition: slnunico.c:1329
static unsigned deco(const MatchState *ms, const char **s, const char *e)
Definition: slnunico.c:590
static const char * classend(MatchState *ms, const char *p)
Definition: slnunico.c:504
#define LUA_MAXCAPTURES
Definition: slnunico.c:102
#define NUMBER_BITS
Definition: slnunico.c:537
static const char * lmemfind(const char *s1, size_t l1, const char *s2, size_t l2)
Definition: slnunico.c:860
#define SLN_UNICODENAME
Definition: slnunico.c:99
#define MODE_MBYTE(mode)
Definition: slnunico.c:136
#define CAP_POSITION
Definition: slnunico.c:467
static void addquoted(lua_State *L, luaL_Buffer *b, int arg)
Definition: slnunico.c:1128
int luaopen_unicode(lua_State *L)
Definition: slnunico.c:1364
#define LUA_INTFRM_T
Definition: slnunico.c:111
struct MatchState MatchState
#define Grapheme_Extend(code)
Definition: slnunico.c:128
#define STDSPACE
static int check_capture(MatchState *ms, int l)
Definition: slnunico.c:487
#define LETTER_BITS
Definition: slnunico.c:532
static int unic_find(lua_State *L)
Definition: slnunico.c:963
static const char * matchbalance(MatchState *ms, const char *s, const char *p)
Definition: slnunico.c:686
static int gfind_nodef(lua_State *L)
Definition: slnunico.c:1014
static void utf8_graphext(const char **pp, const char *end)
Definition: slnunico.c:235
static const char * end_capture(MatchState *ms, const char *s, const char *p)
Definition: slnunico.c:754
static int unic_match(lua_State *L)
Definition: slnunico.c:968
static int gmatch(lua_State *L)
Definition: slnunico.c:1004
static unsigned utf8_deco(const char **pp, const char *end)
Definition: slnunico.c:168
static int gmatch_aux(lua_State *L)
Definition: slnunico.c:974
static int str_dump(lua_State *L)
Definition: slnunico.c:433
#define charcat(c)
Definition: slnunico.c:127
static int unic_gsub(lua_State *L)
Definition: slnunico.c:1078
const unsigned char cuc
Definition: slnunico.c:143
static int unic_byte(lua_State *L)
Definition: slnunico.c:380
#define PUNCT_BITS
Definition: slnunico.c:545
static int str_rep(lua_State *L)
Definition: slnunico.c:367
#define SPACE_BITS
Definition: slnunico.c:540
static int unic_lower(lua_State *L)
Definition: slnunico.c:333
static ptrdiff_t posrelat(ptrdiff_t pos, size_t len)
Definition: slnunico.c:272
static const char * max_expand(MatchState *ms, const char *s, const char *p, const char *ep)
Definition: slnunico.c:706
static int push_captures(MatchState *ms, const char *s, const char *e)
Definition: slnunico.c:902
static void addintlen(char *form)
Definition: slnunico.c:1181
static void add_s(MatchState *ms, luaL_Buffer *b, const char *s, const char *e)
Definition: slnunico.c:1020
static int unic_len(lua_State *L)
Definition: slnunico.c:262
static void add_value(MatchState *ms, luaL_Buffer *b, const char *s, const char *e)
Definition: slnunico.c:1042
static int str_format(lua_State *L)
Definition: slnunico.c:1189
#define charinfo(c)
Definition: slnunico.c:126
static int writer(lua_State *L, const void *b, size_t size, void *B)
Definition: slnunico.c:426
#define U8_LENGTH(c)
Definition: slnunico.c:123
static const char * match_capture(MatchState *ms, const char *s, int l)
Definition: slnunico.c:765
static int utf8_count(const char **pp, int bytes, int graph, int max)
Definition: slnunico.c:245
static int unic_upper(lua_State *L)
Definition: slnunico.c:350
unsigned char level
Definition: lstrlib.c:220
int mode
Definition: slnunico.c:474
const char * init
Definition: lstrlib.c:222
const char * src_init
Definition: lstrlib.c:215
const char * src_end
Definition: lstrlib.c:216
struct MatchState::@1693 capture[32]
ptrdiff_t len
Definition: lstrlib.c:223
lua_State * L
Definition: lstrlib.c:218
Definition: inftrees.h:24
Definition: sh.h:1226
Definition: sh2.c:920
#define c2
Definition: t1io.c:53
#define c1
Definition: t1io.c:52
s1
Definition: t4ht.c:1059
char * s2
Definition: t4ht.c:1062
*job_name strlen((char *) job_name) - 4)
#define sp
Definition: stack.c:11
@ L
Definition: ubidiimp.h:45
@ start
Definition: preamble.c:52
#define end(cp)
Definition: zic.c:71