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)  

main.c
Go to the documentation of this file.
1 /* Argument parsing and main program of GNU Make.
2 Copyright (C) 1988-2020 Free Software Foundation, Inc.
3 This file is part of GNU Make.
4 
5 GNU Make is free software; you can redistribute it and/or modify it under the
6 terms of the GNU General Public License as published by the Free Software
7 Foundation; either version 3 of the License, or (at your option) any later
8 version.
9 
10 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see <http://www.gnu.org/licenses/>. */
16 
17 #include "makeint.h"
18 #include "os.h"
19 #include "filedef.h"
20 #include "dep.h"
21 #include "variable.h"
22 #include "job.h"
23 #include "commands.h"
24 #include "rule.h"
25 #include "debug.h"
26 #include "getopt.h"
27 
28 #include <assert.h>
29 #ifdef _AMIGA
30 # include <dos/dos.h>
31 # include <proto/dos.h>
32 #endif
33 #ifdef WINDOWS32
34 # include <windows.h>
35 # include <io.h>
36 #ifdef HAVE_STRINGS_H
37 # include <strings.h> /* for strcasecmp */
38 #endif
39 # include "pathstuff.h"
40 # include "sub_proc.h"
41 # include "w32err.h"
42 #endif
43 #ifdef __EMX__
44 # include <sys/types.h>
45 # include <sys/wait.h>
46 #endif
47 #ifdef HAVE_FCNTL_H
48 # include <fcntl.h>
49 #endif
50 
51 #ifdef _AMIGA
52 int __stack = 20000; /* Make sure we have 20K of stack space */
53 #endif
54 #ifdef VMS
55 int vms_use_mcr_command = 0;
56 int vms_always_use_cmd_file = 0;
57 int vms_gnv_shell = 0;
58 int vms_legacy_behavior = 0;
59 int vms_comma_separator = 0;
60 int vms_unix_simulation = 0;
61 int vms_report_unix_paths = 0;
62 
63 /* Evaluates if a VMS environment option is set, only look at first character */
64 static int
65 get_vms_env_flag (const char *name, int default_value)
66 {
67 char * value;
68 char x;
69 
70  value = getenv (name);
71  if (value == NULL)
72  return default_value;
73 
74  x = toupper (value[0]);
75  switch (x)
76  {
77  case '1':
78  case 'T':
79  case 'E':
80  return 1;
81  break;
82  case '0':
83  case 'F':
84  case 'D':
85  return 0;
86  }
87 }
88 #endif
89 
90 #if defined HAVE_WAITPID || defined HAVE_WAIT3
91 # define HAVE_WAIT_NOHANG
92 #endif
93 
94 #ifndef HAVE_UNISTD_H
95 int chdir ();
96 #endif
97 #ifndef STDC_HEADERS
98 # ifndef sun /* Sun has an incorrect decl in a header. */
99 void exit (int) NORETURN;
100 # endif
101 double atof ();
102 #endif
103 
104 static void clean_jobserver (int status);
105 static void print_data_base (void);
106 static void print_version (void);
107 static void decode_switches (int argc, const char **argv, int env);
108 static void decode_env_switches (const char *envar, size_t len);
109 static struct variable *define_makeflags (int all, int makefile);
110 static char *quote_for_env (char *out, const char *in);
111 static void initialize_global_hash_tables (void);
112 
113 ␌
114 /* The structure that describes an accepted command switch. */
115 
117  {
118  int c; /* The switch character. */
119 
120  enum /* Type of the value. */
121  {
122  flag, /* Turn int flag on. */
123  flag_off, /* Turn int flag off. */
124  string, /* One string per invocation. */
125  strlist, /* One string per switch. */
126  filename, /* A string containing a file name. */
127  positive_int, /* A positive integer. */
128  floating, /* A floating-point number (double). */
129  ignore /* Ignored. */
130  } type;
131 
132  void *value_ptr; /* Pointer to the value-holding variable. */
133 
134  unsigned int env:1; /* Can come from MAKEFLAGS. */
135  unsigned int toenv:1; /* Should be put in MAKEFLAGS. */
136  unsigned int no_makefile:1; /* Don't propagate when remaking makefiles. */
137 
138  const void *noarg_value; /* Pointer to value used if no arg given. */
139  const void *default_value; /* Pointer to default value. */
140 
141  const char *long_name; /* Long option name. */
142  };
143 
144 /* True if C is a switch value that corresponds to a short option. */
145 
146 #define short_option(c) ((c) <= CHAR_MAX)
147 
148 /* The structure used to hold the list of strings given
149  in command switches of a type that takes strlist arguments. */
150 
152  {
153  const char **list; /* Nil-terminated list of strings. */
154  unsigned int idx; /* Index into above. */
155  unsigned int max; /* Number of pointers allocated. */
156  };
157 
158 
159 /* The recognized command switches. */
160 
161 /* Nonzero means do extra verification (that may slow things down). */
162 
164 
165 /* Nonzero means do not print commands to be executed (-s). */
166 
167 static int silent_flag;
168 static const int default_silent_flag = 0;
169 
170 /* Nonzero means either -s was given, or .SILENT-with-no-deps was seen. */
171 
172 int run_silent = 0;
173 
174 /* Nonzero means just touch the files
175  that would appear to need remaking (-t) */
176 
178 
179 /* Nonzero means just print what commands would need to be executed,
180  don't actually execute them (-n). */
181 
183 
184 /* Print debugging info (--debug). */
185 
186 static struct stringlist *db_flags = 0;
187 static int debug_flag = 0;
188 
189 int db_level = 0;
190 
191 /* Synchronize output (--output-sync). */
192 
194 
195 /* Environment variables override makefile definitions. */
196 
198 
199 /* Nonzero means ignore status codes returned by commands
200  executed to remake files. Just treat them all as successful (-i). */
201 
203 
204 /* Nonzero means don't remake anything, just print the data base
205  that results from reading the makefile (-p). */
206 
208 
209 /* Nonzero means don't remake anything; just return a nonzero status
210  if the specified targets are not up to date (-q). */
211 
213 
214 /* Nonzero means do not use any of the builtin rules (-r) / variables (-R). */
215 
218 
219 /* Nonzero means keep going even if remaking some file fails (-k). */
220 
222 static const int default_keep_going_flag = 0;
223 
224 /* Nonzero means check symlink mtimes. */
225 
227 
228 /* Nonzero means print directory before starting and when done (-w). */
229 
231 
232 /* Nonzero means ignore print_directory_flag and never print the directory.
233  This is necessary because print_directory_flag is set implicitly. */
234 
236 
237 /* Nonzero means print version information. */
238 
240 
241 /* List of makefiles given with -f switches. */
242 
243 static struct stringlist *makefiles = 0;
244 
245 /* Size of the stack when we started. */
246 
247 #ifdef SET_STACK_SIZE
248 struct rlimit stack_limit;
249 #endif
250 
251 
252 /* Number of job slots for parallelism. */
253 
254 unsigned int job_slots;
255 
256 #define INVALID_JOB_SLOTS (-1)
257 static unsigned int master_job_slots = 0;
259 
261 
262 /* Value of job_slots that means no limit. */
263 
264 static const int inf_jobs = 0;
265 
266 /* Authorization for the jobserver. */
267 
268 static char *jobserver_auth = NULL;
269 
270 /* Handle for the mutex used on Windows to synchronize output of our
271  children under -O. */
272 
273 char *sync_mutex = NULL;
274 
275 /* Maximum load average at which multiple jobs will be run.
276  Negative values mean unlimited, while zero means limit to
277  zero load (which could be useful to start infinite jobs remotely
278  but one at a time locally). */
279 double max_load_average = -1.0;
280 double default_load_average = -1.0;
281 
282 /* List of directories given with -C switches. */
283 
284 static struct stringlist *directories = 0;
285 
286 /* List of include directories given with -I switches. */
287 
288 static struct stringlist *include_directories = 0;
289 
290 /* List of files given with -o switches. */
291 
292 static struct stringlist *old_files = 0;
293 
294 /* List of files given with -W switches. */
295 
296 static struct stringlist *new_files = 0;
297 
298 /* List of strings to be eval'd. */
299 static struct stringlist *eval_strings = 0;
300 
301 /* If nonzero, we should just print usage and exit. */
302 
303 static int print_usage_flag = 0;
304 
305 /* If nonzero, we should print a warning message
306  for each reference to an undefined variable. */
307 
309 
310 /* If nonzero, always build all targets, regardless of whether
311  they appear out of date or not. */
312 
313 static int always_make_set = 0;
315 
316 /* If nonzero, we're in the "try to rebuild makefiles" phase. */
317 
319 
320 /* Remember the original value of the SHELL variable, from the environment. */
321 
322 struct variable shell_var;
323 
324 /* This character introduces a command: it's the first char on the line. */
325 
326 char cmd_prefix = '\t';
327 
328 ␌
329 /* The usage output. We write it this way to make life easier for the
330  translators, especially those trying to translate to right-to-left
331  languages like Hebrew. */
332 
333 static const char *const usage[] =
334  {
335  N_("Options:\n"),
336  N_("\
337  -b, -m Ignored for compatibility.\n"),
338  N_("\
339  -B, --always-make Unconditionally make all targets.\n"),
340  N_("\
341  -C DIRECTORY, --directory=DIRECTORY\n\
342  Change to DIRECTORY before doing anything.\n"),
343  N_("\
344  -d Print lots of debugging information.\n"),
345  N_("\
346  --debug[=FLAGS] Print various types of debugging information.\n"),
347  N_("\
348  -e, --environment-overrides\n\
349  Environment variables override makefiles.\n"),
350  N_("\
351  -E STRING, --eval=STRING Evaluate STRING as a makefile statement.\n"),
352  N_("\
353  -f FILE, --file=FILE, --makefile=FILE\n\
354  Read FILE as a makefile.\n"),
355  N_("\
356  -h, --help Print this message and exit.\n"),
357  N_("\
358  -i, --ignore-errors Ignore errors from recipes.\n"),
359  N_("\
360  -I DIRECTORY, --include-dir=DIRECTORY\n\
361  Search DIRECTORY for included makefiles.\n"),
362  N_("\
363  -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.\n"),
364  N_("\
365  -k, --keep-going Keep going when some targets can't be made.\n"),
366  N_("\
367  -l [N], --load-average[=N], --max-load[=N]\n\
368  Don't start multiple jobs unless load is below N.\n"),
369  N_("\
370  -L, --check-symlink-times Use the latest mtime between symlinks and target.\n"),
371  N_("\
372  -n, --just-print, --dry-run, --recon\n\
373  Don't actually run any recipe; just print them.\n"),
374  N_("\
375  -o FILE, --old-file=FILE, --assume-old=FILE\n\
376  Consider FILE to be very old and don't remake it.\n"),
377  N_("\
378  -O[TYPE], --output-sync[=TYPE]\n\
379  Synchronize output of parallel jobs by TYPE.\n"),
380  N_("\
381  -p, --print-data-base Print make's internal database.\n"),
382  N_("\
383  -q, --question Run no recipe; exit status says if up to date.\n"),
384  N_("\
385  -r, --no-builtin-rules Disable the built-in implicit rules.\n"),
386  N_("\
387  -R, --no-builtin-variables Disable the built-in variable settings.\n"),
388  N_("\
389  -s, --silent, --quiet Don't echo recipes.\n"),
390  N_("\
391  --no-silent Echo recipes (disable --silent mode).\n"),
392  N_("\
393  -S, --no-keep-going, --stop\n\
394  Turns off -k.\n"),
395  N_("\
396  -t, --touch Touch targets instead of remaking them.\n"),
397  N_("\
398  --trace Print tracing information.\n"),
399  N_("\
400  -v, --version Print the version number of make and exit.\n"),
401  N_("\
402  -w, --print-directory Print the current directory.\n"),
403  N_("\
404  --no-print-directory Turn off -w, even if it was turned on implicitly.\n"),
405  N_("\
406  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE\n\
407  Consider FILE to be infinitely new.\n"),
408  N_("\
409  --warn-undefined-variables Warn when an undefined variable is referenced.\n"),
410  NULL
411  };
412 
413 /* The table of command switches.
414  Order matters here: this is the order MAKEFLAGS will be constructed.
415  So be sure all simple flags (single char, no argument) come first. */
416 
417 static const struct command_switch switches[] =
418  {
419  { 'b', ignore, 0, 0, 0, 0, 0, 0, 0 },
420  { 'B', flag, &always_make_set, 1, 1, 0, 0, 0, "always-make" },
421  { 'd', flag, &debug_flag, 1, 1, 0, 0, 0, 0 },
422  { 'e', flag, &env_overrides, 1, 1, 0, 0, 0, "environment-overrides", },
423  { 'E', strlist, &eval_strings, 1, 0, 0, 0, 0, "eval" },
424  { 'h', flag, &print_usage_flag, 0, 0, 0, 0, 0, "help" },
425  { 'i', flag, &ignore_errors_flag, 1, 1, 0, 0, 0, "ignore-errors" },
426  { 'k', flag, &keep_going_flag, 1, 1, 0, 0, &default_keep_going_flag,
427  "keep-going" },
428  { 'L', flag, &check_symlink_flag, 1, 1, 0, 0, 0, "check-symlink-times" },
429  { 'm', ignore, 0, 0, 0, 0, 0, 0, 0 },
430  { 'n', flag, &just_print_flag, 1, 1, 1, 0, 0, "just-print" },
431  { 'p', flag, &print_data_base_flag, 1, 1, 0, 0, 0, "print-data-base" },
432  { 'q', flag, &question_flag, 1, 1, 1, 0, 0, "question" },
433  { 'r', flag, &no_builtin_rules_flag, 1, 1, 0, 0, 0, "no-builtin-rules" },
434  { 'R', flag, &no_builtin_variables_flag, 1, 1, 0, 0, 0,
435  "no-builtin-variables" },
436  { 's', flag, &silent_flag, 1, 1, 0, 0, &default_silent_flag, "silent" },
437  { 'S', flag_off, &keep_going_flag, 1, 1, 0, 0, &default_keep_going_flag,
438  "no-keep-going" },
439  { 't', flag, &touch_flag, 1, 1, 1, 0, 0, "touch" },
440  { 'v', flag, &print_version_flag, 1, 1, 0, 0, 0, "version" },
441  { 'w', flag, &print_directory_flag, 1, 1, 0, 0, 0, "print-directory" },
442 
443  /* These options take arguments. */
444  { 'C', filename, &directories, 0, 0, 0, 0, 0, "directory" },
445  { 'f', filename, &makefiles, 0, 0, 0, 0, 0, "file" },
446  { 'I', filename, &include_directories, 1, 1, 0, 0, 0,
447  "include-dir" },
449  "jobs" },
450  { 'l', floating, &max_load_average, 1, 1, 0, &default_load_average,
451  &default_load_average, "load-average" },
452  { 'o', filename, &old_files, 0, 0, 0, 0, 0, "old-file" },
453  { 'O', string, &output_sync_option, 1, 1, 0, "target", 0, "output-sync" },
454  { 'W', filename, &new_files, 0, 0, 0, 0, 0, "what-if" },
455 
456  /* These are long-style options. */
457  { CHAR_MAX+1, strlist, &db_flags, 1, 1, 0, "basic", 0, "debug" },
458  { CHAR_MAX+2, string, &jobserver_auth, 1, 1, 0, 0, 0, "jobserver-auth" },
459  { CHAR_MAX+3, flag, &trace_flag, 1, 1, 0, 0, 0, "trace" },
460  { CHAR_MAX+4, flag, &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
461  "no-print-directory" },
462  { CHAR_MAX+5, flag, &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
463  "warn-undefined-variables" },
464  { CHAR_MAX+7, string, &sync_mutex, 1, 1, 0, 0, 0, "sync-mutex" },
465  { CHAR_MAX+8, flag_off, &silent_flag, 1, 1, 0, 0, &default_silent_flag, "no-silent" },
466  { CHAR_MAX+9, string, &jobserver_auth, 1, 0, 0, 0, 0, "jobserver-fds" },
467  { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
468  };
469 
470 /* Secondary long names for options. */
471 
472 static struct option long_option_aliases[] =
473  {
474  { "quiet", no_argument, 0, 's' },
475  { "stop", no_argument, 0, 'S' },
476  { "new-file", required_argument, 0, 'W' },
477  { "assume-new", required_argument, 0, 'W' },
478  { "assume-old", required_argument, 0, 'o' },
479  { "max-load", optional_argument, 0, 'l' },
480  { "dry-run", no_argument, 0, 'n' },
481  { "recon", no_argument, 0, 'n' },
482  { "makefile", required_argument, 0, 'f' },
483  };
484 
485 /* List of goal targets. */
486 
487 static struct goaldep *goals, *lastgoal;
488 
489 /* List of variables which were defined on the command line
490  (or, equivalently, in MAKEFLAGS). */
491 
493  {
496  };
498 ␌
499 /* The name we were invoked with. */
500 
501 const char *program;
502 
503 /* Our current directory before processing any -C options. */
504 
506 
507 /* Our current directory after processing all -C options. */
508 
510 
511 /* Value of the MAKELEVEL variable at startup (or 0). */
512 
513 unsigned int makelevel;
514 
515 /* Pointer to the value of the .DEFAULT_GOAL special variable.
516  The value will be the name of the goal to remake if the command line
517  does not override it. It can be set by the makefile, or else it's
518  the first target defined in the makefile whose name does not start
519  with '.'. */
520 
522 
523 /* Pointer to structure for the file .DEFAULT
524  whose commands are used for any file that has none of its own.
525  This is zero if the makefiles do not define .DEFAULT. */
526 
528 
529 /* Nonzero if we have seen the magic '.POSIX' target.
530  This turns on pedantic compliance with POSIX.2. */
531 
533 
534 /* Nonzero if we have seen the '.SECONDEXPANSION' target.
535  This turns on secondary expansion of prerequisites. */
536 
538 
539 /* Nonzero if we have seen the '.ONESHELL' target.
540  This causes the entire recipe to be handed to SHELL
541  as a single string, potentially containing newlines. */
542 
544 
545 /* One of OUTPUT_SYNC_* if the "--output-sync" option was given. This
546  attempts to synchronize the output of parallel jobs such that the results
547  of each job stay together. */
548 
550 
551 /* Nonzero if the "--trace" option was given. */
552 
553 int trace_flag = 0;
554 
555 /* Nonzero if we have seen the '.NOTPARALLEL' target.
556  This turns off parallel builds for this invocation of make. */
557 
559 
560 /* Nonzero if some rule detected clock skew; we keep track so (a) we only
561  print one warning about it during the run, and (b) we can print a final
562  warning at the end of the run. */
563 
565 
566 /* Map of possible stop characters for searching strings. */
567 #ifndef UCHAR_MAX
568 # define UCHAR_MAX 255
569 #endif
570 unsigned short stopchar_map[UCHAR_MAX + 1] = {0};
571 
572 /* If output-sync is enabled we'll collect all the output generated due to
573  options, while reading makefiles, etc. */
574 
575 struct output make_sync;
576 
577 ␌
578 /* Mask of signals that are being caught with fatal_error_signal. */
579 
580 #if defined(POSIX)
581 sigset_t fatal_signal_set;
582 #elif defined(HAVE_SIGSETMASK)
583 int fatal_signal_mask;
584 #endif
585 
586 #if !HAVE_DECL_BSD_SIGNAL && !defined bsd_signal
587 # if !defined HAVE_SIGACTION
588 # define bsd_signal signal
589 # else
590 typedef RETSIGTYPE (*bsd_signal_ret_t) (int);
591 
592 static bsd_signal_ret_t
593 bsd_signal (int sig, bsd_signal_ret_t func)
594 {
595  struct sigaction act, oact;
596  act.sa_handler = func;
597  act.sa_flags = SA_RESTART;
598  sigemptyset (&act.sa_mask);
599  sigaddset (&act.sa_mask, sig);
600  if (sigaction (sig, &act, &oact) != 0)
601  return SIG_ERR;
602  return oact.sa_handler;
603 }
604 # endif
605 #endif
606 
607 static void
609 {
611  strcache_init ();
612  init_hash_files ();
615 }
616 
617 /* This character map locate stop chars when parsing GNU makefiles.
618  Each element is true if we should stop parsing on that character. */
619 
620 static void
622 {
623  int i;
624 
625  stopchar_map[(int)'\0'] = MAP_NUL;
626  stopchar_map[(int)'#'] = MAP_COMMENT;
627  stopchar_map[(int)';'] = MAP_SEMI;
628  stopchar_map[(int)'='] = MAP_EQUALS;
629  stopchar_map[(int)':'] = MAP_COLON;
630  stopchar_map[(int)'|'] = MAP_PIPE;
632  stopchar_map[(int)','] = MAP_COMMA;
633  stopchar_map[(int)'('] = MAP_VARSEP;
634  stopchar_map[(int)'{'] = MAP_VARSEP;
635  stopchar_map[(int)'}'] = MAP_VARSEP;
636  stopchar_map[(int)')'] = MAP_VARSEP;
637  stopchar_map[(int)'$'] = MAP_VARIABLE;
638 
639  stopchar_map[(int)'-'] = MAP_USERFUNC;
640  stopchar_map[(int)'_'] = MAP_USERFUNC;
641 
642  stopchar_map[(int)' '] = MAP_BLANK;
643  stopchar_map[(int)'\t'] = MAP_BLANK;
644 
645  stopchar_map[(int)'/'] = MAP_DIRSEP;
646 #if defined(VMS)
647  stopchar_map[(int)':'] |= MAP_DIRSEP;
648  stopchar_map[(int)']'] |= MAP_DIRSEP;
649  stopchar_map[(int)'>'] |= MAP_DIRSEP;
650 #elif defined(HAVE_DOS_PATHS)
651  stopchar_map[(int)'\\'] |= MAP_DIRSEP;
652 #endif
653 
654  for (i = 1; i <= UCHAR_MAX; ++i)
655  {
656  if (isspace (i) && NONE_SET (stopchar_map[i], MAP_BLANK))
657  /* Don't mark blank characters as newline characters. */
659  else if (isalnum (i))
661  }
662 }
663 
664 static const char *
666 {
667  const char *cp;
668  char *expanded = 0;
669 
670  if (name[0] == '\0')
671  O (fatal, NILF, _("empty string invalid as file name"));
672 
673  if (name[0] == '~')
674  {
675  expanded = tilde_expand (name);
676  if (expanded && expanded[0] != '\0')
677  name = expanded;
678  }
679 
680  /* This is also done in parse_file_seq, so this is redundant
681  for names read from makefiles. It is here for names passed
682  on the command line. */
683  while (name[0] == '.' && name[1] == '/')
684  {
685  name += 2;
686  while (name[0] == '/')
687  /* Skip following slashes: ".//foo" is "foo", not "/foo". */
688  ++name;
689  }
690 
691  if (name[0] == '\0')
692  {
693  /* Nothing else but one or more "./", maybe plus slashes! */
694  name = "./";
695  }
696 
697  cp = strcache_add (name);
698 
699  free (expanded);
700 
701  return cp;
702 }
703 
704 /* Toggle -d on receipt of SIGUSR1. */
705 
706 #ifdef SIGUSR1
707 static RETSIGTYPE
708 debug_signal_handler (int sig UNUSED)
709 {
711 }
712 #endif
713 
714 static void
716 {
717  const char **pp;
718 
719  if (debug_flag)
720  db_level = DB_ALL;
721 
722  if (db_flags)
723  for (pp=db_flags->list; *pp; ++pp)
724  {
725  const char *p = *pp;
726 
727  while (1)
728  {
729  switch (tolower (p[0]))
730  {
731  case 'a':
732  db_level |= DB_ALL;
733  break;
734  case 'b':
735  db_level |= DB_BASIC;
736  break;
737  case 'i':
739  break;
740  case 'j':
741  db_level |= DB_JOBS;
742  break;
743  case 'm':
745  break;
746  case 'n':
747  db_level = 0;
748  break;
749  case 'v':
751  break;
752  default:
753  OS (fatal, NILF,
754  _("unknown debug level specification '%s'"), p);
755  }
756 
757  while (*(++p) != '\0')
758  if (*p == ',' || *p == ' ')
759  {
760  ++p;
761  break;
762  }
763 
764  if (*p == '\0')
765  break;
766  }
767  }
768 
769  if (db_level)
770  verify_flag = 1;
771 
772  if (! db_level)
773  debug_flag = 0;
774 }
775 
776 static void
778 {
779 #ifdef NO_OUTPUT_SYNC
781 #else
782  if (output_sync_option)
783  {
784  if (streq (output_sync_option, "none"))
786  else if (streq (output_sync_option, "line"))
788  else if (streq (output_sync_option, "target"))
790  else if (streq (output_sync_option, "recurse"))
792  else
793  OS (fatal, NILF,
794  _("unknown output-sync type '%s'"), output_sync_option);
795  }
796 
797  if (sync_mutex)
799 #endif
800 }
801 
802 #ifdef WINDOWS32
803 
804 #ifndef NO_OUTPUT_SYNC
805 
806 /* This is called from start_job_command when it detects that
807  output_sync option is in effect. The handle to the synchronization
808  mutex is passed, as a string, to sub-makes via the --sync-mutex
809  command-line argument. */
810 void
811 prepare_mutex_handle_string (sync_handle_t handle)
812 {
813  if (!sync_mutex)
814  {
815  /* Prepare the mutex handle string for our children. */
816  /* 2 hex digits per byte + 2 characters for "0x" + null. */
817  sync_mutex = xmalloc ((2 * sizeof (sync_handle_t)) + 2 + 1);
818  sprintf (sync_mutex, "0x%Ix", handle);
819  define_makeflags (1, 0);
820  }
821 }
822 
823 #endif /* NO_OUTPUT_SYNC */
824 
825 /*
826  * HANDLE runtime exceptions by avoiding a requestor on the GUI. Capture
827  * exception and print it to stderr instead.
828  *
829  * If ! DB_VERBOSE, just print a simple message and exit.
830  * If DB_VERBOSE, print a more verbose message.
831  * If compiled for DEBUG, let exception pass through to GUI so that
832  * debuggers can attach.
833  */
834 LONG WINAPI
835 handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo)
836 {
837  PEXCEPTION_RECORD exrec = exinfo->ExceptionRecord;
838  LPSTR cmdline = GetCommandLine ();
839  LPSTR prg = strtok (cmdline, " ");
840  CHAR errmsg[1024];
841 #ifdef USE_EVENT_LOG
842  HANDLE hEventSource;
843  LPTSTR lpszStrings[1];
844 #endif
845 
846  if (! ISDB (DB_VERBOSE))
847  {
848  sprintf (errmsg,
849  _("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%p)\n"),
850  prg, exrec->ExceptionCode, exrec->ExceptionAddress);
851  fprintf (stderr, errmsg);
852  exit (255);
853  }
854 
855  sprintf (errmsg,
856  _("\nUnhandled exception filter called from program %s\nExceptionCode = %lx\nExceptionFlags = %lx\nExceptionAddress = 0x%p\n"),
857  prg, exrec->ExceptionCode, exrec->ExceptionFlags,
858  exrec->ExceptionAddress);
859 
860  if (exrec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION
861  && exrec->NumberParameters >= 2)
863  (exrec->ExceptionInformation[0]
864  ? _("Access violation: write operation at address 0x%p\n")
865  : _("Access violation: read operation at address 0x%p\n")),
866  (PVOID)exrec->ExceptionInformation[1]);
867 
868  /* turn this on if we want to put stuff in the event log too */
869 #ifdef USE_EVENT_LOG
870  hEventSource = RegisterEventSource (NULL, "GNU Make");
871  lpszStrings[0] = errmsg;
872 
873  if (hEventSource != NULL)
874  {
875  ReportEvent (hEventSource, /* handle of event source */
876  EVENTLOG_ERROR_TYPE, /* event type */
877  0, /* event category */
878  0, /* event ID */
879  NULL, /* current user's SID */
880  1, /* strings in lpszStrings */
881  0, /* no bytes of raw data */
882  lpszStrings, /* array of error strings */
883  NULL); /* no raw data */
884 
885  (VOID) DeregisterEventSource (hEventSource);
886  }
887 #endif
888 
889  /* Write the error to stderr too */
890  fprintf (stderr, errmsg);
891 
892 #ifdef DEBUG
893  return EXCEPTION_CONTINUE_SEARCH;
894 #else
895  exit (255);
896  return (255); /* not reached */
897 #endif
898 }
899 
900 /*
901  * On WIN32 systems we don't have the luxury of a /bin directory that
902  * is mapped globally to every drive mounted to the system. Since make could
903  * be invoked from any drive, and we don't want to propagate /bin/sh
904  * to every single drive. Allow ourselves a chance to search for
905  * a value for default shell here (if the default path does not exist).
906  */
907 
908 int
909 find_and_set_default_shell (const char *token)
910 {
911  int sh_found = 0;
912  char *atoken = 0;
913  const char *search_token;
914  const char *tokend;
915  PATH_VAR(sh_path);
916  extern const char *default_shell;
917 
918  if (!token)
919  search_token = default_shell;
920  else
921  search_token = atoken = xstrdup (token);
922 
923  /* If the user explicitly requests the DOS cmd shell, obey that request.
924  However, make sure that's what they really want by requiring the value
925  of SHELL either equal, or have a final path element of, "cmd" or
926  "cmd.exe" case-insensitive. */
927  tokend = search_token + strlen (search_token) - 3;
928  if (((tokend == search_token
929  || (tokend > search_token
930  && (tokend[-1] == '/' || tokend[-1] == '\\')))
931  && !strcasecmp (tokend, "cmd"))
932  || ((tokend - 4 == search_token
933  || (tokend - 4 > search_token
934  && (tokend[-5] == '/' || tokend[-5] == '\\')))
935  && !strcasecmp (tokend - 4, "cmd.exe")))
936  {
937  batch_mode_shell = 1;
938  unixy_shell = 0;
939  sprintf (sh_path, "%s", search_token);
940  default_shell = xstrdup (w32ify (sh_path, 0));
941  DB (DB_VERBOSE, (_("find_and_set_shell() setting default_shell = %s\n"),
942  default_shell));
943  sh_found = 1;
944  }
945  else if (!no_default_sh_exe
946  && (token == NULL || !strcmp (search_token, default_shell)))
947  {
948  /* no new information, path already set or known */
949  sh_found = 1;
950  }
951  else if (_access (search_token, 0) == 0)
952  {
953  /* search token path was found */
954  sprintf (sh_path, "%s", search_token);
955  default_shell = xstrdup (w32ify (sh_path, 0));
956  DB (DB_VERBOSE, (_("find_and_set_shell() setting default_shell = %s\n"),
957  default_shell));
958  sh_found = 1;
959  }
960  else
961  {
962  char *p;
963  struct variable *v = lookup_variable (STRING_SIZE_TUPLE ("PATH"));
964 
965  /* Search Path for shell */
966  if (v && v->value)
967  {
968  char *ep;
969 
970  p = v->value;
971  ep = strchr (p, PATH_SEPARATOR_CHAR);
972 
973  while (ep && *ep)
974  {
975  *ep = '\0';
976 
977  sprintf (sh_path, "%s/%s", p, search_token);
978  if (_access (sh_path, 0) == 0)
979  {
980  default_shell = xstrdup (w32ify (sh_path, 0));
981  sh_found = 1;
982  *ep = PATH_SEPARATOR_CHAR;
983 
984  /* terminate loop */
985  p += strlen (p);
986  }
987  else
988  {
989  *ep = PATH_SEPARATOR_CHAR;
990  p = ++ep;
991  }
992 
993  ep = strchr (p, PATH_SEPARATOR_CHAR);
994  }
995 
996  /* be sure to check last element of Path */
997  if (p && *p)
998  {
999  sprintf (sh_path, "%s/%s", p, search_token);
1000  if (_access (sh_path, 0) == 0)
1001  {
1002  default_shell = xstrdup (w32ify (sh_path, 0));
1003  sh_found = 1;
1004  }
1005  }
1006 
1007  if (sh_found)
1008  DB (DB_VERBOSE,
1009  (_("find_and_set_shell() path search set default_shell = %s\n"),
1010  default_shell));
1011  }
1012  }
1013 
1014  /* naive test */
1015  if (!unixy_shell && sh_found
1016  && (strstr (default_shell, "sh") || strstr (default_shell, "SH")))
1017  {
1018  unixy_shell = 1;
1019  batch_mode_shell = 0;
1020  }
1021 
1022 #ifdef BATCH_MODE_ONLY_SHELL
1023  batch_mode_shell = 1;
1024 #endif
1025 
1026  free (atoken);
1027 
1028  return (sh_found);
1029 }
1030 #endif /* WINDOWS32 */
1031 
1032 #ifdef __MSDOS__
1033 static void
1034 msdos_return_to_initial_directory (void)
1035 {
1038 }
1039 #endif /* __MSDOS__ */
1040 
1041 static void
1043 {
1044  jobserver_clear ();
1045  free (jobserver_auth);
1046  jobserver_auth = NULL;
1047 }
1048 
1049 #ifdef _AMIGA
1050 int
1051 main (int argc, char **argv)
1052 #else
1053 int
1054 main (int argc, char **argv, char **envp)
1055 #endif
1056 {
1057  static char *stdin_nm = 0;
1058  int makefile_status = MAKE_SUCCESS;
1059  struct goaldep *read_files;
1060  PATH_VAR (current_directory);
1061  unsigned int restarts = 0;
1062  unsigned int syncing = 0;
1063  int argv_slots;
1064 #ifdef WINDOWS32
1065  const char *unix_path = NULL;
1066  const char *windows32_path = NULL;
1067 
1068  SetUnhandledExceptionFilter (handle_runtime_exceptions);
1069 
1070  /* start off assuming we have no shell */
1071  unixy_shell = 0;
1072  no_default_sh_exe = 1;
1073 #endif
1074 
1075  /* Useful for attaching debuggers, etc. */
1076  SPIN ("main-entry");
1077 
1079 
1081 
1082 #ifdef SET_STACK_SIZE
1083  /* Get rid of any avoidable limit on stack size. */
1084  {
1085  struct rlimit rlim;
1086 
1087  /* Set the stack limit huge so that alloca does not fail. */
1088  if (getrlimit (RLIMIT_STACK, &rlim) == 0
1089  && rlim.rlim_cur > 0 && rlim.rlim_cur < rlim.rlim_max)
1090  {
1091  stack_limit = rlim;
1092  rlim.rlim_cur = rlim.rlim_max;
1093  setrlimit (RLIMIT_STACK, &rlim);
1094  }
1095  else
1096  stack_limit.rlim_cur = 0;
1097  }
1098 #endif
1099 
1100  /* Needed for OS/2 */
1101  initialize_main (&argc, &argv);
1102 
1103 #ifdef MAKE_MAINTAINER_MODE
1104  /* In maintainer mode we always enable verification. */
1105  verify_flag = 1;
1106 #endif
1107 
1108 #if defined (__MSDOS__) && !defined (_POSIX_SOURCE)
1109  /* Request the most powerful version of 'system', to
1110  make up for the dumb default shell. */
1111  __system_flags = (__system_redirect
1112  | __system_use_shell
1113  | __system_allow_multiple_cmds
1114  | __system_allow_long_cmds
1115  | __system_handle_null_commands
1116  | __system_emulate_chdir);
1117 
1118 #endif
1119 
1120  /* Set up gettext/internationalization support. */
1121  setlocale (LC_ALL, "");
1122  /* The cast to void shuts up compiler warnings on systems that
1123  disable NLS. */
1124  (void)bindtextdomain (PACKAGE, LOCALEDIR);
1125  (void)textdomain (PACKAGE);
1126 
1127 #ifdef POSIX
1128  sigemptyset (&fatal_signal_set);
1129 #define ADD_SIG(sig) sigaddset (&fatal_signal_set, sig)
1130 #else
1131 #ifdef HAVE_SIGSETMASK
1132  fatal_signal_mask = 0;
1133 #define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig)
1134 #else
1135 #define ADD_SIG(sig) (void)sig
1136 #endif
1137 #endif
1138 
1139 #define FATAL_SIG(sig) \
1140  if (bsd_signal (sig, fatal_error_signal) == SIG_IGN) \
1141  bsd_signal (sig, SIG_IGN); \
1142  else \
1143  ADD_SIG (sig);
1144 
1145 #ifdef SIGHUP
1146  FATAL_SIG (SIGHUP);
1147 #endif
1148 #ifdef SIGQUIT
1149  FATAL_SIG (SIGQUIT);
1150 #endif
1151  FATAL_SIG (SIGINT);
1152  FATAL_SIG (SIGTERM);
1153 
1154 #ifdef __MSDOS__
1155  /* Windows 9X delivers FP exceptions in child programs to their
1156  parent! We don't want Make to die when a child divides by zero,
1157  so we work around that lossage by catching SIGFPE. */
1158  FATAL_SIG (SIGFPE);
1159 #endif
1160 
1161 #ifdef SIGDANGER
1162  FATAL_SIG (SIGDANGER);
1163 #endif
1164 #ifdef SIGXCPU
1165  FATAL_SIG (SIGXCPU);
1166 #endif
1167 #ifdef SIGXFSZ
1168  FATAL_SIG (SIGXFSZ);
1169 #endif
1170 
1171 #undef FATAL_SIG
1172 
1173  /* Do not ignore the child-death signal. This must be done before
1174  any children could possibly be created; otherwise, the wait
1175  functions won't work on systems with the SVR4 ECHILD brain
1176  damage, if our invoker is ignoring this signal. */
1177 
1178 #ifdef HAVE_WAIT_NOHANG
1179 # if defined SIGCHLD
1180  (void) bsd_signal (SIGCHLD, SIG_DFL);
1181 # endif
1182 # if defined SIGCLD && SIGCLD != SIGCHLD
1183  (void) bsd_signal (SIGCLD, SIG_DFL);
1184 # endif
1185 #endif
1186 
1187  output_init (NULL);
1188 
1189  /* Figure out where this program lives. */
1190 
1191  if (argv[0] == 0)
1192  argv[0] = (char *)"";
1193  if (argv[0][0] == '\0')
1194  program = "make";
1195  else
1196  {
1197 #if defined(HAVE_DOS_PATHS)
1198  const char* start = argv[0];
1199 
1200  /* Skip an initial drive specifier if present. */
1201  if (isalpha ((unsigned char)start[0]) && start[1] == ':')
1202  start += 2;
1203 
1204  if (start[0] == '\0')
1205  program = "make";
1206  else
1207  {
1208  program = start + strlen (start);
1209  while (program > start && ! STOP_SET (program[-1], MAP_DIRSEP))
1210  --program;
1211 
1212  /* Remove the .exe extension if present. */
1213  {
1214  size_t len = strlen (program);
1215  if (len > 4 && streq (&program[len - 4], ".exe"))
1216  program = xstrndup (program, len - 4);
1217  }
1218  }
1219 #elif defined(VMS)
1220  set_program_name (argv[0]);
1222  {
1223  const char *shell;
1224  char pwdbuf[256];
1225  char *pwd;
1226  shell = getenv ("SHELL");
1227  if (shell != NULL)
1228  vms_gnv_shell = 1;
1229 
1230  /* Need to know if CRTL set to report UNIX paths. Use getcwd as
1231  it works on all versions of VMS. */
1232  pwd = getcwd(pwdbuf, 256);
1233  if (pwd[0] == '/')
1234  vms_report_unix_paths = 1;
1235 
1236  vms_use_mcr_command = get_vms_env_flag ("GNV$MAKE_USE_MCR", 0);
1237 
1238  vms_always_use_cmd_file = get_vms_env_flag ("GNV$MAKE_USE_CMD_FILE", 0);
1239 
1240  /* Legacy behavior is on VMS is older behavior that needed to be
1241  changed to be compatible with standard make behavior.
1242  For now only completely disable when running under a Bash shell.
1243  TODO: Update VMS built in recipes and macros to not need this
1244  behavior, at which time the default may change. */
1245  vms_legacy_behavior = get_vms_env_flag ("GNV$MAKE_OLD_VMS",
1246  !vms_gnv_shell);
1247 
1248  /* VMS was changed to use a comma separator in the past, but that is
1249  incompatible with built in functions that expect space separated
1250  lists. Allow this to be selectively turned off. */
1251  vms_comma_separator = get_vms_env_flag ("GNV$MAKE_COMMA",
1252  vms_legacy_behavior);
1253 
1254  /* Some Posix shell syntax options are incompatible with VMS syntax.
1255  VMS requires double quotes for strings and escapes quotes
1256  differently. When this option is active, VMS will try
1257  to simulate Posix shell simulations instead of using
1258  VMS DCL behavior. */
1259  vms_unix_simulation = get_vms_env_flag ("GNV$MAKE_SHELL_SIM",
1260  !vms_legacy_behavior);
1261 
1262  }
1263  if (need_vms_symbol () && !vms_use_mcr_command)
1265 #else
1266  program = strrchr (argv[0], '/');
1267  if (program == 0)
1268  program = argv[0];
1269  else
1270  ++program;
1271 #endif
1272  }
1273 
1274  /* Set up to access user data (files). */
1275  user_access ();
1276 
1278 
1279  /* Figure out where we are. */
1280 
1281 #ifdef WINDOWS32
1282  if (getcwd_fs (current_directory, GET_PATH_MAX) == 0)
1283 #else
1284  if (getcwd (current_directory, GET_PATH_MAX) == 0)
1285 #endif
1286  {
1287 #ifdef HAVE_GETCWD
1288  perror_with_name ("getcwd", "");
1289 #else
1290  OS (error, NILF, "getwd: %s", current_directory);
1291 #endif
1292  current_directory[0] = '\0';
1294  }
1295  else
1296  directory_before_chdir = xstrdup (current_directory);
1297 
1298 #ifdef __MSDOS__
1299  /* Make sure we will return to the initial directory, come what may. */
1300  atexit (msdos_return_to_initial_directory);
1301 #endif
1302 
1303  /* Initialize the special variables. */
1304  define_variable_cname (".VARIABLES", "", o_default, 0)->special = 1;
1305  /* define_variable_cname (".TARGETS", "", o_default, 0)->special = 1; */
1306  define_variable_cname (".RECIPEPREFIX", "", o_default, 0)->special = 1;
1307  define_variable_cname (".SHELLFLAGS", "-c", o_default, 0);
1308  define_variable_cname (".LOADED", "", o_default, 0);
1309 
1310  /* Set up .FEATURES
1311  Use a separate variable because define_variable_cname() is a macro and
1312  some compilers (MSVC) don't like conditionals in macros. */
1313  {
1314  const char *features = "target-specific order-only second-expansion"
1315  " else-if shortest-stem undefine oneshell nocomment"
1316  " grouped-target extra-prereqs"
1317 #ifndef NO_ARCHIVES
1318  " archives"
1319 #endif
1320 #ifdef MAKE_JOBSERVER
1321  " jobserver"
1322 #endif
1323 #ifndef NO_OUTPUT_SYNC
1324  " output-sync"
1325 #endif
1326 #ifdef MAKE_SYMLINKS
1327  " check-symlink"
1328 #endif
1329 #ifdef HAVE_GUILE
1330  " guile"
1331 #endif
1332 #ifdef MAKE_LOAD
1333  " load"
1334 #endif
1335 #ifdef MAKE_MAINTAINER_MODE
1336  " maintainer"
1337 #endif
1338  ;
1339 
1340  define_variable_cname (".FEATURES", features, o_default, 0);
1341  }
1342 
1343  /* Configure GNU Guile support */
1345 
1346  /* Read in variables from the environment. It is important that this be
1347  done before $(MAKE) is figured out so its definitions will not be
1348  from the environment. */
1349 
1350 #ifndef _AMIGA
1351  {
1352  unsigned int i;
1353 
1354  for (i = 0; envp[i] != 0; ++i)
1355  {
1356  struct variable *v;
1357  const char *ep = envp[i];
1358  /* By default, export all variables culled from the environment. */
1359  enum variable_export export = v_export;
1360  size_t len;
1361 
1362  while (! STOP_SET (*ep, MAP_EQUALS))
1363  ++ep;
1364 
1365  /* If there's no equals sign it's a malformed environment. Ignore. */
1366  if (*ep == '\0')
1367  continue;
1368 
1369 #ifdef WINDOWS32
1370  if (!unix_path && strneq (envp[i], "PATH=", 5))
1371  unix_path = ep+1;
1372  else if (!strnicmp (envp[i], "Path=", 5))
1373  {
1374  if (!windows32_path)
1375  windows32_path = ep+1;
1376  /* PATH gets defined after the loop exits. */
1377  continue;
1378  }
1379 #endif
1380 
1381  /* Length of the variable name, and skip the '='. */
1382  len = ep++ - envp[i];
1383 
1384  /* If this is MAKE_RESTARTS, check to see if the "already printed
1385  the enter statement" flag is set. */
1386  if (len == 13 && strneq (envp[i], "MAKE_RESTARTS", 13))
1387  {
1388  if (*ep == '-')
1389  {
1390  OUTPUT_TRACED ();
1391  ++ep;
1392  }
1393  restarts = (unsigned int) atoi (ep);
1394  export = v_noexport;
1395  }
1396 
1397  v = define_variable (envp[i], len, ep, o_env, 1);
1398 
1399  /* POSIX says the value of SHELL set in the makefile won't change the
1400  value of SHELL given to subprocesses. */
1401  if (streq (v->name, "SHELL"))
1402  {
1403 #ifndef __MSDOS__
1404  export = v_noexport;
1405 #endif
1406  shell_var.name = xstrdup ("SHELL");
1407  shell_var.length = 5;
1408  shell_var.value = xstrdup (ep);
1409  }
1410 
1411  v->export = export;
1412  }
1413  }
1414 #ifdef WINDOWS32
1415  /* If we didn't find a correctly spelled PATH we define PATH as
1416  * either the first misspelled value or an empty string
1417  */
1418  if (!unix_path)
1419  define_variable_cname ("PATH", windows32_path ? windows32_path : "",
1420  o_env, 1)->export = v_export;
1421 #endif
1422 #else /* For Amiga, read the ENV: device, ignoring all dirs */
1423  {
1424  BPTR env, file, old;
1425  char buffer[1024];
1426  int len;
1427  __aligned struct FileInfoBlock fib;
1428 
1429  env = Lock ("ENV:", ACCESS_READ);
1430  if (env)
1431  {
1432  old = CurrentDir (DupLock (env));
1433  Examine (env, &fib);
1434 
1435  while (ExNext (env, &fib))
1436  {
1437  if (fib.fib_DirEntryType < 0) /* File */
1438  {
1439  /* Define an empty variable. It will be filled in
1440  variable_lookup(). Makes startup quite a bit faster. */
1441  define_variable (fib.fib_FileName,
1442  strlen (fib.fib_FileName),
1443  "", o_env, 1)->export = v_export;
1444  }
1445  }
1446  UnLock (env);
1447  UnLock (CurrentDir (old));
1448  }
1449  }
1450 #endif
1451 
1452  /* Decode the switches. */
1453  decode_env_switches (STRING_SIZE_TUPLE ("GNUMAKEFLAGS"));
1454 
1455  /* Clear GNUMAKEFLAGS to avoid duplication. */
1456  define_variable_cname ("GNUMAKEFLAGS", "", o_env, 0);
1457 
1458  decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
1459 
1460 #if 0
1461  /* People write things like:
1462  MFLAGS="CC=gcc -pipe" "CFLAGS=-g"
1463  and we set the -p, -i and -e switches. Doesn't seem quite right. */
1465 #endif
1466 
1467  /* In output sync mode we need to sync any output generated by reading the
1468  makefiles, such as in $(info ...) or stderr from $(shell ...) etc. */
1469 
1472  OUTPUT_SET (&make_sync);
1473 
1474  /* Parse the command line options. Remember the job slots set this way. */
1475  {
1476  int env_slots = arg_job_slots;
1478 
1479  decode_switches (argc, (const char **)argv, 0);
1480  argv_slots = arg_job_slots;
1481 
1483  arg_job_slots = env_slots;
1484  }
1485 
1486  /* Set a variable specifying whether stdout/stdin is hooked to a TTY. */
1487 #ifdef HAVE_ISATTY
1488  if (isatty (fileno (stdout)))
1489  if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
1490  {
1491  const char *tty = TTYNAME (fileno (stdout));
1492  define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
1493  o_default, 0)->export = v_export;
1494  }
1495  if (isatty (fileno (stderr)))
1496  if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
1497  {
1498  const char *tty = TTYNAME (fileno (stderr));
1499  define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
1500  o_default, 0)->export = v_export;
1501  }
1502 #endif
1503 
1504  /* Reset in case the switches changed our minds. */
1505  syncing = (output_sync == OUTPUT_SYNC_LINE
1507 
1508  if (make_sync.syncout && ! syncing)
1510 
1511  make_sync.syncout = syncing;
1512  OUTPUT_SET (&make_sync);
1513 
1514  /* Figure out the level of recursion. */
1515  {
1517  if (v && v->value[0] != '\0' && v->value[0] != '-')
1518  makelevel = (unsigned int) atoi (v->value);
1519  else
1520  makelevel = 0;
1521  }
1522 
1523  /* Set always_make_flag if -B was given and we've not restarted already. */
1524  always_make_flag = always_make_set && (restarts == 0);
1525 
1526  /* Print version information, and exit. */
1527  if (print_version_flag)
1528  {
1529  print_version ();
1530  die (MAKE_SUCCESS);
1531  }
1532 
1533  if (ISDB (DB_BASIC))
1534  print_version ();
1535 
1536 #ifndef VMS
1537  /* Set the "MAKE_COMMAND" variable to the name we were invoked with.
1538  (If it is a relative pathname with a slash, prepend our directory name
1539  so the result will run the same program regardless of the current dir.
1540  If it is a name with no slash, we can only hope that PATH did not
1541  find it in the current directory.) */
1542 #ifdef WINDOWS32
1543  /*
1544  * Convert from backslashes to forward slashes for
1545  * programs like sh which don't like them. Shouldn't
1546  * matter if the path is one way or the other for
1547  * CreateProcess().
1548  */
1549  if (strpbrk (argv[0], "/:\\") || strstr (argv[0], "..")
1550  || strneq (argv[0], "//", 2))
1551  argv[0] = xstrdup (w32ify (argv[0], 1));
1552 #else /* WINDOWS32 */
1553 #if defined (__MSDOS__) || defined (__EMX__)
1554  if (strchr (argv[0], '\\'))
1555  {
1556  char *p;
1557 
1558  argv[0] = xstrdup (argv[0]);
1559  for (p = argv[0]; *p; p++)
1560  if (*p == '\\')
1561  *p = '/';
1562  }
1563  /* If argv[0] is not in absolute form, prepend the current
1564  directory. This can happen when Make is invoked by another DJGPP
1565  program that uses a non-absolute name. */
1566  if (current_directory[0] != '\0'
1567  && argv[0] != 0
1568  && (argv[0][0] != '/' && (argv[0][0] == '\0' || argv[0][1] != ':'))
1569 # ifdef __EMX__
1570  /* do not prepend cwd if argv[0] contains no '/', e.g. "make" */
1571  && (strchr (argv[0], '/') != 0 || strchr (argv[0], '\\') != 0)
1572 # endif
1573  )
1574  argv[0] = xstrdup (concat (3, current_directory, "/", argv[0]));
1575 #else /* !__MSDOS__ */
1576  if (current_directory[0] != '\0'
1577  && argv[0] != 0 && argv[0][0] != '/' && strchr (argv[0], '/') != 0
1578 #ifdef HAVE_DOS_PATHS
1579  && (argv[0][0] != '\\' && (!argv[0][0] || argv[0][1] != ':'))
1580  && strchr (argv[0], '\\') != 0
1581 #endif
1582  )
1583  argv[0] = xstrdup (concat (3, current_directory, "/", argv[0]));
1584 #endif /* !__MSDOS__ */
1585 #endif /* WINDOWS32 */
1586 #endif
1587 
1588  /* We may move, but until we do, here we are. */
1589  starting_directory = current_directory;
1590 
1591  /* Validate the arg_job_slots configuration before we define MAKEFLAGS so
1592  users get an accurate value in their makefiles.
1593  At this point arg_job_slots is the argv setting, if there is one, else
1594  the MAKEFLAGS env setting, if there is one. */
1595 
1596  if (jobserver_auth)
1597  {
1598  /* We're a child in an existing jobserver group. */
1599  if (argv_slots == INVALID_JOB_SLOTS)
1600  {
1601  /* There's no -j option on the command line: check authorization. */
1603  {
1604  /* Success! Use the jobserver. */
1605  goto job_setup_complete;
1606  }
1607 
1608  /* Oops: we have jobserver-auth but it's invalid :(. */
1609  O (error, NILF, _("warning: jobserver unavailable: using -j1. Add '+' to parent make rule."));
1610  arg_job_slots = 1;
1611  }
1612 
1613  /* The user provided a -j setting on the command line so use it: we're
1614  the master make of a new jobserver group. */
1615  else if (!restarts)
1616  ON (error, NILF,
1617  _("warning: -j%d forced in submake: resetting jobserver mode."),
1618  argv_slots);
1619 
1620  /* We can't use our parent's jobserver, so reset. */
1621  reset_jobserver ();
1622  }
1623 
1624  job_setup_complete:
1625 
1626  /* The extra indirection through $(MAKE_COMMAND) is done
1627  for hysterical raisins. */
1628 
1629 #ifdef VMS
1630  if (vms_use_mcr_command)
1631  define_variable_cname ("MAKE_COMMAND", vms_command (argv[0]), o_default, 0);
1632  else
1633  define_variable_cname ("MAKE_COMMAND", program, o_default, 0);
1634 #else
1635  define_variable_cname ("MAKE_COMMAND", argv[0], o_default, 0);
1636 #endif
1637  define_variable_cname ("MAKE", "$(MAKE_COMMAND)", o_default, 1);
1638 
1639  if (command_variables != 0)
1640  {
1641  struct command_variable *cv;
1642  struct variable *v;
1643  size_t len = 0;
1644  char *value, *p;
1645 
1646  /* Figure out how much space will be taken up by the command-line
1647  variable definitions. */
1648  for (cv = command_variables; cv != 0; cv = cv->next)
1649  {
1650  v = cv->variable;
1651  len += 2 * strlen (v->name);
1652  if (! v->recursive)
1653  ++len;
1654  ++len;
1655  len += 2 * strlen (v->value);
1656  ++len;
1657  }
1658 
1659  /* Now allocate a buffer big enough and fill it. */
1660  p = value = alloca (len);
1661  for (cv = command_variables; cv != 0; cv = cv->next)
1662  {
1663  v = cv->variable;
1664  p = quote_for_env (p, v->name);
1665  if (! v->recursive)
1666  *p++ = ':';
1667  *p++ = '=';
1668  p = quote_for_env (p, v->value);
1669  *p++ = ' ';
1670  }
1671  p[-1] = '\0'; /* Kill the final space and terminate. */
1672 
1673  /* Define an unchangeable variable with a name that no POSIX.2
1674  makefile could validly use for its own variable. */
1675  define_variable_cname ("-*-command-variables-*-", value, o_automatic, 0);
1676 
1677  /* Define the variable; this will not override any user definition.
1678  Normally a reference to this variable is written into the value of
1679  MAKEFLAGS, allowing the user to override this value to affect the
1680  exported value of MAKEFLAGS. In POSIX-pedantic mode, we cannot
1681  allow the user's setting of MAKEOVERRIDES to affect MAKEFLAGS, so
1682  a reference to this hidden variable is written instead. */
1683  define_variable_cname ("MAKEOVERRIDES", "${-*-command-variables-*-}",
1684  o_env, 1);
1685 #ifdef VMS
1686  vms_export_dcl_symbol ("MAKEOVERRIDES", "${-*-command-variables-*-}");
1687 #endif
1688  }
1689 
1690  /* If there were -C flags, move ourselves about. */
1691  if (directories != 0)
1692  {
1693  unsigned int i;
1694  for (i = 0; directories->list[i] != 0; ++i)
1695  {
1696  const char *dir = directories->list[i];
1697 #ifdef WINDOWS32
1698  /* WINDOWS32 chdir() doesn't work if the directory has a trailing '/'
1699  But allow -C/ just in case someone wants that. */
1700  {
1701  char *p = (char *)dir + strlen (dir) - 1;
1702  while (p > dir && (p[0] == '/' || p[0] == '\\'))
1703  --p;
1704  p[1] = '\0';
1705  }
1706 #endif
1707  if (chdir (dir) < 0)
1709  }
1710  }
1711 
1712 #ifdef WINDOWS32
1713  /*
1714  * THIS BLOCK OF CODE MUST COME AFTER chdir() CALL ABOVE IN ORDER
1715  * TO NOT CONFUSE THE DEPENDENCY CHECKING CODE IN implicit.c.
1716  *
1717  * The functions in dir.c can incorrectly cache information for "."
1718  * before we have changed directory and this can cause file
1719  * lookups to fail because the current directory (.) was pointing
1720  * at the wrong place when it was first evaluated.
1721  */
1722  no_default_sh_exe = !find_and_set_default_shell (NULL);
1723 #endif /* WINDOWS32 */
1724 
1725  /* Except under -s, always do -w in sub-makes and under -C. */
1726  if (!silent_flag && (directories != 0 || makelevel > 0))
1728 
1729  /* Let the user disable that with --no-print-directory. */
1732 
1733  /* If -R was given, set -r too (doesn't make sense otherwise!) */
1736 
1737  /* Construct the list of include directories to search. */
1738 
1740  ? 0 : include_directories->list);
1741 
1742  /* If we chdir'ed, figure out where we are now. */
1743  if (directories)
1744  {
1745 #ifdef WINDOWS32
1746  if (getcwd_fs (current_directory, GET_PATH_MAX) == 0)
1747 #else
1748  if (getcwd (current_directory, GET_PATH_MAX) == 0)
1749 #endif
1750  {
1751 #ifdef HAVE_GETCWD
1752  perror_with_name ("getcwd", "");
1753 #else
1754  OS (error, NILF, "getwd: %s", current_directory);
1755 #endif
1756  starting_directory = 0;
1757  }
1758  else
1759  starting_directory = current_directory;
1760  }
1761 
1762  define_variable_cname ("CURDIR", current_directory, o_file, 0);
1763 
1764  /* Read any stdin makefiles into temporary files. */
1765 
1766  if (makefiles != 0)
1767  {
1768  unsigned int i;
1769  for (i = 0; i < makefiles->idx; ++i)
1770  if (makefiles->list[i][0] == '-' && makefiles->list[i][1] == '\0')
1771  {
1772  /* This makefile is standard input. Since we may re-exec
1773  and thus re-read the makefiles, we read standard input
1774  into a temporary file and read from that. */
1775  FILE *outfile;
1776  char *template;
1777  const char *tmpdir;
1778 
1779  if (stdin_nm)
1780  O (fatal, NILF,
1781  _("Makefile from standard input specified twice."));
1782 
1783 #ifdef VMS
1784 # define DEFAULT_TMPDIR "/sys$scratch/"
1785 #else
1786 # ifdef P_tmpdir
1787 # define DEFAULT_TMPDIR P_tmpdir
1788 # else
1789 # define DEFAULT_TMPDIR "/tmp"
1790 # endif
1791 #endif
1792 #define DEFAULT_TMPFILE "GmXXXXXX"
1793 
1794  if (((tmpdir = getenv ("TMPDIR")) == NULL || *tmpdir == '\0')
1795 #if defined (__MSDOS__) || defined (WINDOWS32) || defined (__EMX__)
1796  /* These are also used commonly on these platforms. */
1797  && ((tmpdir = getenv ("TEMP")) == NULL || *tmpdir == '\0')
1798  && ((tmpdir = getenv ("TMP")) == NULL || *tmpdir == '\0')
1799 #endif
1800  )
1802 
1803  template = alloca (strlen (tmpdir) + CSTRLEN (DEFAULT_TMPFILE) + 2);
1804  strcpy (template, tmpdir);
1805 
1806 #ifdef HAVE_DOS_PATHS
1807  if (strchr ("/\\", template[strlen (template) - 1]) == NULL)
1808  strcat (template, "/");
1809 #else
1810 # ifndef VMS
1811  if (template[strlen (template) - 1] != '/')
1812  strcat (template, "/");
1813 # endif /* !VMS */
1814 #endif /* !HAVE_DOS_PATHS */
1815 
1816  strcat (template, DEFAULT_TMPFILE);
1817  outfile = get_tmpfile (&stdin_nm, template);
1818  if (outfile == 0)
1819  pfatal_with_name (_("fopen (temporary file)"));
1820  while (!feof (stdin) && ! ferror (stdin))
1821  {
1822  char buf[2048];
1823  size_t n = fread (buf, 1, sizeof (buf), stdin);
1824  if (n > 0 && fwrite (buf, 1, n, outfile) != n)
1825  pfatal_with_name (_("fwrite (temporary file)"));
1826  }
1827  fclose (outfile);
1828 
1829  /* Replace the name that read_all_makefiles will
1830  see with the name of the temporary file. */
1831  makefiles->list[i] = strcache_add (stdin_nm);
1832 
1833  /* Make sure the temporary file will not be remade. */
1834  {
1835  struct file *f = enter_file (strcache_add (stdin_nm));
1836  f->updated = 1;
1837  f->update_status = us_success;
1838  f->command_state = cs_finished;
1839  /* Can't be intermediate, or it'll be removed too early for
1840  make re-exec. */
1841  f->intermediate = 0;
1842  f->dontcare = 0;
1843  }
1844  }
1845  }
1846 
1847 #ifndef __EMX__ /* Don't use a SIGCHLD handler for OS/2 */
1848 #if !defined(HAVE_WAIT_NOHANG) || defined(MAKE_JOBSERVER)
1849  /* Set up to handle children dying. This must be done before
1850  reading in the makefiles so that 'shell' function calls will work.
1851 
1852  If we don't have a hanging wait we have to fall back to old, broken
1853  functionality here and rely on the signal handler and counting
1854  children.
1855 
1856  If we're using the jobs pipe we need a signal handler so that SIGCHLD is
1857  not ignored; we need it to interrupt the read(2) of the jobserver pipe if
1858  we're waiting for a token.
1859 
1860  If none of these are true, we don't need a signal handler at all. */
1861  {
1862 # if defined SIGCHLD
1864 # endif
1865 # if defined SIGCLD && SIGCLD != SIGCHLD
1866  bsd_signal (SIGCLD, child_handler);
1867 # endif
1868  }
1869 
1870 #ifdef HAVE_PSELECT
1871  /* If we have pselect() then we need to block SIGCHLD so it's deferred. */
1872  {
1873  sigset_t block;
1874  sigemptyset (&block);
1875  sigaddset (&block, SIGCHLD);
1876  if (sigprocmask (SIG_SETMASK, &block, NULL) < 0)
1877  pfatal_with_name ("sigprocmask(SIG_SETMASK, SIGCHLD)");
1878  }
1879 #endif
1880 
1881 #endif
1882 #endif
1883 
1884  /* Let the user send us SIGUSR1 to toggle the -d flag during the run. */
1885 #ifdef SIGUSR1
1886  bsd_signal (SIGUSR1, debug_signal_handler);
1887 #endif
1888 
1889  /* Define the initial list of suffixes for old-style rules. */
1891 
1892  /* Define the file rules for the built-in suffix rules. These will later
1893  be converted into pattern rules. We used to do this in
1894  install_default_implicit_rules, but since that happens after reading
1895  makefiles, it results in the built-in pattern rules taking precedence
1896  over makefile-specified suffix rules, which is wrong. */
1898 
1899  /* Define some internal and special variables. */
1901 
1902  /* Set up the MAKEFLAGS and MFLAGS variables for makefiles to see.
1903  Initialize it to be exported but allow the makefile to reset it. */
1904  define_makeflags (0, 0)->export = v_export;
1905 
1906  /* Define the default variables. */
1908 
1909  default_file = enter_file (strcache_add (".DEFAULT"));
1910 
1911  default_goal_var = define_variable_cname (".DEFAULT_GOAL", "", o_file, 0);
1912 
1913  /* Evaluate all strings provided with --eval.
1914  Also set up the $(-*-eval-flags-*-) variable. */
1915 
1916  if (eval_strings)
1917  {
1918  char *p, *value;
1919  unsigned int i;
1920  size_t len = (CSTRLEN ("--eval=") + 1) * eval_strings->idx;
1921 
1922  for (i = 0; i < eval_strings->idx; ++i)
1923  {
1924  p = xstrdup (eval_strings->list[i]);
1925  len += 2 * strlen (p);
1926  eval_buffer (p, NULL);
1927  free (p);
1928  }
1929 
1930  p = value = alloca (len);
1931  for (i = 0; i < eval_strings->idx; ++i)
1932  {
1933  strcpy (p, "--eval=");
1934  p += CSTRLEN ("--eval=");
1936  *(p++) = ' ';
1937  }
1938  p[-1] = '\0';
1939 
1940  define_variable_cname ("-*-eval-flags-*-", value, o_automatic, 0);
1941  }
1942 
1943  /* Read all the makefiles. */
1944 
1946 
1947 #ifdef WINDOWS32
1948  /* look one last time after reading all Makefiles */
1949  if (no_default_sh_exe)
1950  no_default_sh_exe = !find_and_set_default_shell (NULL);
1951 #endif /* WINDOWS32 */
1952 
1953 #if defined (__MSDOS__) || defined (__EMX__) || defined (VMS)
1954  /* We need to know what kind of shell we will be using. */
1955  {
1956  extern int _is_unixy_shell (const char *_path);
1957  struct variable *shv = lookup_variable (STRING_SIZE_TUPLE ("SHELL"));
1958  extern int unixy_shell;
1959  extern const char *default_shell;
1960 
1961  if (shv && *shv->value)
1962  {
1963  char *shell_path = recursively_expand (shv);
1964 
1965  if (shell_path && _is_unixy_shell (shell_path))
1966  unixy_shell = 1;
1967  else
1968  unixy_shell = 0;
1969  if (shell_path)
1970  default_shell = shell_path;
1971  }
1972  }
1973 #endif /* __MSDOS__ || __EMX__ */
1974 
1975  {
1976  int old_builtin_rules_flag = no_builtin_rules_flag;
1977  int old_builtin_variables_flag = no_builtin_variables_flag;
1978  int old_arg_job_slots = arg_job_slots;
1979 
1981 
1982  /* Decode switches again, for variables set by the makefile. */
1983  decode_env_switches (STRING_SIZE_TUPLE ("GNUMAKEFLAGS"));
1984 
1985  /* Clear GNUMAKEFLAGS to avoid duplication. */
1986  define_variable_cname ("GNUMAKEFLAGS", "", o_override, 0);
1987 
1988  decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
1989 #if 0
1991 #endif
1992 
1993  /* If -j is not set in the makefile, or it was set on the command line,
1994  reset to use the previous value. */
1995  if (arg_job_slots == INVALID_JOB_SLOTS || argv_slots != INVALID_JOB_SLOTS)
1996  arg_job_slots = old_arg_job_slots;
1997 
1998  else if (jobserver_auth)
1999  {
2000  /* Makefile MAKEFLAGS set -j, but we already have a jobserver.
2001  Make us the master of a new jobserver group. */
2002  if (!restarts)
2003  ON (error, NILF,
2004  _("warning: -j%d forced in makefile: resetting jobserver mode."),
2005  arg_job_slots);
2006 
2007  /* We can't use our parent's jobserver, so reset. */
2008  reset_jobserver ();
2009  }
2010 
2011  /* Reset in case the switches changed our mind. */
2012  syncing = (output_sync == OUTPUT_SYNC_LINE
2014 
2015  if (make_sync.syncout && ! syncing)
2017 
2018  make_sync.syncout = syncing;
2019  OUTPUT_SET (&make_sync);
2020 
2021  /* If we've disabled builtin rules, get rid of them. */
2022  if (no_builtin_rules_flag && ! old_builtin_rules_flag)
2023  {
2024  if (suffix_file->builtin)
2025  {
2027  suffix_file->deps = 0;
2028  }
2029  define_variable_cname ("SUFFIXES", "", o_default, 0);
2030  }
2031 
2032  /* If we've disabled builtin variables, get rid of them. */
2033  if (no_builtin_variables_flag && ! old_builtin_variables_flag)
2035  }
2036 
2037  /* Final jobserver configuration.
2038 
2039  If we have jobserver_auth then we are a client in an existing jobserver
2040  group, that's already been verified OK above. If we don't have
2041  jobserver_auth and jobserver is enabled, then start a new jobserver.
2042 
2043  arg_job_slots = INVALID_JOB_SLOTS if we don't want -j in MAKEFLAGS
2044 
2045  arg_job_slots = # of jobs of parallelism
2046 
2047  job_slots = 0 for no limits on jobs, or when limiting via jobserver.
2048 
2049  job_slots = 1 for standard non-parallel mode.
2050 
2051  job_slots >1 for old-style parallelism without jobservers. */
2052 
2053  if (jobserver_auth)
2054  job_slots = 0;
2055  else if (arg_job_slots == INVALID_JOB_SLOTS)
2056  job_slots = 1;
2057  else
2059 
2060 #if defined (__MSDOS__) || defined (__EMX__) || defined (VMS)
2061  if (job_slots != 1
2062 # ifdef __EMX__
2063  && _osmode != OS2_MODE /* turn off -j if we are in DOS mode */
2064 # endif
2065  )
2066  {
2067  O (error, NILF,
2068  _("Parallel jobs (-j) are not supported on this platform."));
2069  O (error, NILF, _("Resetting to single job (-j1) mode."));
2071  job_slots = 1;
2072  }
2073 #endif
2074 
2075  /* If we have >1 slot at this point, then we're a top-level make.
2076  Set up the jobserver.
2077 
2078  Every make assumes that it always has one job it can run. For the
2079  submakes it's the token they were given by their parent. For the top
2080  make, we just subtract one from the number the user wants. */
2081 
2082  if (job_slots > 1 && jobserver_setup (job_slots - 1))
2083  {
2084  /* Fill in the jobserver_auth for our children. */
2086 
2087  if (jobserver_auth)
2088  {
2089  /* We're using the jobserver so set job_slots to 0. */
2091  job_slots = 0;
2092  }
2093  }
2094 
2095  /* If we're not using parallel jobs, then we don't need output sync.
2096  This is so people can enable output sync in GNUMAKEFLAGS or similar, but
2097  not have it take effect unless parallel builds are enabled. */
2098  if (syncing && job_slots == 1)
2099  {
2100  OUTPUT_UNSET ();
2102  syncing = 0;
2104  }
2105 
2106 #ifndef MAKE_SYMLINKS
2107  if (check_symlink_flag)
2108  {
2109  O (error, NILF, _("Symbolic links not supported: disabling -L."));
2110  check_symlink_flag = 0;
2111  }
2112 #endif
2113 
2114  /* Set up MAKEFLAGS and MFLAGS again, so they will be right. */
2115 
2116  define_makeflags (1, 0);
2117 
2118  /* Make each 'struct goaldep' point at the 'struct file' for the file
2119  depended on. Also do magic for special targets. */
2120 
2121  snap_deps ();
2122 
2123  /* Convert old-style suffix rules to pattern rules. It is important to
2124  do this before installing the built-in pattern rules below, so that
2125  makefile-specified suffix rules take precedence over built-in pattern
2126  rules. */
2127 
2128  convert_to_pattern ();
2129 
2130  /* Install the default implicit pattern rules.
2131  This used to be done before reading the makefiles.
2132  But in that case, built-in pattern rules were in the chain
2133  before user-defined ones, so they matched first. */
2134 
2136 
2137  /* Compute implicit rule limits and do magic for pattern rules. */
2138 
2140 
2141  /* Construct the listings of directories in VPATH lists. */
2142 
2143  build_vpath_lists ();
2144 
2145  /* Mark files given with -o flags as very old and as having been updated
2146  already, and files given with -W flags as brand new (time-stamp as far
2147  as possible into the future). If restarts is set we'll do -W later. */
2148 
2149  if (old_files != 0)
2150  {
2151  const char **p;
2152  for (p = old_files->list; *p != 0; ++p)
2153  {
2154  struct file *f = enter_file (*p);
2155  f->last_mtime = f->mtime_before_update = OLD_MTIME;
2156  f->updated = 1;
2157  f->update_status = us_success;
2158  f->command_state = cs_finished;
2159  }
2160  }
2161 
2162  if (!restarts && new_files != 0)
2163  {
2164  const char **p;
2165  for (p = new_files->list; *p != 0; ++p)
2166  {
2167  struct file *f = enter_file (*p);
2168  f->last_mtime = f->mtime_before_update = NEW_MTIME;
2169  }
2170  }
2171 
2172  /* Initialize the remote job module. */
2173  remote_setup ();
2174 
2175  /* Dump any output we've collected. */
2176 
2177  OUTPUT_UNSET ();
2179 
2180  if (read_files)
2181  {
2182  /* Update any makefiles if necessary. */
2183 
2184  FILE_TIMESTAMP *makefile_mtimes;
2185  char **aargv = NULL;
2186  const char **nargv;
2187  int nargc;
2188  enum update_status status;
2189 
2190  DB (DB_BASIC, (_("Updating makefiles....\n")));
2191 
2192  {
2193  struct goaldep *d;
2194  unsigned int num_mkfiles = 0;
2195  for (d = read_files; d != NULL; d = d->next)
2196  ++num_mkfiles;
2197 
2198  makefile_mtimes = alloca (num_mkfiles * sizeof (FILE_TIMESTAMP));
2199  }
2200 
2201  /* Remove any makefiles we don't want to try to update. Record the
2202  current modtimes of the others so we can compare them later. */
2203  {
2204  struct goaldep *d = read_files;
2205  struct goaldep *last = NULL;
2206  unsigned int mm_idx = 0;
2207 
2208  while (d != 0)
2209  {
2210  struct file *f;
2211 
2212  for (f = d->file->double_colon; f != NULL; f = f->prev)
2213  if (f->deps == 0 && f->cmds != 0)
2214  break;
2215 
2216  if (f)
2217  {
2218  /* This makefile is a :: target with commands, but no
2219  dependencies. So, it will always be remade. This might
2220  well cause an infinite loop, so don't try to remake it.
2221  (This will only happen if your makefiles are written
2222  exceptionally stupidly; but if you work for Athena, that's
2223  how you write your makefiles.) */
2224 
2225  DB (DB_VERBOSE,
2226  (_("Makefile '%s' might loop; not remaking it.\n"),
2227  f->name));
2228 
2229  if (last)
2230  last->next = d->next;
2231  else
2232  read_files = d->next;
2233 
2234  /* Free the storage. */
2235  free_goaldep (d);
2236 
2237  d = last ? last->next : read_files;
2238  }
2239  else
2240  {
2241  makefile_mtimes[mm_idx++] = file_mtime_no_search (d->file);
2242  last = d;
2243  d = d->next;
2244  }
2245  }
2246  }
2247 
2248  /* Set up 'MAKEFLAGS' specially while remaking makefiles. */
2249  define_makeflags (1, 1);
2250 
2251  {
2252  int orig_db_level = db_level;
2253 
2254  if (! ISDB (DB_MAKEFILES))
2255  db_level = DB_NONE;
2256 
2260 
2261  db_level = orig_db_level;
2262  }
2263 
2264  switch (status)
2265  {
2266  case us_question:
2267  /* The only way this can happen is if the user specified -q and asked
2268  for one of the makefiles to be remade as a target on the command
2269  line. Since we're not actually updating anything with -q we can
2270  treat this as "did nothing". */
2271 
2272  case us_none:
2273  /* Did nothing. */
2274  break;
2275 
2276  case us_failed:
2277  /* Failed to update. Figure out if we care. */
2278  {
2279  /* Nonzero if any makefile was successfully remade. */
2280  int any_remade = 0;
2281  /* Nonzero if any makefile we care about failed
2282  in updating or could not be found at all. */
2283  int any_failed = 0;
2284  unsigned int i;
2285  struct goaldep *d;
2286 
2287  for (i = 0, d = read_files; d != 0; ++i, d = d->next)
2288  {
2289  if (d->file->updated)
2290  {
2291  /* This makefile was updated. */
2292  if (d->file->update_status == us_success)
2293  {
2294  /* It was successfully updated. */
2295  any_remade |= (file_mtime_no_search (d->file)
2296  != makefile_mtimes[i]);
2297  }
2298  else if (! (d->flags & RM_DONTCARE))
2299  {
2301  /* The update failed and this makefile was not
2302  from the MAKEFILES variable, so we care. */
2303  OS (error, NILF, _("Failed to remake makefile '%s'."),
2304  d->file->name);
2305  mtime = file_mtime_no_search (d->file);
2306  any_remade |= (mtime != NONEXISTENT_MTIME
2307  && mtime != makefile_mtimes[i]);
2308  makefile_status = MAKE_FAILURE;
2309  }
2310  }
2311  else
2312  /* This makefile was not found at all. */
2313  if (! (d->flags & RM_DONTCARE))
2314  {
2315  const char *dnm = dep_name (d);
2316  size_t l = strlen (dnm);
2317 
2318  /* This is a makefile we care about. See how much. */
2319  if (d->flags & RM_INCLUDED)
2320  /* An included makefile. We don't need to die, but we
2321  do want to complain. */
2322  error (NILF, l,
2323  _("Included makefile '%s' was not found."), dnm);
2324  else
2325  {
2326  /* A normal makefile. We must die later. */
2327  error (NILF, l,
2328  _("Makefile '%s' was not found"), dnm);
2329  any_failed = 1;
2330  }
2331  }
2332  }
2333 
2334  if (any_remade)
2335  goto re_exec;
2336  if (any_failed)
2337  die (MAKE_FAILURE);
2338  break;
2339  }
2340 
2341  case us_success:
2342  re_exec:
2343  /* Updated successfully. Re-exec ourselves. */
2344 
2346 
2348  print_data_base ();
2349 
2350  clean_jobserver (0);
2351 
2352  if (makefiles != 0)
2353  {
2354  /* These names might have changed. */
2355  int i, j = 0;
2356  for (i = 1; i < argc; ++i)
2357  if (strneq (argv[i], "-f", 2)) /* XXX */
2358  {
2359  if (argv[i][2] == '\0')
2360  /* This cast is OK since we never modify argv. */
2361  argv[++i] = (char *) makefiles->list[j];
2362  else
2363  argv[i] = xstrdup (concat (2, "-f", makefiles->list[j]));
2364  ++j;
2365  }
2366  }
2367 
2368  /* Add -o option for the stdin temporary file, if necessary. */
2369  nargc = argc;
2370  if (stdin_nm)
2371  {
2372  void *m = xmalloc ((nargc + 2) * sizeof (char *));
2373  aargv = m;
2374  memcpy (aargv, argv, argc * sizeof (char *));
2375  aargv[nargc++] = xstrdup (concat (2, "-o", stdin_nm));
2376  aargv[nargc] = 0;
2377  nargv = m;
2378  }
2379  else
2380  nargv = (const char**)argv;
2381 
2382  if (directories != 0 && directories->idx > 0)
2383  {
2384  int bad = 1;
2385  if (directory_before_chdir != 0)
2386  {
2387  if (chdir (directory_before_chdir) < 0)
2388  perror_with_name ("chdir", "");
2389  else
2390  bad = 0;
2391  }
2392  if (bad)
2393  O (fatal, NILF,
2394  _("Couldn't change back to original directory."));
2395  }
2396 
2397  ++restarts;
2398 
2399  if (ISDB (DB_BASIC))
2400  {
2401  const char **p;
2402  printf (_("Re-executing[%u]:"), restarts);
2403  for (p = nargv; *p != 0; ++p)
2404  printf (" %s", *p);
2405  putchar ('\n');
2406  fflush (stdout);
2407  }
2408 
2409 #ifndef _AMIGA
2410  {
2411  char **p;
2412  for (p = environ; *p != 0; ++p)
2413  {
2414  if (strneq (*p, MAKELEVEL_NAME "=", MAKELEVEL_LENGTH+1))
2415  {
2416  *p = alloca (40);
2417  sprintf (*p, "%s=%u", MAKELEVEL_NAME, makelevel);
2418 #ifdef VMS
2419  vms_putenv_symbol (*p);
2420 #endif
2421  }
2422  else if (strneq (*p, "MAKE_RESTARTS=", CSTRLEN ("MAKE_RESTARTS=")))
2423  {
2424  *p = alloca (40);
2425  sprintf (*p, "MAKE_RESTARTS=%s%u",
2426  OUTPUT_IS_TRACED () ? "-" : "", restarts);
2427  restarts = 0;
2428  }
2429  }
2430  }
2431 #else /* AMIGA */
2432  {
2433  char buffer[256];
2434 
2435  sprintf (buffer, "%u", makelevel);
2436  SetVar (MAKELEVEL_NAME, buffer, -1, GVF_GLOBAL_ONLY);
2437 
2438  sprintf (buffer, "%s%u", OUTPUT_IS_TRACED () ? "-" : "", restarts);
2439  SetVar ("MAKE_RESTARTS", buffer, -1, GVF_GLOBAL_ONLY);
2440  restarts = 0;
2441  }
2442 #endif
2443 
2444  /* If we didn't set the restarts variable yet, add it. */
2445  if (restarts)
2446  {
2447  char *b = alloca (40);
2448  sprintf (b, "MAKE_RESTARTS=%s%u",
2449  OUTPUT_IS_TRACED () ? "-" : "", restarts);
2450  putenv (b);
2451  }
2452 
2453  fflush (stdout);
2454  fflush (stderr);
2455 
2456  /* The exec'd "child" will be another make, of course. */
2458 
2459 #ifdef _AMIGA
2460  exec_command (nargv);
2461  exit (0);
2462 #elif defined (__EMX__)
2463  {
2464  /* It is not possible to use execve() here because this
2465  would cause the parent process to be terminated with
2466  exit code 0 before the child process has been terminated.
2467  Therefore it may be the best solution simply to spawn the
2468  child process including all file handles and to wait for its
2469  termination. */
2470  pid_t pid;
2471  int r;
2472  struct childbase child;
2473  child.cmd_name = NULL;
2474  child.output.syncout = 0;
2476 
2477  pid = child_execute_job (&child, 1, nargv);
2478 
2479  /* is this loop really necessary? */
2480  do {
2481  pid = wait (&r);
2482  } while (pid <= 0);
2483  /* use the exit code of the child process */
2485  }
2486 #else
2487 #ifdef SET_STACK_SIZE
2488  /* Reset limits, if necessary. */
2489  if (stack_limit.rlim_cur)
2490  setrlimit (RLIMIT_STACK, &stack_limit);
2491 #endif
2492  exec_command ((char **)nargv, environ);
2493 #endif
2494 
2495  /* We shouldn't get here but just in case. */
2497  free (aargv);
2498  break;
2499  }
2500  }
2501 
2502  /* Set up 'MAKEFLAGS' again for the normal targets. */
2503  define_makeflags (1, 0);
2504 
2505  /* Set always_make_flag if -B was given. */
2507 
2508  /* If restarts is set we haven't set up -W files yet, so do that now. */
2509  if (restarts && new_files != 0)
2510  {
2511  const char **p;
2512  for (p = new_files->list; *p != 0; ++p)
2513  {
2514  struct file *f = enter_file (*p);
2515  f->last_mtime = f->mtime_before_update = NEW_MTIME;
2516  }
2517  }
2518 
2519  /* If there is a temp file from reading a makefile from stdin, get rid of
2520  it now. */
2521  if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT)
2522  perror_with_name (_("unlink (temporary file): "), stdin_nm);
2523 
2524  /* If there were no command-line goals, use the default. */
2525  if (goals == 0)
2526  {
2527  char *p;
2528 
2531  else
2532  {
2535  *p = '\0';
2536  p = variable_buffer;
2537  }
2538 
2539  if (*p != '\0')
2540  {
2541  struct file *f = lookup_file (p);
2542 
2543  /* If .DEFAULT_GOAL is a non-existent target, enter it into the
2544  table and let the standard logic sort it out. */
2545  if (f == 0)
2546  {
2547  struct nameseq *ns;
2548 
2549  ns = PARSE_SIMPLE_SEQ (&p, struct nameseq);
2550  if (ns)
2551  {
2552  /* .DEFAULT_GOAL should contain one target. */
2553  if (ns->next != 0)
2554  O (fatal, NILF,
2555  _(".DEFAULT_GOAL contains more than one target"));
2556 
2557  f = enter_file (strcache_add (ns->name));
2558 
2559  ns->name = 0; /* It was reused by enter_file(). */
2560  free_ns_chain (ns);
2561  }
2562  }
2563 
2564  if (f)
2565  {
2566  goals = alloc_goaldep ();
2567  goals->file = f;
2568  }
2569  }
2570  }
2571  else
2572  lastgoal->next = 0;
2573 
2574 
2575  if (!goals)
2576  {
2577  struct variable *v = lookup_variable (STRING_SIZE_TUPLE ("MAKEFILE_LIST"));
2578  if (v && v->value && v->value[0] != '\0')
2579  O (fatal, NILF, _("No targets"));
2580 
2581  O (fatal, NILF, _("No targets specified and no makefile found"));
2582  }
2583 
2584  /* Update the goals. */
2585 
2586  DB (DB_BASIC, (_("Updating goal targets....\n")));
2587 
2588  {
2589  switch (update_goal_chain (goals))
2590  {
2591  case us_none:
2592  /* Nothing happened. */
2593  /* FALLTHROUGH */
2594  case us_success:
2595  /* Keep the previous result. */
2596  break;
2597  case us_question:
2598  /* We are under -q and would run some commands. */
2599  makefile_status = MAKE_TROUBLE;
2600  break;
2601  case us_failed:
2602  /* Updating failed. POSIX.2 specifies exit status >1 for this; */
2603  makefile_status = MAKE_FAILURE;
2604  break;
2605  }
2606 
2607  /* If we detected some clock skew, generate one last warning */
2608  if (clock_skew_detected)
2609  O (error, NILF,
2610  _("warning: Clock skew detected. Your build may be incomplete."));
2611 
2612  /* Exit. */
2613  die (makefile_status);
2614  }
2615 
2616  /* NOTREACHED */
2617  exit (MAKE_SUCCESS);
2618 }
2619 ␌
2620 /* Parsing of arguments, decoding of switches. */
2621 
2622 static char options[1 + sizeof (switches) / sizeof (switches[0]) * 3];
2623 static struct option long_options[(sizeof (switches) / sizeof (switches[0])) +
2624  (sizeof (long_option_aliases) /
2625  sizeof (long_option_aliases[0]))];
2626 
2627 /* Fill in the string and vector for getopt. */
2628 static void
2630 {
2631  char *p;
2632  unsigned int c;
2633  unsigned int i;
2634 
2635  if (options[0] != '\0')
2636  /* Already done. */
2637  return;
2638 
2639  p = options;
2640 
2641  /* Return switch and non-switch args in order, regardless of
2642  POSIXLY_CORRECT. Non-switch args are returned as option 1. */
2643  *p++ = '-';
2644 
2645  for (i = 0; switches[i].c != '\0'; ++i)
2646  {
2647  long_options[i].name = (char *) (switches[i].long_name == 0 ? "" :
2648  switches[i].long_name);
2649  long_options[i].flag = 0;
2650  long_options[i].val = switches[i].c;
2651  if (short_option (switches[i].c))
2652  *p++ = (char) switches[i].c;
2653  switch (switches[i].type)
2654  {
2655  case flag:
2656  case flag_off:
2657  case ignore:
2659  break;
2660 
2661  case string:
2662  case strlist:
2663  case filename:
2664  case positive_int:
2665  case floating:
2666  if (short_option (switches[i].c))
2667  *p++ = ':';
2668  if (switches[i].noarg_value != 0)
2669  {
2670  if (short_option (switches[i].c))
2671  *p++ = ':';
2673  }
2674  else
2676  break;
2677  }
2678  }
2679  *p = '\0';
2680  for (c = 0; c < (sizeof (long_option_aliases) /
2681  sizeof (long_option_aliases[0]));
2682  ++c)
2684  long_options[i].name = 0;
2685 }
2686 
2687 
2688 /* Non-option argument. It might be a variable definition. */
2689 static void
2690 handle_non_switch_argument (const char *arg, int env)
2691 {
2692  struct variable *v;
2693 
2694  if (arg[0] == '-' && arg[1] == '\0')
2695  /* Ignore plain '-' for compatibility. */
2696  return;
2697 
2698 #ifdef VMS
2699  {
2700  /* VMS DCL quoting can result in foo="bar baz" showing up here.
2701  Need to remove the double quotes from the value. */
2702  char * eq_ptr;
2703  char * new_arg;
2704  eq_ptr = strchr (arg, '=');
2705  if ((eq_ptr != NULL) && (eq_ptr[1] == '"'))
2706  {
2707  int len;
2708  int seg1;
2709  int seg2;
2710  len = strlen(arg);
2711  new_arg = alloca(len);
2712  seg1 = eq_ptr - arg + 1;
2713  strncpy(new_arg, arg, (seg1));
2714  seg2 = len - seg1 - 1;
2715  strncpy(&new_arg[seg1], &eq_ptr[2], seg2);
2716  new_arg[seg1 + seg2] = 0;
2717  if (new_arg[seg1 + seg2 - 1] == '"')
2718  new_arg[seg1 + seg2 - 1] = 0;
2719  arg = new_arg;
2720  }
2721  }
2722 #endif
2723  v = try_variable_definition (0, arg, o_command, 0);
2724  if (v != 0)
2725  {
2726  /* It is indeed a variable definition. If we don't already have this
2727  one, record a pointer to the variable for later use in
2728  define_makeflags. */
2729  struct command_variable *cv;
2730 
2731  for (cv = command_variables; cv != 0; cv = cv->next)
2732  if (cv->variable == v)
2733  break;
2734 
2735  if (! cv)
2736  {
2737  cv = xmalloc (sizeof (*cv));
2738  cv->variable = v;
2739  cv->next = command_variables;
2741  }
2742  }
2743  else if (! env)
2744  {
2745  /* Not an option or variable definition; it must be a goal
2746  target! Enter it as a file and add it to the dep chain of
2747  goals. */
2749  f->cmd_target = 1;
2750 
2751  if (goals == 0)
2752  {
2753  goals = alloc_goaldep ();
2754  lastgoal = goals;
2755  }
2756  else
2757  {
2758  lastgoal->next = alloc_goaldep ();
2759  lastgoal = lastgoal->next;
2760  }
2761 
2762  lastgoal->file = f;
2763 
2764  {
2765  /* Add this target name to the MAKECMDGOALS variable. */
2766  struct variable *gv;
2767  const char *value;
2768 
2769  gv = lookup_variable (STRING_SIZE_TUPLE ("MAKECMDGOALS"));
2770  if (gv == 0)
2771  value = f->name;
2772  else
2773  {
2774  /* Paste the old and new values together */
2775  size_t oldlen, newlen;
2776  char *vp;
2777 
2778  oldlen = strlen (gv->value);
2779  newlen = strlen (f->name);
2780  vp = alloca (oldlen + 1 + newlen + 1);
2781  memcpy (vp, gv->value, oldlen);
2782  vp[oldlen] = ' ';
2783  memcpy (&vp[oldlen + 1], f->name, newlen + 1);
2784  value = vp;
2785  }
2786  define_variable_cname ("MAKECMDGOALS", value, o_default, 0);
2787  }
2788  }
2789 }
2790 
2791 /* Print a nice usage method. */
2792 
2793 static void
2795 {
2796  const char *const *cpp;
2797  FILE *usageto;
2798 
2799  if (print_version_flag)
2800  print_version ();
2801 
2802  usageto = bad ? stderr : stdout;
2803 
2804  fprintf (usageto, _("Usage: %s [options] [target] ...\n"), program);
2805 
2806  for (cpp = usage; *cpp; ++cpp)
2807  fputs (_(*cpp), usageto);
2808 
2809  if (!remote_description || *remote_description == '\0')
2810  fprintf (usageto, _("\nThis program built for %s\n"), make_host);
2811  else
2812  fprintf (usageto, _("\nThis program built for %s (%s)\n"),
2814 
2815  fprintf (usageto, _("Report bugs to <bug-make@gnu.org>\n"));
2816 }
2817 
2818 /* Decode switches from ARGC and ARGV.
2819  They came from the environment if ENV is nonzero. */
2820 
2821 static void
2822 decode_switches (int argc, const char **argv, int env)
2823 {
2824  int bad = 0;
2825  const struct command_switch *cs;
2826  struct stringlist *sl;
2827  int c;
2828 
2829  /* getopt does most of the parsing for us.
2830  First, get its vectors set up. */
2831 
2832  init_switches ();
2833 
2834  /* Let getopt produce error messages for the command line,
2835  but not for options from the environment. */
2836  opterr = !env;
2837  /* Reset getopt's state. */
2838  optind = 0;
2839 
2840  while (optind < argc)
2841  {
2842  const char *coptarg;
2843 
2844  /* Parse the next argument. */
2845  c = getopt_long (argc, (char*const*)argv, options, long_options, NULL);
2846  coptarg = optarg;
2847  if (c == EOF)
2848  /* End of arguments, or "--" marker seen. */
2849  break;
2850  else if (c == 1)
2851  /* An argument not starting with a dash. */
2852  handle_non_switch_argument (coptarg, env);
2853  else if (c == '?')
2854  /* Bad option. We will print a usage message and die later.
2855  But continue to parse the other options so the user can
2856  see all he did wrong. */
2857  bad = 1;
2858  else
2859  for (cs = switches; cs->c != '\0'; ++cs)
2860  if (cs->c == c)
2861  {
2862  /* Whether or not we will actually do anything with
2863  this switch. We test this individually inside the
2864  switch below rather than just once outside it, so that
2865  options which are to be ignored still consume args. */
2866  int doit = !env || cs->env;
2867 
2868  switch (cs->type)
2869  {
2870  default:
2871  abort ();
2872 
2873  case ignore:
2874  break;
2875 
2876  case flag:
2877  case flag_off:
2878  if (doit)
2879  *(int *) cs->value_ptr = cs->type == flag;
2880  break;
2881 
2882  case string:
2883  case strlist:
2884  case filename:
2885  if (!doit)
2886  break;
2887 
2888  if (! coptarg)
2889  coptarg = xstrdup (cs->noarg_value);
2890  else if (*coptarg == '\0')
2891  {
2892  char opt[2] = "c";
2893  const char *op = opt;
2894 
2895  if (short_option (cs->c))
2896  opt[0] = (char) cs->c;
2897  else
2898  op = cs->long_name;
2899 
2900  error (NILF, strlen (op),
2901  _("the '%s%s' option requires a non-empty string argument"),
2902  short_option (cs->c) ? "-" : "--", op);
2903  bad = 1;
2904  break;
2905  }
2906 
2907  if (cs->type == string)
2908  {
2909  char **val = (char **)cs->value_ptr;
2910  free (*val);
2911  *val = xstrdup (coptarg);
2912  break;
2913  }
2914 
2915  sl = *(struct stringlist **) cs->value_ptr;
2916  if (sl == 0)
2917  {
2918  sl = xmalloc (sizeof (struct stringlist));
2919  sl->max = 5;
2920  sl->idx = 0;
2921  sl->list = xmalloc (5 * sizeof (char *));
2922  *(struct stringlist **) cs->value_ptr = sl;
2923  }
2924  else if (sl->idx == sl->max - 1)
2925  {
2926  sl->max += 5;
2927  /* MSVC erroneously warns without a cast here. */
2928  sl->list = xrealloc ((void *)sl->list,
2929  sl->max * sizeof (char *));
2930  }
2931  if (cs->type == filename)
2932  sl->list[sl->idx++] = expand_command_line_file (coptarg);
2933  else
2934  sl->list[sl->idx++] = xstrdup (coptarg);
2935  sl->list[sl->idx] = 0;
2936  break;
2937 
2938  case positive_int:
2939  /* See if we have an option argument; if we do require that
2940  it's all digits, not something like "10foo". */
2941  if (coptarg == 0 && argc > optind)
2942  {
2943  const char *cp;
2944  for (cp=argv[optind]; ISDIGIT (cp[0]); ++cp)
2945  ;
2946  if (cp[0] == '\0')
2947  coptarg = argv[optind++];
2948  }
2949 
2950  if (!doit)
2951  break;
2952 
2953  if (coptarg)
2954  {
2955  int i = atoi (coptarg);
2956  const char *cp;
2957 
2958  /* Yes, I realize we're repeating this in some cases. */
2959  for (cp = coptarg; ISDIGIT (cp[0]); ++cp)
2960  ;
2961 
2962  if (i < 1 || cp[0] != '\0')
2963  {
2964  error (NILF, 0,
2965  _("the '-%c' option requires a positive integer argument"),
2966  cs->c);
2967  bad = 1;
2968  }
2969  else
2970  *(unsigned int *) cs->value_ptr = i;
2971  }
2972  else
2973  *(unsigned int *) cs->value_ptr
2974  = *(unsigned int *) cs->noarg_value;
2975  break;
2976 
2977  case floating:
2978  if (coptarg == 0 && optind < argc
2979  && (ISDIGIT (argv[optind][0]) || argv[optind][0] == '.'))
2980  coptarg = argv[optind++];
2981 
2982  if (doit)
2983  *(double *) cs->value_ptr
2984  = (coptarg != 0 ? atof (coptarg)
2985  : *(double *) cs->noarg_value);
2986 
2987  break;
2988  }
2989 
2990  /* We've found the switch. Stop looking. */
2991  break;
2992  }
2993  }
2994 
2995  /* There are no more options according to getting getopt, but there may
2996  be some arguments left. Since we have asked for non-option arguments
2997  to be returned in order, this only happens when there is a "--"
2998  argument to prevent later arguments from being options. */
2999  while (optind < argc)
3001 
3002  if (!env && (bad || print_usage_flag))
3003  {
3004  print_usage (bad);
3006  }
3007 
3008  /* If there are any options that need to be decoded do it now. */
3009  decode_debug_flags ();
3011 
3012  /* Perform any special switch handling. */
3014 }
3015 
3016 /* Decode switches from environment variable ENVAR (which is LEN chars long).
3017  We do this by chopping the value into a vector of words, prepending a
3018  dash to the first word if it lacks one, and passing the vector to
3019  decode_switches. */
3020 
3021 static void
3022 decode_env_switches (const char *envar, size_t len)
3023 {
3024  char *varref = alloca (2 + len + 2);
3025  char *value, *p, *buf;
3026  int argc;
3027  const char **argv;
3028 
3029  /* Get the variable's value. */
3030  varref[0] = '$';
3031  varref[1] = '(';
3032  memcpy (&varref[2], envar, len);
3033  varref[2 + len] = ')';
3034  varref[2 + len + 1] = '\0';
3035  value = variable_expand (varref);
3036 
3037  /* Skip whitespace, and check for an empty value. */
3038  NEXT_TOKEN (value);
3039  len = strlen (value);
3040  if (len == 0)
3041  return;
3042 
3043  /* Allocate a vector that is definitely big enough. */
3044  argv = alloca ((1 + len + 1) * sizeof (char *));
3045 
3046  /* getopt will look at the arguments starting at ARGV[1].
3047  Prepend a spacer word. */
3048  argv[0] = 0;
3049  argc = 1;
3050 
3051  /* We need a buffer to copy the value into while we split it into words
3052  and unquote it. Set up in case we need to prepend a dash later. */
3053  buf = alloca (1 + len + 1);
3054  buf[0] = '-';
3055  p = buf+1;
3056  argv[argc] = p;
3057  while (*value != '\0')
3058  {
3059  if (*value == '\\' && value[1] != '\0')
3060  ++value; /* Skip the backslash. */
3061  else if (ISBLANK (*value))
3062  {
3063  /* End of the word. */
3064  *p++ = '\0';
3065  argv[++argc] = p;
3066  do
3067  ++value;
3068  while (ISBLANK (*value));
3069  continue;
3070  }
3071  *p++ = *value++;
3072  }
3073  *p = '\0';
3074  argv[++argc] = 0;
3075  assert (p < buf + len + 2);
3076 
3077  if (argv[1][0] != '-' && strchr (argv[1], '=') == 0)
3078  /* The first word doesn't start with a dash and isn't a variable
3079  definition, so add a dash. */
3080  argv[1] = buf;
3081 
3082  /* Parse those words. */
3083  decode_switches (argc, argv, 1);
3084 }
3085 ␌
3086 /* Quote the string IN so that it will be interpreted as a single word with
3087  no magic by decode_env_switches; also double dollar signs to avoid
3088  variable expansion in make itself. Write the result into OUT, returning
3089  the address of the next character to be written.
3090  Allocating space for OUT twice the length of IN is always sufficient. */
3091 
3092 static char *
3093 quote_for_env (char *out, const char *in)
3094 {
3095  while (*in != '\0')
3096  {
3097  if (*in == '$')
3098  *out++ = '$';
3099  else if (ISBLANK (*in) || *in == '\\')
3100  *out++ = '\\';
3101  *out++ = *in++;
3102  }
3103 
3104  return out;
3105 }
3106 
3107 /* Define the MAKEFLAGS and MFLAGS variables to reflect the settings of the
3108  command switches. Include options with args if ALL is nonzero.
3109  Don't include options with the 'no_makefile' flag set if MAKEFILE. */
3110 
3111 static struct variable *
3112 define_makeflags (int all, int makefile)
3113 {
3114  const char ref[] = "MAKEOVERRIDES";
3115  const char posixref[] = "-*-command-variables-*-";
3116  const char evalref[] = "$(-*-eval-flags-*-)";
3117  const struct command_switch *cs;
3118  char *flagstring;
3119  char *p;
3120 
3121  /* We will construct a linked list of 'struct flag's describing
3122  all the flags which need to go in MAKEFLAGS. Then, once we
3123  know how many there are and their lengths, we can put them all
3124  together in a string. */
3125 
3126  struct flag
3127  {
3128  struct flag *next;
3129  const struct command_switch *cs;
3130  const char *arg;
3131  };
3132  struct flag *flags = 0;
3133  struct flag *last = 0;
3134  size_t flagslen = 0;
3135 #define ADD_FLAG(ARG, LEN) \
3136  do { \
3137  struct flag *new = alloca (sizeof (struct flag)); \
3138  new->cs = cs; \
3139  new->arg = (ARG); \
3140  new->next = 0; \
3141  if (! flags) \
3142  flags = new; \
3143  else \
3144  last->next = new; \
3145  last = new; \
3146  if (new->arg == 0) \
3147  /* Just a single flag letter: " -x" */ \
3148  flagslen += 3; \
3149  else \
3150  /* " -xfoo", plus space to escape "foo". */ \
3151  flagslen += 1 + 1 + 1 + (3 * (LEN)); \
3152  if (!short_option (cs->c)) \
3153  /* This switch has no single-letter version, so we use the long. */ \
3154  flagslen += 2 + strlen (cs->long_name); \
3155  } while (0)
3156 
3157  for (cs = switches; cs->c != '\0'; ++cs)
3158  if (cs->toenv && (!makefile || !cs->no_makefile))
3159  switch (cs->type)
3160  {
3161  case ignore:
3162  break;
3163 
3164  case flag:
3165  case flag_off:
3166  if ((!*(int *) cs->value_ptr) == (cs->type == flag_off)
3167  && (cs->default_value == 0
3168  || *(int *) cs->value_ptr != *(int *) cs->default_value))
3169  ADD_FLAG (0, 0);
3170  break;
3171 
3172  case positive_int:
3173  if (all)
3174  {
3175  if ((cs->default_value != 0
3176  && (*(unsigned int *) cs->value_ptr
3177  == *(unsigned int *) cs->default_value)))
3178  break;
3179  else if (cs->noarg_value != 0
3180  && (*(unsigned int *) cs->value_ptr ==
3181  *(unsigned int *) cs->noarg_value))
3182  ADD_FLAG ("", 0); /* Optional value omitted; see below. */
3183  else
3184  {
3185  char *buf = alloca (30);
3186  sprintf (buf, "%u", *(unsigned int *) cs->value_ptr);
3187  ADD_FLAG (buf, strlen (buf));
3188  }
3189  }
3190  break;
3191 
3192  case floating:
3193  if (all)
3194  {
3195  if (cs->default_value != 0
3196  && (*(double *) cs->value_ptr
3197  == *(double *) cs->default_value))
3198  break;
3199  else if (cs->noarg_value != 0
3200  && (*(double *) cs->value_ptr
3201  == *(double *) cs->noarg_value))
3202  ADD_FLAG ("", 0); /* Optional value omitted; see below. */
3203  else
3204  {
3205  char *buf = alloca (100);
3206  sprintf (buf, "%g", *(double *) cs->value_ptr);
3207  ADD_FLAG (buf, strlen (buf));
3208  }
3209  }
3210  break;
3211 
3212  case string:
3213  if (all)
3214  {
3215  p = *((char **)cs->value_ptr);
3216  if (p)
3217  ADD_FLAG (p, strlen (p));
3218  }
3219  break;
3220 
3221  case filename:
3222  case strlist:
3223  if (all)
3224  {
3225  struct stringlist *sl = *(struct stringlist **) cs->value_ptr;
3226  if (sl != 0)
3227  {
3228  unsigned int i;
3229  for (i = 0; i < sl->idx; ++i)
3230  ADD_FLAG (sl->list[i], strlen (sl->list[i]));
3231  }
3232  }
3233  break;
3234 
3235  default:
3236  abort ();
3237  }
3238 
3239 #undef ADD_FLAG
3240 
3241  /* Four more for the possible " -- ", plus variable references. */
3242  flagslen += 4 + CSTRLEN (posixref) + 4 + CSTRLEN (evalref) + 4;
3243 
3244  /* Construct the value in FLAGSTRING.
3245  We allocate enough space for a preceding dash and trailing null. */
3246  flagstring = alloca (1 + flagslen + 1);
3247  memset (flagstring, '\0', 1 + flagslen + 1);
3248  p = flagstring;
3249 
3250  /* Start with a dash, for MFLAGS. */
3251  *p++ = '-';
3252 
3253  /* Add simple options as a group. */
3254  while (flags != 0 && !flags->arg && short_option (flags->cs->c))
3255  {
3256  *p++ = (char) flags->cs->c;
3257  flags = flags->next;
3258  }
3259 
3260  /* Now add more complex flags: ones with options and/or long names. */
3261  while (flags)
3262  {
3263  *p++ = ' ';
3264  *p++ = '-';
3265 
3266  /* Add the flag letter or name to the string. */
3267  if (short_option (flags->cs->c))
3268  *p++ = (char) flags->cs->c;
3269  else
3270  {
3271  /* Long options require a double-dash. */
3272  *p++ = '-';
3273  strcpy (p, flags->cs->long_name);
3274  p += strlen (p);
3275  }
3276  /* An omitted optional argument has an ARG of "". */
3277  if (flags->arg && flags->arg[0] != '\0')
3278  {
3279  if (!short_option (flags->cs->c))
3280  /* Long options require '='. */
3281  *p++ = '=';
3282  p = quote_for_env (p, flags->arg);
3283  }
3284  flags = flags->next;
3285  }
3286 
3287  /* If no flags at all, get rid of the initial dash. */
3288  if (p == &flagstring[1])
3289  {
3290  flagstring[0] = '\0';
3291  p = flagstring;
3292  }
3293 
3294  /* Define MFLAGS before appending variable definitions. Omit an initial
3295  empty dash. Since MFLAGS is not parsed for flags, there is no reason to
3296  override any makefile redefinition. */
3297  define_variable_cname ("MFLAGS",
3298  flagstring + (flagstring[0] == '-' && flagstring[1] == ' ' ? 2 : 0),
3299  o_env, 1);
3300 
3301  /* Write a reference to -*-eval-flags-*-, which contains all the --eval
3302  flag options. */
3303  if (eval_strings)
3304  {
3305  *p++ = ' ';
3306  memcpy (p, evalref, CSTRLEN (evalref));
3307  p += CSTRLEN (evalref);
3308  }
3309 
3310  if (all)
3311  {
3312  /* If there are any overrides to add, write a reference to
3313  $(MAKEOVERRIDES), which contains command-line variable definitions.
3314  Separate the variables from the switches with a "--" arg. */
3315 
3316  const char *r = posix_pedantic ? posixref : ref;
3317  size_t l = strlen (r);
3318  struct variable *v = lookup_variable (r, l);
3319 
3320  if (v && v->value && v->value[0] != '\0')
3321  {
3322  strcpy (p, " -- ");
3323  p += 4;
3324 
3325  *(p++) = '$';
3326  *(p++) = '(';
3327  memcpy (p, r, l);
3328  p += l;
3329  *(p++) = ')';
3330  }
3331  }
3332 
3333  /* If there is a leading dash, omit it. */
3334  if (flagstring[0] == '-')
3335  ++flagstring;
3336 
3337  /* This used to use o_env, but that lost when a makefile defined MAKEFLAGS.
3338  Makefiles set MAKEFLAGS to add switches, but we still want to redefine
3339  its value with the full set of switches. Then we used o_file, but that
3340  lost when users added -e, causing a previous MAKEFLAGS env. var. to take
3341  precedence over the new one. Of course, an override or command
3342  definition will still take precedence. */
3343  return define_variable_cname ("MAKEFLAGS", flagstring,
3345 }
3346 ␌
3347 /* Print version information. */
3348 
3349 static void
3351 {
3352  static int printed_version = 0;
3353 
3354  const char *precede = print_data_base_flag ? "# " : "";
3355 
3356  if (printed_version)
3357  /* Do it only once. */
3358  return;
3359 
3360  printf ("%sGNU Make %s\n", precede, version_string);
3361 
3362  if (!remote_description || *remote_description == '\0')
3363  printf (_("%sBuilt for %s\n"), precede, make_host);
3364  else
3365  printf (_("%sBuilt for %s (%s)\n"),
3366  precede, make_host, remote_description);
3367 
3368  /* Print this untranslated. The coding standards recommend translating the
3369  (C) to the copyright symbol, but this string is going to change every
3370  year, and none of the rest of it should be translated (including the
3371  word "Copyright"), so it hardly seems worth it. */
3372 
3373  printf ("%sCopyright (C) 1988-2020 Free Software Foundation, Inc.\n",
3374  precede);
3375 
3376  printf (_("%sLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
3377 %sThis is free software: you are free to change and redistribute it.\n\
3378 %sThere is NO WARRANTY, to the extent permitted by law.\n"),
3379  precede, precede, precede);
3380 
3381  printed_version = 1;
3382 
3383  /* Flush stdout so the user doesn't have to wait to see the
3384  version information while make thinks about things. */
3385  fflush (stdout);
3386 }
3387 
3388 /* Print a bunch of information about this and that. */
3389 
3390 static void
3392 {
3393  time_t when = time ((time_t *) 0);
3394 
3395  print_version ();
3396 
3397  printf (_("\n# Make data base, printed on %s"), ctime (&when));
3398 
3404  strcache_print_stats ("#");
3405 
3406  when = time ((time_t *) 0);
3407  printf (_("\n# Finished Make data base on %s\n"), ctime (&when));
3408 }
3409 
3410 static void
3412 {
3413  /* Sanity: have we written all our jobserver tokens back? If our
3414  exit status is 2 that means some kind of syntax error; we might not
3415  have written all our tokens so do that now. If tokens are left
3416  after any other error code, that's bad. */
3417 
3419  {
3420  if (status != 2)
3421  ON (error, NILF,
3422  "INTERNAL: Exiting with %u jobserver tokens (should be 0)!",
3424  else
3425  /* Don't write back the "free" token */
3426  while (--jobserver_tokens)
3427  jobserver_release (0);
3428  }
3429 
3430 
3431  /* Sanity: If we're the master, were all the tokens written back? */
3432 
3433  if (master_job_slots)
3434  {
3435  /* We didn't write one for ourself, so start at 1. */
3436  unsigned int tokens = 1 + jobserver_acquire_all ();
3437 
3438  if (tokens != master_job_slots)
3439  ONN (error, NILF,
3440  "INTERNAL: Exiting with %u jobserver tokens available; should be %u!",
3441  tokens, master_job_slots);
3442 
3443  reset_jobserver ();
3444  }
3445 }
3446 ␌
3447 /* Exit with STATUS, cleaning up as necessary. */
3448 
3449 void
3451 {
3452  static char dying = 0;
3453 
3454  if (!dying)
3455  {
3456  int err;
3457 
3458  dying = 1;
3459 
3460  if (print_version_flag)
3461  print_version ();
3462 
3463  /* Wait for children to die. */
3464  err = (status != 0);
3465  while (job_slots_used > 0)
3466  reap_children (1, err);
3467 
3468  /* Let the remote job module clean up its state. */
3469  remote_cleanup ();
3470 
3471  /* Remove the intermediate files. */
3473 
3475  print_data_base ();
3476 
3477  if (verify_flag)
3479 
3481 
3482  if (output_context)
3483  {
3484  /* die() might be called in a recipe output context due to an
3485  $(error ...) function. */
3487 
3488  if (output_context != &make_sync)
3490 
3491  OUTPUT_UNSET ();
3492  }
3493 
3494  output_close (NULL);
3495 
3496  /* Try to move back to the original directory. This is essential on
3497  MS-DOS (where there is really only one process), and on Unix it
3498  puts core files in the original directory instead of the -C
3499  directory. Must wait until after remove_intermediates(), or unlinks
3500  of relative pathnames fail. */
3501  if (directory_before_chdir != 0)
3502  {
3503  /* If it fails we don't care: shut up GCC. */
3504  int _x UNUSED;
3506  }
3507  }
3508 
3509  exit (status);
3510 }
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
#define WINAPI
cp
Definition: action.c:1035
static char * concat(const char *s1, const char *s2)
Definition: afm2pl.c:377
#define type(a)
Definition: aptex-macros.h:171
#define name
#define next(a)
Definition: aptex-macros.h:924
char *__cdecl strpbrk(char const *_Str, char const *_Control)
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define free(a)
Definition: decNumber.cpp:310
void set_default_suffixes(void)
Definition: default.c:696
void install_default_implicit_rules(void)
Definition: default.c:747
void install_default_suffix_rules(void)
Definition: default.c:722
void undefine_default_variables(void)
Definition: default.c:774
void define_default_variables(void)
Definition: default.c:762
#define PARSE_SIMPLE_SEQ(_s, _t)
Definition: dep.h:82
void eval_buffer(char *buffer, const floc *floc)
void free_ns_chain(struct nameseq *n)
Definition: misc.c:422
#define RM_DONTCARE
Definition: dep.h:35
#define alloc_goaldep()
Definition: dep.h:119
#define RM_INCLUDED
Definition: dep.h:34
#define free_dep_chain(_d)
Definition: dep.h:125
#define free_goaldep(_g)
Definition: dep.h:123
#define dep_name(d)
Definition: dep.h:98
char * tilde_expand(const char *name)
enum update_status update_goal_chain(struct goaldep *goals)
Definition: remake.c:83
struct goaldep * read_all_makefiles(const char **makefiles)
#define strrchr
Definition: detex.c:67
int v
Definition: dviconv.c:10
#define fread
Definition: xxstdio.h:25
#define fflush
Definition: xxstdio.h:24
char * strncpy()
int strcmp()
Definition: coll.cpp:143
int printf()
char * strcpy()
static void doit(const char *name, FILE *fp)
Definition: dviconcat.c:383
char tmpdir[]
#define error(a)
Definition: dviinfo.c:48
char * strtok()
long int flag
Definition: f2c.h:53
#define OLD_MTIME
Definition: filedef.h:198
#define file_mtime_no_search(f)
Definition: filedef.h:183
us_failed
Definition: filedef.h:4
us_success
Definition: filedef.h:0
cs_finished
Definition: filedef.h:4
us_question
Definition: filedef.h:2
us_none
Definition: filedef.h:1
#define NEW_MTIME
Definition: filedef.h:212
#define NONEXISTENT_MTIME
Definition: filedef.h:194
char version_string[]
Definition: filesrch.c:416
static void
Definition: fpif.c:118
#define _(String)
Definition: ftxerr18.c:64
void hash_init_function_table(void)
Definition: function.c:2692
Integer_T bad
mpz_t * f
Definition: gen-fib.c:34
mpz_t pp
Definition: gen-psqr.c:108
#define c(n)
Definition: gpos-common.c:150
#define d(n)
Definition: gpos-common.c:151
static void * xrealloc(char *oldp, unsigned size)
Definition: gsftopk.c:643
#define SIGCHLD
Definition: gsftopk.c:143
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
int guile_gmake_setup(floc *flocp)
Definition: guile.c:154
unsigned short CHAR
Definition: hbf.c:169
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
int batch_mode_shell
Definition: job.c:81
int unixy_shell
Definition: job.c:245
char * default_shell
Definition: job.c:80
int wait()
unsigned int jobserver_tokens
Definition: job.c:253
void exec_command(char **argv, char **envp)
Definition: job.c:2460
pid_t child_execute_job(struct childbase *child, int good_stdin, char **argv)
Definition: job.c:2274
void reap_children(int block, int err)
Definition: job.c:621
unsigned int job_slots_used
Definition: job.c:233
void child_handler(int sig)
Definition: job.c:599
#define EXIT_FAILURE
Definition: cdjpeg.h:169
static FILE * outfile
Definition: wrjpgcom.c:80
#define NORETURN
Definition: bzip2.c:94
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
sizeof(AF_ModuleRec)
for(n=0;n< outline->n_points;n++)
Definition: ftbbox.c:494
#define EOF
Definition: afmparse.c:59
#define PACKAGE
Definition: config.h:90
int optind
Definition: getopt.c:39
char * optarg
Definition: getopt.c:42
int opterr
Definition: getopt.c:38
char * getenv()
#define no_argument
Definition: getopt.h:110
#define required_argument
Definition: getopt.h:111
int getopt_long()
#define optional_argument
Definition: getopt.h:112
int main(int argc, char **argv)
Definition: main.c:197
int atoi(const char *)
int errno
#define xstrdup(s)
Definition: writet1.c:34
#define xmalloc(size)
Definition: writet1.c:33
#define unlink(file)
Definition: config.h:413
#define WEXITSTATUS(val)
Definition: dpxfile.c:58
#define WIFEXITED(val)
Definition: dpxfile.c:61
#define buf
#define ISBLANK(c)
Definition: fontmap.c:215
#define RETSIGTYPE
Definition: c-auto.h:14
#define strcasecmp
Definition: c-auto.h:150
#define ISDIGIT(c)
Definition: c-ctype.h:35
char * strstr()
#define fclose
Definition: debug.h:100
char ** environ
#define strnicmp
Definition: win32lib.h:96
#define fileno
Definition: win32lib.h:72
#define alloca
Definition: win32lib.h:60
#define getcwd
Definition: win32lib.h:77
#define putenv
Definition: win32lib.h:87
#define isatty
Definition: win32lib.h:80
#define fputs
Definition: mendex.h:67
#define fprintf
Definition: mendex.h:64
void set_program_name(const char *argv0)
Definition: progname.c:24
static const unsigned char cv[]
Definition: nkf.c:555
#define string
Definition: ctangleboot.c:111
#define ignore
Definition: ctangleboot.c:133
#define bindtextdomain(A, B)
Definition: cwebboot.c:32
#define textdomain(A)
Definition: cwebboot.c:33
#define setlocale(A, B)
Definition: cwebboot.c:31
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
string cmdline(int n)
Definition: main.c:36
int argc
Definition: main.c:9
char ** argv
Definition: main.c:8
#define fatal
Definition: tie.c:14
FILE * out
Definition: main.c:52
string program_name
Definition: main.c:47
int pid_t
Definition: types.h:81
long time_t
Definition: types.h:18
void abort()
#define DB(_l, _x)
Definition: debug.h:39
#define DB_NONE
Definition: debug.h:17
#define DB_JOBS
Definition: debug.h:20
#define DB_MAKEFILES
Definition: debug.h:22
#define DB_BASIC
Definition: debug.h:18
#define DB_VERBOSE
Definition: debug.h:19
#define ISDB(_l)
Definition: debug.h:28
#define DB_IMPLICIT
Definition: debug.h:21
#define DB_ALL
Definition: debug.h:24
void hash_init_directories(void)
Definition: dir.c:1344
void print_dir_data_base(void)
Definition: dir.c:1066
char * variable_buffer_output(char *ptr, const char *string, size_t length)
Definition: expand.c:56
char * variable_buffer
Definition: expand.c:46
char * variable_expand(const char *line)
Definition: expand.c:415
struct file * enter_file(const char *name)
Definition: file.c:155
void remove_intermediates(int sig)
Definition: file.c:365
void verify_file_data_base(void)
Definition: file.c:1143
struct file * lookup_file(const char *name)
Definition: file.c:71
void print_file_data_base(void)
Definition: file.c:1103
void init_hash_files(void)
Definition: file.c:1197
void snap_deps(void)
Definition: file.c:711
static int default_silent_flag
Definition: main.c:168
int keep_going_flag
Definition: main.c:221
struct variable * default_goal_var
Definition: main.c:521
int verify_flag
Definition: main.c:163
static struct command_switch switches[]
Definition: main.c:417
struct file * default_file
Definition: main.c:527
static int arg_job_slots
Definition: main.c:258
static void decode_debug_flags(void)
Definition: main.c:715
static struct variable * define_makeflags(int all, int makefile)
Definition: main.c:3112
static void handle_non_switch_argument(char *arg, int env)
Definition: main.c:2690
unsigned short stopchar_map[255+1]
Definition: main.c:570
int run_silent
Definition: main.c:172
static int debug_flag
Definition: main.c:187
static char * jobserver_auth
Definition: main.c:268
int check_symlink_flag
Definition: main.c:226
static void decode_switches(int argc, char **argv, int env)
Definition: main.c:2822
char * program
Definition: main.c:501
static void decode_env_switches(char *envar, size_t len)
Definition: main.c:3022
#define short_option(c)
Definition: main.c:146
static int always_make_set
Definition: main.c:313
int posix_pedantic
Definition: main.c:532
static void initialize_stopchar_map(void)
Definition: main.c:621
static void print_version(void)
Definition: main.c:3350
#define ADD_FLAG(ARG, LEN)
static int inf_jobs
Definition: main.c:264
int ignore_errors_flag
Definition: main.c:202
int second_expansion
Definition: main.c:537
int one_shell
Definition: main.c:543
static struct stringlist * directories
Definition: main.c:284
#define DEFAULT_TMPFILE
double default_load_average
Definition: main.c:280
#define UCHAR_MAX
Definition: main.c:568
int inhibit_print_directory_flag
Definition: main.c:235
static struct option long_options[(sizeof(switches)/sizeof(switches[0]))+(sizeof(long_option_aliases)/sizeof(long_option_aliases[0]))]
Definition: main.c:2623
static int default_keep_going_flag
Definition: main.c:222
static char * usage[]
Definition: main.c:333
int trace_flag
Definition: main.c:553
char * starting_directory
Definition: main.c:509
static char * quote_for_env(char *out, char *in)
Definition: main.c:3093
struct variable shell_var
Definition: main.c:322
int print_data_base_flag
Definition: main.c:207
static void clean_jobserver(int status)
Definition: main.c:3411
static void print_usage(int bad)
Definition: main.c:2794
#define FATAL_SIG(sig)
static void print_data_base(void)
Definition: main.c:3391
char cmd_prefix
Definition: main.c:326
int rebuilding_makefiles
Definition: main.c:318
void die(int status)
Definition: main.c:3450
struct output make_sync
Definition: main.c:575
static char options[1+sizeof(switches)/sizeof(switches[0]) *3]
Definition: main.c:2622
void exit(int)
int warn_undefined_variables_flag
Definition: main.c:308
static struct stringlist * eval_strings
Definition: main.c:299
static int default_job_slots
Definition: main.c:260
#define INVALID_JOB_SLOTS
Definition: main.c:256
static struct goaldep * goals
Definition: main.c:487
static int print_usage_flag
Definition: main.c:303
int clock_skew_detected
Definition: main.c:564
int output_sync
Definition: main.c:549
int no_builtin_rules_flag
Definition: main.c:216
int just_print_flag
Definition: main.c:182
int always_make_flag
Definition: main.c:314
static struct command_variable * command_variables
Definition: main.c:497
char * directory_before_chdir
Definition: main.c:505
static struct stringlist * new_files
Definition: main.c:296
char * output_sync_option
Definition: main.c:193
int touch_flag
Definition: main.c:177
static struct goaldep * lastgoal
Definition: main.c:487
static char * expand_command_line_file(char *name)
Definition: main.c:665
static void initialize_global_hash_tables(void)
Definition: main.c:608
static unsigned int master_job_slots
Definition: main.c:257
int chdir()
static void reset_jobserver(void)
Definition: main.c:1042
static void decode_output_sync_flags(void)
Definition: main.c:777
static struct stringlist * db_flags
Definition: main.c:186
int question_flag
Definition: main.c:212
double atof()
static struct stringlist * makefiles
Definition: main.c:243
unsigned int makelevel
Definition: main.c:513
double max_load_average
Definition: main.c:279
#define bsd_signal
Definition: main.c:588
int print_version_flag
Definition: main.c:239
static struct stringlist * old_files
Definition: main.c:292
static struct option long_option_aliases[]
Definition: main.c:472
int no_builtin_variables_flag
Definition: main.c:217
int env_overrides
Definition: main.c:197
static void init_switches(void)
Definition: main.c:2629
int db_level
Definition: main.c:189
char * sync_mutex
Definition: main.c:273
unsigned int job_slots
Definition: main.c:254
int not_parallel
Definition: main.c:558
int print_directory_flag
Definition: main.c:230
static int silent_flag
Definition: main.c:167
static struct stringlist * include_directories
Definition: main.c:288
#define DEFAULT_TMPDIR
int sync_handle_t
Definition: output.h:101
#define OUTPUT_IS_TRACED()
Definition: output.h:35
#define OUTPUT_UNSET()
Definition: output.h:32
#define RECORD_SYNC_MUTEX(m)
Definition: output.h:103
#define OUTPUT_TRACED()
Definition: output.h:34
#define OUTPUT_SET(_new)
Definition: output.h:31
static struct goaldep * read_files
Definition: read.c:134
struct variable * lookup_variable(char *name, size_t length)
Definition: variable.c:455
void init_hash_global_variable_set(void)
Definition: variable.c:182
void define_automatic_variables(void)
Definition: variable.c:827
struct variable * try_variable_definition(floc *flocp, char *line, enum variable_origin origin, int target_var)
Definition: variable.c:1619
@ o_file
Definition: variable.h:25
@ o_automatic
Definition: variable.h:29
@ o_default
Definition: variable.h:23
@ o_env
Definition: variable.h:24
@ o_command
Definition: variable.h:27
@ o_env_override
Definition: variable.h:26
@ o_override
Definition: variable.h:28
v_export
Definition: variable.h:0
#define define_variable(n, l, v, o, r)
Definition: variable.h:189
#define define_variable_cname(n, v, o, r)
Definition: variable.h:195
#define recursively_expand(v)
Definition: variable.h:147
#define MAKELEVEL_NAME
Definition: variable.h:240
#define MAKELEVEL_LENGTH
Definition: variable.h:241
v_noexport
Definition: variable.h:1
long LONG
Definition: common.h:146
int atexit(void(*)(void))
#define VOID
Definition: main.c:21
#define sprintf
Definition: snprintf.c:44
#define streq(a, b)
Definition: mkg3states.c:42
#define CHAR_MAX
Definition: limits.h:10
static luaL_Reg func[]
Definition: except.c:32
#define NILF
Definition: makeint.h:465
#define OUTPUT_SYNC_RECURSE
Definition: makeint.h:660
#define MAKE_FAILURE
Definition: makeint.h:751
void pfatal_with_name(char *)
Definition: output.c:664
#define ONN(_t, _a, _f, _n1, _n2)
Definition: makeint.h:508
#define SPIN(_s)
Definition: makeint.h:611
#define TTYNAME(_f)
Definition: makeint.h:477
void perror_with_name(char *, char *)
Definition: output.c:655
#define MAKE_TROUBLE
Definition: makeint.h:750
#define MAP_USERFUNC
Definition: makeint.h:407
#define MAP_VARIABLE
Definition: makeint.h:409
#define MAP_COMMENT
Definition: makeint.h:397
char * remote_description
Definition: makeint.h:736
#define strneq(a, b, l)
Definition: makeint.h:331
#define STRING_SIZE_TUPLE(_s)
Definition: makeint.h:468
#define FILE_TIMESTAMP
Definition: makeint.h:292
#define MAKE_SUCCESS
Definition: makeint.h:749
char * make_host
Definition: makeint.h:736
#define PATH_SEPARATOR_CHAR
Definition: makeint.h:434
char * xstrndup(char *, size_t)
Definition: misc.c:247
void print_variable_data_base(void)
Definition: variable.c:1754
void build_vpath_lists(void)
Definition: vpath.c:55
#define STOP_SET(_v, _m)
Definition: makeint.h:447
#define MAP_SEMI
Definition: makeint.h:398
#define OUTPUT_SYNC_NONE
Definition: makeint.h:657
#define MAP_NUL
Definition: makeint.h:394
#define SA_RESTART
Definition: makeint.h:135
void strcache_init(void)
Definition: strcache.c:257
#define MAP_NEWLINE
Definition: makeint.h:396
#define MAP_VARSEP
Definition: makeint.h:401
#define OUTPUT_SYNC_TARGET
Definition: makeint.h:659
#define OS(_t, _a, _f, _s)
Definition: makeint.h:502
void remote_setup(void)
Definition: remote-cstms.c:47
char * strcache_add(char *str)
Definition: strcache.c:235
void user_access(void)
Definition: misc.c:675
#define MAP_BLANK
Definition: makeint.h:395
#define MAP_DOT
Definition: makeint.h:403
#define MAP_COLON
Definition: makeint.h:400
void strcache_print_stats(char *prefix)
Definition: strcache.c:266
#define CSTRLEN(_s)
Definition: makeint.h:467
#define GET_PATH_MAX
Definition: makeint.h:159
#define MAP_DIRSEP
Definition: makeint.h:411
#define N_(msgid)
Definition: makeint.h:350
void construct_include_path(char **arg_dirs)
Definition: read.c:2913
#define MAP_PIPE
Definition: makeint.h:402
#define O(_t, _a, _f)
Definition: makeint.h:501
#define NEXT_TOKEN(s)
Definition: makeint.h:451
#define MAP_EQUALS
Definition: makeint.h:399
#define MAP_COMMA
Definition: makeint.h:404
#define OUTPUT_SYNC_LINE
Definition: makeint.h:658
FILE * get_tmpfile(char **, char *)
Definition: misc.c:479
#define UNUSED
Definition: makeint.h:237
#define DEFAULT_TTYNAME
Definition: makeint.h:473
#define initialize_main(pargc, pargv)
Definition: makeint.h:764
void remote_cleanup(void)
Definition: remote-cstms.c:54
void print_vpath_data_base(void)
Definition: vpath.c:598
#define PATH_VAR(var)
Definition: makeint.h:160
#define NONE_SET(_v, _m)
Definition: makeint.h:392
@ err
Definition: mtxline.h:24
float x
Definition: cordic.py:15
cpp
Definition: cutout.py:14
std::is_same< integer_sequence< bool, true, Bs... >, integer_sequence< bool, Bs..., true > > all
Definition: variant.hpp:799
def ref(x)
Definition: pdf-org.py:104
union value value
Definition: obx.h:44
#define jobserver_clear()
Definition: os.h:68
#define jobserver_release(_fatal)
Definition: os.h:69
#define jobserver_parse_auth(_auth)
Definition: os.h:66
#define jobserver_acquire_all()
Definition: os.h:70
#define jobserver_pre_child(_r)
Definition: os.h:72
#define jobserver_post_child(_r)
Definition: os.h:73
#define jobserver_setup(_slots)
Definition: os.h:65
#define jobserver_get_auth()
Definition: os.h:67
#define jobserver_enabled()
Definition: os.h:64
static const Mapping features[]
Definition: otfdescrip.cc:537
char * w32ify(const char *file, int resolve)
char * getcwd_fs(char *buf, int len)
Definition: pathstuff.c:115
static int floating
Definition: pbmtolj.c:34
char * filename[256]
Definition: pbmtopk.c:46
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
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
subroutine errmsg(lineq, iccount, ibarno, msgq)
Definition: pmx294.for:7804
static int mtime
Definition: pngtopnm.c:77
static int32_t last
Definition: ppagelist.c:29
static struct colourSystem * cs
Definition: ppmcie.c:241
int r
Definition: ppmqvga.c:68
type_C toupper(type_C)
bstring c int memset(void *s, int c, int length)
time_t time()
char * ctime()
#define dir
#define status
#define flags
#define tolower(ch)
Definition: utype.h:137
#define isspace(ch)
Definition: utype.h:87
#define isalpha(ch)
Definition: utype.h:82
#define isalnum(ch)
Definition: utype.h:84
#define flag
Definition: round_prec.c:45
void print_rule_data_base(void)
Definition: rule.c:525
void snap_implicit_rules(void)
Definition: rule.c:70
struct file * suffix_file
Definition: rule.c:57
void convert_to_pattern(void)
Definition: rule.c:224
int _osmode
Definition: sh.h:2461
static FILE * in
Definition: squeeze.c:36
Definition: utils.c:300
Definition: job.h:44
struct output output
Definition: job.h:45
char * cmd_name
Definition: job.h:45
char ** environment
Definition: job.h:45
Definition: job.h:39
enum command_switch::@244 type
unsigned int env
Definition: main.c:134
void * default_value
Definition: main.c:139
void * noarg_value
Definition: main.c:138
unsigned int no_makefile
Definition: main.c:136
void * value_ptr
Definition: main.c:132
char * long_name
Definition: main.c:141
unsigned int toenv
Definition: main.c:135
@ positive_int
Definition: main.c:127
struct variable * variable
Definition: main.c:495
struct command_variable * next
Definition: main.c:494
Definition: pst1form.c:310
Definition: sh.h:1689
Definition: filedef.h:30
unsigned int builtin
Definition: filedef.h:84
struct dep * deps
Definition: filedef.h:34
Definition: dep.h:64
struct file * file
Definition: dep.h:65
struct goaldep * next
Definition: dep.h:65
Definition: dep.h:25
Definition: sh.h:1226
Definition: getopt.h:95
int val
Definition: getopt.h:105
int * flag
Definition: getopt.h:104
int has_arg
Definition: getopt.h:103
char * name
Definition: getopt.h:99
Definition: output.h:18
unsigned int syncout
Definition: output.h:21
unsigned int max
Definition: main.c:155
unsigned int idx
Definition: main.c:154
char ** list
Definition: main.c:153
Definition: parser.c:43
Definition: strexpr.c:21
char * name
Definition: variable.h:53
char * value
Definition: variable.h:54
unsigned int length
Definition: variable.h:56
variable_export
Definition: variable.h:76
unsigned int recursive
Definition: variable.h:57
#define FILE
Definition: t1stdio.h:34
#define feof(f)
Definition: t1stdio.h:109
#define ferror(f)
Definition: t1stdio.h:110
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
char * file
Definition: t4ht.c:931
m
Definition: tex4ht.c:3990
op
Definition: tex4ht.c:3129
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)
void output_close(struct output *out)
Definition: output.c:485
struct output * output_context
Definition: output.c:43
void output_init(struct output *out)
Definition: output.c:451
int pid
Definition: ttf2pfb.c:129
@ ON
Definition: ubidiimp.h:55
Definition: obx.h:51
@ start
Definition: preamble.c:52
int create_foreign_command(const char *command, const char *image)
int vms_putenv_symbol(const char *string)
int vms_export_dcl_symbol(const char *name, const char *value)
int need_vms_symbol(void)
Definition: vms_progname.c:124
char * vms_command(char *argv0)
Definition: vmsfunctions.c:134
int _is_unixy_shell(const char *path)
Definition: vmsjobs.c:57
#define ns
Definition: xmlparse.c:597
static node * new_arg(parser_state *p, mrb_sym sym)
Definition: y.tab.c:838