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)  

clp.c
Go to the documentation of this file.
1 /* -*- related-file-name: "../include/lcdf/clp.h" -*- */
2 /* clp.c - Complete source code for CLP.
3  * This file is part of CLP, the command line parser package.
4  *
5  * Copyright (c) 1997-2014 Eddie Kohler, ekohler@gmail.com
6  *
7  * CLP is free software. It is distributed under the GNU General Public
8  * License, Version 2, or, alternatively and at your discretion, under the
9  * more permissive (BSD-like) Click LICENSE file as described below.
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the
13  * "Software"), to deal in the Software without restriction, subject to the
14  * conditions listed in the Click LICENSE file, which is available in full at
15  * http://github.com/kohler/click/blob/master/LICENSE. The conditions
16  * include: you must preserve this copyright notice, and you cannot mention
17  * the copyright holders in advertising related to the Software without
18  * their permission. The Software is provided WITHOUT ANY WARRANTY, EXPRESS
19  * OR IMPLIED. This notice is a summary of the Click LICENSE file; the
20  * license in that file is binding. */
21 
22 #ifdef HAVE_CONFIG_H
23 # include <config.h>
24 #endif
25 #include <lcdf/clp.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <stdio.h>
29 #include <assert.h>
30 #include <stdarg.h>
31 #include <ctype.h>
32 #if HAVE_SYS_TYPES_H
33 # include <sys/types.h>
34 #endif
35 #if HAVE_INTTYPES_H || !defined(HAVE_CONFIG_H)
36 # include <inttypes.h>
37 #endif
38 
39 /* By default, assume we have inttypes.h, strtoul, and uintptr_t. */
40 #if !HAVE_STRTOUL && !defined(HAVE_CONFIG_H)
41 # define HAVE_STRTOUL 1
42 #endif
43 #if !HAVE_UINTPTR_T && !HAVE_INTTYPES_H && defined(HAVE_CONFIG_H)
44 typedef unsigned long uintptr_t;
45 #endif
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 
52 /** @file clp.h
53  * @brief Functions for parsing command line options.
54  *
55  * The CLP functions are used to parse command line arguments into options.
56  * It automatically handles value parsing, error messages, long options with
57  * minimum prefix matching, short options, and negated options.
58  *
59  * The CLP model works like this.
60  *
61  * <ol>
62  * <li>The user declares an array of Clp_Option structures that define the
63  * options their program accepts.</li>
64  * <li>The user creates a Clp_Parser object using Clp_NewParser(), passing in
65  * the command line arguments to parse and the Clp_Option structures.</li>
66  * <li>A loop repeatedly calls Clp_Next() to parse the arguments.</li>
67  * </ol>
68  *
69  * Unlike many command line parsing libraries, CLP steps through all arguments
70  * one at a time, rather than slurping up all options at once. This makes it
71  * meaningful to give an option more than once.
72  *
73  * Here's an example.
74  *
75  * @code
76  * #define ANIMAL_OPT 1
77  * #define VEGETABLE_OPT 2
78  * #define MINERALS_OPT 3
79  * #define USAGE_OPT 4
80  *
81  * static const Clp_Option options[] = {
82  * { "animal", 'a', ANIMAL_OPT, Clp_ValString, 0 },
83  * { "vegetable", 'v', VEGETABLE_OPT, Clp_ValString, Clp_Negate | Clp_Optional },
84  * { "minerals", 'm', MINERALS_OPT, Clp_ValInt, 0 },
85  * { "usage", 0, USAGE_OPT, 0, 0 }
86  * };
87  *
88  * int main(int argc, char *argv[]) {
89  * Clp_Parser *clp = Clp_NewParser(argc, argv,
90  * sizeof(options) / sizeof(options[0]), options);
91  * int opt;
92  * while ((opt = Clp_Next(clp)) != Clp_Done)
93  * switch (opt) {
94  * case ANIMAL_OPT:
95  * fprintf(stderr, "animal is %s\n", clp->val.s);
96  * break;
97  * case VEGETABLE_OPT:
98  * if (clp->negated)
99  * fprintf(stderr, "no vegetables!\n");
100  * else if (clp->have_val)
101  * fprintf(stderr, "vegetable is %s\n", clp->val.s);
102  * else
103  * fprintf(stderr, "vegetables OK\n");
104  * break;
105  * case MINERALS_OPT:
106  * fprintf(stderr, "%d minerals\n", clp->val.i);
107  * break;
108  * case USAGE_OPT:
109  * fprintf(stderr, "Usage: 20q [--animal=ANIMAL] [--vegetable[=VEGETABLE]] [--minerals=N]\n");
110  * break;
111  * case Clp_NotOption:
112  * fprintf(stderr, "non-option %s\n", clp->vstr);
113  * break;
114  * }
115  * }
116  * }
117  * @endcode
118  *
119  * Here are a couple of executions.
120  *
121  * <pre>
122  * % ./20q --animal=cat
123  * animal is cat
124  * % ./20q --animal=cat -a dog -afish --animal bird --an=snake
125  * animal is cat
126  * animal is dog
127  * animal is fish
128  * animal is bird
129  * animal is snake
130  * % ./20q --no-vegetables
131  * no vegetables!
132  * % ./20q -v
133  * vegetables OK
134  * % ./20q -vkale
135  * vegetable is kale
136  * % ./20q -m10
137  * 10 minerals
138  * % ./20q -m foo
139  * '-m' expects an integer, not 'foo'
140  * </pre>
141  */
142 
143 
144 /* Option types for Clp_SetOptionChar */
145 #define Clp_DoubledLong (Clp_LongImplicit * 2)
146 
147 #define Clp_InitialValType 8
148 #define MAX_AMBIGUOUS_VALUES 4
149 
150 typedef struct {
151  int val_type;
153  int flags;
154  void *user_data;
155 } Clp_ValType;
156 
157 typedef struct {
158  unsigned ilong : 1;
159  unsigned ishort : 1;
160  unsigned imandatory : 1;
161  unsigned ioptional : 1;
162  unsigned ipos : 1;
163  unsigned ineg : 1;
164  unsigned iprefmatch : 1;
165  unsigned lmmpos_short : 1;
166  unsigned lmmneg_short : 1;
167  unsigned char ilongoff;
168  int lmmpos;
169  int lmmneg;
171 
172 
173 #define Clp_OptionCharsSize 5
174 
175 typedef struct {
176  int c;
177  int type;
178 } Clp_Oclass;
179 #define Clp_OclassSize 10
180 
181 typedef struct Clp_Internal {
182  const Clp_Option *opt;
184  int nopt;
185  unsigned opt_generation;
186 
188  int nvaltype;
189 
190  const char * const *argv;
191  int argc;
192 
194  int noclass;
195  int long1pos;
196  int long1neg;
197  int utf8;
198 
200  const char *xtext;
201 
202  const char *program_name;
203  void (*error_handler)(Clp_Parser *, const char *);
204 
207 
208  unsigned char is_short;
209  unsigned char whole_negated; /* true if negated by an option character */
210  unsigned char could_be_short;
211  unsigned char current_short;
212  unsigned char negated_by_no;
213 
217 
218 
220  const char * const *argv;
221  int argc;
222 
224  const char *xtext;
225 
227 
228  unsigned opt_generation;
230  unsigned char is_short;
231  unsigned char whole_negated;
232  unsigned char current_short;
233  unsigned char negated_by_no;
234 };
235 
236 
237 typedef struct Clp_StringList {
240  int nitems;
241 
242  unsigned char allow_int;
243  unsigned char val_long;
246 
247 
248 static const Clp_Option clp_option_sentinel[] = {
249  {"", 0, Clp_NotOption, 0, 0},
250  {"", 0, Clp_Done, 0, 0},
251  {"", 0, Clp_BadOption, 0, 0},
252  {"", 0, Clp_Error, 0, 0}
253 };
254 
255 
256 static int parse_string(Clp_Parser *, const char *, int, void *);
257 static int parse_int(Clp_Parser *, const char *, int, void *);
258 static int parse_bool(Clp_Parser *, const char *, int, void *);
259 static int parse_double(Clp_Parser *, const char *, int, void *);
260 static int parse_string_list(Clp_Parser *, const char *, int, void *);
261 
262 static int ambiguity_error(Clp_Parser *, int, int *, const Clp_Option *,
263  const Clp_InternOption *, const char *, const char *,
264  ...);
265 
266 
267 /*******
268  * utf8
269  **/
270 
271 #define U_REPLACEMENT 0xFFFD
272 
273 static char *
274 encode_utf8(char *s, int n, int c)
275 {
276  if (c < 0 || c >= 0x110000 || (c >= 0xD800 && c <= 0xDFFF))
277  c = U_REPLACEMENT;
278  if (c <= 0x7F && n >= 1)
279  *s++ = c;
280  else if (c <= 0x7FF && n >= 2) {
281  *s++ = 0xC0 | (c >> 6);
282  goto char1;
283  } else if (c <= 0xFFFF && n >= 3) {
284  *s++ = 0xE0 | (c >> 12);
285  goto char2;
286  } else if (n >= 4) {
287  *s++ = 0xF0 | (c >> 18);
288  *s++ = 0x80 | ((c >> 12) & 0x3F);
289  char2:
290  *s++ = 0x80 | ((c >> 6) & 0x3F);
291  char1:
292  *s++ = 0x80 | (c & 0x3F);
293  }
294  return s;
295 }
296 
297 static int
298 decode_utf8(const char *s, const char **cp)
299 {
300  int c;
301  if ((unsigned char) *s <= 0x7F) /* 1 byte: 0x000000-0x00007F */
302  c = *s++;
303  else if ((unsigned char) *s <= 0xC1) /* bad/overlong encoding */
304  goto replacement;
305  else if ((unsigned char) *s <= 0xDF) { /* 2 bytes: 0x000080-0x0007FF */
306  if ((s[1] & 0xC0) != 0x80) /* bad encoding */
307  goto replacement;
308  c = (*s++ & 0x1F) << 6;
309  goto char1;
310  } else if ((unsigned char) *s <= 0xEF) { /* 3 bytes: 0x000800-0x00FFFF */
311  if ((s[1] & 0xC0) != 0x80 /* bad encoding */
312  || (s[2] & 0xC0) != 0x80 /* bad encoding */
313  || ((unsigned char) *s == 0xE0 /* overlong encoding */
314  && (s[1] & 0xE0) == 0x80)
315  || ((unsigned char) *s == 0xED /* encoded surrogate */
316  && (s[1] & 0xE0) == 0xA0))
317  goto replacement;
318  c = (*s++ & 0x0F) << 12;
319  goto char2;
320  } else if ((unsigned char) *s <= 0xF4) { /* 4 bytes: 0x010000-0x10FFFF */
321  if ((s[1] & 0xC0) != 0x80 /* bad encoding */
322  || (s[2] & 0xC0) != 0x80 /* bad encoding */
323  || (s[3] & 0xC0) != 0x80 /* bad encoding */
324  || ((unsigned char) *s == 0xF0 /* overlong encoding */
325  && (s[1] & 0xF0) == 0x80)
326  || ((unsigned char) *s == 0xF4 /* encoded value > 0x10FFFF */
327  && (unsigned char) s[1] >= 0x90))
328  goto replacement;
329  c = (*s++ & 0x07) << 18;
330  c += (*s++ & 0x3F) << 12;
331  char2:
332  c += (*s++ & 0x3F) << 6;
333  char1:
334  c += (*s++ & 0x3F);
335  } else {
336  replacement:
337  c = U_REPLACEMENT;
338  for (s++; (*s & 0xC0) == 0x80; s++)
339  /* nothing */;
340  }
341  if (cp)
342  *cp = s;
343  return c;
344 }
345 
346 static int
347 utf8_charlen(const char *s)
348 {
349  const char *sout;
350  (void) decode_utf8(s, &sout);
351  return sout - s;
352 }
353 
354 static int
355 clp_utf8_charlen(const Clp_Internal *cli, const char *s)
356 {
357  return (cli->utf8 ? utf8_charlen(s) : 1);
358 }
359 
360 
361 /*******
362  * Clp_NewParser, etc.
363  **/
364 
365 static int
366 min_different_chars(const char *s, const char *t)
367  /* Returns the minimum number of bytes required to distinguish
368  s from t.
369  If s is shorter than t, returns strlen(s). */
370 {
371  const char *sfirst = s;
372  while (*s && *t && *s == *t)
373  s++, t++;
374  if (!*s)
375  return s - sfirst;
376  else
377  return s - sfirst + 1;
378 }
379 
380 static int
381 long_as_short(const Clp_Internal *cli, const Clp_Option *o,
382  Clp_InternOption *io, int failure)
383 {
384  if ((cli->long1pos || cli->long1neg) && io->ilong) {
385  const char *name = o->long_name + io->ilongoff;
386  if (cli->utf8) {
387  int c = decode_utf8(name, &name);
388  if (!*name && c && c != U_REPLACEMENT)
389  return c;
390  } else if (name[0] && !name[1])
391  return (unsigned char) name[0];
392  }
393  return failure;
394 }
395 
396 static void
398  const Clp_Option *o2, Clp_InternOption *io2)
399 {
400  Clp_Internal *cli = clp->internal;
401  int short1, shortx1;
402 
403  /* ignore meaningless combinations */
404  if ((!io1->ishort && !io1->ilong) || (!io2->ishort && !io2->ilong)
405  || !((io1->ipos && io2->ipos) || (io1->ineg && io2->ineg))
406  || o1->option_id == o2->option_id)
407  return;
408 
409  /* look for duplication of short options */
410  short1 = (io1->ishort ? o1->short_name : -1);
411  shortx1 = long_as_short(cli, o1, io1, -2);
412  if (short1 >= 0 || shortx1 >= 0) {
413  int short2 = (io2->ishort ? o2->short_name : -3);
414  int shortx2 = long_as_short(cli, o2, io2, -4);
415  if (short1 == short2)
416  Clp_OptionError(clp, "CLP internal error: more than 1 option has short name %<%c%>", short1);
417  else if ((short1 == shortx2 || shortx1 == short2 || shortx1 == shortx2)
418  && ((io1->ipos && io2->ipos && cli->long1pos)
419  || (io1->ineg && io2->ineg && cli->long1neg)))
420  Clp_OptionError(clp, "CLP internal error: 1-char long name conflicts with short name %<%c%>", (short1 == shortx2 ? shortx2 : shortx1));
421  }
422 
423  /* analyze longest minimum match */
424  if (io1->ilong) {
425  const char *name1 = o1->long_name + io1->ilongoff;
426 
427  /* long name's first character matches short name */
428  if (io2->ishort && !io1->iprefmatch) {
429  int name1char = (cli->utf8 ? decode_utf8(name1, 0) : (unsigned char) *name1);
430  if (name1char == o2->short_name) {
431  if (io1->ipos && io2->ipos)
432  io1->lmmpos_short = 1;
433  if (io1->ineg && io2->ineg)
434  io1->lmmneg_short = 1;
435  }
436  }
437 
438  /* match long name to long name */
439  if (io2->ilong) {
440  const char *name2 = o2->long_name + io2->ilongoff;
441  if (strcmp(name1, name2) == 0)
442  Clp_OptionError(clp, "CLP internal error: duplicate long name %<%s%>", name1);
443  if (io1->ipos && io2->ipos && !strncmp(name1, name2, io1->lmmpos)
444  && (!io1->iprefmatch || strncmp(name1, name2, strlen(name1))))
445  io1->lmmpos = min_different_chars(name1, name2);
446  if (io1->ineg && io2->ineg && !strncmp(name1, name2, io1->lmmneg)
447  && (!io1->iprefmatch || strncmp(name1, name2, strlen(name1))))
448  io1->lmmneg = min_different_chars(name1, name2);
449  }
450  }
451 }
452 
453 static void
454 calculate_lmm(Clp_Parser *clp, const Clp_Option *opt, Clp_InternOption *iopt, int nopt)
455 {
456  int i, j;
457  for (i = 0; i < nopt; ++i) {
458  iopt[i].lmmpos = iopt[i].lmmneg = 1;
459  iopt[i].lmmpos_short = iopt[i].lmmneg_short = 0;
460  for (j = 0; j < nopt; ++j)
461  compare_options(clp, &opt[i], &iopt[i], &opt[j], &iopt[j]);
462  }
463 }
464 
465 /** @param argc number of arguments
466  * @param argv argument array
467  * @param nopt number of option definitions
468  * @param opt option definition array
469  * @return the parser
470  *
471  * The new Clp_Parser that will parse the arguments in @a argv according to
472  * the option definitions in @a opt.
473  *
474  * The Clp_Parser is created with the following characteristics:
475  *
476  * <ul>
477  * <li>The "-" character introduces short options (<tt>Clp_SetOptionChar(clp,
478  * '-', Clp_Short)</tt>).</li>
479  * <li>Clp_ProgramName is set from the first argument in @a argv, if any. The
480  * first argument returned by Clp_Next() will be the second argument in @a
481  * argv. Note that this behavior differs from Clp_SetArguments.</li>
482  * <li>UTF-8 support is on iff the <tt>LANG</tt> environment variable contains
483  * one of the substrings "UTF-8", "UTF8", or "utf8". Override this with
484  * Clp_SetUTF8().</li>
485  * <li>The Clp_ValString, Clp_ValStringNotOption, Clp_ValInt, Clp_ValUnsigned,
486  * Clp_ValLong, Clp_ValUnsignedLong, Clp_ValBool, and Clp_ValDouble types are
487  * installed.</li>
488  * <li>Errors are reported to standard error.</li>
489  * </ul>
490  *
491  * You may also create a Clp_Parser with no arguments or options
492  * (<tt>Clp_NewParser(0, 0, 0, 0)</tt>) and set the arguments and options
493  * later.
494  *
495  * Returns NULL if there isn't enough memory to construct the parser.
496  *
497  * @note The CLP library will not modify the contents of @a argv or @a opt.
498  * The calling program must not modify @a opt. It may modify @a argv in
499  * limited cases.
500  */
501 Clp_Parser *
502 Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *opt)
503 {
504  Clp_Parser *clp = (Clp_Parser *)malloc(sizeof(Clp_Parser));
505  Clp_Internal *cli = (Clp_Internal *)malloc(sizeof(Clp_Internal));
506  Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nopt);
507  if (cli)
509  if (!clp || !cli || !iopt || !cli->valtype)
510  goto failed;
511 
513  clp->negated = 0;
514  clp->have_val = 0;
515  clp->vstr = 0;
516  clp->user_data = 0;
517  clp->internal = cli;
518 
519  cli->opt = opt;
520  cli->nopt = nopt;
521  cli->iopt = iopt;
522  cli->opt_generation = 0;
523  cli->error_handler = 0;
524 
525  /* Assign program name (now so we can call Clp_OptionError) */
526  if (argc > 0) {
527  const char *slash = strrchr(argv[0], '/');
528  cli->program_name = slash ? slash + 1 : argv[0];
529  } else
530  cli->program_name = 0;
531 
532  /* Assign arguments, skipping program name */
533  Clp_SetArguments(clp, argc - 1, argv + 1);
534 
535  /* Initialize UTF-8 status and option classes */
536  {
537  char *s = getenv("LANG");
538  cli->utf8 = (s && (strstr(s, "UTF-8") != 0 || strstr(s, "UTF8") != 0
539  || strstr(s, "utf8") != 0));
540  }
541  cli->oclass[0].c = '-';
542  cli->oclass[0].type = Clp_Short;
543  cli->noclass = 1;
544  cli->long1pos = cli->long1neg = 0;
545 
546  /* Add default type parsers */
547  cli->nvaltype = 0;
550  Clp_AddType(clp, Clp_ValInt, 0, parse_int, (void*) (uintptr_t) 0);
551  Clp_AddType(clp, Clp_ValUnsigned, 0, parse_int, (void*) (uintptr_t) 1);
552  Clp_AddType(clp, Clp_ValLong, 0, parse_int, (void*) (uintptr_t) 2);
553  Clp_AddType(clp, Clp_ValUnsignedLong, 0, parse_int, (void*) (uintptr_t) 3);
554  Clp_AddType(clp, Clp_ValBool, 0, parse_bool, 0);
556 
557  /* Set options */
558  Clp_SetOptions(clp, nopt, opt);
559 
560  return clp;
561 
562  failed:
563  if (cli && cli->valtype)
564  free(cli->valtype);
565  if (cli)
566  free(cli);
567  if (clp)
568  free(clp);
569  if (iopt)
570  free(iopt);
571  return 0;
572 }
573 
574 /** @param clp the parser
575  *
576  * All memory associated with @a clp is freed. */
577 void
579 {
580  int i;
581  Clp_Internal *cli;
582  if (!clp)
583  return;
584 
585  cli = clp->internal;
586 
587  /* get rid of any string list types */
588  for (i = 0; i < cli->nvaltype; i++)
589  if (cli->valtype[i].func == parse_string_list) {
591  free(clsl->items);
592  free(clsl->iopt);
593  free(clsl);
594  }
595 
596  free(cli->valtype);
597  free(cli->iopt);
598  free(cli);
599  free(clp);
600 }
601 
602 
603 /** @param clp the parser
604  * @param errh error handler function
605  * @return previous error handler function
606  *
607  * The error handler function is called when CLP encounters an error while
608  * parsing the command line. It is called with the arguments "<tt>(*errh)(@a
609  * clp, s)</tt>", where <tt>s</tt> is a description of the error terminated by
610  * a newline. The <tt>s</tt> descriptions produced by CLP itself are prefixed
611  * by the program name, if any. */
613 Clp_SetErrorHandler(Clp_Parser *clp, void (*errh)(Clp_Parser *, const char *))
614 {
615  Clp_Internal *cli = clp->internal;
616  Clp_ErrorHandler old = cli->error_handler;
617  cli->error_handler = errh;
618  return old;
619 }
620 
621 /** @param clp the parser
622  * @param utf8 does the parser support UTF-8?
623  * @return previous UTF-8 mode
624  *
625  * In UTF-8 mode, all input strings (arguments and long names for options) are
626  * assumed to be encoded via UTF-8, and all character names
627  * (Clp_SetOptionChar() and short names for options) may cover the whole
628  * Unicode range. Out of UTF-8 mode, all input strings are treated as binary,
629  * and all character names must be unsigned char values.
630  *
631  * Furthermore, error messages in UTF-8 mode may contain Unicode quote
632  * characters. */
633 int
635 {
636  Clp_Internal *cli = clp->internal;
637  int old_utf8 = cli->utf8;
638  cli->utf8 = utf8;
639  calculate_lmm(clp, cli->opt, cli->iopt, cli->nopt);
640  return old_utf8;
641 }
642 
643 /** @param clp the parser
644  * @param c character
645  * @return option character treatment
646  *
647  * Returns an integer specifying how CLP treats arguments that begin
648  * with character @a c. See Clp_SetOptionChar for possibilities.
649  */
650 int
652 {
653  Clp_Internal *cli = clp->internal;
654  int i, oclass = 0;
655  if (cli->noclass > 0 && cli->oclass[0].c == 0)
656  oclass = cli->oclass[0].type;
657  for (i = 0; i < cli->noclass; ++i)
658  if (cli->oclass[i].c == c)
659  oclass = cli->oclass[i].type;
660  return oclass;
661 }
662 
663 /** @param clp the parser
664  * @param c character
665  * @param type option character treatment
666  * @return previous option character treatment, or -1 on error
667  *
668  * @a type specifies how CLP treats arguments that begin with character @a c.
669  * Possibilities are:
670  *
671  * <dl>
672  * <dt>Clp_NotOption (or 0)</dt>
673  * <dd>The argument cannot be an option.</dd>
674  * <dt>Clp_Long</dt>
675  * <dd>The argument is a long option.</dd>
676  * <dt>Clp_Short</dt>
677  * <dd>The argument is a set of short options.</dd>
678  * <dt>Clp_Short|Clp_Long</dt>
679  * <dd>The argument is either a long option or, if no matching long option is
680  * found, a set of short options.</dd>
681  * <dt>Clp_LongNegated</dt>
682  * <dd>The argument is a negated long option. For example, after
683  * Clp_SetOptionChar(@a clp, '^', Clp_LongNegated), the argument "^foo" is
684  * equivalent to "--no-foo".</dd>
685  * <dt>Clp_ShortNegated</dt>
686  * <dd>The argument is a set of negated short options.</dd>
687  * <dt>Clp_ShortNegated|Clp_LongNegated</dt>
688  * <dd>The argument is either a negated long option or, if no matching long
689  * option is found, a set of negated short options.</dd>
690  * <dt>Clp_LongImplicit</dt>
691  * <dd>The argument may be a long option, where the character @a c is actually
692  * part of the long option name. For example, after Clp_SetOptionChar(@a clp,
693  * 'f', Clp_LongImplicit), the argument "foo" may be equivalent to
694  * "--foo".</dd>
695  * </dl>
696  *
697  * In UTF-8 mode, @a c may be any Unicode character. Otherwise, @a c must be
698  * an unsigned char value. The special character 0 assigns @a type to @em
699  * every character.
700  *
701  * It is an error if @a c is out of range, @a type is illegal, or there are
702  * too many character definitions stored in @a clp already. The function
703  * returns -1 on error.
704  *
705  * A double hyphen "--" always introduces a long option. This behavior cannot
706  * currently be changed with Clp_SetOptionChar().
707  */
708 int
710 {
711  int i, long1pos, long1neg;
712  int old = Clp_OptionChar(clp, c);
713  Clp_Internal *cli = clp->internal;
714 
715  if (type != Clp_NotOption && type != Clp_Short && type != Clp_Long
719  return -1;
720  if (c < 0 || c >= (cli->utf8 ? 0x110000 : 256))
721  return -1;
722 
723  if (c == 0)
724  cli->noclass = 0;
725  for (i = 0; i < cli->noclass; ++i)
726  if (cli->oclass[i].c == c)
727  break;
728  if (i == Clp_OclassSize)
729  return -1;
730 
731  cli->oclass[i].c = c;
732  cli->oclass[i].type = type;
733  if (cli->noclass == i)
734  cli->noclass = i + 1;
735 
736  long1pos = long1neg = 0;
737  for (i = 0; i < cli->noclass; ++i) {
738  if ((cli->oclass[i].type & Clp_Short)
739  && (cli->oclass[i].type & Clp_Long))
740  long1pos = 1;
741  if ((cli->oclass[i].type & Clp_ShortNegated)
742  && (cli->oclass[i].type & Clp_LongNegated))
743  long1neg = 1;
744  }
745 
746  if (long1pos != cli->long1pos || long1neg != cli->long1neg) {
747  /* Must recheck option set */
748  cli->long1pos = long1pos;
749  cli->long1neg = long1neg;
750  calculate_lmm(clp, cli->opt, cli->iopt, cli->nopt);
751  }
752 
753  return old;
754 }
755 
756 /** @param clp the parser
757  * @param nopt number of option definitions
758  * @param opt option definition array
759  * @return 0 on success, -1 on failure
760  *
761  * Installs the option definitions in @a opt. Future option parsing will
762  * use @a opt to search for options.
763  *
764  * Also checks @a opt's option definitions for validity. "CLP internal
765  * errors" are reported via Clp_OptionError() if:
766  *
767  * <ul>
768  * <li>An option has a negative ID.</li>
769  * <li>Two different short options have the same name.</li>
770  * <li>Two different long options have the same name.</li>
771  * <li>A short and a long option are ambiguous, in that some option character
772  * might introduce either a short or a long option (e.g., Clp_SetOptionChar(@a
773  * clp, '-', Clp_Long|Clp_Short)), and a short name equals a long name.</li>
774  * </ul>
775  *
776  * If necessary memory cannot be allocated, this function returns -1 without
777  * modifying the parser.
778  *
779  * @note The CLP library will not modify the contents of @a argv or @a opt.
780  * The calling program must not modify @a opt either until another call to
781  * Clp_SetOptions() or the parser is destroyed.
782  */
783 int
784 Clp_SetOptions(Clp_Parser *clp, int nopt, const Clp_Option *opt)
785 {
786  Clp_Internal *cli = clp->internal;
787  Clp_InternOption *iopt;
788  int i;
789  static unsigned opt_generation = 0;
790 
791  if (nopt > cli->nopt) {
792  iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nopt);
793  if (!iopt)
794  return -1;
795  free(cli->iopt);
796  cli->iopt = iopt;
797  }
798 
799  cli->opt = opt;
800  cli->nopt = nopt;
801  cli->opt_generation = ++opt_generation;
802  iopt = cli->iopt;
803  cli->current_option = -1;
804 
805  /* Massage the options to make them usable */
806  for (i = 0; i < nopt; ++i) {
807  memset(&iopt[i], 0, sizeof(iopt[i]));
808 
809  /* Ignore negative option_ids, which are internal to CLP */
810  if (opt[i].option_id < 0) {
811  Clp_OptionError(clp, "CLP internal error: option %d has negative option_id", i);
812  iopt[i].ilong = iopt[i].ishort = iopt[i].ipos = iopt[i].ineg = 0;
813  continue;
814  }
815 
816  /* Set flags based on input flags */
817  iopt[i].ilong = (opt[i].long_name != 0 && opt[i].long_name[0] != 0);
818  iopt[i].ishort = (opt[i].short_name > 0
819  && opt[i].short_name < (cli->utf8 ? 0x110000 : 256));
820  iopt[i].ipos = 1;
821  iopt[i].ineg = (opt[i].flags & Clp_Negate) != 0;
822  iopt[i].imandatory = (opt[i].flags & Clp_Mandatory) != 0;
823  iopt[i].ioptional = (opt[i].flags & Clp_Optional) != 0;
824  iopt[i].iprefmatch = (opt[i].flags & Clp_PreferredMatch) != 0;
825  iopt[i].ilongoff = 0;
826 
827  /* Enforce invariants */
828  if (opt[i].val_type <= 0)
829  iopt[i].imandatory = iopt[i].ioptional = 0;
830  if (opt[i].val_type > 0 && !iopt[i].ioptional)
831  iopt[i].imandatory = 1;
832 
833  /* Options that start with 'no-' should be changed to OnlyNegated */
834  if (iopt[i].ilong && strncmp(opt[i].long_name, "no-", 3) == 0) {
835  iopt[i].ipos = 0;
836  iopt[i].ineg = 1;
837  iopt[i].ilongoff = 3;
838  if (strncmp(opt[i].long_name + 3, "no-", 3) == 0)
839  Clp_OptionError(clp, "CLP internal error: option %d begins with \"no-no-\"", i);
840  } else if (opt[i].flags & Clp_OnlyNegated) {
841  iopt[i].ipos = 0;
842  iopt[i].ineg = 1;
843  }
844  }
845 
846  /* Check option set */
847  calculate_lmm(clp, opt, iopt, nopt);
848 
849  return 0;
850 }
851 
852 /** @param clp the parser
853  * @param argc number of arguments
854  * @param argv argument array
855  *
856  * Installs the arguments in @a argv for parsing. Future option parsing will
857  * analyze @a argv.
858  *
859  * Unlike Clp_NewParser(), this function does not treat @a argv[0] specially.
860  * The first subsequent call to Clp_Next() will analyze @a argv[0].
861  *
862  * This function also sets option processing to on, as by
863  * Clp_SetOptionProcessing(@a clp, 1).
864  *
865  * @note The CLP library will not modify the contents of @a argv. The calling
866  * program should not generally modify the element of @a argv that CLP is
867  * currently analyzing.
868  */
869 void
870 Clp_SetArguments(Clp_Parser *clp, int argc, const char * const *argv)
871 {
872  Clp_Internal *cli = clp->internal;
873 
874  cli->argc = argc + 1;
875  cli->argv = argv - 1;
876 
877  cli->is_short = 0;
878  cli->whole_negated = 0;
879  cli->option_processing = 1;
880  cli->current_option = -1;
881 }
882 
883 
884 /** @param clp the parser
885  * @param on whether to search for options
886  * @return previous option processing setting
887  *
888  * When option processing is off, every call to Clp_Next() returns
889  * Clp_NotOption. By default the option <tt>"--"</tt> turns off option
890  * processing and is otherwise ignored.
891  */
892 int
894 {
895  Clp_Internal *cli = clp->internal;
896  int old = cli->option_processing;
897  cli->option_processing = on;
898  return old;
899 }
900 
901 
902 /*******
903  * functions for Clp_Option lists
904  **/
905 
906 /* the ever-glorious argcmp */
907 
908 static int
909 argcmp(const char *ref, const char *arg, int min_match, int fewer_dashes)
910  /* Returns 0 if ref and arg don't match.
911  Returns -1 if ref and arg match, but fewer than min_match characters.
912  Returns len if ref and arg match min_match or more characters;
913  len is the number of characters that matched in arg.
914  Allows arg to contain fewer dashes than ref iff fewer_dashes != 0.
915 
916  Examples:
917  argcmp("x", "y", 1, 0) --> 0 / just plain wrong
918  argcmp("a", "ax", 1, 0) --> 0 / ...even though min_match == 1
919  and the 1st chars match
920  argcmp("box", "bo", 3, 0) --> -1 / ambiguous
921  argcmp("cat", "c=3", 1, 0) --> 1 / handles = arguments
922  */
923 {
924  const char *refstart = ref;
925  const char *argstart = arg;
926  assert(min_match > 0);
927 
928  compare:
929  while (*ref && *arg && *arg != '=' && *ref == *arg)
930  ref++, arg++;
931 
932  /* Allow arg to contain fewer dashes than ref */
933  if (fewer_dashes && *ref == '-' && ref[1] && ref[1] == *arg) {
934  ref++;
935  goto compare;
936  }
937 
938  if (*arg && *arg != '=')
939  return 0;
940  else if (ref - refstart < min_match)
941  return -1;
942  else
943  return arg - argstart;
944 }
945 
946 static int
947 find_prefix_opt(Clp_Parser *clp, const char *arg,
948  int nopt, const Clp_Option *opt,
949  const Clp_InternOption *iopt,
950  int *ambiguous, int *ambiguous_values)
951  /* Looks for an unambiguous match of 'arg' against one of the long
952  options in 'opt'. Returns positive if it finds one; otherwise, returns
953  -1 and possibly changes 'ambiguous' and 'ambiguous_values' to keep
954  track of at most MAX_AMBIGUOUS_VALUES possibilities. */
955 {
956  int i, fewer_dashes = 0, first_ambiguous = *ambiguous;
957  int negated = clp && clp->negated;
958  int first_charlen = (clp ? clp_utf8_charlen(clp->internal, arg) : 1);
959 
960  retry:
961  for (i = 0; i < nopt; i++) {
962  int len, lmm;
963  if (!iopt[i].ilong || (negated ? !iopt[i].ineg : !iopt[i].ipos))
964  continue;
965 
966  lmm = (negated ? iopt[i].lmmneg : iopt[i].lmmpos);
967  if (clp && clp->internal->could_be_short
968  && (negated ? iopt[i].lmmneg_short : iopt[i].lmmpos_short))
969  lmm = (first_charlen >= lmm ? first_charlen + 1 : lmm);
970  len = argcmp(opt[i].long_name + iopt[i].ilongoff, arg, lmm, fewer_dashes);
971  if (len > 0)
972  return i;
973  else if (len < 0) {
975  ambiguous_values[*ambiguous] = i;
976  (*ambiguous)++;
977  }
978  }
979 
980  /* If there were no partial matches, try again with fewer_dashes true */
981  if (*ambiguous == first_ambiguous && !fewer_dashes) {
982  fewer_dashes = 1;
983  goto retry;
984  }
985 
986  return -1;
987 }
988 
989 
990 /*****
991  * Argument parsing
992  **/
993 
994 static int
996 {
997  unsigned l = 0, r = cli->nvaltype;
998  while (l < r) {
999  unsigned m = l + (r - l) / 2;
1000  if (cli->valtype[m].val_type == val_type)
1001  return m;
1002  else if (cli->valtype[m].val_type < val_type)
1003  l = m + 1;
1004  else
1005  r = m;
1006  }
1007  return l;
1008 }
1009 
1010 /** @param clp the parser
1011  * @param val_type value type ID
1012  * @param flags value type flags
1013  * @param parser parser function
1014  * @param user_data user data for @a parser function
1015  * @return 0 on success, -1 on failure
1016  *
1017  * Defines argument type @a val_type in parser @a clp. The parsing function
1018  * @a parser will be passed argument values for type @a val_type. It should
1019  * parse the argument into values (usually in @a clp->val, but sometimes
1020  * elsewhere), report errors if necessary, and return whether the parse was
1021  * successful.
1022  *
1023  * Any prior argument parser match @a val_type is removed. @a val_type must
1024  * be greater than zero.
1025  *
1026  * @a flags specifies additional parsing flags. At the moment the only
1027  * relevant flag is Clp_DisallowOptions, which means that separated values
1028  * must not look like options. For example, assume argument
1029  * <tt>--a</tt>/<tt>-a</tt> has mandatory value type Clp_ValStringNotOption
1030  * (which has Clp_DisallowOptions). Then:
1031  *
1032  * <ul>
1033  * <li><tt>--a=--b</tt> will parse with value <tt>--b</tt>.</li>
1034  * <li><tt>-a--b</tt> will parse with value <tt>--b</tt>.</li>
1035  * <li><tt>--a --b</tt> will not parse, since the mandatory value looks like
1036  * an option.</li>
1037  * <li><tt>-a --b</tt> will not parse, since the mandatory value looks like
1038  * an option.</li>
1039  * </ul>
1040  */
1041 int
1043  Clp_ValParseFunc parser, void *user_data)
1044 {
1045  Clp_Internal *cli = clp->internal;
1046  int vtpos;
1047 
1048  if (val_type <= 0 || !parser)
1049  return -1;
1050 
1051  vtpos = val_type_binsearch(cli, val_type);
1052 
1053  if (vtpos == cli->nvaltype || cli->valtype[vtpos].val_type != val_type) {
1054  if (cli->nvaltype != 0 && (cli->nvaltype % Clp_InitialValType) == 0) {
1055  Clp_ValType *new_valtype =
1056  (Clp_ValType *) realloc(cli->valtype, sizeof(Clp_ValType) * (cli->nvaltype + Clp_InitialValType));
1057  if (!new_valtype)
1058  return -1;
1059  cli->valtype = new_valtype;
1060  }
1061  memmove(&cli->valtype[vtpos + 1], &cli->valtype[vtpos],
1062  sizeof(Clp_ValType) * (cli->nvaltype - vtpos));
1063  cli->nvaltype++;
1064  cli->valtype[vtpos].func = 0;
1065  }
1066 
1067  if (cli->valtype[vtpos].func == parse_string_list) {
1068  Clp_StringList *clsl = (Clp_StringList *) cli->valtype[vtpos].user_data;
1069  free(clsl->items);
1070  free(clsl->iopt);
1071  free(clsl);
1072  }
1073 
1074  cli->valtype[vtpos].val_type = val_type;
1075  cli->valtype[vtpos].func = parser;
1076  cli->valtype[vtpos].flags = flags;
1077  cli->valtype[vtpos].user_data = user_data;
1078  return 0;
1079 }
1080 
1081 
1082 /*******
1083  * Default argument parsers
1084  **/
1085 
1086 static int
1087 parse_string(Clp_Parser *clp, const char *arg, int complain, void *user_data)
1088 {
1089  (void)complain, (void)user_data;
1090  clp->val.s = arg;
1091  return 1;
1092 }
1093 
1094 static int
1095 parse_int(Clp_Parser* clp, const char* arg, int complain, void* user_data)
1096 {
1097  const char *val;
1098  char *temp;
1099  uintptr_t type = (uintptr_t) user_data;
1100  if (*arg == 0 || isspace((unsigned char) *arg)
1101  || ((type & 1) && *arg == '-'))
1102  val = arg;
1103  else if (type & 1) { /* unsigned */
1104 #if HAVE_STRTOUL
1105  clp->val.ul = strtoul(arg, &temp, 0);
1106  val = temp;
1107 #else
1108  /* don't bother really trying to do it right */
1109  if (arg[0] == '-')
1110  val = arg;
1111  else {
1112  clp->val.l = strtol(arg, &temp, 0);
1113  val = temp;
1114  }
1115 #endif
1116  } else {
1117  clp->val.l = strtol(arg, &temp, 0);
1118  val = temp;
1119  }
1120  if (type <= 1)
1121  clp->val.u = (unsigned) clp->val.ul;
1122  if (*arg != 0 && *val == 0)
1123  return 1;
1124  else {
1125  if (complain) {
1126  const char *message = type & 1
1127  ? "%<%O%> expects a nonnegative integer, not %<%s%>"
1128  : "%<%O%> expects an integer, not %<%s%>";
1129  Clp_OptionError(clp, message, arg);
1130  }
1131  return 0;
1132  }
1133 }
1134 
1135 static int
1136 parse_double(Clp_Parser *clp, const char *arg, int complain, void *user_data)
1137 {
1138  const char *val;
1139  char *temp;
1140  (void)user_data;
1141  if (*arg == 0 || isspace((unsigned char) *arg))
1142  val = arg;
1143  else {
1144  clp->val.d = strtod(arg, &temp);
1145  val = temp;
1146  }
1147  if (*arg != 0 && *val == 0)
1148  return 1;
1149  else {
1150  if (complain)
1151  Clp_OptionError(clp, "%<%O%> expects a real number, not %<%s%>", arg);
1152  return 0;
1153  }
1154 }
1155 
1156 static int
1157 parse_bool(Clp_Parser *clp, const char *arg, int complain, void *user_data)
1158 {
1159  int i;
1160  char lcarg[6];
1161  (void)user_data;
1162  if (strlen(arg) > 5 || strchr(arg, '=') != 0)
1163  goto error;
1164 
1165  for (i = 0; arg[i] != 0; i++)
1166  lcarg[i] = tolower((unsigned char) arg[i]);
1167  lcarg[i] = 0;
1168 
1169  if (argcmp("yes", lcarg, 1, 0) > 0
1170  || argcmp("true", lcarg, 1, 0) > 0
1171  || argcmp("1", lcarg, 1, 0) > 0) {
1172  clp->val.i = 1;
1173  return 1;
1174  } else if (argcmp("no", lcarg, 1, 0) > 0
1175  || argcmp("false", lcarg, 1, 0) > 0
1176  || argcmp("1", lcarg, 1, 0) > 0) {
1177  clp->val.i = 0;
1178  return 1;
1179  }
1180 
1181  error:
1182  if (complain)
1183  Clp_OptionError(clp, "%<%O%> expects a true-or-false value, not %<%s%>", arg);
1184  return 0;
1185 }
1186 
1187 
1188 /*****
1189  * Clp_AddStringListType
1190  **/
1191 
1192 static int
1193 parse_string_list(Clp_Parser *clp, const char *arg, int complain, void *user_data)
1194 {
1195  Clp_StringList *sl = (Clp_StringList *)user_data;
1196  int idx, ambiguous = 0;
1197  int ambiguous_values[MAX_AMBIGUOUS_VALUES + 1];
1198 
1199  /* actually look for a string value */
1201  (0, arg, sl->nitems, sl->items, sl->iopt,
1202  &ambiguous, ambiguous_values);
1203  if (idx >= 0) {
1204  clp->val.i = sl->items[idx].option_id;
1205  if (sl->val_long)
1206  clp->val.l = clp->val.i;
1207  return 1;
1208  }
1209 
1210  if (sl->allow_int) {
1211  if (parse_int(clp, arg, 0, (void*) (uintptr_t) (sl->val_long ? 2 : 0)))
1212  return 1;
1213  }
1214 
1215  if (complain) {
1216  const char *complaint = (ambiguous ? "ambiguous" : "invalid");
1217  if (!ambiguous) {
1219  for (idx = 0; idx < ambiguous; idx++)
1220  ambiguous_values[idx] = idx;
1221  }
1222  return ambiguity_error
1223  (clp, ambiguous, ambiguous_values, sl->items, sl->iopt,
1224  "", "option %<%V%> is %s", complaint);
1225  } else
1226  return 0;
1227 }
1228 
1229 
1230 static int
1232  Clp_Option *items, int nitems, int itemscap)
1233 {
1234  int i;
1235  Clp_StringList *clsl = (Clp_StringList *)malloc(sizeof(Clp_StringList));
1236  Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nitems);
1237  if (!clsl || !iopt)
1238  goto error;
1239 
1240  clsl->items = items;
1241  clsl->iopt = iopt;
1242  clsl->nitems = nitems;
1243  clsl->allow_int = (flags & Clp_AllowNumbers) != 0;
1244  clsl->val_long = (flags & Clp_StringListLong) != 0;
1245 
1246  if (nitems < MAX_AMBIGUOUS_VALUES && nitems < itemscap && clsl->allow_int) {
1247  items[nitems].long_name = "any integer";
1248  clsl->nitems_invalid_report = nitems + 1;
1249  } else if (nitems > MAX_AMBIGUOUS_VALUES + 1)
1251  else
1252  clsl->nitems_invalid_report = nitems;
1253 
1254  for (i = 0; i < nitems; i++) {
1255  iopt[i].ilong = iopt[i].ipos = 1;
1256  iopt[i].ishort = iopt[i].ineg = iopt[i].ilongoff = iopt[i].iprefmatch = 0;
1257  }
1258  calculate_lmm(clp, items, iopt, nitems);
1259 
1260  if (Clp_AddType(clp, val_type, 0, parse_string_list, clsl) >= 0)
1261  return 0;
1262 
1263  error:
1264  if (clsl)
1265  free(clsl);
1266  if (iopt)
1267  free(iopt);
1268  return -1;
1269 }
1270 
1271 /** @param clp the parser
1272  * @param val_type value type ID
1273  * @param flags string list flags
1274  * @return 0 on success, -1 on failure
1275  *
1276  * Defines argument type @a val_type in parser @a clp. The parsing function
1277  * sets @a clp->val.i to an integer. The value string is matched against
1278  * strings provided in the ellipsis arguments. For example, the
1279  * Clp_AddStringListType() call below has the same effect as the
1280  * Clp_AddStringListTypeVec() call:
1281  *
1282  * For example:
1283  * @code
1284  * Clp_AddStringListType(clp, 100, Clp_AllowNumbers, "cat", 1,
1285  * "cattle", 2, "dog", 3, (const char *) NULL);
1286  *
1287  * const char * const strs[] = { "cat", "cattle", "dog" };
1288  * const int vals[] = { 1, 2, 3 };
1289  * Clp_AddStringListTypeVec(clp, 100, Clp_AllowNumbers, 3, strs, vals);
1290  * @endcode
1291  *
1292  * @note The CLP library will not modify any of the passed-in strings. The
1293  * calling program must not modify or free them either until the parser is
1294  * destroyed.
1295  */
1296 int
1298 {
1299  int nitems = 0;
1300  int itemscap = 5;
1301  Clp_Option *items = (Clp_Option *)malloc(sizeof(Clp_Option) * itemscap);
1302 
1303  va_list val;
1304  va_start(val, flags);
1305 
1306  if (!items)
1307  goto error;
1308 
1309  /* slurp up the arguments */
1310  while (1) {
1311  int value;
1312  char *name = va_arg(val, char *);
1313  if (!name)
1314  break;
1315  if (flags & Clp_StringListLong) {
1316  long lvalue = va_arg(val, long);
1317  value = (int) lvalue;
1318  assert(value == lvalue);
1319  } else
1320  value = va_arg(val, int);
1321 
1322  if (nitems >= itemscap) {
1323  Clp_Option *new_items;
1324  itemscap *= 2;
1325  new_items = (Clp_Option *)realloc(items, sizeof(Clp_Option) * itemscap);
1326  if (!new_items)
1327  goto error;
1328  items = new_items;
1329  }
1330 
1331  items[nitems].long_name = name;
1332  items[nitems].option_id = value;
1333  items[nitems].flags = 0;
1334  nitems++;
1335  }
1336 
1337  va_end(val);
1338  if (finish_string_list(clp, val_type, flags, items, nitems, itemscap) >= 0)
1339  return 0;
1340 
1341  error:
1342  va_end(val);
1343  if (items)
1344  free(items);
1345  return -1;
1346 }
1347 
1348 /** @param clp the parser
1349  * @param val_type value type ID
1350  * @param flags string list flags
1351  * @param nstrs number of strings in list
1352  * @param strs array of strings
1353  * @param vals array of values
1354  * @return 0 on success, -1 on failure
1355  *
1356  * Defines argument type @a val_type in parser @a clp. The parsing function
1357  * sets @a clp->val.i to an integer. The value string is matched against the
1358  * @a strs. If there's a unique match, the corresponding entry from @a vals
1359  * is returned. Unique prefix matches also work. Finally, if @a flags
1360  * contains the Clp_AllowNumbers flag, then integers are also accepted.
1361  *
1362  * For example:
1363  * @code
1364  * const char * const strs[] = { "cat", "cattle", "dog" };
1365  * const int vals[] = { 1, 2, 3 };
1366  * Clp_AddStringListTypeVec(clp, 100, Clp_AllowNumbers, 3, strs, vals);
1367  * @endcode
1368  *
1369  * Say that option <tt>--animal</tt> takes value type 100. Then:
1370  *
1371  * <ul>
1372  * <li><tt>--animal=cat</tt> will succeed and set @a clp->val.i = 1.</li>
1373  * <li><tt>--animal=cattle</tt> will succeed and set @a clp->val.i = 2.</li>
1374  * <li><tt>--animal=dog</tt> will succeed and set @a clp->val.i = 3.</li>
1375  * <li><tt>--animal=d</tt> will succeed and set @a clp->val.i = 3.</li>
1376  * <li><tt>--animal=c</tt> will fail, since <tt>c</tt> is ambiguous.</li>
1377  * <li><tt>--animal=4</tt> will succeed and set @a clp->val.i = 4.</li>
1378  * </ul>
1379  *
1380  * @note The CLP library will not modify the contents of @a strs or @a vals.
1381  * The calling program can modify the @a strs array, but the actual strings
1382  * (for instance, @a strs[0] and @a strs[1]) must not be modified or freed
1383  * until the parser is destroyed.
1384  */
1385 int
1387  int nstrs, const char * const *strs,
1388  const int *vals)
1389  /* An alternate way to make a string list type. See Clp_AddStringListType
1390  for the basics; this coalesces the strings and values into two arrays,
1391  rather than spreading them out into a variable argument list. */
1392 {
1393  int i;
1394  int itemscap = (nstrs < 5 ? 5 : nstrs);
1395  Clp_Option *items = (Clp_Option *)malloc(sizeof(Clp_Option) * itemscap);
1396  if (!items)
1397  return -1;
1398 
1399  /* copy over items */
1400  for (i = 0; i < nstrs; i++) {
1401  items[i].long_name = strs[i];
1402  items[i].option_id = vals[i];
1403  items[i].flags = 0;
1404  }
1405 
1406  if (finish_string_list(clp, val_type, flags, items, nstrs, itemscap) >= 0)
1407  return 0;
1408  else {
1409  free(items);
1410  return -1;
1411  }
1412 }
1413 
1414 
1415 /*******
1416  * Returning information
1417  **/
1418 
1419 const char *
1421 {
1422  return clp->internal->program_name;
1423 }
1424 
1425 /** @param clp the parser
1426  * @param name new program name
1427  * @return previous program name
1428  *
1429  * The calling program should not modify or free @a name until @a clp itself
1430  * is destroyed. */
1431 const char *
1433 {
1434  const char *old = clp->internal->program_name;
1435  clp->internal->program_name = name;
1436  return old;
1437 }
1438 
1439 
1440 /******
1441  * Clp_ParserStates
1442  **/
1443 
1444 /** @return the parser state
1445  *
1446  * A Clp_ParserState object can store a parsing state of a Clp_Parser object.
1447  * This state specifies exactly how far the Clp_Parser has gotten in parsing
1448  * an argument list. The Clp_SaveParser() and Clp_RestoreParser() functions
1449  * can be used to save this state and then restore it later, allowing a
1450  * Clp_Parser to switch among argument lists.
1451  *
1452  * The initial state is empty, in that after Clp_RestoreParser(clp, state),
1453  * Clp_Next(clp) would return Clp_Done.
1454  *
1455  * Parser states can be saved and restored among different parser objects.
1456  *
1457  * @sa Clp_DeleteParserState, Clp_SaveParser, Clp_RestoreParser
1458  */
1461 {
1463  if (state) {
1464  state->argv = 0;
1465  state->argc = 0;
1466  state->option_chars[0] = 0;
1467  state->xtext = 0;
1468  state->option_processing = 0;
1469  state->opt_generation = 0;
1470  state->current_option = -1;
1471  state->is_short = 0;
1472  state->whole_negated = 0;
1473  state->current_short = 0;
1474  state->negated_by_no = 0;
1475  }
1476  return state;
1477 }
1478 
1479 /** @param state parser state
1480  *
1481  * The memory associated with @a state is freed.
1482  */
1483 void
1485 {
1486  free(state);
1487 }
1488 
1489 /** @param clp the parser
1490  * @param state parser state
1491  * @sa Clp_NewParserState, Clp_RestoreParser
1492  */
1493 void
1495 {
1496  Clp_Internal *cli = clp->internal;
1497  state->argv = cli->argv;
1498  state->argc = cli->argc;
1499  memcpy(state->option_chars, cli->option_chars, Clp_OptionCharsSize);
1500  state->xtext = cli->xtext;
1501 
1502  state->option_processing = cli->option_processing;
1503  state->opt_generation = cli->opt_generation;
1504  state->current_option = cli->current_option;
1505  state->is_short = cli->is_short;
1506  state->whole_negated = cli->whole_negated;
1507  state->current_short = cli->current_short;
1508  state->negated_by_no = cli->negated_by_no;
1509 }
1510 
1511 
1512 /** @param clp the parser
1513  * @param state parser state
1514  *
1515  * The parser state in @a state is restored into @a clp. The next call to
1516  * Clp_Next() will return the same result as it would have at the time @a
1517  * state was saved (probably by Clp_SaveParser(@a clp, @a state)).
1518  *
1519  * A parser state contains information about arguments (argc and argv; see
1520  * Clp_SetArguments()) and option processing (Clp_SetOptionProcessing()), but
1521  * not about options (Clp_SetOptions()). Changes to options and value types
1522  * are preserved across Clp_RestoreParser().
1523  *
1524  * @sa Clp_NewParserState, Clp_SaveParser
1525  */
1526 void
1528 {
1529  Clp_Internal *cli = clp->internal;
1530  cli->argv = state->argv;
1531  cli->argc = state->argc;
1532  memcpy(cli->option_chars, state->option_chars, Clp_OptionCharsSize);
1533  cli->xtext = state->xtext;
1534  cli->option_processing = state->option_processing;
1535  cli->is_short = state->is_short;
1536  cli->whole_negated = state->whole_negated;
1537  cli->current_short = state->current_short;
1538  cli->negated_by_no = state->negated_by_no;
1539  if (cli->opt_generation == state->opt_generation)
1540  cli->current_option = state->current_option;
1541  else
1542  cli->current_option = -1;
1543 }
1544 
1545 
1546 /*******
1547  * Clp_Next and its helpers
1548  **/
1549 
1550 static void
1551 set_option_text(Clp_Internal *cli, const char *text, int n_option_chars)
1552 {
1553  assert(n_option_chars < Clp_OptionCharsSize);
1554  memcpy(cli->option_chars, text, n_option_chars);
1555  cli->option_chars[n_option_chars] = 0;
1556  cli->xtext = text + n_option_chars;
1557 }
1558 
1559 static int
1560 get_oclass(Clp_Parser *clp, const char *text, int *ocharskip)
1561 {
1562  int c;
1563  if (clp->internal->utf8) {
1564  const char *s;
1565  c = decode_utf8(text, &s);
1566  *ocharskip = s - text;
1567  } else {
1568  c = (unsigned char) text[0];
1569  *ocharskip = 1;
1570  }
1571  return Clp_OptionChar(clp, c);
1572 }
1573 
1574 static int
1575 next_argument(Clp_Parser *clp, int want_argument)
1576  /* Moves clp to the next argument.
1577  Returns 1 if it finds another option.
1578  Returns 0 if there aren't any more arguments.
1579  Returns 0, sets clp->have_val = 1, and sets clp->vstr to the argument
1580  if the next argument isn't an option.
1581  If want_argument > 0, it'll look for an argument.
1582  want_argument == 1: Accept arguments that start with Clp_NotOption
1583  or Clp_LongImplicit.
1584  want_argument == 2: Accept ALL arguments.
1585 
1586  Where is the option stored when this returns?
1587  Well, cli->argv[0] holds the whole of the next command line argument.
1588  cli->option_chars holds a string: what characters began the option?
1589  It is generally "-" or "--".
1590  cli->text holds the text of the option:
1591  for short options, cli->text[0] is the relevant character;
1592  for long options, cli->text holds the rest of the option. */
1593 {
1594  Clp_Internal *cli = clp->internal;
1595  const char *text;
1596  int oclass, ocharskip;
1597 
1598  /* clear relevant flags */
1599  clp->have_val = 0;
1600  clp->vstr = 0;
1601  cli->could_be_short = 0;
1602 
1603  /* if we're in a string of short options, move up one char in the string */
1604  if (cli->is_short) {
1605  cli->xtext += clp_utf8_charlen(cli, cli->xtext);
1606  if (cli->xtext[0] == 0)
1607  cli->is_short = 0;
1608  else if (want_argument > 0) {
1609  /* handle -O[=]argument case */
1610  clp->have_val = 1;
1611  if (cli->xtext[0] == '=')
1612  clp->vstr = cli->xtext + 1;
1613  else
1614  clp->vstr = cli->xtext;
1615  cli->is_short = 0;
1616  return 0;
1617  }
1618  }
1619 
1620  /* if in short options, we're all set */
1621  if (cli->is_short)
1622  return 1;
1623 
1624  /** if not in short options, move to the next argument **/
1625  cli->whole_negated = 0;
1626  cli->xtext = 0;
1627 
1628  if (cli->argc <= 1)
1629  return 0;
1630 
1631  cli->argc--;
1632  cli->argv++;
1633  text = cli->argv[0];
1634 
1635  if (want_argument > 1)
1636  goto not_option;
1637 
1638  if (text[0] == '-' && text[1] == '-') {
1639  oclass = Clp_DoubledLong;
1640  ocharskip = 2;
1641  } else
1642  oclass = get_oclass(clp, text, &ocharskip);
1643 
1644  /* If this character could introduce either a short or a long option,
1645  try a long option first, but remember that short's a possibility for
1646  later. */
1647  if ((oclass & (Clp_Short | Clp_ShortNegated))
1648  && (oclass & (Clp_Long | Clp_LongNegated))) {
1649  oclass &= ~(Clp_Short | Clp_ShortNegated);
1650  if (text[ocharskip])
1651  cli->could_be_short = 1;
1652  }
1653 
1654  switch (oclass) {
1655 
1656  case Clp_Short:
1657  cli->is_short = 1;
1658  goto check_singleton;
1659 
1660  case Clp_ShortNegated:
1661  cli->is_short = 1;
1662  cli->whole_negated = 1;
1663  goto check_singleton;
1664 
1665  case Clp_Long:
1666  goto check_singleton;
1667 
1668  case Clp_LongNegated:
1669  cli->whole_negated = 1;
1670  goto check_singleton;
1671 
1672  check_singleton:
1673  /* For options introduced with one character, option-char,
1674  '[option-char]' alone is NOT an option. */
1675  if (!text[ocharskip])
1676  goto not_option;
1677  set_option_text(cli, text, ocharskip);
1678  break;
1679 
1680  case Clp_LongImplicit:
1681  /* LongImplict: option_chars == "" (since all chars are part of the
1682  option); restore head -> text of option */
1683  if (want_argument > 0)
1684  goto not_option;
1685  set_option_text(cli, text, 0);
1686  break;
1687 
1688  case Clp_DoubledLong:
1689  set_option_text(cli, text, ocharskip);
1690  break;
1691 
1692  not_option:
1693  case Clp_NotOption:
1694  cli->is_short = 0;
1695  clp->have_val = 1;
1696  clp->vstr = text;
1697  return 0;
1698 
1699  default:
1700  assert(0 /* CLP misconfiguration: bad option type */);
1701 
1702  }
1703 
1704  return 1;
1705 }
1706 
1707 
1708 static void
1710 {
1711  Clp_Internal *cli = clp->internal;
1712  const char *text = cli->argv[0];
1713  int ocharskip, oclass = get_oclass(clp, text, &ocharskip);
1714  assert(cli->could_be_short);
1715  cli->is_short = 1;
1716  cli->whole_negated = (oclass & Clp_ShortNegated ? 1 : 0);
1717  set_option_text(cli, cli->argv[0], ocharskip);
1718 }
1719 
1720 
1721 static int
1722 find_long(Clp_Parser *clp, const char *arg)
1723  /* If arg corresponds to one of clp's options, finds that option &
1724  returns it. If any argument is given after an = sign in arg, sets
1725  clp->have_val = 1 and clp->vstr to that argument. Sets cli->ambiguous
1726  to 1 iff there was no match because the argument was ambiguous. */
1727 {
1728  Clp_Internal *cli = clp->internal;
1729  int optno, len, lmm;
1730  const Clp_Option *opt = cli->opt;
1731  const Clp_InternOption *iopt;
1732  int first_negative_ambiguous;
1733 
1734  /* Look for a normal option. */
1735  optno = find_prefix_opt
1736  (clp, arg, cli->nopt, opt, cli->iopt,
1737  &cli->ambiguous, cli->ambiguous_values);
1738  if (optno >= 0)
1739  goto worked;
1740 
1741  /* If we can't find it, look for a negated option. */
1742  /* I know this is silly, but it makes me happy to accept
1743  --no-no-option as a double negative synonym for --option. :) */
1744  first_negative_ambiguous = cli->ambiguous;
1745  while (arg[0] == 'n' && arg[1] == 'o' && arg[2] == '-') {
1746  arg += 3;
1747  clp->negated = !clp->negated;
1748  optno = find_prefix_opt
1749  (clp, arg, cli->nopt, opt, cli->iopt,
1750  &cli->ambiguous, cli->ambiguous_values);
1751  if (optno >= 0)
1752  goto worked;
1753  }
1754 
1755  /* No valid option was found; return 0. Mark the ambiguous values found
1756  through '--no' by making them negative. */
1757  {
1758  int i, max = cli->ambiguous;
1760  for (i = first_negative_ambiguous; i < max; i++)
1761  cli->ambiguous_values[i] = -cli->ambiguous_values[i] - 1;
1762  }
1763  return -1;
1764 
1765  worked:
1766  iopt = &cli->iopt[optno];
1767  lmm = (clp->negated ? iopt->lmmneg : iopt->lmmpos);
1768  if (cli->could_be_short
1769  && (clp->negated ? iopt->lmmneg_short : iopt->lmmpos_short)) {
1770  int first_charlen = clp_utf8_charlen(cli, arg);
1771  lmm = (first_charlen >= lmm ? first_charlen + 1 : lmm);
1772  }
1773  len = argcmp(opt[optno].long_name + iopt->ilongoff, arg, lmm, 1);
1774  assert(len > 0);
1775  if (arg[len] == '=') {
1776  clp->have_val = 1;
1777  clp->vstr = arg + len + 1;
1778  }
1779  return optno;
1780 }
1781 
1782 
1783 static int
1784 find_short(Clp_Parser *clp, const char *text)
1785  /* If short_name corresponds to one of clp's options, returns it. */
1786 {
1787  Clp_Internal *cli = clp->internal;
1788  const Clp_Option *opt = cli->opt;
1789  const Clp_InternOption *iopt = cli->iopt;
1790  int i, c;
1791  if (clp->internal->utf8)
1792  c = decode_utf8(text, 0);
1793  else
1794  c = (unsigned char) *text;
1795 
1796  for (i = 0; i < cli->nopt; i++)
1797  if (iopt[i].ishort && opt[i].short_name == c
1798  && (!clp->negated || iopt[i].ineg)) {
1799  clp->negated = clp->negated || !iopt[i].ipos;
1800  return i;
1801  }
1802 
1803  return -1;
1804 }
1805 
1806 
1807 /** @param clp the parser
1808  * @return option ID of next option
1809  *
1810  * Parse the next argument from the argument list, store information about
1811  * that argument in the fields of @a clp, and return the option's ID.
1812  *
1813  * If an argument was successfully parsed, that option's ID is returned.
1814  * Other possible return values are:
1815  *
1816  * <dl>
1817  * <dt>Clp_Done</dt>
1818  * <dd>There are no more arguments.</dd>
1819  * <dt>Clp_NotOption</dt>
1820  * <dd>The next argument was not an option. The argument's text is @a
1821  * clp->vstr (and @a clp->val.s).</dd>
1822  * <dt>Clp_BadOption</dt>
1823  * <dd>The next argument was a bad option: either an option that wasn't
1824  * understood, or an option lacking a required value, or an option whose value
1825  * couldn't be parsed. The option has been skipped.</dd>
1826  * <dt>Clp_Error</dt>
1827  * <dd>There was an internal error. This should never occur unless a user
1828  * messes with, for example, a Clp_Option array.</dd>
1829  * </dl>
1830  *
1831  * The fields of @a clp are set as follows.
1832  *
1833  * <dl>
1834  * <dt><tt>negated</tt></dt>
1835  * <dd>1 if the option was negated, 0 if it wasn't.</dd>
1836  * <dt><tt>have_val</tt></dt>
1837  * <dd>1 if the option had a value, 0 if it didn't. Note that negated options
1838  * are not allowed to have values.</dd>
1839  * <dt><tt>vstr</tt></dt>
1840  * <dd>The value string, if any. NULL if there was no value.</dd>
1841  * <dt><tt>val</tt></dt>
1842  * <dd>An option's value type will parse the value string into this
1843  * union.</dd>
1844  * </dl>
1845  *
1846  * The parsed argument is shifted off the argument list, so that sequential
1847  * calls to Clp_Next() step through the argument list.
1848  */
1849 int
1851 {
1852  Clp_Internal *cli = clp->internal;
1853  int optno;
1854  const Clp_Option *opt;
1855  Clp_ParserState clpsave;
1856  int vtpos, complain;
1857 
1858  /* Set up clp */
1859  cli->current_option = -1;
1860  cli->ambiguous = 0;
1861 
1862  /* Get the next argument or option */
1863  if (!next_argument(clp, cli->option_processing ? 0 : 2)) {
1864  clp->val.s = clp->vstr;
1865  optno = clp->have_val ? Clp_NotOption : Clp_Done;
1866  clp->option = &clp_option_sentinel[-optno];
1867  return optno;
1868  }
1869 
1870  clp->negated = cli->whole_negated;
1871  if (cli->is_short)
1872  optno = find_short(clp, cli->xtext);
1873  else
1874  optno = find_long(clp, cli->xtext);
1875 
1876  /* If there's ambiguity between long & short options, and we couldn't
1877  find a long option, look for a short option */
1878  if (optno < 0 && cli->could_be_short) {
1880  optno = find_short(clp, cli->xtext);
1881  }
1882 
1883  /* If we didn't find an option... */
1884  if (optno < 0 || (clp->negated && !cli->iopt[optno].ineg)) {
1885  /* default processing for the "--" option: turn off option processing
1886  and return the next argument */
1887  if (strcmp(cli->argv[0], "--") == 0) {
1888  Clp_SetOptionProcessing(clp, 0);
1889  return Clp_Next(clp);
1890  }
1891 
1892  /* otherwise, report some error or other */
1893  if (cli->ambiguous)
1894  ambiguity_error(clp, cli->ambiguous, cli->ambiguous_values,
1895  cli->opt, cli->iopt, cli->option_chars,
1896  "option %<%s%s%> is ambiguous",
1897  cli->option_chars, cli->xtext);
1898  else if (cli->is_short && !cli->could_be_short)
1899  Clp_OptionError(clp, "unrecognized option %<%s%C%>",
1900  cli->option_chars, cli->xtext);
1901  else
1902  Clp_OptionError(clp, "unrecognized option %<%s%s%>",
1903  cli->option_chars, cli->xtext);
1904 
1906  return Clp_BadOption;
1907  }
1908 
1909  /* Set the current option */
1910  cli->current_option = optno;
1911  cli->current_short = cli->is_short;
1912  cli->negated_by_no = clp->negated && !cli->whole_negated;
1913 
1914  /* The no-argument (or should-have-no-argument) case */
1915  if (clp->negated
1916  || (!cli->iopt[optno].imandatory && !cli->iopt[optno].ioptional)) {
1917  if (clp->have_val) {
1918  Clp_OptionError(clp, "%<%O%> can%,t take an argument");
1920  return Clp_BadOption;
1921  } else {
1922  clp->option = &cli->opt[optno];
1923  return cli->opt[optno].option_id;
1924  }
1925  }
1926 
1927  /* Get an argument if we need one, or if it's optional */
1928  /* Sanity-check the argument type. */
1929  opt = &cli->opt[optno];
1930  if (opt->val_type <= 0) {
1932  return Clp_Error;
1933  }
1934  vtpos = val_type_binsearch(cli, opt->val_type);
1935  if (vtpos == cli->nvaltype
1936  || cli->valtype[vtpos].val_type != opt->val_type) {
1938  return Clp_Error;
1939  }
1940 
1941  /* complain == 1 only if the argument was explicitly given,
1942  or it is mandatory. */
1943  complain = (clp->have_val != 0) || cli->iopt[optno].imandatory;
1944  Clp_SaveParser(clp, &clpsave);
1945 
1946  if (cli->iopt[optno].imandatory && !clp->have_val) {
1947  /* Mandatory argument case */
1948  /* Allow arguments to options to start with a dash, but only if the
1949  argument type allows it by not setting Clp_DisallowOptions */
1950  int disallow = (cli->valtype[vtpos].flags & Clp_DisallowOptions) != 0;
1951  next_argument(clp, disallow ? 1 : 2);
1952  if (!clp->have_val) {
1953  int got_option = cli->xtext != 0;
1954  Clp_RestoreParser(clp, &clpsave);
1955  if (got_option)
1956  Clp_OptionError(clp, "%<%O%> requires a non-option argument");
1957  else
1958  Clp_OptionError(clp, "%<%O%> requires an argument");
1960  return Clp_BadOption;
1961  }
1962 
1963  } else if (cli->is_short && !clp->have_val
1964  && cli->xtext[clp_utf8_charlen(cli, cli->xtext)])
1965  /* The -[option]argument case:
1966  Assume that the rest of the current string is the argument. */
1967  next_argument(clp, 1);
1968 
1969  /* Parse the argument */
1970  clp->option = opt;
1971  if (clp->have_val) {
1972  Clp_ValType *atr = &cli->valtype[vtpos];
1973  if (atr->func(clp, clp->vstr, complain, atr->user_data) <= 0) {
1974  /* parser failed */
1975  clp->have_val = 0;
1976  if (complain) {
1978  return Clp_BadOption;
1979  } else {
1980  Clp_RestoreParser(clp, &clpsave);
1981  clp->option = opt;
1982  }
1983  }
1984  }
1985 
1986  return opt->option_id;
1987 }
1988 
1989 
1990 /** @param clp the parser
1991  * @param allow_options whether options will be allowed
1992  *
1993  * Remove and return the next argument from @a clp's argument array. If there
1994  * are no arguments left, or if the next argument is an option and @a
1995  * allow_options != 0, then returns null.
1996  */
1997 const char *
1998 Clp_Shift(Clp_Parser *clp, int allow_options)
1999  /* Returns the next argument from the argument list without parsing it.
2000  If there are no more arguments, returns 0. */
2001 {
2002  Clp_ParserState clpsave;
2003  Clp_SaveParser(clp, &clpsave);
2004  next_argument(clp, allow_options ? 2 : 1);
2005  if (!clp->have_val)
2006  Clp_RestoreParser(clp, &clpsave);
2007  return clp->vstr;
2008 }
2009 
2010 
2011 /*******
2012  * Clp_OptionError
2013  **/
2014 
2015 typedef struct Clp_BuildString {
2016  char* data;
2017  char* pos;
2018  char* end_data;
2019  char buf[256];
2021 
2023  const Clp_Parser* clp);
2024 
2026  bs->data = bs->pos = bs->buf;
2027  bs->end_data = &bs->buf[sizeof(bs->buf)];
2028  if (clp)
2029  build_string_program_prefix(bs, clp);
2030 }
2031 
2033  if (bs->data != bs->buf)
2034  free(bs->data);
2035 }
2036 
2037 static int build_string_grow(Clp_BuildString* bs, size_t want) {
2038  size_t ipos = bs->pos - bs->data, ncap;
2039  if (!bs->pos)
2040  return 0;
2041  for (ncap = (bs->end_data - bs->data) << 1; ncap < want; ncap *= 2)
2042  /* nada */;
2043  if (bs->data == bs->buf) {
2044  if ((bs->data = (char*) malloc(ncap)))
2045  memcpy(bs->data, bs->buf, bs->pos - bs->buf);
2046  } else
2047  bs->data = (char*) realloc(bs->data, ncap);
2048  if (!bs->data) {
2049  bs->pos = bs->end_data = bs->data;
2050  return 0;
2051  } else {
2052  bs->pos = bs->data + ipos;
2053  bs->end_data = bs->data + ncap;
2054  return 1;
2055  }
2056 }
2057 
2058 #define ENSURE_BUILD_STRING(bs, space) \
2059  ((((bs)->end_data - (bs)->pos) >= (space)) \
2060  || build_string_grow((bs), (bs)->pos - (bs)->data + (space)))
2061 
2062 static void
2063 append_build_string(Clp_BuildString *bs, const char *s, int l)
2064 {
2065  if (l < 0)
2066  l = strlen(s);
2067  if (ENSURE_BUILD_STRING(bs, l)) {
2068  memcpy(bs->pos, s, l);
2069  bs->pos += l;
2070  }
2071 }
2072 
2073 static void
2075 {
2076  const Clp_Internal* cli = clp->internal;
2077  if (cli->program_name && cli->program_name[0]) {
2078  append_build_string(bs, cli->program_name, -1);
2079  append_build_string(bs, ": ", 2);
2080  }
2081 }
2082 
2083 
2084 static void
2086  const char *fmt, va_list val)
2087 {
2088  Clp_Internal *cli = clp->internal;
2089  const char *percent;
2090  int c;
2091 
2092  for (percent = strchr(fmt, '%'); percent; percent = strchr(fmt, '%')) {
2094  switch (*++percent) {
2095 
2096  case 's': {
2097  const char *s = va_arg(val, const char *);
2098  append_build_string(bs, s ? s : "(null)", -1);
2099  break;
2100  }
2101 
2102  case 'C': {
2103  const char *s = va_arg(val, const char *);
2104  if (cli->utf8)
2105  c = decode_utf8(s, 0);
2106  else
2107  c = (unsigned char) *s;
2108  goto char_c;
2109  }
2110 
2111  case 'c':
2112  c = va_arg(val, int);
2113  goto char_c;
2114 
2115  char_c:
2116  if (ENSURE_BUILD_STRING(bs, 4)) {
2117  if (c >= 32 && c <= 126)
2118  *bs->pos++ = c;
2119  else if (c < 32) {
2120  *bs->pos++ = '^';
2121  *bs->pos++ = c + 64;
2122  } else if (cli->utf8 && c >= 127 && c < 0x110000) {
2123  bs->pos = encode_utf8(bs->pos, 4, c);
2124  } else if (c >= 127 && c <= 255) {
2125  sprintf(bs->pos, "\\%03o", c & 0xFF);
2126  bs->pos += 4;
2127  } else {
2128  *bs->pos++ = '\\';
2129  *bs->pos++ = '?';
2130  }
2131  }
2132  break;
2133 
2134  case 'd': {
2135  int d = va_arg(val, int);
2136  if (ENSURE_BUILD_STRING(bs, 32)) {
2137  sprintf(bs->pos, "%d", d);
2138  bs->pos = strchr(bs->pos, 0);
2139  }
2140  break;
2141  }
2142 
2143  case 'O':
2144  case 'V': {
2145  int optno = cli->current_option;
2146  const Clp_Option *opt = &cli->opt[optno];
2147  if (optno < 0)
2148  append_build_string(bs, "(no current option!)", -1);
2149  else if (cli->current_short) {
2150  append_build_string(bs, cli->option_chars, -1);
2151  if (ENSURE_BUILD_STRING(bs, 5)) {
2152  if (cli->utf8)
2153  bs->pos = encode_utf8(bs->pos, 5, opt->short_name);
2154  else
2155  *bs->pos++ = opt->short_name;
2156  }
2157  } else if (cli->negated_by_no) {
2158  append_build_string(bs, cli->option_chars, -1);
2159  append_build_string(bs, "no-", 3);
2160  append_build_string(bs, opt->long_name + cli->iopt[optno].ilongoff, -1);
2161  } else {
2162  append_build_string(bs, cli->option_chars, -1);
2163  append_build_string(bs, opt->long_name + cli->iopt[optno].ilongoff, -1);
2164  }
2165  if (optno >= 0 && clp->have_val && *percent == 'V') {
2166  if (cli->current_short && !cli->iopt[optno].ioptional)
2167  append_build_string(bs, " ", 1);
2168  else if (!cli->current_short)
2169  append_build_string(bs, "=", 1);
2170  append_build_string(bs, clp->vstr, -1);
2171  }
2172  break;
2173  }
2174 
2175  case '%':
2176  if (ENSURE_BUILD_STRING(bs, 1))
2177  *bs->pos++ = '%';
2178  break;
2179 
2180  case '`': /* backwards compatibility */
2181  case '<':
2182  append_build_string(bs, (cli->utf8 ? "\342\200\230" : "'"), -1);
2183  break;
2184 
2185  case '\'': /* backwards compatibility */
2186  case ',':
2187  case '>':
2188  append_build_string(bs, (cli->utf8 ? "\342\200\231" : "'"), -1);
2189  break;
2190 
2191  case 0:
2192  append_build_string(bs, "%", 1);
2193  goto done;
2194 
2195  default:
2196  if (ENSURE_BUILD_STRING(bs, 2)) {
2197  *bs->pos++ = '%';
2198  *bs->pos++ = *percent;
2199  }
2200  break;
2201 
2202  }
2203  fmt = ++percent;
2204  }
2205 
2206  done:
2207  append_build_string(bs, fmt, -1);
2208 }
2209 
2210 static const char* build_string_text(Clp_BuildString* bs, int report_oom) {
2211  if (bs->pos) {
2212  *bs->pos = 0;
2213  return bs->data;
2214  } else if (report_oom)
2215  return "out of memory\n";
2216  else
2217  return NULL;
2218 }
2219 
2220 static void
2222 {
2223  const char *text = build_string_text(bs, 1);
2224  if (clp->internal->error_handler != 0)
2225  (*clp->internal->error_handler)(clp, text);
2226  else
2227  fputs(text, stderr);
2228 }
2229 
2230 /** @param clp the parser
2231  * @param format error format
2232  *
2233  * Format an error message from @a format and any additional arguments in
2234  * the ellipsis. The resulting error string is then printed to standard
2235  * error (or passed to the error handler specified by Clp_SetErrorHandler).
2236  * Returns the number of characters printed.
2237  *
2238  * The following format characters are accepted:
2239  *
2240  * <dl>
2241  * <dt><tt>%</tt><tt>c</tt></dt>
2242  * <dd>A character (type <tt>int</tt>). Control characters are printed in
2243  * caret notation. If the parser is in UTF-8 mode, the character is formatted
2244  * in UTF-8. Otherwise, special characters are printed with backslashes and
2245  * octal notation.</dd>
2246  * <dt><tt>%</tt><tt>s</tt></dt>
2247  * <dd>A string (type <tt>const char *</tt>).</dd>
2248  * <dt><tt>%</tt><tt>C</tt></dt>
2249  * <dd>The argument is a string (type <tt>const char *</tt>). The first
2250  * character in this string is printed. If the parser is in UTF-8 mode, this
2251  * may involve multiple bytes.</dd>
2252  * <dt><tt>%</tt><tt>d</tt></dt>
2253  * <dd>An integer (type <tt>int</tt>). Printed in decimal.</dd>
2254  * <dt><tt>%</tt><tt>O</tt></dt>
2255  * <dd>The current option. No values are read from the argument list; the
2256  * current option is defined in the Clp_Parser object itself.</dd>
2257  * <dt><tt>%</tt><tt>V</tt></dt>
2258  * <dd>Like <tt>%</tt><tt>O</tt>, but also includes the current value,
2259  * if any.</dd>
2260  * <dt><tt>%%</tt></dt>
2261  * <dd>Prints a percent character.</dd>
2262  * <dt><tt>%</tt><tt>&lt;</tt></dt>
2263  * <dd>Prints an open quote string. In UTF-8 mode, prints a left single
2264  * quote. Otherwise prints a single quote.</dd>
2265  * <dt><tt>%</tt><tt>&gt;</tt></dt>
2266  * <dd>Prints a closing quote string. In UTF-8 mode, prints a right single
2267  * quote. Otherwise prints a single quote.</dd>
2268  * <dt><tt>%</tt><tt>,</tt></dt>
2269  * <dd>Prints an apostrophe. In UTF-8 mode, prints a right single quote.
2270  * Otherwise prints a single quote.</dd>
2271  * </dl>
2272  *
2273  * Note that no flag characters, precision, or field width characters are
2274  * currently supported.
2275  *
2276  * @sa Clp_SetErrorHandler
2277  */
2278 int
2279 Clp_OptionError(Clp_Parser *clp, const char *format, ...)
2280 {
2281  Clp_BuildString bs;
2282  va_list val;
2283  va_start(val, format);
2284  build_string_init(&bs, clp);
2285  Clp_vbsprintf(clp, &bs, format, val);
2286  append_build_string(&bs, "\n", 1);
2287  va_end(val);
2288  do_error(clp, &bs);
2289  build_string_cleanup(&bs);
2290  return bs.pos - bs.data;
2291 }
2292 
2293 /** @param clp the parser
2294  * @param f output file
2295  * @param format error format
2296  *
2297  * Format an error message using @a format and additional arguments in the
2298  * ellipsis, according to the Clp_OptionError formatting conventions. The
2299  * resulting message is written to @a f.
2300  *
2301  * @sa Clp_OptionError */
2302 int
2303 Clp_fprintf(Clp_Parser* clp, FILE* f, const char* format, ...)
2304 {
2305  Clp_BuildString bs;
2306  va_list val;
2307  va_start(val, format);
2308  build_string_init(&bs, NULL);
2309  Clp_vbsprintf(clp, &bs, format, val);
2310  va_end(val);
2311  if (bs.pos != bs.data)
2312  fwrite(bs.data, 1, bs.pos - bs.data, f);
2313  build_string_cleanup(&bs);
2314  return bs.pos - bs.data;
2315 }
2316 
2317 /** @param clp the parser
2318  * @param f output file
2319  * @param format error format
2320  * @param val arguments
2321  *
2322  * Format an error message using @a format and @a val, according to the
2323  * Clp_OptionError formatting conventions. The resulting message is written
2324  * to @a f.
2325  *
2326  * @sa Clp_OptionError */
2327 int
2329 {
2330  Clp_BuildString bs;
2331  build_string_init(&bs, NULL);
2332  Clp_vbsprintf(clp, &bs, format, val);
2333  if (bs.pos != bs.data)
2334  fwrite(bs.data, 1, bs.pos - bs.data, f);
2335  build_string_cleanup(&bs);
2336  return bs.pos - bs.data;
2337 }
2338 
2339 /** @param clp the parser
2340  * @param str output string
2341  * @param size size of output string
2342  * @param format error format
2343  *
2344  * Format an error message from @a format and any additional arguments in
2345  * the ellipsis, according to the Clp_OptionError formatting conventions.
2346  * The resulting string is written to @a str. At most @a size characters are
2347  * written to @a str, including a terminating null byte. The return value is
2348  * the number of characters that would have been written (excluding the
2349  * terminating null byte) if @a size were large enough to contain the entire
2350  * string.
2351  *
2352  * @sa Clp_OptionError */
2353 int
2354 Clp_vsnprintf(Clp_Parser* clp, char* str, size_t size,
2355  const char* format, va_list val)
2356 {
2357  Clp_BuildString bs;
2358  build_string_init(&bs, NULL);
2359  Clp_vbsprintf(clp, &bs, format, val);
2360  if ((size_t) (bs.pos - bs.data) < size) {
2361  memcpy(str, bs.data, bs.pos - bs.data);
2362  str[bs.pos - bs.data] = 0;
2363  } else {
2364  memcpy(str, bs.data, size - 1);
2365  str[size - 1] = 0;
2366  }
2367  build_string_cleanup(&bs);
2368  return bs.pos - bs.data;
2369 }
2370 
2371 static int
2372 ambiguity_error(Clp_Parser *clp, int ambiguous, int *ambiguous_values,
2373  const Clp_Option *opt, const Clp_InternOption *iopt,
2374  const char *prefix, const char *fmt, ...)
2375 {
2376  Clp_Internal *cli = clp->internal;
2377  Clp_BuildString bs;
2378  int i;
2379  va_list val;
2380 
2381  va_start(val, fmt);
2382  build_string_init(&bs, clp);
2383  Clp_vbsprintf(clp, &bs, fmt, val);
2384  append_build_string(&bs, "\n", 1);
2385 
2386  build_string_program_prefix(&bs, clp);
2387  append_build_string(&bs, "(Possibilities are", -1);
2388 
2389  for (i = 0; i < ambiguous && i < MAX_AMBIGUOUS_VALUES; i++) {
2390  int value = ambiguous_values[i];
2391  const char *no_dash = "";
2392  if (value < 0)
2393  value = -(value + 1), no_dash = "no-";
2394  if (i == 0)
2395  append_build_string(&bs, " ", 1);
2396  else if (i == ambiguous - 1)
2397  append_build_string(&bs, (i == 1 ? " and " : ", and "), -1);
2398  else
2399  append_build_string(&bs, ", ", 2);
2400  append_build_string(&bs, (cli->utf8 ? "\342\200\230" : "'"), -1);
2401  append_build_string(&bs, prefix, -1);
2402  append_build_string(&bs, no_dash, -1);
2403  append_build_string(&bs, opt[value].long_name + iopt[value].ilongoff, -1);
2404  append_build_string(&bs, (cli->utf8 ? "\342\200\231" : "'"), -1);
2405  }
2406 
2408  append_build_string(&bs, ", and others", -1);
2409  append_build_string(&bs, ".)\n", -1);
2410  va_end(val);
2411 
2412  do_error(clp, &bs);
2413  build_string_cleanup(&bs);
2414  return 0;
2415 }
2416 
2417 static int
2418 copy_string(char *buf, int buflen, int bufpos, const char *what)
2419 {
2420  int l = strlen(what);
2421  if (l > buflen - bufpos - 1)
2422  l = buflen - bufpos - 1;
2423  memcpy(buf + bufpos, what, l);
2424  return l;
2425 }
2426 
2427 /** @param clp the parser
2428  * @param buf output buffer
2429  * @param len length of output buffer
2430  * @return number of characters written to the buffer, not including the terminating NUL
2431  *
2432  * A string that looks like the last option parsed by @a clp is extracted into
2433  * @a buf. The correct option characters are put into the string first,
2434  * followed by the option text. The output buffer is null-terminated unless
2435  * @a len == 0.
2436  *
2437  * @sa Clp_CurOptionName
2438  */
2439 int
2441 {
2442  Clp_Internal *cli = clp->internal;
2443  int optno = cli->current_option;
2444  int pos = 0;
2445  if (optno < 0)
2446  pos += copy_string(buf, len, pos, "(no current option!)");
2447  else if (cli->current_short) {
2448  pos += copy_string(buf, len, pos, cli->option_chars);
2449  if (cli->utf8)
2450  pos = (encode_utf8(buf + pos, len - pos - 1, cli->opt[optno].short_name) - buf);
2451  else if (pos < len - 1)
2452  buf[pos++] = cli->opt[optno].short_name;
2453  } else if (cli->negated_by_no) {
2454  pos += copy_string(buf, len, pos, cli->option_chars);
2455  pos += copy_string(buf, len, pos, "no-");
2456  pos += copy_string(buf, len, pos, cli->opt[optno].long_name + cli->iopt[optno].ilongoff);
2457  } else {
2458  pos += copy_string(buf, len, pos, cli->option_chars);
2459  pos += copy_string(buf, len, pos, cli->opt[optno].long_name + cli->iopt[optno].ilongoff);
2460  }
2461  if (pos < len)
2462  buf[pos] = 0;
2463  return pos;
2464 }
2465 
2466 /** @param clp the parser
2467  * @return string describing the current option
2468  *
2469  * This function acts like Clp_CurOptionNameBuf(), but returns a pointer into
2470  * a static buffer that will be rewritten on the next call to
2471  * Clp_CurOptionName().
2472  *
2473  * @note This function is not thread safe.
2474  *
2475  * @sa Clp_CurOptionName
2476  */
2477 const char *
2479 {
2480  static char buf[256];
2481  Clp_CurOptionNameBuf(clp, buf, 256);
2482  return buf;
2483 }
2484 
2485 int
2486 Clp_IsLong(Clp_Parser *clp, const char *long_name)
2487 {
2488  Clp_Internal *cli = clp->internal;
2489  int optno = cli->current_option;
2490  return optno >= 0 && strcmp(cli->opt[optno].long_name, long_name) == 0;
2491 }
2492 
2493 int
2494 Clp_IsShort(Clp_Parser *clp, int short_name)
2495 {
2496  Clp_Internal *cli = clp->internal;
2497  int optno = cli->current_option;
2498  return optno >= 0 && cli->opt[optno].short_name == short_name;
2499 }
2500 
2501 #ifdef __cplusplus
2502 }
2503 #endif
double __cdecl strtod(char const *_String, char **_EndPtr)
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
unsigned long __cdecl strtoul(char const *_String, char **_EndPtr, int _Radix)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
cp
Definition: action.c:1035
#define buflen
Definition: afm2pl.c:181
#define message
Definition: aptex-macros.h:418
#define state
Definition: aptex-macros.h:996
#define type(a)
Definition: aptex-macros.h:171
#define name
#define text(a)
Definition: aptex-macros.h:925
static double percent(cairo_time_t a, cairo_time_t b)
#define n
Definition: t4ht.c:1290
static U_NAMESPACE_USE UnicodeString ** strs
Definition: dbgutil.cpp:25
#define free(a)
Definition: decNumber.cpp:310
#define strrchr
Definition: detex.c:67
int strcmp()
Definition: coll.cpp:143
char * temp
Definition: dvidvi.c:137
#define error(a)
Definition: dviinfo.c:48
static void
Definition: fpif.c:118
mpz_t * f
Definition: gen-fib.c:34
#define s
Definition: afcover.h:80
#define c(n)
Definition: gpos-common.c:150
#define d(n)
Definition: gpos-common.c:151
#define strchr
Definition: gsftopk.c:59
#define memmove(d, s, n)
Definition: gsftopk.c:65
#define memcpy(d, s, n)
Definition: gsftopk.c:64
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
FT_UInt idx
Definition: cffcmap.c:135
unsigned int uintptr_t
Definition: stdint.h:119
char * getenv()
#define buf
char * strstr()
#define fputs
Definition: mendex.h:67
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
#define malloc
Definition: alloca.c:91
int strncmp()
#define sprintf
Definition: snprintf.c:44
static void Clp_vbsprintf(Clp_Parser *clp, Clp_BuildString *bs, const char *fmt, va_list val)
Definition: clp.c:2085
int Clp_SetOptions(Clp_Parser *clp, int nopt, const Clp_Option *opt)
Set clp's option definitions.
Definition: clp.c:784
static int clp_utf8_charlen(const Clp_Internal *cli, const char *s)
Definition: clp.c:355
static const Clp_Option clp_option_sentinel[]
Definition: clp.c:248
void Clp_SetArguments(Clp_Parser *clp, int argc, const char *const *argv)
Set clp's arguments.
Definition: clp.c:870
int Clp_OptionChar(Clp_Parser *clp, int c)
Return clp's treatment of character c.
Definition: clp.c:651
#define Clp_InitialValType
Definition: clp.c:147
static void append_build_string(Clp_BuildString *bs, const char *s, int l)
Definition: clp.c:2063
static int parse_double(Clp_Parser *, const char *, int, void *)
Definition: clp.c:1136
int Clp_vfprintf(Clp_Parser *clp, FILE *f, const char *format, va_list val)
Print a message.
Definition: clp.c:2328
static int utf8_charlen(const char *s)
Definition: clp.c:347
static char * encode_utf8(char *s, int n, int c)
Definition: clp.c:274
#define Clp_OclassSize
Definition: clp.c:179
Clp_Parser * Clp_NewParser(int argc, const char *const *argv, int nopt, const Clp_Option *opt)
Create a new Clp_Parser.
Definition: clp.c:502
static int finish_string_list(Clp_Parser *clp, int val_type, int flags, Clp_Option *items, int nitems, int itemscap)
Definition: clp.c:1231
Clp_ParserState * Clp_NewParserState(void)
Create a new Clp_ParserState.
Definition: clp.c:1460
#define U_REPLACEMENT
Definition: clp.c:271
Clp_ErrorHandler Clp_SetErrorHandler(Clp_Parser *clp, void(*errh)(Clp_Parser *, const char *))
Definition: clp.c:613
#define MAX_AMBIGUOUS_VALUES
Definition: clp.c:148
void Clp_RestoreParser(Clp_Parser *clp, const Clp_ParserState *state)
Restore parser state from state into clp.
Definition: clp.c:1527
static void set_option_text(Clp_Internal *cli, const char *text, int n_option_chars)
Definition: clp.c:1551
int Clp_SetOptionProcessing(Clp_Parser *clp, int on)
Set whether clp is searching for options.
Definition: clp.c:893
static void calculate_lmm(Clp_Parser *clp, const Clp_Option *opt, Clp_InternOption *iopt, int nopt)
Definition: clp.c:454
static void build_string_init(Clp_BuildString *bs, Clp_Parser *clp)
Definition: clp.c:2025
static int find_long(Clp_Parser *clp, const char *arg)
Definition: clp.c:1722
static int find_prefix_opt(Clp_Parser *clp, const char *arg, int nopt, const Clp_Option *opt, const Clp_InternOption *iopt, int *ambiguous, int *ambiguous_values)
Definition: clp.c:947
static int long_as_short(const Clp_Internal *cli, const Clp_Option *o, Clp_InternOption *io, int failure)
Definition: clp.c:381
struct Clp_Internal Clp_Internal
int Clp_SetOptionChar(Clp_Parser *clp, int c, int type)
Set clp's treatment of character c.
Definition: clp.c:709
static int val_type_binsearch(Clp_Internal *cli, int val_type)
Definition: clp.c:995
static int parse_int(Clp_Parser *, const char *, int, void *)
Definition: clp.c:1095
static int get_oclass(Clp_Parser *clp, const char *text, int *ocharskip)
Definition: clp.c:1560
int Clp_OptionError(Clp_Parser *clp, const char *format,...)
Report a parser error.
Definition: clp.c:2279
static void build_string_program_prefix(Clp_BuildString *bs, const Clp_Parser *clp)
Definition: clp.c:2074
int Clp_AddStringListTypeVec(Clp_Parser *clp, int val_type, int flags, int nstrs, const char *const *strs, const int *vals)
Define a new string list value type for clp.
Definition: clp.c:1386
static int ambiguity_error(Clp_Parser *, int, int *, const Clp_Option *, const Clp_InternOption *, const char *, const char *,...)
Definition: clp.c:2372
static int parse_string(Clp_Parser *, const char *, int, void *)
Definition: clp.c:1087
#define Clp_DoubledLong
Definition: clp.c:145
static int copy_string(char *buf, int buflen, int bufpos, const char *what)
Definition: clp.c:2418
struct Clp_BuildString Clp_BuildString
int Clp_CurOptionNameBuf(Clp_Parser *clp, char *buf, int len)
Extract the current option as a string.
Definition: clp.c:2440
void Clp_SaveParser(const Clp_Parser *clp, Clp_ParserState *state)
Save clp's current state in state.
Definition: clp.c:1494
struct Clp_StringList Clp_StringList
static int parse_string_list(Clp_Parser *, const char *, int, void *)
Definition: clp.c:1193
int Clp_IsShort(Clp_Parser *clp, int short_name)
Test if the current option had short name name.
Definition: clp.c:2494
int Clp_AddStringListType(Clp_Parser *clp, int val_type, int flags,...)
Define a new string list value type for clp.
Definition: clp.c:1297
static int build_string_grow(Clp_BuildString *bs, size_t want)
Definition: clp.c:2037
static void switch_to_short_argument(Clp_Parser *clp)
Definition: clp.c:1709
const char * Clp_CurOptionName(Clp_Parser *clp)
Extract the current option as a string.
Definition: clp.c:2478
int Clp_AddType(Clp_Parser *clp, int val_type, int flags, Clp_ValParseFunc parser, void *user_data)
Define a new value type for clp.
Definition: clp.c:1042
static int decode_utf8(const char *s, const char **cp)
Definition: clp.c:298
#define Clp_OptionCharsSize
Definition: clp.c:173
static void build_string_cleanup(Clp_BuildString *bs)
Definition: clp.c:2032
static int next_argument(Clp_Parser *clp, int want_argument)
Definition: clp.c:1575
int Clp_Next(Clp_Parser *clp)
Parse and return the next argument from clp.
Definition: clp.c:1850
static int parse_bool(Clp_Parser *, const char *, int, void *)
Definition: clp.c:1157
int Clp_fprintf(Clp_Parser *clp, FILE *f, const char *format,...)
Print a message.
Definition: clp.c:2303
static int argcmp(const char *ref, const char *arg, int min_match, int fewer_dashes)
Definition: clp.c:909
static const char * build_string_text(Clp_BuildString *bs, int report_oom)
Definition: clp.c:2210
const char * Clp_Shift(Clp_Parser *clp, int allow_options)
Return the next argument from clp without option parsing.
Definition: clp.c:1998
void Clp_DeleteParserState(Clp_ParserState *state)
Destroy a Clp_ParserState object.
Definition: clp.c:1484
int Clp_vsnprintf(Clp_Parser *clp, char *str, size_t size, const char *format, va_list val)
Format a message.
Definition: clp.c:2354
int Clp_IsLong(Clp_Parser *clp, const char *long_name)
Test if the current option had long name name.
Definition: clp.c:2486
void Clp_DeleteParser(Clp_Parser *clp)
Destroy a Clp_Parser object.
Definition: clp.c:578
const char * Clp_SetProgramName(Clp_Parser *clp, const char *name)
Set clp's program name.
Definition: clp.c:1432
#define ENSURE_BUILD_STRING(bs, space)
Definition: clp.c:2058
int Clp_SetUTF8(Clp_Parser *clp, int utf8)
Set clp's UTF-8 mode.
Definition: clp.c:634
static void compare_options(Clp_Parser *clp, const Clp_Option *o1, Clp_InternOption *io1, const Clp_Option *o2, Clp_InternOption *io2)
Definition: clp.c:397
static int find_short(Clp_Parser *clp, const char *text)
Definition: clp.c:1784
static void do_error(Clp_Parser *clp, Clp_BuildString *bs)
Definition: clp.c:2221
static int min_different_chars(const char *s, const char *t)
Definition: clp.c:366
const char * Clp_ProgramName(Clp_Parser *clp)
Return clp's program name.
Definition: clp.c:1420
#define Clp_ValBool
Option value is a boolean.
Definition: clp.h:69
#define Clp_ValUnsigned
Option value is an unsigned int.
Definition: clp.h:91
#define Clp_ShortNegated
Option character begins a set of negated short options.
Definition: clp.h:178
#define Clp_Negate
Option flag: option may be negated.
Definition: clp.h:139
#define Clp_Error
Clp_Next value: internal CLP error.
Definition: clp.h:200
#define Clp_Mandatory
Option flag: value is mandatory.
Definition: clp.h:125
#define Clp_BadOption
Clp_Next value: argument was an erroneous option.
Definition: clp.h:197
#define Clp_NotOption
Clp_Next value: argument was not an option.
Definition: clp.h:191
void(* Clp_ErrorHandler)(Clp_Parser *clp, const char *message)
A function for reporting option errors.
Definition: clp.h:226
#define Clp_AllowNumbers
String list flag: allow explicit numbers.
Definition: clp.h:327
#define Clp_PreferredMatch
Option flag: prefer this option when matching.
Definition: clp.h:157
#define Clp_ValString
Option value is an arbitrary string.
Definition: clp.h:59
#define Clp_ValLong
Option value is a signed long.
Definition: clp.h:104
#define Clp_ValStringNotOption
Option value is a non-option string.
Definition: clp.h:62
#define Clp_ValDouble
Option value is a double. Accepts a real number as defined by strtod().
Definition: clp.h:110
#define Clp_DisallowOptions
Value type flag: value can't be an option string.
Definition: clp.h:314
#define Clp_Optional
Option flag: value is optional.
Definition: clp.h:136
#define Clp_Long
Option character begins a long option.
Definition: clp.h:175
#define Clp_LongNegated
Option character begins a negated long option.
Definition: clp.h:181
#define Clp_ValUnsignedLong
Option value is an unsigned long.
Definition: clp.h:107
#define Clp_LongImplicit
Option character can begin a long option, and is part of that long option.
Definition: clp.h:184
#define Clp_OnlyNegated
Option flag: option must be negated.
Definition: clp.h:146
int(* Clp_ValParseFunc)(Clp_Parser *clp, const char *vstr, int complain, void *user_data)
A value parsing function.
Definition: clp.h:219
#define Clp_Done
Clp_Next value: there are no more arguments.
Definition: clp.h:194
#define Clp_Short
Option character begins a set of short options.
Definition: clp.h:172
#define Clp_ValInt
Option value is a signed int.
Definition: clp.h:78
#define Clp_StringListLong
String list flag: values have long type.
Definition: clp.h:334
const int * pos
Definition: combiners.h:905
#define realloc
Definition: glob.c:206
utf< uint8 > utf8
Definition: UtfCodec.h:249
constexpr std::size_t ambiguous
Definition: variant.hpp:974
def ref(x)
Definition: pdf-org.py:104
union value value
Definition: obx.h:44
static int format
Definition: pbmclean.c:15
#define max(a, b)
Definition: pbmto4425.c:11
static int items
Definition: pgmtofs.c:86
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 if[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(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
integer ishort
Definition: pmxab.c:657
static int size
Definition: ppmlabel.c:24
int r
Definition: ppmqvga.c:68
bstring c int memset(void *s, int c, int length)
#define flags
val_type
Definition: splinefont.h:110
#define tolower(ch)
Definition: utype.h:137
#define isspace(ch)
Definition: utype.h:87
static ErrorHandler * errh
Definition: main.cc:71
size_t bufpos(caryll_Buffer *buf)
Definition: buffer.c:18
static void complain(struct file *file)
Definition: remake.c:362
#define str(s)
Definition: sh6.c:399
#define uintptr_t
Definition: stdint.in.h:321
char * pos
Definition: clp.c:2017
char * end_data
Definition: clp.c:2018
char buf[256]
Definition: clp.c:2019
char * data
Definition: clp.c:2016
unsigned lmmpos_short
Definition: clp.c:165
unsigned lmmneg_short
Definition: clp.c:166
unsigned ilong
Definition: clp.c:158
unsigned ineg
Definition: clp.c:163
unsigned imandatory
Definition: clp.c:160
unsigned ioptional
Definition: clp.c:161
unsigned iprefmatch
Definition: clp.c:164
unsigned char ilongoff
Definition: clp.c:167
int lmmpos
Definition: clp.c:168
unsigned ishort
Definition: clp.c:159
unsigned ipos
Definition: clp.c:162
int lmmneg
Definition: clp.c:169
int long1neg
Definition: clp.c:196
Clp_ValType * valtype
Definition: clp.c:187
unsigned char negated_by_no
Definition: clp.c:212
Clp_InternOption * iopt
Definition: clp.c:183
const Clp_Option * opt
Definition: clp.c:182
int long1pos
Definition: clp.c:195
unsigned char whole_negated
Definition: clp.c:209
unsigned char current_short
Definition: clp.c:211
char option_chars[5]
Definition: clp.c:199
int noclass
Definition: clp.c:194
int utf8
Definition: clp.c:197
unsigned opt_generation
Definition: clp.c:185
unsigned char could_be_short
Definition: clp.c:210
int current_option
Definition: clp.c:206
const char *const * argv
Definition: clp.c:190
void(* error_handler)(Clp_Parser *, const char *)
Definition: clp.c:203
int nopt
Definition: clp.c:184
int nvaltype
Definition: clp.c:188
int ambiguous
Definition: clp.c:214
const char * program_name
Definition: clp.c:202
int option_processing
Definition: clp.c:205
Clp_Oclass oclass[10]
Definition: clp.c:193
unsigned char is_short
Definition: clp.c:208
const char * xtext
Definition: clp.c:200
int argc
Definition: clp.c:191
int ambiguous_values[4]
Definition: clp.c:215
int type
Definition: clp.c:177
int c
Definition: clp.c:176
Option description.
Definition: clp.h:41
int val_type
Definition: clp.h:48
const char * long_name
Definition: clp.h:42
int flags
Definition: clp.h:50
int option_id
Definition: clp.h:46
int short_name
Definition: clp.h:44
int current_option
Definition: clp.c:229
int argc
Definition: clp.c:221
const char * xtext
Definition: clp.c:224
int option_processing
Definition: clp.c:226
unsigned char current_short
Definition: clp.c:232
const char *const * argv
Definition: clp.c:220
unsigned char whole_negated
Definition: clp.c:231
unsigned char negated_by_no
Definition: clp.c:233
unsigned opt_generation
Definition: clp.c:228
char option_chars[5]
Definition: clp.c:223
unsigned char is_short
Definition: clp.c:230
Command line parser.
Definition: clp.h:234
const Clp_Option * option
Definition: clp.h:235
union Clp_Parser::@427 val
int have_val
Definition: clp.h:239
long l
Definition: clp.h:246
struct Clp_Internal * internal
Definition: clp.h:265
double d
Definition: clp.h:248
int negated
Definition: clp.h:237
int i
Definition: clp.h:244
unsigned u
Definition: clp.h:245
unsigned long ul
Definition: clp.h:247
const char * vstr
Definition: clp.h:240
const char * s
Definition: clp.h:249
void * user_data
Definition: clp.h:262
int nitems
Definition: clp.c:240
int nitems_invalid_report
Definition: clp.c:244
Clp_InternOption * iopt
Definition: clp.c:239
Clp_Option * items
Definition: clp.c:238
unsigned char allow_int
Definition: clp.c:242
unsigned char val_long
Definition: clp.c:243
int flags
Definition: clp.c:153
void * user_data
Definition: clp.c:154
int val_type
Definition: clp.c:151
Clp_ValParseFunc func
Definition: clp.c:152
Definition: psread.c:42
Definition: ffi.h:208
Definition: dvips.h:235
Definition: strexpr.c:21
#define FILE
Definition: t1stdio.h:34
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
char fmt[256]
Definition: tex4ht.c:3925
val
Definition: tex4ht.c:3227
m
Definition: tex4ht.c:3990
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
int _cdecl compare(const void *a1, const void *a2)
Definition: misc.c:34
Definition: sd.h:149
Definition: obx.h:51
#define va_start(pvar)
Definition: varargs.h:30
#define va_arg(pvar, type)
Definition: varargs.h:35
#define va_end(pvar)
Definition: varargs.h:38
char * va_list
Definition: varargs.h:22
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269