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)  

sh8.c
Go to the documentation of this file.
1 /*
2  * MS-DOS SHELL - Unix File I/O Emulation
3  *
4  * MS-DOS SHELL - Copyright (c) 1990,4 Data Logic Limited
5  *
6  * This code is subject to the following copyright restrictions:
7  *
8  * 1. Redistribution and use in source and binary forms are permitted
9  * provided that the above copyright notice is duplicated in the
10  * source form and the copyright notice in file sh6.c is displayed
11  * on entry to the program.
12  *
13  * 2. The sources (or parts thereof) or objects generated from the sources
14  * (or parts of sources) cannot be sold under any circumstances.
15  *
16  * The directory functions opendir, readdir, closedir are based on the public
17  * domain implementation for MS-DOS written by Michael Rendell
18  * ({uunet,utai}michael@garfield), August 1897
19  *
20  * startup () is based on EMX/GCC startup.c in emx/lib/src/startup. Copyright
21  * (c) 1990-1993 by Eberhard Mattes.
22  *
23  * $Header: /usr/users/istewart/shell/sh2.3/Release/RCS/sh8.c,v 2.16 1994/08/25 20:49:11 istewart Exp $
24  *
25  * $Log: sh8.c,v $
26  * Revision 2.16 1994/08/25 20:49:11 istewart
27  * MS Shell 2.3 Release
28  *
29  * Revision 2.15 1994/02/23 09:23:38 istewart
30  * Beta 233 updates
31  *
32  * Revision 2.14 1994/02/01 10:25:20 istewart
33  * Release 2.3 Beta 2, including first NT port
34  *
35  * Revision 2.13 1994/01/20 14:51:43 istewart
36  * Release 2.3 Beta 1
37  *
38  * Revision 2.12 1994/01/11 17:55:25 istewart
39  * Release 2.3 Beta 0 patches
40  *
41  * Revision 2.11 1993/11/09 10:39:49 istewart
42  * Beta 226 checking
43  *
44  * Revision 2.10 1993/08/25 16:03:57 istewart
45  * Beta 225 - see Notes file
46  *
47  * Revision 2.9 1993/07/02 10:21:35 istewart
48  * 224 Beta fixes
49  *
50  * Revision 2.8 1993/06/14 11:00:12 istewart
51  * More changes for 223 beta
52  *
53  * Revision 2.7 1993/06/02 09:52:35 istewart
54  * Beta 223 Updates - see Notes file
55  *
56  * Revision 2.6 1993/02/16 16:03:15 istewart
57  * Beta 2.22 Release
58  *
59  * Revision 2.5 1993/01/26 18:35:09 istewart
60  * Release 2.2 beta 0
61  *
62  * Revision 2.4 1992/12/14 10:54:56 istewart
63  * BETA 215 Fixes and 2.1 Release
64  *
65  * Revision 2.3 1992/11/06 10:03:44 istewart
66  * 214 Beta test updates
67  *
68  * Revision 2.2 1992/07/16 14:33:34 istewart
69  * Beta 212 Baseline
70  *
71  * Revision 2.1 1992/07/10 10:52:48 istewart
72  * 211 Beta updates
73  *
74  * Revision 2.0 1992/04/13 17:39:09 Ian_Stewartson
75  * MS-Shell 2.0 Baseline release
76  *
77  */
78 
79 #if defined (__EMX__)
80 # include <sys/emx.h>
81 #endif
82 #include <sys/types.h>
83 #include <sys/stat.h>
84 #include <stdio.h>
85 #include <signal.h>
86 #include <errno.h>
87 #include <setjmp.h>
88 #include <stdlib.h>
89 #include <fcntl.h>
90 #include <string.h>
91 #include <unistd.h>
92 #include <limits.h>
93 #include <dirent.h>
94 #include <ctype.h>
95 #include <stdarg.h>
96 #if defined (__EMX__)
97 # include <sys/ioctl.h>
98 #endif
99 
100 
101 /*
102  * There appears to be no alloca in TurboC
103  */
104 
105 #if defined (__TURBOC__)
106 # include <alloc.h>
107 # include <dir.h>
108 # define alloca(x) malloc (x)
109 # define alloca_free(x) free (x)
110 #else
111 # include <malloc.h>
112 # define alloca_free(x)
113 #endif
114 
115 #include "sh.h"
116 
117 #define MAX_LINE 160 /* Max line length */
118 
119 #define F_START 4
120 #define NSTART 16 /* default number of words to */
121  /* allow for initially */
122 #define IS_OCTAL(a) (((a) >= '0') && ((a) <= '7'))
123 
124 static char *nopipe = "can't create pipe";
125 
126 /* List of open files to allow us to simulate the Unix open and unlink
127  * operation for temporary files
128  */
129 
130 typedef struct flist {
131  struct flist *fl_next; /* Next link */
132  char *fl_name; /* File name */
133  bool fl_close; /* Delete on close flag */
134  int fl_size; /* Size of fl_fd array */
135  int fl_count; /* Number of entries in array */
136  int fl_mode; /* File open mode */
137  int *fl_fd; /* File ID array (for dup) */
139 
141 static s_flist * F_LOCAL find_entry (int);
142 static void F_LOCAL SaveFileDescriptor (FILE *);
143 static char * F_LOCAL _Ex_SkipWhiteSpace (char *);
144 #if (OS_TYPE != OS_UNIX)
145 static void F_LOCAL _Ex_ExpandIndirectFile (char *, Word_B **);
146 static char * F_LOCAL _Ex_GetSpace (int, char *);
147 static void F_LOCAL _Ex_ExpandField (char *, Word_B **);
148 static char * F_LOCAL _Ex_ConvertEnvVariables (char *);
149 static void F_LOCAL _Ex_SaveArgvValue (char *, bool, Word_B **);
150 static void F_LOCAL _Ex_CommandLine (char *, Word_B **);
151 static unsigned long F_LOCAL QueryApplicationType1 (int);
152 #endif
153 
154 #if (OS_TYPE == OS_OS2)
155 static void F_LOCAL _Ex_ProcessEMXArguments (char *, Word_B **);
156 #endif
157 
158 #if (OS_TYPE == OS_DOS) && (__WATCOMC__)
159 extern char *_LpCmdLine;
160 extern char *_LpPgmName;
161 static void F_LOCAL OutputBIOSString (char *);
162 #endif
163 
164 #if (__WATCOMC__)
165 char *_getdcwd (int, char *, int);
166 #endif
167 
168 #if (__EMX__)
169 char *_getdcwd (int, char *, int);
170 #endif
171 
172 /*
173  * Command Line pointers
174  */
175 
176 #if defined (__TURBOC__) /* Borland C */
177 # define ARG_ARRAY _argv
178 # define ARG_COUNT _argc
179 # define ENTRY_POINT _setargv
180 #elif defined (__WATCOMC__) /* WatCom C */
181 # define ARG_ARRAY ___Argv
182 # define ARG_COUNT ___Argc
183 # define ENTRY_POINT __Init_Argv
184 #elif defined (__IBMC__) /* IBM C Set/2 */
185 # define ARG_ARRAY _argv
186 # define ARG_COUNT _argc
187 # define ENTRY_POINT _setuparg
188 #elif defined (__EMX__) /* Gcc/EMX */
189 # define ARG_ARRAY _argv
190 # define ARG_COUNT _argc
191 # define ENTRY_POINT GetArgcV
192 #elif defined (MSDOS) /* Microsoft C */
193 # define ARG_ARRAY __argv
194 # define ARG_COUNT __argc
195 # define ENTRY_POINT _setargv
196 #else
197 # define ARG_ARRAY __argv
198 # define ARG_COUNT __argc
199 # define ENTRY_POINT _setargv
200 #endif
201 
202 #if (OS_TYPE != OS_UNIX)
203 # if defined (__EMX__) /* Gcc/EMX */
204 extern void __startup (int argc, char **argv);
205 extern void ENTRY_POINT (void);
206 static char **ARG_ARRAY; /* Current argument address */
207 static int ARG_COUNT; /* Current argument count */
208 # else
209 extern void ENTRY_POINT (void);
210 extern char **ARG_ARRAY; /* Current argument address */
211 extern int ARG_COUNT; /* Current argument count */
212 # endif
213 
214 /*
215  * Some EMX startup statics
216  */
217 
218 # if defined (__EMX__)
219  /* The version of this libc.*/
220 static const char _libc_version[] = " libc for emx 0.8h";
221 /* Display this warning if emx.dll or emx.exe is out of date. */
222 static const char _version_warning[] =
223  "WARNING: emx 0.8h or later required\r\n";
224  /* The buffer for stdin. */
225 static char ibuf[BUFSIZ];
226 # endif
227 
228 /*
229  * General OS independent start of the command line and program name.
230  */
231 
232 char *_ACmdLine;
233 char *_APgmName; /* Program name */
234 
235 # if defined (OS2)
236 extern ushort far _aenvseg;
237 extern ushort far _acmdln;
238 # endif
239 
240 /*
241  * Directory functions internals structure.
242  */
243 
244 typedef struct _dircontents DIRCONT;
245 static void FreeDirectoryListing (DIRCONT *);
246 #endif
247 
248 /*
249  * Open a file and add it to the Open file list. Errors are the same as
250  * for a normal open.
251  */
252 
253 int S_open (bool d_flag, char *name, int mode)
254 {
255  int pmask;
256  s_flist *fp = (s_flist *)NULL;
257  int *f_list = (int *)NULL;
258  char *f_name = (char *)NULL;
259  void (*save_signal)(int);
260 #ifdef __IBMC__
261  HFILE shfFileHandle;
262  ULONG ActionTaken;
263  ULONG ulFileAttribute;
264  ULONG ulOpenFlag;
265  ULONG ulOpenMode;
266  APIRET rc; /* Return code */
267 #endif
268 
269 /* Check this is a valid file name */
270 
272 
273 /* Grap some space. If it fails, free space and return an error */
274 
275  if (((fp = (s_flist *) GetAllocatedSpace (sizeof (s_flist)))
276  == (s_flist *)NULL) ||
277  ((f_list = (int *) GetAllocatedSpace (sizeof (int) * F_START))
278  == (int *)NULL) ||
279  ((f_name = StringSave (name)) == null))
280  {
281  if (f_list == (int *)NULL)
282  ReleaseMemoryCell ((void *)f_list);
283 
284  if (fp == (s_flist *)NULL)
285  ReleaseMemoryCell ((void *)fp);
286 
287  return -1;
288  }
289 
290 /* Disable signals */
291 
292  save_signal = signal (SIGINT, SIG_IGN);
293 
294 /* Set up the structure. Change two Unix device names to the DOS
295  * equivalents and disable create
296  */
297  fp->fl_name = strcpy (f_name, name);
298 
299 #if (OS_TYPE != OS_UNIX)
301  {
302  if (stricmp (&name[5], "tty") == 0)
303  strcpy (&f_name[5], "con");
304 
305  else if (stricmp (&name[5], "null") == 0)
306  strcpy (&f_name[5], "nul");
307 
308  mode &= ~(O_CREAT | O_TRUNC);
309  }
310 #endif
311 
312  fp->fl_close = d_flag;
313  fp->fl_size = F_START;
314  fp->fl_count = 1;
315  fp->fl_fd = f_list;
316  fp->fl_mode = mode;
317 
318 /*
319  * The IBM C Set/2 OS/2 2.x library function, open, does not appear work
320  * correctly. So I've replaced it with a emulator here
321  */
322 
323 #ifdef __IBMC__
324 
325 /* Set up open actions */
326 
327  if (mode & O_CREAT)
328  ulOpenFlag = OPEN_ACTION_CREATE_IF_NEW |
329  ((mode & O_EXCL)
330  ? OPEN_ACTION_FAIL_IF_EXISTS
331  : ((mode & O_TRUNC)
332  ? OPEN_ACTION_REPLACE_IF_EXISTS
333  : OPEN_ACTION_OPEN_IF_EXISTS));
334  else
335  ulOpenFlag = OPEN_ACTION_FAIL_IF_NEW |
336  ((mode & O_TRUNC)
337  ? OPEN_ACTION_REPLACE_IF_EXISTS
338  : OPEN_ACTION_OPEN_IF_EXISTS);
339 
340 /* Set up open mode */
341 
342  ulOpenMode = OPEN_FLAGS_SEQUENTIAL | OPEN_SHARE_DENYNONE;
343 
344  if (mode & O_NOINHERIT)
345  ulOpenMode |= OPEN_FLAGS_NOINHERIT;
346 
347  if (mode & O_WRONLY)
348  ulOpenMode |= OPEN_ACCESS_WRITEONLY;
349 
350  else if (mode & O_RDONLY)
351  ulOpenMode |= OPEN_ACCESS_READONLY;
352 
353  else
354  ulOpenMode |= OPEN_ACCESS_READWRITE;
355 
357  rc = DosOpen (f_name, &shfFileHandle, &ActionTaken, (ULONG)0, FILE_NORMAL,
358  ulOpenFlag, ulOpenMode, (PEAOP2)NULL);
360 
361  if (!rc)
362  {
363  if (mode & O_TEXT)
364  setmode (shfFileHandle, O_TEXT);
365 
366  else if (mode & O_BINARY)
367  setmode (shfFileHandle, O_BINARY);
368 
369  fp->fl_fd[0] = shfFileHandle;
370  }
371 
372  else
373  fp->fl_fd[0] = -1;
374 
375 #else
377  fp->fl_fd[0] = open (f_name, mode, S_IREAD | S_IWRITE);
379 #endif
380 
381 /* Open the file */
382 
383  if (fp->fl_fd[0] < 0)
384  {
385  ReleaseMemoryCell ((void *)f_name);
386  ReleaseMemoryCell ((void *)f_list);
387  ReleaseMemoryCell ((void *)fp);
388  pmask = -1;
389  }
390 
391 /* Make sure everything is in area 0 */
392 
393  else
394  {
395  SetMemoryAreaNumber ((void *)fp, 0);
396  SetMemoryAreaNumber ((void *)f_list, 0);
397 
398 /* List into the list */
399 
400  fp->fl_next = list_start;
401  list_start = fp;
402 
403 /* Return the file descriptor */
404 
405  pmask = fp->fl_fd[0];
406 
407 /* Mark in use */
408 
410  }
411 
412 /* Restore signals */
413 
414  signal (SIGINT, save_signal);
415 
416  return pmask;
417 }
418 
419 /*
420  * Scan the File list for the appropriate entry for the specified ID
421  */
422 
423 static s_flist * F_LOCAL find_entry (int fid)
424 {
425  s_flist *fp = list_start;
426  int i;
427 
428  while (fp != (s_flist *)NULL)
429  {
430  for (i = 0; i < fp->fl_count; i++)
431  {
432  if (fp->fl_fd[i] == fid)
433  return fp;
434  }
435 
436  fp = fp->fl_next;
437  }
438 
439  return (s_flist *)NULL;
440 }
441 
442 /* Close the file
443  *
444  * We need a version of close that does everything but close for dup2 as
445  * new file id is closed. If c_flag is TRUE, close the file as well.
446  */
447 
448 int S_close (int fid, bool c_flag)
449 {
450  s_flist *fp = find_entry (fid);
451  s_flist *last = (s_flist *)NULL;
452  s_flist *fp1 = list_start;
453  int i;
454  bool release = TRUE;
455  bool delete = FALSE;
456  char *fname;
457  void (*save_signal)(int);
458 
459 /* Disable signals */
460 
461  save_signal = signal (SIGINT, SIG_IGN);
462 
463 /* Find the entry for this ID */
464 
465  if (fp != (s_flist *)NULL)
466  {
467  for (i = 0; i < fp->fl_count; i++)
468  {
469  if (fp->fl_fd[i] == fid)
470  fp->fl_fd[i] = -1;
471 
472  if (fp->fl_fd[i] != -1)
473  release = FALSE;
474  }
475 
476 /* Are all the Fids closed ? */
477 
478  if (release)
479  {
480  fname = fp->fl_name;
481  delete = fp->fl_close;
482  ReleaseMemoryCell ((void *)fp->fl_fd);
483 
484 /* Scan the list and remove the entry */
485 
486  while (fp1 != (s_flist *)NULL)
487  {
488  if (fp1 != fp)
489  {
490  last = fp1;
491  fp1 = fp1->fl_next;
492  continue;
493  }
494 
495  if (last == (s_flist *)NULL)
496  list_start = fp->fl_next;
497 
498  else
499  last->fl_next = fp->fl_next;
500 
501  break;
502  }
503 
504 /* OK - delete the area */
505 
506  ReleaseMemoryCell ((void *)fp);
507  }
508  }
509 
510 /* Flush these two in case they were re-directed */
511 
512  FlushStreams ();
513 
514 /* Close the file anyway */
515 
516  if (c_flag)
517  {
518  i = close (fid);
519 /* --ak crashes here for VS 2010 in the case of the default
520  Invalid parameter handler. So I define myInvalidParameterHandler()
521  in sh1.c which does nothing. */
523  }
524 
525 /* Delete the file ? */
526 
527  if (delete)
528  {
529  unlink (fname);
530  ReleaseMemoryCell ((void *)fname);
531  }
532 
533 /* Restore signals */
534 
535  signal (SIGINT, save_signal);
536 
537  return i;
538 }
539 
540 /*
541  * Version of fclose
542  */
543 
544 void S_fclose (FILE *FP, bool d_flag)
545 {
546  CloseFile (FP);
547  S_close (fileno (FP), d_flag);
548 }
549 
550 /*
551  * Duplicate file handler. Add the new handler to the ID array for this
552  * file.
553  */
554 
555 int S_dup (int old_fid)
556 {
557  int new_fid;
558 
559  if ((new_fid = dup (old_fid)) >= 0)
560  S_Remap (old_fid, new_fid);
561 
562  return new_fid;
563 }
564 
565 /*
566  * Add the ID to the ID array for this file
567  */
568 
569 int S_Remap (int old_fid, int new_fid)
570 {
571  s_flist *fp = find_entry (old_fid);
572  int *flist;
573  int i;
574 
575  ChangeFileDescriptorStatus (new_fid, TRUE);
576 
577  if (fp == (s_flist *)NULL)
578  return new_fid;
579 
580 /* Is there an empty slot ? */
581 
582  for (i = 0; i < fp->fl_count; i++)
583  {
584  if (fp->fl_fd[i] == -1)
585  return (fp->fl_fd[i] = new_fid);
586  }
587 
588 /* Is there any room at the end ? No - grap somemore space and effect a
589  * re-alloc. What to do if the re-alloc fails - should really get here.
590  * Safty check only??
591  */
592 
593  if (fp->fl_count == fp->fl_size)
594  {
595  flist = (int *)ReAllocateSpace ((void *)fp->fl_fd,
596  (fp->fl_size + F_START) * sizeof (int));
597 
598  if (flist == (int *)NULL)
599  return new_fid;
600 
601  SetMemoryAreaNumber ((void *)flist, 0);
602  fp->fl_fd = flist;
603  fp->fl_size += F_START;
604  }
605 
606  return (fp->fl_fd[fp->fl_count++] = new_fid);
607 }
608 
609 
610 /*
611  * Duplicate file handler onto specific handler
612  */
613 
614 int S_dup2 (int old_fid, int new_fid)
615 {
616  int res = -1;
617  int i;
618  Save_IO *sp;
619 
620 /* If duping onto stdin, stdout or stderr, Search the Save IO stack for an
621  * entry matching us
622  */
623 
624  if ((new_fid >= STDIN_FILENO) && (new_fid <= STDERR_FILENO))
625  {
626  for (sp = SSave_IO, i = 0;
628  i++, ++sp)
629  continue;
630 
631 /* If depth is greater the Execute_stack_depth - we should panic as this
632  * should not happen. However, for the moment, I'll ignore it
633  */
634 
635 /* If there an entry for this depth ? */
636 
637  if (i == NSave_IO_E)
638  {
639 
640 /* Do we need more space? */
641 
642  if (NSave_IO_E == MSave_IO_E)
643  {
644  sp = (Save_IO *)ReAllocateSpace ((MSave_IO_E != 0)
645  ? SSave_IO : (void *)NULL,
647  sizeof (Save_IO));
648 
649 /* Check for error */
650 
651  if (sp == (Save_IO *)NULL)
652  return -1;
653 
654 /* Save original data */
655 
656  SetMemoryAreaNumber ((void *)sp, 1);
657  SSave_IO = sp;
659  }
660 
661 /* Initialise the new entry */
662 
663  sp = &SSave_IO[NSave_IO_E++];
664  sp->depth = Execute_stack_depth;
665  sp->fp[STDIN_FILENO] = -1;
666  sp->fp[STDOUT_FILENO] = -1;
667  sp->fp[STDERR_FILENO] = -1;
668  }
669 
670  if (sp->fp[new_fid] == -1)
671  sp->fp[new_fid] = ReMapIOHandler (new_fid);
672 
673  FlushStreams ();
674  }
675 
676 /* OK - Dup the descriptor */
677 
678  if ((old_fid != -1) && ((res = dup2 (old_fid, new_fid)) >= 0))
679  {
680  S_close (new_fid, FALSE);
681  res = S_Remap (old_fid, new_fid);
682  }
683 
684  return res;
685 }
686 
687 /*
688  * Restore the Stdin, Stdout and Stderr to original values. If change is
689  * FALSE, just remove entries from stack. A special case for exec.
690  */
691 
692 int RestoreStandardIO (int rv, bool change)
693 {
694  int j, i;
695  Save_IO *sp;
696 
697 /* Start at the top and remove any entries above the current execute stack
698  * depth
699  */
700 
701  for (j = NSave_IO_E; j > 0; j--)
702  {
703  sp = &SSave_IO[j - 1];
704 
705  if (sp->depth < Execute_stack_depth)
706  break;
707 
708 /* Reduce number of entries */
709 
710  --NSave_IO_E;
711 
712 /* If special case (changed at this level) - continue */
713 
714  if (!change && (sp->depth == Execute_stack_depth))
715  continue;
716 
717 /* Close and restore any files */
718 
719  for (i = STDIN_FILENO; i <= STDERR_FILENO; i++)
720  {
721  if (sp->fp[i] != -1)
722  {
723  S_close (i, TRUE);
724  dup2 (sp->fp[i], i);
725  S_close (sp->fp[i], TRUE);
726  }
727  }
728  }
729 
730  return rv;
731 }
732 
733 /*
734  * Create a Pipe
735  */
736 
737 int OpenAPipe (void)
738 {
739  int i;
740 
741  if ((i = S_open (TRUE, GenerateTemporaryFileName (), O_PMASK)) < 0)
743 
744  return i;
745 }
746 
747 /*
748  * Close a pipe
749  */
750 
751 void CloseThePipe (int pv)
752 {
753  if (pv != -1)
754  S_close (pv, TRUE);
755 }
756 
757 /*
758  * Check for restricted shell
759  */
760 
762 {
764  {
765  PrintErrorMessage (BasicErrorMessage, s, "restricted");
766  return TRUE;
767  }
768 
769  return FALSE;
770 }
771 
772 /*
773  * Check to see if a file is a shell script. If it is, return the file
774  * handler for the file
775  */
776 static char *Extensions[] = { null, SHELLExtension, KSHELLExtension};
777 
778 int OpenForExecution (char *path, char **params, int *nargs)
779 {
780  int RetVal = -1;
781  int j;
782  int EndP = strlen (path);
783  char *local_path;
784 
785 /* Work on a copy of the path */
786 
787  if ((local_path = AllocateMemoryCell (EndP + 5)) == (char *)NULL)
788  return -1;
789 
790  strcpy (local_path, path);
791 
792 /* Try the file name and then with a .sh and then .ksh appended */
793 
794  for (j = 0; j < 3; j++)
795  {
796  strcpy (&local_path[EndP], Extensions[j]);
797 
798  if ((RetVal = CheckForScriptFile (local_path, params, nargs)) >= 0)
799  break;
800  }
801 
802  ReleaseMemoryCell ((void *)local_path);
803  return RetVal;
804 }
805 
806 /*
807  * Check for shell script
808  */
809 
810 int CheckForScriptFile (char *path, char **params, int *nargs)
811 {
812  char buf[512]; /* Input buffer */
813  int fp; /* File handler */
814  int nbytes; /* Number of bytes read */
815  char *bp; /* Pointers into buffers */
816  char *ep;
817 
818  if ((fp = S_open (FALSE, path, O_RMASK)) < 0)
819  return -1;
820 
821 /* zero or less bytes - not a script */
822 
823  memset (buf, 0, 512);
824  nbytes = read (fp, buf, 512);
825  lseek (fp, 0L, SEEK_SET);
826 
827  for (ep = &buf[nbytes], bp = buf;
828  (bp < ep) && ((unsigned char)*bp >= 0x08); ++bp)
829  continue;
830 
831 /* If non-ascii file or length is less than 1 - not a script */
832 
833  if ((bp != ep) || (nbytes < 1))
834  {
835  S_close (fp, TRUE);
836  return -1;
837  }
838 
839 /* Ensure end of buffer detected */
840 
841  buf[511] = 0;
842 
843 /* Initialise the return parameters, if specified */
844 
845  if (params != (char **)NULL)
846  *params = null;
847 
848  if (nargs != (int *)NULL)
849  *nargs = 0;
850 
851 /* We don't care how many bytes were read now, so use it to count the
852  * additional arguments
853  */
854 
855  nbytes = 0;
856 
857 /* Find the end of the first line */
858 
859  if ((bp = strchr (buf, CHAR_NEW_LINE)) != (char *)NULL)
860  *bp = 0;
861 
862  bp = buf;
863  ep = (char *)NULL;
864 
865 /* Check for script */
866 
867  if ((*(bp++) != CHAR_COMMENT) || (*(bp++) != '!'))
868  return fp;
869 
870  while (*bp)
871  {
872 
873 /* Save the start of the arguments */
874 
875  if (*(bp = _Ex_SkipWhiteSpace (bp)))
876  {
877  if (ep == (char *)NULL)
878  ep = bp;
879 
880 /* Count the arguments */
881 
882  ++nbytes;
883  }
884 
885  bp = SkipToWhiteSpace (bp);
886  }
887 
888 /* Set up the return parameters, if appropriate */
889 
890  if ((params != (char **)NULL) && (strlen (ep) != 0))
891  {
892  if ((*params = AllocateMemoryCell (strlen (ep) + 1)) == (char *)NULL)
893  {
894  *params = null;
895  S_close (fp, TRUE);
896  return -1;
897  }
898 
899  strcpy (*params, ep);
900  }
901 
902  if (nargs != (int *)NULL)
903  *nargs = nbytes;
904 
905  return fp;
906 }
907 
908 /*
909  * Get the file descriptor type.
910  */
911 
912 #if (OS_TYPE == OS_OS2)
913 int GetDescriptorType (int fp)
914 {
915  OSCALL_PARAM fsType = HANDTYPE_FILE;
916  OSCALL_PARAM usDeviceAttr;
917 
918  if (DosQHandType (fp, &fsType, &usDeviceAttr))
919  return DESCRIPTOR_UNKNOWN;
920 
921  if (LOBYTE (fsType) == HANDTYPE_PIPE)
922  return DESCRIPTOR_PIPE;
923 
924  else if (LOBYTE (fsType) != HANDTYPE_DEVICE)
925  return DESCRIPTOR_FILE;
926 
927 /* The value 0x8083 seems to be the value returned by the console */
928 
929  else if (usDeviceAttr == 0x8083)
930  return DESCRIPTOR_CONSOLE;
931 
932  else
933  return DESCRIPTOR_DEVICE;
934 }
935 #endif
936 
937 /* NT version */
938 
939 #if (OS_TYPE == OS_NT)
940 
941 int GetDescriptorType (int fp)
942 {
943 /* extern long _CRTAPI1 _get_osfhandle (int); */
944  extern long _get_osfhandle (int);
945  DWORD fdwMode;
946  HANDLE osfp = (HANDLE)_get_osfhandle (fp);
947 
948  switch (GetFileType (osfp))
949  {
950  default:
951  return DESCRIPTOR_UNKNOWN;
952 
953  case FILE_TYPE_DISK:
954  return DESCRIPTOR_FILE;
955 
956  case FILE_TYPE_PIPE:
957  return DESCRIPTOR_PIPE;
958 
959  case FILE_TYPE_CHAR:
960  {
961  if (!GetConsoleMode (osfp, &fdwMode))
962  return DESCRIPTOR_DEVICE;
963 
964  else
965  return DESCRIPTOR_CONSOLE;
966  }
967  }
968 }
969 #endif
970 
971 /* DOS Version */
972 
973 #if (OS_TYPE == OS_DOS)
975 {
976  union REGS r;
977 
978  r.x.REG_AX = 0x4400;
979  r.x.REG_BX = fp;
980  DosInterrupt (&r, &r);
981 
982  if (r.x.REG_CFLAGS)
983  return DESCRIPTOR_UNKNOWN;
984 
985  if ((r.x.REG_DX & 0x0080) == 0)
986  return DESCRIPTOR_FILE;
987 
988  if ((r.x.REG_DX & 0x0081) != 0x0081)
989  return DESCRIPTOR_DEVICE;
990 
991 /*
992  * Check to see if the console is really the console or something else.
993  * Look at /dev/con and see if the console i/o bits are set
994  */
995 
996  r.x.REG_AX = 0x4400;
997  r.x.REG_BX = open ("con", 0);
998  DosInterrupt (&r, &r);
999  close (r.x.REG_BX);
1000 
1001  if ((r.x.REG_CFLAGS) || ((r.x.REG_DX & 0x0083) != 0x0083))
1002  return DESCRIPTOR_DEVICE;
1003 
1004  return DESCRIPTOR_CONSOLE;
1005 }
1006 #endif
1007 
1008 /* UNIX Version */
1009 
1010 #if (OS_TYPE == OS_UNIX)
1011 int GetDescriptorType (int fp)
1012 {
1013  struct _stat s;
1014 
1015  if (fstat (fp, &s) != 0)
1016  return DESCRIPTOR_UNKNOWN;
1017 
1018  else if (S_ISREG (s.st_mode))
1019  return DESCRIPTOR_FILE;
1020 
1021  else if (S_ISCHR (s.st_mode))
1022  return DESCRIPTOR_CONSOLE;
1023 
1024  return DESCRIPTOR_UNKNOWN;
1025 }
1026 #endif
1027 
1028 /*
1029  * Get the current drive number
1030  */
1031 
1032 #if (OS_TYPE == OS_OS2)
1033 unsigned int GetCurrentDrive (void)
1034 {
1035  OSCALL_PARAM usDisk;
1036  ULONG ulDrives;
1037 
1038  DosQCurDisk (&usDisk, &ulDrives); /* gets current drive */
1039 
1040  return (unsigned int)usDisk;
1041 }
1042 #endif
1043 
1044 /* NT Version */
1045 
1046 #if (OS_TYPE == OS_NT)
1047 unsigned int GetCurrentDrive (void)
1048 {
1049  char szCurDir [MAX_PATH];
1050 
1051  GetCurrentDirectory (MAX_PATH, szCurDir);
1052 
1053  return szCurDir[0] - 'A' + 1;
1054 }
1055 #endif
1056 
1057 /* DOS Version */
1058 
1059 #if (OS_TYPE == OS_DOS)
1060 unsigned int GetCurrentDrive (void)
1061 {
1062 # if defined (__TURBOC__)
1063  return (unsigned int)getdisk () + 1;
1064 
1065 # elif defined (__EMX__)
1066 
1067  union REGS r;
1068 
1069  r.h.ah = 0x19;
1070  DosInterrupt (&r, &r);
1071  return r.h.al + 1;
1072 
1073 # else
1074 
1075  unsigned int CurrentDrive;
1076 
1077  _dos_getdrive (&CurrentDrive);
1078 
1079  return CurrentDrive;
1080 # endif
1081 }
1082 #endif
1083 
1084 /*
1085  * Set the current drive number and return the number of drives.
1086  */
1087 
1088 #if (OS_TYPE == OS_OS2)
1089 int SetCurrentDrive (unsigned int drive)
1090 {
1091  OSCALL_RET usError;
1092  OSCALL_PARAM usDisk;
1093  FSALLOCATE FsBlock;
1094  ULONG ulDrives;
1095  int i;
1096 
1097 /* Check the drive exists */
1098 
1100  usError = DosQFSInfo (drive, FSIL_ALLOC, (PBYTE)&FsBlock,
1101  sizeof (FSALLOCATE));
1103 
1104  if (usError || DosSelectDisk ((USHORT)drive))
1105  return -1;
1106 
1107 /* Get the current disk and check that to see the number of drives */
1108 
1109  DosQCurDisk (&usDisk, &ulDrives); /* gets current drive */
1110 
1111  for (i = 25; (!(ulDrives & (1L << i))) && i >= 0; --i)
1112  continue;
1113 
1114  return i + 1;
1115 }
1116 #endif
1117 
1118 /* NT Version */
1119 
1120 #if (OS_TYPE == OS_NT)
1121 int SetCurrentDrive (unsigned int drive)
1122 {
1123  char szNewDrive[3];
1124  DWORD dwLogicalDrives;
1125  int i;
1126 
1127  szNewDrive[0] = drive + 'A' - 1;
1128  szNewDrive[1] = CHAR_DRIVE;
1129  szNewDrive[2] = 0;
1130 
1131  if (!SetCurrentDirectory (szNewDrive))
1132  return -1;
1133 
1134  dwLogicalDrives = GetLogicalDrives();
1135 
1136  for (i = 25; (!(dwLogicalDrives & (1L << i))) && i >= 0; --i)
1137  continue;
1138 
1139  return i + 1;
1140 }
1141 #endif
1142 
1143 /* DOS Version */
1144 
1145 #if (OS_TYPE == OS_DOS)
1146 int SetCurrentDrive (unsigned int drive)
1147 {
1148 # if defined (__TURBOC__)
1149 
1150  return setdisk (drive - 1);
1151 
1152 # elif defined (__EMX__)
1153 
1154  union REGS r;
1155 
1156  r.h.ah = 0x0e;
1157  r.h.dl = drive;
1158  DosInterrupt (&r, &r);
1159  return r.h.al;
1160 
1161 # else
1162 
1163  unsigned int ndrives;
1164 
1165  _dos_setdrive (drive, &ndrives);
1166 
1167  return (int)ndrives;
1168 # endif
1169 }
1170 #endif
1171 
1172 /*
1173  * Get and process configuration line:
1174  *
1175  * <field> = <field> <field> # comment
1176  *
1177  * return the number of fields found.
1178  */
1179 
1181 {
1182  char *cp;
1183  int len;
1184  Word_B *wb;
1185 
1186  if (fgets (fd->Line, fd->LineLength - 1, fd->FP) == (char *)NULL)
1187  {
1188  CloseFile (fd->FP);
1189  return -1;
1190  }
1191 
1192 /* Remove the EOL */
1193 
1194  if ((cp = strchr (fd->Line, CHAR_NEW_LINE)) != (char *)NULL)
1195  *cp = 0;
1196 
1197 /* Remove the comments at end */
1198 
1199  if ((cp = strchr (fd->Line, CHAR_COMMENT)) != (char *)NULL)
1200  *cp = 0;
1201 
1202 /* Extract the fields */
1203 
1204  if (fd->Fields != (Word_B *)NULL)
1205  fd->Fields->w_nword = 0;
1206 
1207  fd->Fields = SplitString (fd->Line, fd->Fields);
1208 
1209  if (WordBlockSize (fd->Fields) < 2)
1210  return 1;
1211 
1212 /* Check for =. At end of first field? */
1213 
1214  wb = fd->Fields;
1215  len = strlen (wb->w_words[0]) - 1;
1216 
1217  if (wb->w_words[0][len] == CHAR_ASSIGN)
1218  wb->w_words[0][len] = 0;
1219 
1220 /* Check second field for just being equals */
1221 
1222  if (strcmp (wb->w_words[1], "=") == 0)
1223  {
1224  if ((--(wb->w_nword)) > 1)
1225  memcpy (wb->w_words + 1, wb->w_words + 2,
1226  (wb->w_nword - 1) * sizeof (void *));
1227  }
1228 
1229 /* Check the second field for starting with an equals */
1230 
1231  else if (*(wb->w_words[1]) == CHAR_ASSIGN)
1232  strcpy (wb->w_words[1], wb->w_words[1] + 1);
1233 
1234  return wb->w_nword;
1235 }
1236 
1237 /*
1238  * Split the string up into words
1239  */
1240 
1241 Word_B *SplitString (char *string, Word_B *wb)
1242 {
1243  while (*string)
1244  {
1245  while (isspace (*string))
1246  *(string++) = 0;
1247 
1248  if (*string)
1249  wb = AddWordToBlock (string, wb);
1250 
1251  string = SkipToWhiteSpace (string);
1252  }
1253 
1254  return wb;
1255 }
1256 
1257 /*
1258  * Test to see if a file is a directory
1259  */
1260 
1261 
1262 bool IsDirectory (char *Name)
1263 {
1264  struct _stat s;
1265 
1266  return C2bool (S_stat (Name, &s) && S_ISDIR (s.st_mode & S_IFMT));
1267 }
1268 
1269 
1270 /*
1271 bool IsDirectory (char *Name)
1272 {
1273  WIN32_FIND_DATA wfd;
1274  HANDLE h;
1275 
1276  if((h = FindFirstFile(Name,&wfd)) != INVALID_HANDLE_VALUE) {
1277  if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
1278  FindClose(h);
1279  return 1;
1280  }
1281  else {
1282  FindClose(h);
1283  return 0;
1284  }
1285  }
1286  else {
1287  return 0;
1288  }
1289 }
1290 */
1291 
1292 
1293 /*
1294  * Check that filename conforms to DOS format. Convert additional .'s to ~.
1295  */
1296 
1297 #if (OS_TYPE != OS_UNIX)
1298 char *CheckDOSFileName (char *name)
1299 {
1300  char *s;
1301 /*
1302  char *s1;
1303 */
1304  int count = 0;
1305 
1306 
1307 
1308 /*
1309  if (!IsHPFSFileSystem (name))
1310  {
1311 
1312  if ((s = FindLastPathCharacter (name)) == (char *)NULL)
1313  s = name;
1314 
1315  else
1316  ++s;
1317 
1318  if ((strcmp (s, CurrentDirLiteral) == 0) ||
1319  (strcmp (s, ParentDirLiteral) == 0))
1320 
1321  else if (*s == CHAR_PERIOD)
1322  count = 2;
1323 
1324  else
1325  {
1326  s1 = s;
1327 
1328  while ((s1 = strchr (s1, CHAR_PERIOD)) != (char *)NULL)
1329  {
1330  count++;
1331  s1++;
1332  }
1333  }
1334 
1335  if (count > 1)
1336  {
1337  if (!FL_TEST (FLAG_WARNING))
1338  fprintf (stderr, "sh: File <%s> has too many dots, changed to ",
1339  name);
1340 
1341  if (*s == CHAR_PERIOD)
1342  *s = CHAR_TILDE;
1343 
1344  s1 = s;
1345  count = 0;
1346 
1347  while ((s1 = strchr (s1, CHAR_PERIOD)) != (char *)NULL)
1348  {
1349  if (++count != 1)
1350  *s1 = CHAR_TILDE;
1351 
1352  s1++;
1353  }
1354 
1355  if (!FL_TEST (FLAG_WARNING))
1356  PrintWarningMessage ("<%s>", name);
1357  }
1358  }
1359 
1360 */
1361 
1362  s = name;
1363 
1364  while ((s = FindPathCharacter (s)) != (char *)NULL)
1365  {
1366  if (IsPathCharacter (*(++s)))
1367  strcpy (s, s + 1);
1368  }
1369 
1370  return name;
1371 }
1372 #endif
1373 
1374 /*
1375  * Get a valid numeric value
1376  */
1377 
1378 bool ConvertNumericValue (char *string, long *value, int base)
1379 {
1380  char *ep;
1381 
1382  *value = strtol (string, &ep, base);
1383 
1384  return C2bool (!*ep);
1385 }
1386 
1387 /*
1388  * Character types - replaces is???? functions
1389  */
1390 
1391 void SetCharacterTypes (char *String, int Type)
1392 {
1393  int i;
1394 
1395 /*
1396  * If we're changing C_IFS (interfield separators), clear them all
1397  */
1398 
1399  if ((Type & C_IFS))
1400  {
1401  for (i = 0; i < UCHAR_MAX+1; i++)
1402  CharTypes[i] &=~ C_IFS;
1403 
1404  CharTypes[0] |= C_IFS; /* include \0 as an C_IFS */
1405  }
1406 
1407  /*
1408  * Allow leading \0 in string
1409  */
1410 
1411  CharTypes[(unsigned char) *(String++)] |= Type;
1412 
1413  while (*String != 0)
1414  CharTypes[(unsigned char) *(String++)] |= Type;
1415 }
1416 
1417 /*
1418  * Initialise the Ctypes values
1419  */
1420 
1422 {
1423  int c;
1424 
1425  memset (CharTypes, 0, UCHAR_MAX);
1426 
1427  for (c = 'a'; c <= 'z'; c++)
1428  CharTypes[c] = C_ALPHA;
1429 
1430  for (c = 'A'; c <= 'Z'; c++)
1431  CharTypes[c] = C_ALPHA;
1432 
1433  CharTypes['_'] = C_ALPHA;
1434  CharTypes[';'] = C_SEMICOLON;
1435  SetCharacterTypes ("0123456789", C_DIGIT);
1436  SetCharacterTypes ("\0 \t\n|&;<>()", C_LEX1);
1437  SetCharacterTypes ("*@#!$-?", C_VAR1);
1438  SetCharacterTypes ("=-+?#%", C_SUBOP);
1439  SetCharacterTypes ("?*[", C_WILD);
1440 }
1441 
1442 /*
1443  * Word Block Functions
1444  *
1445  * Add a new word to a Word Block or list
1446  */
1447 
1448 Word_B *AddWordToBlock (char *wd, Word_B *wb)
1449 {
1450 
1451 /* Do we require more space ? */
1452 
1453  if ((wb == (Word_B *)NULL) || (wb->w_nword >= wb->w_bsize))
1454  {
1455  int NewCount = (wb == (Word_B *)NULL) ? NSTART : wb->w_nword * 2;
1456 
1457  if ((wb = ReAllocateSpace (wb, (NewCount * sizeof (char *)) +
1458  sizeof (Word_B))) == (Word_B *)NULL)
1459  return (Word_B *)NULL;
1460 
1461  wb->w_bsize = NewCount;
1462  }
1463 
1464 /* Add to the list */
1465 
1466  wb->w_words[wb->w_nword++] = (void *)wd;
1467  return wb;
1468 }
1469 
1470 /*
1471  * Get the number of words in a block
1472  */
1473 
1475 {
1476  return (wb == (Word_B *)NULL) ? 0 : wb->w_nword;
1477 }
1478 
1479 /*
1480  * Convert a word block structure into a array of strings
1481  */
1482 
1483 char **GetWordList (Word_B *wb)
1484 {
1485  char **wd;
1486  int nb;
1487 
1488 /* If the word block is empty or does not exist, return no list */
1489 
1490  if (wb == (Word_B *)NULL)
1491  return NOWORDS;
1492 
1493 /* Get some space for the array and set it up */
1494 
1495  if (((nb = sizeof (char *) * wb->w_nword) == 0) ||
1496  ((wd = (char **)GetAllocatedSpace (nb)) == (char **)NULL))
1497  {
1498  ReleaseMemoryCell ((void *)wb);
1499  return NOWORDS;
1500  }
1501 
1502  memcpy (wd, wb->w_words, nb);
1503  ReleaseMemoryCell ((void *)wb); /* perhaps should done by caller */
1504  return wd;
1505 }
1506 
1507 
1508 /*
1509  * Build up the parameter variables
1510  */
1511 
1512 Word_B *AddParameter (char *value, Word_B *wb, char *function)
1513 {
1514  char **NewArray;
1515  int Count;
1516  int i;
1517 
1518 /* Add to block */
1519 
1520  if ((wb = AddWordToBlock (value, wb)) == (Word_B *)NULL)
1521  {
1522  fprintf (stderr, BasicErrorMessage, function, Outofmemory1);
1523  return (Word_B *)NULL;
1524  }
1525 
1526 /* If not end, return */
1527 
1528  if (value != NOWORD)
1529  return wb;
1530 
1531 /* Get number of entries */
1532 
1533  Count = wb->w_nword - 1;
1534 
1535 /* Convert to array */
1536 
1537  if ((NewArray = GetWordList (wb)) == NOWORDS)
1538  {
1539  fprintf (stderr, BasicErrorMessage, function, Outofmemory1);
1540  return (Word_B *)NULL;
1541  }
1542 
1543 /* Release old array. Note: never release entry zero */
1544 
1545  if (ParameterArray != NOWORDS)
1546  {
1547  for (i = 1; i < ParameterCount; ++i)
1548  ReleaseMemoryCell ((void *)ParameterArray [i]);
1549 
1551  }
1552 
1553 /* Set new array to no-release */
1554 
1555  for (i = 0; i < Count; ++i)
1556  SetMemoryAreaNumber ((void *)NewArray[i], 0);
1557 
1558  SetMemoryAreaNumber ((void *)NewArray, 0);
1559 
1560 /* Reset globals and environment */
1561 
1562  ParameterCount = Count - 1;
1563  ParameterArray = NewArray;
1565  return wb;
1566 }
1567 
1568 /*
1569  * Is this a valid variable name
1570  */
1571 
1573 {
1574  if (!IS_VariableFC ((int)*s))
1575  return *s;
1576 
1577  while (*s && IS_VariableSC ((int)*s))
1578  ++s;
1579 
1580  return *s;
1581 }
1582 
1583 /*
1584  * File Open Stream Save
1585  */
1586 
1587 FILE *FOpenFile (char *name, char *mode)
1588 {
1589  FILE *fp;
1590 
1592  fp = fopen (name, mode);
1594 
1595  if (fp != (FILE *)NULL)
1596  {
1598  setvbuf (fp, (char *)NULL, _IOFBF, BUFSIZ);
1600  }
1601 
1602  return fp;
1603 }
1604 
1605 /*
1606  * File D Open Stream Save
1607  */
1608 
1609 FILE *MyReOpenFile (int fid, char *mode)
1610 {
1611  FILE *fp = fdopen (fid, mode);
1612 
1613  if (fp != (FILE *)NULL)
1614  {
1616  setvbuf (fp, (char *)NULL, _IOFBF, BUFSIZ);
1617  }
1618 
1619  return fp;
1620 }
1621 
1622 /*
1623  * File Close Stream Save
1624  */
1625 
1627 {
1628  Word_B *wb = e.OpenStreams;
1629  int NEntries = WordBlockSize (wb);
1630  int i;
1631 
1632  for (i = 0; i < NEntries; i++)
1633  {
1634  if (wb->w_words[i] == (char *)fp)
1635  wb->w_words[i] = (char *)NULL;
1636  }
1637 
1639  return fclose (fp);
1640 }
1641 
1642 /*
1643  * Flush output streams
1644  */
1645 
1646 void FlushStreams (void)
1647 {
1648  fflush (stdout);
1649  fflush (stderr);
1650 }
1651 
1652 /*
1653  * Save Descriptor in Environment
1654  */
1655 
1657 {
1658  Word_B *wb = e.OpenStreams;
1659  int NEntries = WordBlockSize (wb);
1660  int i;
1661 
1662  for (i = 0; i < NEntries; i++)
1663  {
1664  if (wb->w_words[i] == (char *)NULL)
1665  {
1666  wb->w_words[i] = (char *)fp;
1667  return;
1668  }
1669  }
1670 
1671  e.OpenStreams = AddWordToBlock ((char *)fp, wb);
1672  SetMemoryAreaNumber ((void *)e.OpenStreams, 0);
1673 }
1674 
1675 /*
1676  * Local Stat function to do some additional checks
1677  */
1678 
1679 bool S_stat(char *FileName, struct _stat *Status)
1680 {
1681  int rc;
1682 
1685  rc = _stat(FileName, Status);
1687 
1688 /*
1689  * Watcom has a problem stat'ing the root directory!
1690  */
1691 
1692 #if defined (__WATCOMC__) /* WatCom C */
1693  if (rc)
1694  {
1695  char *fullpath;
1696  char *cp;
1697 
1698  if ((fullpath = AllocateMemoryCell (FFNAME_MAX)) != (char *)NULL)
1699  {
1700  if (((cp = FindLastPathCharacter (strcpy (fullpath, FileName)))
1701  != (char *)NULL) &&
1702  ((strcmp (++cp, ParentDirLiteral) == 0) ||
1703  (strcmp (cp, CurrentDirLiteral) == 0)))
1704  strcat (cp, "/");
1705 
1706 /* Generate the full path */
1707 
1708  GenerateFullExecutablePath (fullpath);
1709 
1710 /* Root directory is a special case */
1711 
1712  if (strcmp (fullpath + 1, ":\\.") == 0)
1713  fullpath[3] = 0;
1714 
1716  rc = stat (fullpath, Status);
1718  ReleaseMemoryCell (fullpath);
1719  }
1720  }
1721 #endif
1722 
1723  return rc ? FALSE : TRUE;
1724 }
1725 
1726 /*
1727  * Local access function to do some additional checks
1728  */
1729 
1730 bool S_access (char *FileName, int mode)
1731 {
1732  int rc;
1733 
1735  rc = access (FileName, mode);
1737 
1738  return rc ? FALSE : TRUE;
1739 }
1740 
1741 /*
1742  * Local change directory function to do some additional checks
1743  */
1744 
1745 bool S_chdir (char *PathName)
1746 {
1747  int rc;
1748 
1749  CheckDOSFileName (PathName);
1750 
1752  rc = chdir (PathName);
1754 
1755  return rc ? FALSE : TRUE;
1756 }
1757 
1758 /*
1759  * Local get current directory function to do some additional checks
1760  *
1761  * Assumes that PathName is a string of length PATH_MAX + 6.
1762  */
1763 
1764 bool S_getcwd (char *PathName, int drive)
1765 {
1766  char *res = (char *)NULL;
1767 #if (OS_TYPE == OS_NT)
1768  unsigned int cdrive;
1769 #endif
1770 
1771 #if defined (__TURBOC__)
1772  *(strcpy (PathName, RootDirectory)) = GetDriveLetter (drive);
1773 #endif
1774 
1776 
1777 #if (OS_TYPE != OS_UNIX)
1778  if (drive)
1779  {
1780 # if defined (__TURBOC__)
1781  res = getcurdir (drive, PathName + 3) ? (char *)NULL : PathName;
1782 # elif (OS_TYPE != OS_NT)
1783  res = _getdcwd (drive, PathName, PATH_MAX + 4);
1784 # else
1785  cdrive = GetCurrentDrive ();
1786 
1787  if (SetCurrentDrive (drive) != -1)
1788  {
1789  res = !GetCurrentDirectory (PATH_MAX + 4, PathName) ? (char *)NULL
1790  : PathName;
1791  SetCurrentDrive (cdrive);
1792  }
1793 # endif
1794  }
1795 
1796  else
1797 # if defined (__EMX__)
1798  res = _getdcwd (GetCurrentDrive (), PathName, PATH_MAX + 4);
1799 # else
1800  res = getcwd (PathName, PATH_MAX + 4);
1801 # endif
1802 #else
1803  res = getcwd (PathName, PATH_MAX + 4);
1804 #endif
1805 
1807  PathName[PATH_MAX + 5] = 0;
1808 
1809 /* Convert to Unix format */
1810 
1811  PATH_TO_UNIX (PathName);
1812  PATH_TO_LOWER_CASE (PathName);
1813 
1814 /* Drive letter in lower case */
1815 
1816 #if (OS_TYPE != OS_UNIX)
1817  *PathName = (char)tolower (*PathName);
1818 #endif
1819 
1820  return (res == (char *)NULL) ? FALSE : TRUE;
1821 }
1822 
1823 /*
1824  * Open the directory stream
1825  *
1826  *
1827  * OS/2 version
1828  */
1829 
1830 #if (OS_TYPE == OS_OS2)
1831 DIR * _CDECL opendir (name)
1832 const char *name;
1833 {
1834  DIR *dirp;
1835  char *last;
1836  DIRCONT *dp;
1837  char *nbuf;
1838  HDIR d_handle = HDIR_SYSTEM;
1839  bool HPFS;
1840  int len = strlen (name);
1841  unsigned long rc;
1842 
1843 # if (OS_SIZE == OS_32)
1844  FILEFINDBUF3 dtabuf;
1845 # define DTA_NAME dtabuf.achName
1846  ULONG d_count = 1;
1847 # else
1848  FILEFINDBUF dtabuf;
1849 # define DTA_NAME dtabuf.achName
1850  USHORT d_count = 1;
1851 # endif
1852 
1853  if (!len)
1854  {
1855  errno = ENOTDIR;
1856  return (DIR *)NULL;
1857  }
1858 
1859  if ((nbuf = AllocateMemoryCell (len + 5)) == (char *)NULL)
1860  return (DIR *) NULL;
1861 
1862  strcpy (nbuf, name);
1863  last = &nbuf[len - 1];
1864 
1865 /* Ok, DOS is very picky about its directory names. The following are
1866  * valid.
1867  *
1868  * c:/
1869  * c:.
1870  * c:name/name1
1871  *
1872  * c:name/ is not valid
1873  */
1874 
1875  if (((*last == CHAR_DOS_PATH) || IsPathCharacter (*last)) &&
1876  (len > 1) && (!((len == 3) && IsDriveCharacter (name[1]))))
1877  *(last--) = 0;
1878 
1879 /* Check its a directory and get some space */
1880 
1881  if ((!IsDirectory (nbuf)) ||
1882  ((dirp = (DIR *) AllocateMemoryCell (sizeof (DIR))) == (DIR *) NULL))
1883  {
1885  return (DIR *)NULL;
1886  }
1887 
1888 /* Set up to find everything */
1889 
1890  if ((*last != CHAR_DOS_PATH) && !IsPathCharacter (*last))
1891  strcat (last, DirectorySeparator);
1892 
1893  strcat (last, "*.*");
1894 
1895 /* For OS/2, find the file system type */
1896 
1897  HPFS = IsHPFSFileSystem (nbuf);
1898 
1899  dirp->dd_loc = 0;
1900  dirp->dd_cp = (DIRCONT *) NULL;
1901  dirp->dd_contents = (DIRCONT *) NULL;
1902 
1904 
1905 # if (OS_SIZE == OS_32)
1906  rc = DosFindFirst (nbuf, &d_handle, OS_FILE_ATTRIBUTES, &dtabuf,
1907  sizeof (FILEFINDBUF3), &d_count, FIL_STANDARD);
1908 # else
1909  rc = DosFindFirst (nbuf, &d_handle, OS_FILE_ATTRIBUTES, &dtabuf,
1910  sizeof (FILEFINDBUF), &d_count, (ULONG)0);
1911 # endif
1912 
1914 
1915  if (rc)
1916  {
1918  ReleaseMemoryCell (dirp);
1919  return (DIR *) NULL;
1920  }
1921 
1922 /* Wander through the directory! */
1923 
1924  do
1925  {
1926  if (((dp = (DIRCONT *) AllocateMemoryCell (sizeof (DIRCONT)))
1927  == (DIRCONT *)NULL) ||
1928  ((dp->_d_entry = StringCopy (DTA_NAME)) == null))
1929  {
1930  if (dp->_d_entry != (char *)NULL)
1931  ReleaseMemoryCell ((char *)dp);
1932 
1934  FreeDirectoryListing (dirp->dd_contents);
1935 
1936  DosFindClose (d_handle);
1937  return (DIR *) NULL;
1938  }
1939 /*
1940  if (!HPFS)
1941  strlwr (dp->_d_entry);
1942 */
1943  if (dirp->dd_contents != (DIRCONT *) NULL)
1944  dirp->dd_cp = dirp->dd_cp->_d_next = dp;
1945 
1946  else
1947  dirp->dd_contents = dirp->dd_cp = dp;
1948 
1949  dp->_d_next = (DIRCONT *) NULL;
1950 
1951  d_count = 1;
1952  } while (DosFindNext (d_handle, &dtabuf, sizeof (FILEFINDBUF),
1953  &d_count) == 0);
1954 
1955  dirp->dd_cp = dirp->dd_contents;
1957 
1958  DosFindClose (d_handle);
1959  return dirp;
1960 }
1961 #endif
1962 
1963 /*
1964  * NT version
1965  */
1966 
1967 #if (OS_TYPE == OS_NT)
1968 DIR * _CDECL opendir (name)
1969 const char *name;
1970 {
1971  DIR *dirp;
1972  char *last;
1973  DIRCONT *dp;
1974  char *nbuf;
1975  HANDLE d_handle;
1976  bool HPFS;
1977  int len;
1978  WIN32_FIND_DATA dtabuf;
1979 
1980  len = strlen(name);
1981 
1982  if (!len)
1983  {
1984  errno = ENOTDIR;
1985  return (DIR *)NULL;
1986  }
1987 
1988  if ((nbuf = AllocateMemoryCell (len + 5)) == (char *)NULL)
1989  return (DIR *) NULL;
1990 
1991  strcpy (nbuf, name);
1992  last = &nbuf[len - 1];
1993 
1994 /* Ok, DOS is very picky about its directory names. The following are
1995  * valid.
1996  *
1997  * c:/
1998  * c:.
1999  * c:name/name1
2000  *
2001  * c:name/ is not valid
2002  */
2003 
2004  if (((*last == CHAR_DOS_PATH) || IsPathCharacter (*last)) &&
2005  (len > 1) && (!((len == 3) && IsDriveCharacter (name[1]))))
2006  *(last--) = 0;
2007 
2008 /* Check its a directory and get some space */
2009 
2010  if ((!IsDirectory (nbuf)) ||
2011  ((dirp = (DIR *) AllocateMemoryCell (sizeof (DIR))) == (DIR *) NULL))
2012  {
2014  return (DIR *)NULL;
2015  }
2016 
2017 /* Set up to find everything */
2018 
2019  if ((*last != CHAR_DOS_PATH) && !IsPathCharacter (*last))
2020  strcat (last, DirectorySeparator);
2021 
2022  strcat (last, "*.*");
2023 
2024 /* For OS/2, find the file system type */
2025 
2026  HPFS = IsHPFSFileSystem (nbuf);
2027 
2028  dirp->dd_loc = 0;
2029  dirp->dd_cp = (DIRCONT *) NULL;
2030  dirp->dd_contents = (DIRCONT *) NULL;
2031 
2033  d_handle = FindFirstFile (nbuf, &dtabuf);
2035 
2036  if (d_handle == INVALID_HANDLE_VALUE)
2037  {
2039  ReleaseMemoryCell (dirp);
2040  return (DIR *) NULL;
2041  }
2042 
2043 /* Wander through the directory! */
2044 
2045  do
2046  {
2047  if (((dp = (DIRCONT *) AllocateMemoryCell (sizeof (DIRCONT)))
2048  == (DIRCONT *)NULL) ||
2049  ((dp->_d_entry = StringCopy (dtabuf.cFileName)) == null))
2050  {
2051  if (dp->_d_entry != (char *)NULL)
2052  ReleaseMemoryCell ((char *)dp);
2053 
2055  FreeDirectoryListing (dirp->dd_contents);
2056 
2057  FindClose (d_handle);
2058  return (DIR *) NULL;
2059  }
2060 /*
2061  if (!HPFS)
2062  strlwr (dp->_d_entry);
2063 */
2064  if (dirp->dd_contents != (DIRCONT *) NULL)
2065  dirp->dd_cp = dirp->dd_cp->_d_next = dp;
2066 
2067  else
2068  dirp->dd_contents = dirp->dd_cp = dp;
2069 
2070  dp->_d_next = (DIRCONT *) NULL;
2071 
2072  } while (FindNextFile (d_handle, &dtabuf));
2073 
2074  dirp->dd_cp = dirp->dd_contents;
2076 
2077  FindClose (d_handle);
2078  return dirp;
2079 }
2080 #endif
2081 
2082 /*
2083  * DOS Version
2084  */
2085 
2086 #if (OS_TYPE == OS_DOS)
2088 const char *name;
2089 {
2090  DIR *dirp;
2091  char *last;
2092  DIRCONT *dp;
2093  char *nbuf;
2094  int len = strlen (name);
2095  unsigned long rc;
2096 
2097 # if defined (__TURBOC__)
2098  struct ffblk dtabuf;
2099 # define DTA_NAME dtabuf.ff_name
2100 # define DIR_FINDNEXT(a) findnext (a)
2101 # define DIR_FINDFIRST(F,A,B) findfirst (F, B, A)
2102 # elif defined (__EMX__)
2103  struct _find dtabuf;
2104 # define DTA_NAME dtabuf.name
2105 # define DIR_FINDNEXT(a) __findnext (a)
2106 # define DIR_FINDFIRST(F,A,B) __findfirst (F, A, B)
2107 # else
2108  struct find_t dtabuf;
2109 # define DTA_NAME dtabuf.name
2110 # define DIR_FINDNEXT(a) _dos_findnext (a)
2111 # define DIR_FINDFIRST(F,A,B) _dos_findfirst (F, A, B)
2112 # endif
2113 
2114  if (!len)
2115  {
2116  errno = ENOTDIR;
2117  return (DIR *)NULL;
2118  }
2119 
2120  if ((nbuf = AllocateMemoryCell (len + 5)) == (char *)NULL)
2121  return (DIR *) NULL;
2122 
2123  strcpy (nbuf, name);
2124  last = &nbuf[len - 1];
2125 
2126 /* Ok, DOS is very picky about its directory names. The following are
2127  * valid.
2128  *
2129  * c:/
2130  * c:.
2131  * c:name/name1
2132  *
2133  * c:name/ is not valid
2134  */
2135 
2136  if (((*last == CHAR_DOS_PATH) || IsPathCharacter (*last)) &&
2137  (len > 1) && (!((len == 3) && IsDriveCharacter (name[1]))))
2138  *(last--) = 0;
2139 
2140 /* Check its a directory and get some space */
2141 
2142  if ((!IsDirectory (nbuf)) ||
2143  ((dirp = (DIR *) AllocateMemoryCell (sizeof (DIR))) == (DIR *) NULL))
2144  {
2146  return (DIR *)NULL;
2147  }
2148 
2149 /* Set up to find everything */
2150 
2151  if ((*last != CHAR_DOS_PATH) && !IsPathCharacter (*last))
2152  strcat (last, DirectorySeparator);
2153 
2154  strcat (last, "*.*");
2155 
2156  dirp->dd_loc = 0;
2157  dirp->dd_cp = (DIRCONT *) NULL;
2158  dirp->dd_contents = (DIRCONT *) NULL;
2159 
2161 
2162  rc = DIR_FINDFIRST (nbuf, OS_FILE_ATTRIBUTES, &dtabuf);
2163 
2165 
2166  if (rc)
2167  {
2169  ReleaseMemoryCell (dirp);
2170  return (DIR *) NULL;
2171  }
2172 
2173  do
2174  {
2175  if (((dp = (DIRCONT *) AllocateMemoryCell (sizeof (DIRCONT)))
2176  == (DIRCONT *)NULL) ||
2177  ((dp->_d_entry = StringCopy (DTA_NAME)) == null))
2178  {
2179  if (dp->_d_entry != (char *)NULL)
2180  ReleaseMemoryCell ((char *)dp);
2181 
2183  FreeDirectoryListing (dirp->dd_contents);
2184  return (DIR *) NULL;
2185  }
2186 
2187  strlwr (dp->_d_entry);
2188 
2189  if (dirp->dd_contents != (DIRCONT *) NULL)
2190  dirp->dd_cp = dirp->dd_cp->_d_next = dp;
2191 
2192  else
2193  dirp->dd_contents = dirp->dd_cp = dp;
2194 
2195  dp->_d_next = (DIRCONT *) NULL;
2196 
2197  } while (DIR_FINDNEXT (&dtabuf) == 0);
2198 
2199  dirp->dd_cp = dirp->dd_contents;
2201  return dirp;
2202 }
2203 #endif
2204 /*
2205  * Close the directory stream
2206  */
2207 
2208 #if (OS_TYPE != OS_UNIX)
2209 int _CDECL closedir (dirp)
2210 DIR *dirp;
2211 {
2212  if (dirp != (DIR *)NULL)
2213  {
2214  FreeDirectoryListing (dirp->dd_contents);
2215  ReleaseMemoryCell ((char *)dirp);
2216  }
2217 
2218  return 0;
2219 }
2220 
2221 /*
2222  * Read the next record from the stream
2223  */
2224 
2225 struct dirent * _CDECL readdir (dirp)
2226 DIR *dirp;
2227 {
2228  static struct dirent dp;
2229 
2230  if ((dirp == (DIR *)NULL) || (dirp->dd_cp == (DIRCONT *) NULL))
2231  return (struct dirent *) NULL;
2232 
2233  dp.d_reclen = strlen (strcpy (dp.d_name, dirp->dd_cp->_d_entry));
2234  dp.d_off = dirp->dd_loc * 32;
2235  dp.d_ino = (ino_t)++dirp->dd_loc;
2236  dirp->dd_cp = dirp->dd_cp->_d_next;
2237 
2238  return &dp;
2239 }
2240 
2241 /*
2242  * Release the internal structure
2243  */
2244 
2246 DIRCONT *dp;
2247 {
2248  DIRCONT *odp;
2249 
2250  while ((odp = dp) != (DIRCONT *)NULL)
2251  {
2252  if (dp->_d_entry != (char *)NULL)
2253  ReleaseMemoryCell (dp->_d_entry);
2254 
2255  dp = dp->_d_next;
2256  ReleaseMemoryCell ((char *)odp);
2257  }
2258 }
2259 #endif
2260 
2261 /*
2262  * For OS/2 and NT, we need to know if we have to convert to lower case. This
2263  * only applies to non-HPFS (FAT, NETWARE etc) file systems.
2264  */
2265 
2266 #if (OS_TYPE == OS_OS2)
2267 /*
2268  * Define the know FAT systems
2269  */
2270 
2271 static char *FATSystems[] = {"FAT", "NETWARE", (char *)NULL};
2272 
2273 /*
2274  * Check for Long filenames
2275  */
2276 
2277 bool IsHPFSFileSystem (char *directory)
2278 {
2279  BYTE bData[128];
2280  BYTE bName[3];
2281  int i;
2282  char *FName;
2283  unsigned long rc;
2284  OSCALL_PARAM cbData;
2285  unsigned int nDrive;
2286 # if (OS_SIZE == OS_32)
2287  PFSQBUFFER2 pFSQ = (PFSQBUFFER2)bData;
2288 # endif
2289 
2290 /*
2291  * Mike tells me there are IFS calls to determine this, but he carn't
2292  * remember which. So we read the partition info and check for HPFS.
2293  */
2294 
2295  if (isalpha (directory[0]) && IsDriveCharacter (directory[1]))
2296  nDrive = toupper (directory[0]) - '@';
2297 
2298  else
2299  nDrive = GetCurrentDrive ();
2300 
2301 /* Set up the drive name */
2302 
2303  bName[0] = (char) (nDrive + '@');
2304  bName[1] = CHAR_DRIVE;
2305  bName[2] = 0;
2306 
2307  cbData = sizeof (bData);
2308 
2309 /* Read the info, if we fail - assume non-HPFS */
2310 
2312 
2313 # if (OS_SIZE == OS_32)
2314  rc = DosQFSAttach (bName, 0, FSAIL_QUERYNAME, pFSQ, &cbData);
2315 # else
2316  rc = DosQFSAttach (bName, 0, FSAIL_QUERYNAME, bData, &cbData, 0L);
2317 # endif
2318 
2320 
2321  if (rc)
2322  return FALSE;
2323 
2324 # if (OS_SIZE == OS_32)
2325  FName = pFSQ->szName + pFSQ->cbName + 1;
2326 # else
2327  FName = bData + (*((USHORT *) (bData + 2)) + 7);
2328 # endif
2329 
2330  for (i = 0; FATSystems[i] != (char *)NULL; i++)
2331  {
2332  if (stricmp (FName, FATSystems[i]) == 0)
2333  return FALSE;
2334  }
2335 
2336  return TRUE;
2337 }
2338 #endif
2339 
2340 /*
2341  * Windows NT version
2342  */
2343 
2344 #if (OS_TYPE == OS_NT)
2345 bool IsHPFSFileSystem (char *directory)
2346 {
2347  char bName[4];
2348  DWORD flags;
2349  DWORD maxname;
2350  BOOL rc;
2351  unsigned int nDrive;
2352 
2353 /*
2354  * Mike tells me there are IFS calls to determine this, but he carn't
2355  * remember which. So we read the partition info and check for HPFS.
2356  */
2357 
2358  if (isalpha (directory[0]) && IsDriveCharacter (directory[1]))
2359  nDrive = toupper (directory[0]) - '@';
2360 
2361  else
2362  nDrive = GetCurrentDrive ();
2363 
2364 /* Set up the drive name */
2365 
2366  bName[0] = (char) (nDrive + '@');
2367  bName[1] = CHAR_DRIVE;
2368  bName[2] = CHAR_DOS_PATH;
2369  bName[3] = 0;
2370 
2371 /* Read the volume info, if we fail - assume non-HPFS */
2372 
2374 
2375  rc = GetVolumeInformation (bName, (LPTSTR)NULL, 0, (LPDWORD)NULL,
2376  &maxname, &flags, (LPTSTR)NULL, 0);
2378 
2379  return C2bool ((rc) && (flags & FS_CASE_SENSITIVE));
2380 }
2381 #endif
2382 
2383 
2384 /*
2385  * Get directory on drive x
2386  */
2387 
2388 #if defined (__WATCOMC__)
2389 char *_getdcwd (int drive, char *PathName, int len)
2390 {
2391  char TPath [PATH_MAX + 3];
2392 # if (OS_TYPE == OS_DOS)
2393  union REGS r;
2394 
2395 /* This is really a bit of a cheat. I'm not sure why it works, but is
2396  * does. The missing bit is that you really should set the DS register up
2397  * but that causes a memory violation. SO!!
2398  */
2399 
2400  r.x.REG_AX = 0x4700;
2401  r.h.dl = drive;
2402  r.x.esi = FP_OFF (TPath);
2403 
2404  DosInterrupt (&r, &r);
2405 
2406  if (r.x.cflag & INTR_CF)
2407  return (char *)NULL;
2408 
2409 # else
2410  ULONG cbBuf = PATH_MAX + 3;
2411 
2412  if (DosQueryCurrentDir (drive, TPath, &cbBuf))
2413  return (char *)NULL;
2414 # endif
2415 
2416 /* Insert the drive and root directory */
2417 
2418  *(strcpy (PathName, RootDirectory)) = GetDriveLetter (drive);
2419  return strcat (PathName, TPath);
2420 }
2421 #endif
2422 
2423 #if defined (__EMX__)
2424 char *_getdcwd (int drive, char *PathName, int len)
2425 {
2426  char TPath [PATH_MAX + 3];
2427 
2428  if (_getcwd1 (TPath, drive + 'A' - 1) != 0)
2429  return (char *)NULL;
2430 
2431 /* Insert the drive and root directory */
2432 
2433  *(strcpy (PathName, RootDirectory)) = GetDriveLetter (drive);
2434  return strcpy (PathName + 2, TPath);
2435 }
2436 #endif
2437 
2438 /*
2439  * MODULE ABSTRACT: _setargv
2440  *
2441  * UNIX like command line expansion
2442  */
2443 
2444 /*
2445  * OS/2 2.x (32-bit) version
2446  */
2447 
2448 #if (OS_TYPE == OS_OS2)
2449 # if (OS_SIZE == OS_32)
2450 void ENTRY_POINT (void)
2451 {
2452  APIRET rc;
2453  PTIB ptib;
2454  PPIB ppib;
2455  char *MName;
2456  Word_B *Alist = (Word_B *)NULL;
2457 
2458 /* Get the command line and program name */
2459 
2460  if ((rc = DosGetInfoBlocks (&ptib, &ppib)))
2461  PrintErrorMessage ("DosGetInfoBlocks: Cannot find command line\n%s\n",
2462  GetOSSystemErrorMessage (rc));
2463 
2464  if ((MName = GetAllocatedSpace (FFNAME_MAX)) == (char *)NULL)
2466 
2467  if ((rc = DosQueryModuleName (ppib->pib_hmte, FFNAME_MAX - 1, MName)))
2468  PrintErrorMessage ("DosQueryModuleName: Cannot get program name\n%s\n",
2469  GetOSSystemErrorMessage (rc));
2470 
2471 /* Save the program name and process the command line */
2472  _APgmName = MName;
2473  _Ex_ProcessEMXArguments (ppib->pib_pchcmd, &Alist);
2474 
2475 /* Terminate */
2476 
2477  _Ex_SaveArgvValue ((char *)NULL, FALSE, &Alist);
2478 }
2479 
2480 # else /* (OS_SIZE == OS_16) */
2481 
2482 /*
2483  * OS/2 1.x (16-bit) version
2484  */
2485 
2486 void ENTRY_POINT (void)
2487 {
2488  char far *argvp = (char far *)((((long)_aenvseg) << 16));
2489  ushort off = _acmdln;
2490  Word_B *Alist = (Word_B *)NULL;
2491 
2492  while (--off)
2493  {
2494  if (argvp[off - 1] == 0)
2495  break;
2496  }
2497 
2498 /* Add program name */
2499 
2500  _APgmName = &argvp[off];
2501 
2502  if (argvp[_acmdln] == 0)
2503  _Ex_SaveArgvValue (_APgmName, TRUE, &Alist);
2504 
2505  else
2506  {
2507  argvp += _acmdln;
2508  _Ex_ProcessEMXArguments (argvp, &Alist);
2509  }
2510 
2511 /* Terminate */
2512 
2513  _Ex_SaveArgvValue ((char *)NULL, FALSE, &Alist);
2514 }
2515 # endif
2516 
2517 #elif (OS_TYPE == OS_DOS)
2518 
2519 /*
2520  * MSDOS version
2521  */
2522 
2523 void ENTRY_POINT (void)
2524 {
2525  Word_B *Alist = (Word_B *)NULL;
2526  char *s; /* Temporary string pointer */
2527 # if (OS_SIZE == OS_16)
2528  /* Set up pointer to command line */
2529  unsigned int envs = *(int far *)((((long)_psp) << 16) + 0x02cL);
2530  union REGS r;
2531  unsigned int Length;
2532 
2533 /* For reasons that escape me, MSC 6.0 does sets up _osmajor and _osminor
2534  * in the command line parser!
2535  */
2536 
2537  r.h.ah = 0x30;
2538  DosInterrupt (&r, &r);
2539  _osminor = r.h.ah;
2540  _osmajor = r.h.al;
2541 
2542 /* Check the length */
2543 
2544  _ACmdLine = (char *)((((long)_psp) << 16) + 0x080L);
2545 
2546  if ((Length = (unsigned int)*(_ACmdLine++)) > 127)
2547  Length = 127;
2548 
2549  _ACmdLine[Length] = 0;
2550 
2551 /* Command line can be null or 0x0d terminated - convert to null */
2552 
2553  if ((s = strchr (_ACmdLine, CHAR_RETURN)) != (char *)NULL)
2554  *s = 0;
2555 
2556 /* Get the program name */
2557 
2558  if ((_osmajor <= 2) || (envs == 0))
2559  s = "unknown";
2560 
2561 /* In the case of DOS 3+, we look in the environment space */
2562 
2563  else
2564  {
2565  s = (char far *)(((long)envs) << 16);
2566 
2567  while (*s)
2568  {
2569  while (*(s++) != 0)
2570  continue;
2571  }
2572 
2573  s += 3;
2574  }
2575 
2576 # elif defined (__WATCOMC__)
2577  _ACmdLine = _LpCmdLine;
2578  s = _LpPgmName;
2579 # endif
2580 
2581 /* Add the program name */
2582 
2583  _APgmName = s;
2584  _Ex_SaveArgvValue (s, TRUE, &Alist);
2585  _Ex_CommandLine (_ACmdLine, &Alist);
2586  _Ex_SaveArgvValue ((char *)NULL, FALSE, &Alist);
2587 }
2588 
2589 #elif (OS_TYPE == OS_NT)
2590 
2591 /* NT version */
2592 
2593 void ENTRY_POINT (void)
2594 {
2595  char *MName;
2596  Word_B *Alist = (Word_B *)NULL;
2597 
2598  _ACmdLine = GetCommandLine ();
2599 
2600 /* Get the command line and program name */
2601 
2602  if ((MName = GetAllocatedSpace (MAX_PATH)) == (char *)NULL)
2604 
2605  if (!GetModuleFileName (0, MName, MAX_PATH))
2606  PrintErrorMessage ("GetModuleFileName: Cannot get program name\n%s\n",
2607  GetOSSystemErrorMessage (GetLastError ()));
2608 
2609 /* Save the program name and process the command line */
2610 
2611  _APgmName = MName;
2612 
2613  if (*_ACmdLine)
2614  _Ex_CommandLine (_ACmdLine, &Alist);
2615 
2616  else
2617  _Ex_SaveArgvValue (MName, TRUE, &Alist);
2618 
2619  _Ex_SaveArgvValue ((char *)NULL, FALSE, &Alist);
2620 }
2621 #endif
2622 
2623 /*
2624  * A fix for EMX, so that startup gets the arguments, I hope.
2625  *
2626  * Initialize the C run-time library. This function is called from crt0.s.
2627  * We know argc and argv are on the stack, and crt0.s does not remove them
2628  * from the start before calling main, so we just replace the values, I
2629  * hope.
2630  */
2631 
2632 #if defined (__EMX__)
2633 void _startup (int argc, char **argv)
2634 {
2635  int i, j;
2636 
2637 /*
2638  * Print a warning message on handle 2 (stderr) if emx.dll or
2639  * emx.exe is out of date.
2640  */
2641 
2642  if (_emx_vcmp < 0x302e3868) /* 0.8h */
2643  __write (2, _version_warning, strlen (_version_warning));
2644 /*
2645  * Fix the stack
2646  */
2647 
2648 # if defined (EMX_DOS)
2649  for (i = 0; i < argc; i++)
2650  {
2651  __write (2, "arg = <", 7);
2652  __write (2, argv[i], strlen (argv[i]));
2653  __write (2, ">\n", 2);
2654  }
2655 # else
2656  GetArgcV ();
2657  argc = ARG_COUNT;
2658  argv = ARG_ARRAY;
2659 # endif
2660 
2661 /* Initialize the file handles and the streams. */
2662 
2663  for (i = 0; i < _nfiles; ++i)
2664  {
2665  _files[i] = 0;
2666  _lookahead[i] = -1;
2667  _streamv[i].flags = 0;
2668 
2669 /*
2670  * Get the handle type. If this fails, the handle is not open.
2671  */
2672 
2673  if (ioctl (i, FGETHTYPE, &j) >= 0)
2674  {
2675  _files[i] |= O_TEXT;
2676 
2677  if (HT_ISDEV (j))
2678  _files[i] |= F_DEV;
2679 
2680  if (j == HT_NPIPE)
2681  _files[i] |= F_NPIPE;
2682 
2683  _streamv[i].flags |= _IOOPEN;
2684  _streamv[i].ptr = NULL;
2685  _streamv[i].buffer = NULL;
2686  _streamv[i].rcount = 0;
2687  _streamv[i].wcount = 0;
2688  _streamv[i].handle = i;
2689  _streamv[i].buf_size = 0;
2690  _streamv[i].tmpidx = 0;
2691  _streamv[i].pid = 0;
2692  _streamv[i].flush = _flushstream;
2693 
2694  switch (i)
2695  {
2696 
2697 /*
2698  * stdin is always buffered.
2699  */
2700 
2701  case 0:
2702  _files[0] |= O_RDONLY;
2703  _streamv[0].flags |= _IOREAD | _IOFBF | _IOBUFUSER;
2704  _streamv[0].ptr = ibuf;
2705  _streamv[0].buffer = ibuf;
2706  _streamv[0].buf_size = BUFSIZ;
2707  break;
2708 
2709 /*
2710  * stdout is buffered unless it's connected to a device.
2711  */
2712  case 1:
2713  _files[i] |= O_WRONLY;
2714  _streamv[i].flags |= (_IOWRT | _IOBUFNONE |
2715  (HT_ISDEV (j) ? _IONBF : _IOFBF));
2716  break;
2717 
2718 /*
2719  * stderr is always unbuffered.
2720  */
2721  case 2:
2722  _files[i] |= O_WRONLY;
2723  _streamv[i].flags |= _IOWRT | _IOBUFNONE | _IONBF;
2724  break;
2725 
2726 /*
2727  * All other handles can be read and written. A handle is buffered
2728  * unless it's connected to a device.
2729  */
2730 
2731  default:
2732  _files[i] |= O_RDWR;
2733  _streamv[i].flags |= (_IORW | _IOBUFNONE |
2734  (HT_ISDEV (j) ? _IONBF : _IOFBF));
2735  break;
2736  }
2737  }
2738  }
2739 }
2740 #endif
2741 /*
2742  * Expand the DOS Command line
2743  */
2744 
2745 #if (OS_TYPE != OS_UNIX)
2746 static void F_LOCAL _Ex_CommandLine (char *argvp, Word_B **Alist)
2747 {
2748  char *spos; /* End of string pointer */
2749  char *cpos; /* Start of string pointer */
2750  char *tpos;
2751  char *fn; /* Extracted file name string */
2752 
2753 /* Search for next separator */
2754 
2755  spos = argvp;
2756 
2757  while (*(cpos = _Ex_SkipWhiteSpace (spos)))
2758  {
2759 
2760 /* Extract string argument */
2761 
2762  if ((*cpos == CHAR_DOUBLE_QUOTE) ||
2763  (*cpos == CHAR_SINGLE_QUOTE) ||
2764  (*cpos == CHAR_BACKQUOTE))
2765  {
2766  spos = cpos + 1;
2767 
2768  do
2769  {
2770  if ((spos = strchr (spos, *cpos)) != NULL)
2771  {
2772  spos++;
2773  if (spos[-2] != CHAR_META)
2774  break;
2775  }
2776 
2777  else
2778  spos = &spos[strlen (cpos)];
2779 
2780  } while (*spos);
2781 
2782  if (*cpos == CHAR_BACKQUOTE) /* bug fix */
2783  fn = _Ex_GetSpace (spos - cpos, cpos); /* bug fix */
2784 
2785  else /* bug fix */
2786  { /* bug fix */
2787  fn = _Ex_GetSpace (spos - cpos - 2, cpos + 1);
2788 
2789 /* Remove escaped characters */
2790 
2791  tpos = fn;
2792 
2793  while ((tpos = strchr (tpos, *cpos)) != (char *)NULL)
2794  strcpy (tpos - 1, tpos);
2795  } /* bug fix */
2796  }
2797 
2798 /* Extract normal argument */
2799 
2800  else
2801  {
2802  spos = SkipToWhiteSpace (cpos);
2803  fn = _Ex_GetSpace (spos - cpos, cpos);
2804  }
2805 
2806 /* Process argument */
2807 
2808  if (*cpos != CHAR_SINGLE_QUOTE)
2810 
2811  switch (*cpos)
2812  {
2813  case CHAR_INDIRECT: /* Expand file */
2814  _Ex_ExpandIndirectFile (fn, Alist);
2815  break;
2816 
2817  case CHAR_DOUBLE_QUOTE: /* Expand string */
2818  case CHAR_SINGLE_QUOTE:
2819  _Ex_SaveArgvValue (fn, FALSE, Alist);
2820  break;
2821 
2822  default: /* Expand field */
2823  _Ex_ExpandField (fn, Alist);
2824  }
2825 
2827  }
2828 }
2829 #endif
2830 
2831 /*
2832  * Expand an indirect file Argument
2833  */
2834 
2835 #if (OS_TYPE != OS_UNIX)
2836 static void F_LOCAL _Ex_ExpandIndirectFile (char *file, Word_B **Alist)
2837 {
2838  FILE *fp; /* File descriptor */
2839  char *EoLFound; /* Pointer */
2840  int c_maxlen = MAX_LINE;
2841  char *line; /* Line buffer */
2842  char *eolp;
2843 
2844 /* If file open fails, expand as a field */
2845 
2846  if ((fp = fopen (file + 1, sOpenReadMode)) == (FILE *)NULL)
2847  PrintErrorMessage ("Cannot open re-direct file - %s (%s)\n",
2848  file + 1, strerror (errno));
2849 
2850 /* Grab some memory for the line */
2851 
2852  line = (char *)GetAllocatedSpace (c_maxlen);
2853 
2854 /* For each line in the file, remove EOF characters and add argument */
2855 
2856  while (fgets (line, c_maxlen, fp) != (char *)NULL)
2857  {
2858  EoLFound = strchr (line, CHAR_NEW_LINE);
2859  eolp = line;
2860 
2861 /* Handle continuation characters */
2862 
2863  while (TRUE)
2864  {
2865 
2866 /* Check for a continuation character */
2867 
2868  if (((EoLFound = strchr (eolp, CHAR_NEW_LINE)) != (char *)NULL) &&
2869  (*(EoLFound - 1) == CHAR_META))
2870  {
2871  *(EoLFound - 1) = CHAR_NEW_LINE;
2872  *EoLFound = 0;
2873  EoLFound = (char *)NULL;
2874  }
2875 
2876  else if (EoLFound == (char *)NULL)
2877  EoLFound = strchr (line, 0x1a);
2878 
2879  if (EoLFound != (char *)NULL)
2880  break;
2881 
2882 /* Find the end of the line */
2883 
2884  c_maxlen = strlen (line);
2885 
2886 /* Get some more space */
2887 
2888  line = (char *)ReAllocateSpace (line, c_maxlen + MAX_LINE);
2889  eolp = &line[c_maxlen];
2890 
2891  if (fgets (eolp, MAX_LINE, fp) == (char *)NULL)
2892  break;
2893  }
2894 
2895 /* Terminate the line and add it to the argument list */
2896 
2897  if (EoLFound != (char *)NULL)
2898  *EoLFound = 0;
2899 
2900  _Ex_SaveArgvValue (line, FALSE, Alist);
2901  }
2902 
2903  if (ferror(fp))
2904  PrintErrorMessage ("%s (%s)", file + 1, strerror (errno));
2905 
2907  fclose (fp);
2908 
2909 /* Delete tempoary files */
2910 
2911  if (((line = strrchr (file + 1, CHAR_PERIOD)) != (char *)NULL) &&
2912  (stricmp (line, ".tmp") == 0))
2913  unlink (file + 1); /* Delete it */
2914 }
2915 #endif
2916 
2917 /*
2918  * Get space for an argument name
2919  */
2920 
2921 #if (OS_TYPE != OS_UNIX)
2922 static char * F_LOCAL _Ex_GetSpace (int length, char *in_s)
2923 {
2924  char *out_s; /* Malloced space address */
2925 
2926 /* Copy string for specified length */
2927 
2928  out_s = strncpy ((char *)GetAllocatedSpace (length + 1), in_s, length);
2929  out_s[length] = 0;
2930  return (out_s);
2931 }
2932 #endif
2933 
2934 /*
2935  * Skip over spaces
2936  */
2937 
2938 static char * F_LOCAL _Ex_SkipWhiteSpace (char *a)
2939 {
2940  while (isspace (*a))
2941  a++;
2942 
2943  return a;
2944 }
2945 
2946 /*
2947  * Skip over spaces
2948  */
2949 
2950 char *SkipToWhiteSpace (char *a)
2951 {
2952  while (*a && !isspace (*a))
2953  a++;
2954 
2955  return a;
2956 }
2957 
2958 /* Find the location of meta-characters. If no meta, add the argument and
2959  * return NULL. If meta characters, return position of end of directory
2960  * name. If not multiple directories, return -1
2961  */
2962 
2963 #if (OS_TYPE != OS_UNIX)
2964 static void F_LOCAL _Ex_ExpandField (char *file, Word_B **Alist)
2965 {
2966  int i;
2967  int j;
2968  char *vecp[2];
2969  char **FileList;
2970 
2971  if (strpbrk (file, "?*[]\\") == (char *)NULL)
2972  {
2973  _Ex_SaveArgvValue (file, FALSE, Alist);
2974  return;
2975  }
2976 
2977  vecp[0] = file;
2978  vecp[1] = (char *)NULL;
2979 
2980  FileList = ExpandWordList (vecp, EXPAND_GLOBBING | EXPAND_TILDE,
2981  (ExeMode *)NULL);
2982 
2983  j = CountNumberArguments (FileList);
2984 
2985  for (i = 0; i < j; )
2986  _Ex_SaveArgvValue (FileList[i++], FALSE, Alist);
2987 
2988  ReleaseAList (FileList);
2989 }
2990 #endif
2991 
2992 /*
2993  * Process Environment - note that field is a malloc'ed field
2994  */
2995 
2996 #if (OS_TYPE != OS_UNIX)
2998 {
2999  char *sp, *cp, *np, *ep;
3000  char save;
3001  int b_flag;
3002 
3003  sp = field;
3004 
3005 /* Replace any $ strings */
3006 
3007  while ((sp = strchr (sp, CHAR_VARIABLE)) != (char *)NULL)
3008  {
3009 
3010 /* If ${...}, find the terminating } */
3011 
3012  if (*(cp = ++sp) == CHAR_OPEN_BRACES)
3013  {
3014  b_flag = 1;
3015  ++cp;
3016 
3017  while (*cp && (*cp != CHAR_CLOSE_BRACES))
3018  cp++;
3019  }
3020 
3021 /* Else must be $..., find the terminating non-alphanumeric */
3022 
3023  else
3024  {
3025  b_flag = 0;
3026 
3027  while (isalnum (*cp))
3028  cp++;
3029  }
3030 
3031 /* Grab the environment variable */
3032 
3033  if (cp == sp)
3034  continue;
3035 
3036 /* Get its value */
3037 
3038  save = *cp;
3039  *cp = 0;
3040  ep = getenv (sp + b_flag);
3041  *cp = save;
3042 
3043  if (ep != (char *)NULL)
3044  {
3045  np = _Ex_GetSpace (strlen(field) - (cp - sp) + strlen (ep) - 1,
3046  field);
3047  strcpy (&np[sp - field - 1], ep);
3049  strcpy ((sp = &np[strlen(np)]), cp + b_flag);
3050  field = np;
3051  }
3052  }
3053 
3054  return field;
3055 }
3056 #endif
3057 
3058 /*
3059  * Handle EMX style arguments
3060  */
3061 
3062 #if (OS_TYPE == OS_OS2)
3063 static void F_LOCAL _Ex_ProcessEMXArguments (char *argvp, Word_B **Alist)
3064 {
3065  char *cp;
3066  char *s = argvp;
3067 
3068  _Ex_SaveArgvValue (argvp, TRUE, Alist);
3069 
3070  argvp += strlen (argvp) + 1;
3071  _ACmdLine = argvp;
3072 
3073 /*
3074  * Add support in OS2 version for Eberhard Mattes EMX interface to commands.
3075  */
3076 
3077  if ((*argvp) && (*(cp = argvp + strlen (argvp) + 1) == CHAR_TILDE) &&
3078  (strcmp (s, PATH_TO_UNIX (cp + 1)) == 0))
3079  {
3080 
3081 /* Skip over the program name at string 2 to the start of the first
3082  * argument at string 3
3083  */
3084 
3085  EMXStyleParameters = TRUE;
3086  argvp += strlen (argvp) + 1;
3087  argvp += strlen (argvp) + 1;
3088 
3089  while (*argvp)
3090  {
3091  cp = (*argvp == CHAR_TILDE) ? argvp + 1 : argvp;
3092 
3093  if (*cp == CHAR_INDIRECT)
3094  _Ex_ExpandIndirectFile (cp, Alist);
3095 
3096  else
3097  _Ex_SaveArgvValue (cp, FALSE, Alist);
3098 
3099  argvp += strlen (argvp) + 1;
3100  }
3101  }
3102 
3103  else
3104  _Ex_CommandLine (argvp, Alist);
3105 }
3106 #endif
3107 
3108 /*
3109  * Save the next argument in the word block
3110  */
3111 
3112 #if (OS_TYPE != OS_UNIX)
3113 static void F_LOCAL _Ex_SaveArgvValue (char *value, bool Convert,
3114  Word_B **Alist)
3115 {
3116  if (Convert)
3117  PATH_TO_UNIX (value);
3118 
3119  *Alist = AddWordToBlock (value == (char *)NULL ? value : StringSave (value),
3120  *Alist);
3121 
3122  if (value == (char *)NULL)
3123  {
3124  ARG_ARRAY = GetWordList (*Alist);
3126  }
3127 }
3128 #endif
3129 
3130 
3131 #if (OS_TYPE == OS_DOS) && (OS_SIZE == OS_32) && !defined (__EMX__)
3132 /*
3133  * INTERRUPT 24 - ERROR HANDLER - Output message
3134  *
3135  * doserror - Error code
3136  * devhdr - Device header address.
3137  * deverror -
3138  *
3139  * Bits Meaning
3140  *
3141  * 15 Disk error if false (0).
3142  * Other device error if true (1).
3143  * 14 Not used.
3144  * 13 "Ignore" response not allowed if false.
3145  * 12 "Retry" response not allowed if false.
3146  * 11 "Fail" response not allowed if false. (Note that DOS changes
3147  * "fail" to "abort".)
3148  * 9-10 Location (for disk error)
3149  *
3150  * 0 - DOS
3151  * 1 - File Allocation Table (FAT)
3152  * 2 - Directory
3153  * 3 - Data area
3154  *
3155  * 8 Read error if false; write error if true
3156  * 0 - 7 Device Number
3157  */
3158 
3159 
3160 char *I24_Errors [] = {
3161  "Write-protect error",
3162  "Unknown unit",
3163  "Drive not ready",
3164  "Unknown command",
3165  "CRC error",
3166  "Bad request structure length",
3167  "Seek error",
3168  "Unknown media type",
3169  "Sector not found",
3170  "Out of paper",
3171  "Write fault",
3172  "Read fault",
3173  "General failure",
3174  "Sharing violation",
3175  "Lock violation",
3176  "Invalid disk change",
3177  "FCB unavailable",
3178  "Sharing buffer overflow",
3179  "Unknown error"
3180 };
3181 
3182 #define I24_ERROR_LAST (ARRAY_SIZE (I24_Errors) - 1)
3183 #define I24_ERROR_DEFAULT I24_ERROR_LAST
3184 
3185 /*
3186  * Error locus
3187  */
3188 
3189 char *I24_Locus [] = {
3190  "Unknown",
3191  "Unknown",
3192  "Block",
3193  "Network",
3194  "Serial",
3195  "Memory",
3196 };
3197 
3198 #define I24_LOCUS_LAST (ARRAY_SIZE (I24_Locus) - 1)
3199 #define I24_LOCUS_DEFAULT 0
3200 
3201 /*
3202  * Action
3203  */
3204 
3205 char *I24_Action [] = {
3206  "None recommended",
3207  "Retry, then abort or ignore",
3208  "Retry with delay, then abort or ignore",
3209  "Correct information supplied",
3210  "Abort with cleanup",
3211  "Abort without cleanup",
3212  "Ignore",
3213  "Retry after correcting",
3214 };
3215 
3216 #define I24_ACTION_LAST (ARRAY_SIZE (I24_Action) - 1)
3217 #define I24_ACTION_DEFAULT 0
3218 
3219 /*
3220  * Class
3221  */
3222 
3223 char *I24_Class [] = {
3224  "Unknown error",
3225  "Out of resource",
3226  "Temporary failure",
3227  "Authorisation error",
3228  "MSDOS Internal error",
3229  "Hardware error",
3230  "System error",
3231  "Application error",
3232  "Item missing",
3233  "Item invalid",
3234  "Item interlocked",
3235  "Media problem"
3236 };
3237 
3238 #define I24_CLASS_LAST (ARRAY_SIZE (I24_Class) - 1)
3239 #define I24_CLASS_DEFAULT 0
3240 
3241 static char *I24_Space = "\n\r ";
3242 
3243 int __far HardErrorHandler (unsigned int deverror,
3244  unsigned int doserror,
3245  unsigned int *devhdr)
3246 {
3247  char DeviceName[10];
3248  static char MessageBuffer[300];
3249  char *mp;
3250  int ch;
3251  struct DOSERROR Ecodes;
3252 
3253 /* If Ignore set, ignore */
3254 
3255  if (IgnoreHardErrors)
3256  _hardresume (_HARDERR_FAIL);
3257 
3258 /* Initialise device name */
3259 
3260  memset (DeviceName, 0, 10);
3261 
3262 /* Get extended error codes */
3263 
3264  dosexterr (&Ecodes);
3265 
3266 /* Output on message */
3267 
3268  if (deverror & 0x8000)
3269  {
3270  memcpy (DeviceName, (((char *)devhdr) + 10), 8);
3271 
3272  if ((mp = strchr (DeviceName, CHAR_SPACE)) == (char *)NULL)
3273  mp = DeviceName + 8;
3274 
3275  strcpy (mp, ":");
3276  }
3277 
3278  else
3279  sprintf (DeviceName, "%c:", (deverror & 0x0ff) + 'A');
3280 
3281  sprintf (MessageBuffer, "\n\r%s when %s %s %s\n\r",
3282  (doserror > I24_ERROR_LAST) ? I24_Errors[I24_ERROR_DEFAULT]
3283  : I24_Errors [doserror],
3284  (deverror & 0x0100) ? "writing" : "reading",
3285  (deverror & 0x8000) ? "device " : "disk",
3286  DeviceName);
3287 
3288  OutputBIOSString (MessageBuffer);
3289 
3290  sprintf (MessageBuffer, "[Extended Code : 0x%.4x%sClass : %s%sAction: %s%sLocus : %s device]\n\r",
3291  Ecodes.exterror, I24_Space,
3292  (Ecodes.class > I24_CLASS_LAST) ? I24_Class[I24_CLASS_DEFAULT]
3293  : I24_Class[Ecodes.class],
3294  I24_Space,
3295  (Ecodes.action > I24_ACTION_LAST) ? I24_Action[I24_ACTION_DEFAULT]
3296  : I24_Action[Ecodes.action],
3297  I24_Space,
3298  (Ecodes.locus > I24_LOCUS_LAST) ? I24_Locus[I24_LOCUS_DEFAULT]
3299  : I24_Locus[Ecodes.locus]);
3300 
3301  OutputBIOSString (MessageBuffer);
3302 
3303 /* Allowed actions */
3304 
3305  strcpy (MessageBuffer, "Abort");
3306  if (deverror & 0x2000)
3307  strcat (MessageBuffer, ", Ignore");
3308 
3309  if (deverror & 0x1000)
3310  strcat (MessageBuffer, ", Retry");
3311 
3312  if (deverror & 0x0800)
3313  strcat (MessageBuffer, ", Fail");
3314 
3315  OutputBIOSString (strcat (MessageBuffer, "? "));
3316 
3317 /* Use BIOS to get a key. */
3318 
3319  while (TRUE)
3320  {
3321  ch = _bios_keybrd (_KEYBRD_READ) & 0x00ff;
3322 
3323  if ((ch = tolower (ch)) == 'a')
3324  {
3325  OutputBIOSString ("A\n\r");
3326  _hardresume (_HARDERR_ABORT);
3327  }
3328 
3329  else if ((ch == 'i') && (deverror & 0x2000))
3330  {
3331  OutputBIOSString ("I\n\r");
3332  _hardresume (_HARDERR_IGNORE);
3333  }
3334 
3335  else if ((ch == 'r') && (deverror & 0x1000))
3336  {
3337  OutputBIOSString ("R\n\r");
3338  _hardresume (_HARDERR_RETRY);
3339  }
3340 
3341  else if ((ch == 'f') && (deverror & 0x0800))
3342  {
3343  OutputBIOSString ("F\n\r");
3344 # if defined (__WATCOMC__)
3345  _hardresume (_HARDERR_FAIL);
3346 # else
3347  _hardretn (doserror);
3348 # endif
3349  }
3350 
3351  OutputBIOSString ("\007");
3352  }
3353 
3354 # if defined (__WATCOMC__)
3355  return _HARDERR_FAIL;
3356 # endif
3357 }
3358 
3359 /*
3360  * Display a string using BIOS interrupt 0x0e (Write TTY).
3361  */
3362 
3363 static void F_LOCAL OutputBIOSString (char *p)
3364 {
3365  union REGS r;
3366 
3367  while (*p)
3368  {
3369  r.h.ah = 0x0e;
3370  r.h.al = *(p++);
3371  SystemInterrupt (0x10, &r, &r);
3372  }
3373 }
3374 #endif
3375 
3376 /*
3377  * Output to Stderr
3378  */
3379 
3380 int feputc (int c)
3381 {
3382  return putc (c, stderr);
3383 }
3384 
3385 int feputs (char *s)
3386 {
3387  return fputs (s, stderr);
3388 }
3389 
3390 int foputs (char *s)
3391 {
3392  return fputs (s, stdout);
3393 }
3394 
3395 /*
3396  * Convert drives
3397  */
3398 
3399 #if (OS_TYPE != OS_UNIX)
3400 unsigned int GetDriveNumber (char letter)
3401 {
3402  return tolower (letter) - 'a' + 1;
3403 }
3404 
3405 char GetDriveLetter (unsigned int drive)
3406 {
3407  return (char)(drive + 'a' - 1);
3408 }
3409 #endif
3410 
3411 /*
3412  * IO Map functions - Set or clear the inuse bit in the environment.
3413  */
3414 
3415 void ChangeFileDescriptorStatus (int fd, bool InUse)
3416 {
3417  if (fd < FDBASE)
3418  return;
3419 
3420  else if (InUse)
3421  e.IOMap |= 1L << (fd - FDBASE);
3422 
3423  else
3424  e.IOMap &= ~(1L << (fd - FDBASE));
3425 }
3426 
3427 /*
3428  * Convert a string to a number
3429  */
3430 
3431 int GetNumericValue (char *as)
3432 {
3433  long value;
3434 
3435  return ConvertNumericValue (as, &value, 10) ? (int) value : -1;
3436 }
3437 
3438 
3439 /*
3440  * ProcessOutputMetaCharacters - Convert an escaped character to a binary value.
3441  *
3442  * Returns the binary value and updates the string pointer.
3443  */
3444 
3445 static struct {
3446  char Escaped;
3448 } ConvertMetaCharacters [] =
3449 {
3450  { 'b', 0x08}, { 'f', 0x0c}, { 'v', 0x0b}, { 'n', 0x0a},
3451  { 'r', 0x0d}, { 't', 0x09}, { CHAR_META, CHAR_META}, { 'c', -1},
3452  { 0, 0}
3453 };
3454 
3456 {
3457  int c_val = **cp; /* Current character */
3458  int j = 0;
3459 
3460  if (c_val)
3461  (*cp)++;
3462 
3463 /* Process escaped characters */
3464 
3465  while (ConvertMetaCharacters[j].Escaped != 0)
3466  {
3467  if (ConvertMetaCharacters[j].Escaped == (char)c_val)
3468  return ConvertMetaCharacters[j].NewValue;
3469 
3470  ++j;
3471  }
3472 
3473 /* Check for an octal string */
3474 
3475  if (IS_OCTAL (c_val) && IS_OCTAL (**cp) && IS_OCTAL (*((*cp) + 1)))
3476  {
3477  c_val = ((c_val & 0x07) << 6) |
3478  ((**cp & 0x07) << 3) |
3479  ((*((*cp) + 1) & 0x07));
3480 
3481  (*cp) += 2;
3482  return c_val;
3483  }
3484 
3485  return c_val;
3486 }
3487 
3488 
3489 /*
3490  * Extract the next path from a string and build a new path from the
3491  * extracted path and a file name
3492  */
3493 
3494 char *BuildNextFullPathName (char *path_s, /* Path string */
3495  char *file_s, /* File name string */
3496  char *output_s) /* Output path */
3497 {
3498  char *s = output_s;
3499  int fsize = 0;
3500 
3501  while (*path_s && (*path_s != CHAR_PATH_SEPARATOR) && (fsize++ < FFNAME_MAX))
3502  *s++ = *path_s++;
3503 
3504  if ((output_s != s) && !IsPathCharacter (*(s - 1)) && (fsize++ < FFNAME_MAX))
3505  *s++ = CHAR_UNIX_DIRECTORY;
3506 
3507  *s = 0;
3508 
3509  if (file_s != (char *)NULL)
3510  strncpy (s, file_s, FFNAME_MAX - fsize);
3511 
3512  output_s[FFNAME_MAX - 1] = 0;
3513 
3514  return (*path_s ? ++path_s : (char *)NULL);
3515 }
3516 
3517 /*
3518  * Go To the specified directory
3519  */
3520 
3521 bool GotoDirectory (char *CNDirectory, unsigned int cdrive)
3522 {
3523  if (IsDriveCharacter (*(CNDirectory + 1)))
3524  {
3525  if (SetCurrentDrive (GetDriveNumber (*CNDirectory)) == -1)
3526  return FALSE;
3527 
3528  CNDirectory += 2;
3529  }
3530 
3531 /* Was the change successful? */
3532 
3533  if ((!*CNDirectory) || (S_chdir (CNDirectory)))
3534  return TRUE;
3535 
3536  SetCurrentDrive (cdrive);
3537  return FALSE;
3538 }
3539 
3540 /*
3541  * Find out the application type
3542  */
3543 
3544 unsigned long QueryApplicationType (const char *pathname)
3545 {
3546 #if (OS_TYPE == OS_UNIX)
3547  return EXETYPE_UNIX_NATIVE;
3548 #else
3549  int fd;
3550  unsigned long res;
3551  size_t len;
3552 
3553  if (pathname == NULL)
3554  return EXETYPE_BAD_FILE;
3555 
3556 /* Open the file */
3557 
3558  if ((fd = open (pathname, O_RDONLY | O_BINARY)) == -1)
3559  return EXETYPE_BAD_FILE;
3560 
3561  res = QueryApplicationType1 (fd);
3562  close (fd);
3563 
3564 /* Check for .com file */
3565 
3566  if ((res == EXETYPE_UNKNOWN) && ((len = strlen (pathname)) > 5) &&
3567  (stricmp (&pathname[len - 4], ".com") == 0))
3568  return EXETYPE_DOS_CUI;
3569 
3570  return res;
3571 #endif
3572 }
3573 
3574 /*
3575  * Do the actual work! Under UNIX, we don't care
3576  */
3577 
3578 #if (OS_TYPE != OS_UNIX)
3579 static unsigned long F_LOCAL QueryApplicationType1 (int fd)
3580 {
3581  union {
3582  struct ExecOS2_16Header OS2aHead;
3583  struct ExecOS2_32header OS2bHead;
3584  struct ExecNTHeader NTHead;
3585  struct ExecDosHeader DosHead;
3586  } OS_Headers;
3587  struct _stat fstatus;
3588 
3589  if ((read (fd, &OS_Headers, sizeof (struct ExecDosHeader)) !=
3590  sizeof (struct ExecDosHeader)) ||
3591  (OS_Headers.DosHead.e_magic != SIG_DOS))
3592  return EXETYPE_UNKNOWN;
3593 
3594 /*
3595  * If the header size in the header is not a new header or the relocation
3596  * section starts before the end of the new header, it must be a DOS program
3597  */
3598 
3599  if ((OS_Headers.DosHead.e_cparhdr * 16 < sizeof (struct ExecDosHeader)) ||
3600  (OS_Headers.DosHead.e_lfarlc < sizeof (struct ExecDosHeader)))
3601  return EXETYPE_DOS_CUI;
3602 
3603  if ((_fstat (fd, &fstatus) == -1) ||
3604  (fstatus.st_size < (off_t) OS_Headers.DosHead.e_lfanew))
3605  return EXETYPE_DOS_CUI;
3606 
3607  if ((lseek (fd, (off_t) OS_Headers.DosHead.e_lfanew, SEEK_SET) ==
3608  (off_t) -1) ||
3609  (read (fd, &OS_Headers, sizeof (OS_Headers)) != sizeof (OS_Headers)))
3610  return EXETYPE_BAD_IMAGE;
3611 
3612 /*
3613  * Check for NT
3614  */
3615 
3616  if (OS_Headers.NTHead.Signature == SIG_NT)
3617  {
3618  if (OS_Headers.NTHead.FileHeader.SizeOfOptionalHeader !=
3620  return EXETYPE_UNKNOWN;
3621 
3622  switch (OS_Headers.NTHead.OptionalHeader.Subsystem)
3623  {
3624  default:
3625  return EXETYPE_UNKNOWN;
3626 
3627  case NT_SS_NATIVE:
3628  return EXETYPE_NT_NATIVE;
3629 
3630  case NT_SS_WINDOWS_GUI:
3631  return EXETYPE_NT_WINDOWS_GUI;
3632 
3633  case NT_SS_WINDOWS_CUI:
3634  return EXETYPE_NT_WINDOWS_CUI;
3635 
3636  case NT_SS_OS2_CUI:
3637  return EXETYPE_NT_OS2;
3638 
3639  case NT_SS_POSIX_CUI:
3640  return EXETYPE_NT_POSIX;
3641  }
3642  }
3643 
3644 /* OS2 1.x */
3645 
3646  else if ((OS_Headers.OS2aHead.ne_magic == SIG_OS2_16) ||
3647  (OS_Headers.OS2aHead.ne_magic == SIG_OS2_16LE))
3648  {
3649 #ifdef APPDEBUG
3650  fprintf (stderr, "ne_flags = %.4x ne_flagsothers = %.4x\n",
3651  OS_Headers.OS2aHead.ne_flags,
3652  OS_Headers.OS2aHead.ne_flagsothers);
3653  fprintf (stderr, "ne_exetyp = %.4x (R %.2x V %.2x)\n",
3654  OS_Headers.OS2aHead.ne_exetyp,
3655  OS_Headers.OS2aHead.ne_ver,
3656  OS_Headers.OS2aHead.ne_rev);
3657 #endif
3658 
3659  if (OS_Headers.OS2aHead.ne_flags & (OS2_16_NOTP | OS2_16_IERR))
3660  return EXETYPE_BAD_IMAGE;
3661 
3662  if (OS_Headers.OS2aHead.ne_exetyp == OS2_16_WINDOWS)
3663  return EXETYPE_DOS_GUI;
3664 
3665 /* This appears to be what Watcom generates */
3666 
3667  else if ((OS_Headers.OS2aHead.ne_exetyp == OS2_16_UNKNOWN) &&
3668  (OS_Headers.OS2aHead.ne_flags == 0))
3669  return EXETYPE_DOS_32;
3670 
3671 
3672 /* Under OS/2, A bound app is an OS/2 app otherwise its a DOS app */
3673 
3674 #if (OS_TYPE != OS_OS2)
3675  else if (OS_Headers.OS2aHead.ne_exetyp == OS2_16_UNKNOWN)
3676  return EXETYPE_DOS_CUI;
3677 
3678  else if (OS_Headers.OS2aHead.ne_flags & OS2_16_BOUND)
3679  return EXETYPE_DOS_BOUND;
3680 #else
3681  else if (OS_Headers.OS2aHead.ne_exetyp == OS2_16_UNKNOWN)
3682  return EXETYPE_OS2_CUI;
3683 #endif
3684 
3685 /* Real OS/2 app */
3686 
3687  else if (OS_Headers.OS2aHead.ne_exetyp == OS2_16_OS2)
3688  {
3689  switch (OS_Headers.OS2aHead.ne_flags & OS2_16_APPTYP)
3690  {
3691  case OS2_16_NOTWINCOMPAT:
3692  return EXETYPE_OS2_CUI;
3693 
3694  case OS2_16_WINCOMPAT:
3695  return EXETYPE_OS2_CGUI;
3696 
3697  case OS2_16_WINAPI:
3698  return EXETYPE_OS2_GUI;
3699 
3700  case 0:
3701 #if (OS_TYPE == OS_OS2)
3702  return EXETYPE_OS2_CUI;
3703 #else
3704  return EXETYPE_DOS_BOUND;
3705 #endif
3706  }
3707  }
3708  }
3709 
3710 /* OS2 2.x */
3711 
3712  else if (OS_Headers.OS2bHead.e32_magic == SIG_OS2_32)
3713  {
3714 #ifdef APPDEBUG
3715  fprintf (stderr, "Mflags = %.8lx\n", OS_Headers.OS2bHead.e32_mflags);
3716 #endif
3717 
3718  if ((OS_Headers.OS2bHead.e32_mflags & (OS2_NOTP | OS2_NOLOAD)) ||
3719  (OS_Headers.OS2bHead.e32_mflags & OS2_MODMASK))
3720  return EXETYPE_NOT_EXE;
3721 
3722  if ((OS_Headers.OS2bHead.e32_mflags & OS2_APPMASK) == OS2_NOPMW)
3724 
3725  else if ((OS_Headers.OS2bHead.e32_mflags & OS2_APPMASK) == OS2_PMW)
3727 
3728  else if ((OS_Headers.OS2bHead.e32_mflags & OS2_APPMASK) == OS2_PMAPI)
3730  }
3731 
3732 /* Give UP! */
3733 
3734  return EXETYPE_UNKNOWN;
3735 }
3736 #endif
3737 
3738 /*
3739  * Need case change for UNIX
3740  */
3741 
3742 #if (OS_TYPE == OS_UNIX)
3743 
3744 /* Convert a string to lower case */
3745 
3746 char *strlwr (char *s)
3747 {
3748  char *original = s;
3749 
3750  if (s != (char *)NULL)
3751  {
3752  while (*s)
3753  {
3754  *s = tolower (*s);
3755  s++;
3756  }
3757  }
3758 
3759  return (original);
3760 }
3761 
3762 /*
3763  * Convert a string to upper case
3764  */
3765 
3766 char *strupr (char *s)
3767 {
3768  char *original = s;
3769 
3770  if (s != (char *)NULL)
3771  {
3772  while (*s)
3773  {
3774  *s = toupper (*s);
3775  s++;
3776  }
3777  }
3778 
3779  return (original);
3780 }
3781 
3782 /*
3783  * String compare - ignore case
3784  */
3785 
3786 int stricmp (char *a, char *b)
3787 {
3788  int diff;
3789 
3790  while ((!(diff = tolower(*a) - toupper (*b))) && *a)
3791  {
3792  a++;
3793  b++;
3794  }
3795 
3796  return diff;
3797 }
3798 #endif
3799 
3800 /*
3801  * Convert long to based number string
3802  */
3803 
3804 #if (OS_TYPE == OS_UNIX) || defined (__EMX__)
3805 char *ltoa (long n, char *ibuffer, int base)
3806 {
3807  char flag = 0;
3808  int r;
3809  char lbuffer[32 + 2];
3810  char *c_pos = lbuffer + 32 + 2;
3811 
3812  if ((base < 2) || (base > 36))
3813  {
3814  errno = ERANGE;
3815  return (char *)NULL;
3816  }
3817 
3818  *(--c_pos) = 0;
3819 
3820  if (n < 0)
3821  {
3822  flag++;
3823  n = -n;
3824  }
3825 
3826  if (n == 0)
3827  *(--c_pos) = '0';
3828 
3829  else
3830  {
3831  while (n > 0)
3832  {
3833  r = (int)(n % (long)base);
3834 
3835  *(--c_pos) = r + ((r > 9) ? 'a' - 10 : '0');
3836 
3837  n /= (long)base;
3838  }
3839  }
3840 
3841  if (flag)
3842  *(--c_pos) = (char)'-';
3843 
3844  return strcpy (ibuffer, c_pos);
3845 }
3846 #endif
3847 
3848 /*
3849  * EMX does not have a cwait function
3850  */
3851 
3852 #if defined (__EMX__) && (OS_TYPE == OS_OS2)
3853 int cwait (int *TermCode, int pid, int action)
3854 {
3855  ULONG rc;
3856  RESULTCODES res;
3857  PID rpid;
3858  PID apid = pid;
3859 
3860  if ((rc = DosWaitChild (action == WAIT_GRANDCHILD ? DCWA_PROCESSTREE
3861  : DCWA_PROCESS,
3862  DCWW_WAIT, &res, &rpid, apid)))
3863  {
3864  if (rc == ERROR_INVALID_PROCID)
3865  errno = EINVAL;
3866 
3867  else
3868  errno = ECHILD;
3869 
3870  return (-1);
3871  }
3872 
3873  *TermCode = res.codeResult;
3874  return rpid;
3875 }
3876 #endif
3877 
3878 /*
3879  * DEBUG code
3880  */
3881 
3882 #ifdef DEBUG_ON
3883 void db_printf (char *fmt, ...)
3884 {
3885  va_list ap;
3886 
3887  va_start (ap, fmt);
3888  vfprintf (stderr, fmt, ap);
3889  fputc (CHAR_NEW_LINE, stderr);
3890  fflush (stderr);
3891  va_end (ap);
3892 }
3893 #endif
3894 
3895 /*
3896  * Get file attributes - EMX version
3897  */
3898 
3899 #if (OS_TYPE == OS_DOS) && defined (__EMX__)
3900 unsigned _dos_getfileattr (char *file, unsigned int *attr)
3901 {
3902  struct _find dtabuf;
3903  int rc;
3904 
3906 
3907  rc = __findfirst (file, OS_FILE_ATTRIBUTES, &dtabuf);
3908 
3910 
3911  *attr = (char)dtabuf.attr;
3912 
3913  return (unsigned int)rc;
3914 }
3915 #endif
long __cdecl strtol(char const *_String, char **_EndPtr, int _Radix)
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
use _CRT_SECURE_NO_WARNINGS.See online help for details.char *__cdecl ltoa(long _Value, char *_Buffer, int _Radix)
#define _CDECL
Definition: DIRENT.H:11
#define strlwr
Definition: Utility.h:162
bp
Definition: action.c:1035
cp
Definition: action.c:1035
#define letter
Definition: aptex-macros.h:355
#define depth(a)
Definition: aptex-macros.h:199
#define count(a)
Definition: aptex-macros.h:781
#define name
#define mode
Definition: aptex-macros.h:510
char *__cdecl strpbrk(char const *_Str, char const *_Control)
int rc
Definition: bmpfont.h:9
static int GetLastError(void)
Definition: call.c:26
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define ap
#define far
Definition: dd.h:143
BOOL
Definition: dd.h:100
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
int params
Definition: definitions.c:42
#define strrchr
Definition: detex.c:67
#define ENABLE_HARD_ERRORS
Definition: director.c:73
#define ENOTDIR
Definition: director.c:104
struct _dircontents DIRCONT
Definition: director.c:119
#define DISABLE_HARD_ERRORS
Definition: director.c:72
#define fopen
Definition: xxstdio.h:21
#define fflush
Definition: xxstdio.h:24
#define fgets
Definition: xxstdio.h:29
static int np
Definition: bifont.c:64
char * strncpy()
int strcmp()
Definition: coll.cpp:143
char * strcpy()
i32 Count[10]
Definition: dvibook.c:121
#define MAX_PATH
Definition: dvispc.c:163
long int flag
Definition: f2c.h:53
FcObject field
Definition: fcdefault.c:32
static char * f_list(char *)
Definition: fmt.c:343
static void
Definition: fpif.c:118
#define s
Definition: afcover.h:80
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
int base
Definition: gsftopk.c:1502
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
static char nbuf[100]
Definition: hpcdtoppm.c:135
unsigned nbytes
Definition: in_pcx.cpp:355
pmask
Definition: in_pcx.cpp:461
#define putc
Definition: jbib.h:20
#define SEEK_SET
Definition: jmemansi.c:26
#define LOBYTE(W)
Definition: jmemdos.c:487
#define PATH_MAX
Definition: ftmac.c:91
#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)
char * getenv()
int errno
#define O_BINARY
Definition: config.h:393
#define unlink(file)
Definition: config.h:413
#define buf
action
Definition: epdf.c:220
unsigned char BYTE
Definition: sfnt.h:34
unsigned short USHORT
Definition: sfnt.h:36
#define UCHAR_MAX
Definition: c-minmax.h:36
#define STDOUT_FILENO
Definition: c-unistd.h:53
#define STDERR_FILENO
Definition: c-unistd.h:54
#define STDIN_FILENO
Definition: c-unistd.h:52
#define fclose
Definition: debug.h:100
#define O_WRONLY
Definition: win32lib.h:179
#define lseek
Definition: win32lib.h:83
#define strnicmp
Definition: win32lib.h:96
#define access
Definition: win32lib.h:59
#define O_CREAT
Definition: win32lib.h:170
#define fileno
Definition: win32lib.h:72
#define S_IWRITE
Definition: win32lib.h:136
#define stricmp
Definition: win32lib.h:93
#define getcwd
Definition: win32lib.h:77
#define dup2
Definition: win32lib.h:67
#define read
Definition: win32lib.h:88
#define S_ISDIR(m)
Definition: win32lib.h:203
#define S_ISCHR(m)
Definition: win32lib.h:199
#define O_RDONLY
Definition: win32lib.h:176
#define open
Definition: win32lib.h:86
#define S_IREAD
Definition: win32lib.h:133
#define O_TEXT
Definition: win32lib.h:185
#define close
Definition: win32lib.h:63
#define chdir
Definition: win32lib.h:61
#define O_EXCL
Definition: win32lib.h:191
#define fstat
Definition: win32lib.h:74
#define S_IFMT
Definition: win32lib.h:118
#define O_RDWR
Definition: win32lib.h:167
#define S_ISREG(m)
Definition: win32lib.h:207
#define O_TRUNC
Definition: win32lib.h:173
void Convert()
Definition: convert.c:182
#define fputs
Definition: mendex.h:67
#define fprintf
Definition: mendex.h:64
static char * strerror(int errnum)
Definition: error.c:56
#define length(c)
Definition: ctangleboot.c:65
The following parameters were sufficient in the original
Definition: comm-w2c.h:249
char * as
Definition: fixwrites.c:8
unsigned short ino_t
Definition: types.h:10
unsigned short ushort
Definition: types.h:70
long off_t
Definition: types.h:34
int setmode()
int stat(const char *path, struct stat *sbuf)
#define sprintf
Definition: snprintf.c:44
unsigned int DWORD
Definition: mktexlib.h:49
int FileName
Definition: mktexpk.c:60
string release
Definition: conf.py:29
string fn
Definition: fc-lang.py:335
dictionary off
Definition: fc-lang.py:226
union value value
Definition: obx.h:44
unsigned long ULONG
Definition: pdfgen.h:158
#define res(length)
Definition: picttoppm.c:287
#define fp
char * fname
Definition: plain2.c:121
integer nb
Definition: pmxab.c:180
static int32_t last
Definition: ppagelist.c:29
int r
Definition: ppmqvga.c:68
type_C toupper(type_C)
char line[1024]
Definition: process_score.c:29
bstring c int memset(void *s, int c, int length)
char ibuf[32000]
Definition: ps_tiny.c:177
#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
FILE * fdopen(int, const char *)
RETTYPE mp_ptr mp_size_t mp_srcptr dp
Definition: sec_div.c:70
static s_flist *near find_entry(int)
Definition: sh8.c:423
#define ENTRY_POINT
Definition: sh8.c:199
Word_B * AddWordToBlock(char *wd, Word_B *wb)
Definition: sh8.c:1448
int foputs(char *s)
Definition: sh8.c:3390
void SetCharacterTypes(char *String, int Type)
Definition: sh8.c:1391
char GetDriveLetter(unsigned int drive)
Definition: sh8.c:3405
Word_B * SplitString(char *string, Word_B *wb)
Definition: sh8.c:1241
int ExtractFieldsFromLine(LineFields *fd)
Definition: sh8.c:1180
bool GotoDirectory(char *CNDirectory, unsigned int cdrive)
Definition: sh8.c:3521
#define ARG_COUNT
Definition: sh8.c:198
static void FreeDirectoryListing(DIRCONT *)
Definition: sh8.c:2245
#define NSTART
Definition: sh8.c:120
static char *near _Ex_SkipWhiteSpace(char *)
Definition: sh8.c:2938
bool ConvertNumericValue(char *string, long *value, int base)
Definition: sh8.c:1378
void FlushStreams(void)
Definition: sh8.c:1646
Word_B * AddParameter(char *value, Word_B *wb, char *function)
Definition: sh8.c:1512
bool S_getcwd(char *PathName, int drive)
Definition: sh8.c:1764
int S_open(bool d_flag, char *name, int mode)
Definition: sh8.c:253
int feputs(char *s)
Definition: sh8.c:3385
static char * Extensions[]
Definition: sh8.c:776
unsigned int GetCurrentDrive(void)
Definition: sh8.c:1060
char * BuildNextFullPathName(char *path_s, char *file_s, char *output_s)
Definition: sh8.c:3494
FILE * FOpenFile(char *name, char *mode)
Definition: sh8.c:1587
#define IS_OCTAL(a)
Definition: sh8.c:122
static s_flist * list_start
Definition: sh8.c:140
int GetDescriptorType(int fp)
Definition: sh8.c:974
struct dirent *_CDECL readdir(DIR *dirp)
Definition: sh8.c:2225
#define F_START
Definition: sh8.c:119
int WordBlockSize(Word_B *wb)
Definition: sh8.c:1474
char ** GetWordList(Word_B *wb)
Definition: sh8.c:1483
static unsigned long near QueryApplicationType1(int)
Definition: sh8.c:3579
int GetNumericValue(char *as)
Definition: sh8.c:3431
int _CDECL closedir(DIR *dirp)
Definition: sh8.c:2209
#define ARG_ARRAY
Definition: sh8.c:197
int CloseFile(FILE *fp)
Definition: sh8.c:1626
char * CheckDOSFileName(char *name)
Definition: sh8.c:1298
#define DTA_NAME
bool S_chdir(char *PathName)
Definition: sh8.c:1745
struct flist s_flist
char * _ACmdLine
Definition: sh8.c:232
void S_fclose(FILE *FP, bool d_flag)
Definition: sh8.c:544
#define MAX_LINE
Definition: sh8.c:117
void CloseThePipe(int pv)
Definition: sh8.c:751
unsigned int GetDriveNumber(char letter)
Definition: sh8.c:3400
FILE * MyReOpenFile(int fid, char *mode)
Definition: sh8.c:1609
char Escaped
Definition: sh8.c:3446
int CheckForScriptFile(char *path, char **params, int *nargs)
Definition: sh8.c:810
int OpenForExecution(char *path, char **params, int *nargs)
Definition: sh8.c:778
char * _APgmName
Definition: sh8.c:233
static struct @239 ConvertMetaCharacters[]
DIR *_CDECL opendir(char *name) const
Definition: sh8.c:2087
int RestoreStandardIO(int rv, bool change)
Definition: sh8.c:692
int S_Remap(int old_fid, int new_fid)
Definition: sh8.c:569
int S_close(int fid, bool c_flag)
Definition: sh8.c:448
#define DIR_FINDNEXT(a)
static char *near _Ex_ConvertEnvVariables(char *)
Definition: sh8.c:2997
static char * nopipe
Definition: sh8.c:124
bool S_access(char *FileName, int mode)
Definition: sh8.c:1730
int NewValue
Definition: sh8.c:3447
char IsValidVariableName(char *s)
Definition: sh8.c:1572
int S_dup2(int old_fid, int new_fid)
Definition: sh8.c:614
int ProcessOutputMetaCharacters(char **cp)
Definition: sh8.c:3455
static void near _Ex_SaveArgvValue(char *, bool, Word_B **)
Definition: sh8.c:3113
bool S_stat(char *FileName, struct _stat *Status)
Definition: sh8.c:1679
static void near _Ex_CommandLine(char *, Word_B **)
Definition: sh8.c:2746
static void near _Ex_ExpandField(char *, Word_B **)
Definition: sh8.c:2964
int feputc(int c)
Definition: sh8.c:3380
static char *near _Ex_GetSpace(int, char *)
Definition: sh8.c:2922
int OpenAPipe(void)
Definition: sh8.c:737
bool CheckForRestrictedShell(char *s)
Definition: sh8.c:761
int SetCurrentDrive(unsigned int drive)
Definition: sh8.c:1146
bool IsDirectory(char *Name)
Definition: sh8.c:1262
unsigned long QueryApplicationType(const char *pathname)
Definition: sh8.c:3544
char * SkipToWhiteSpace(char *a)
Definition: sh8.c:2950
#define DIR_FINDFIRST(F, A, B)
static void near _Ex_ExpandIndirectFile(char *, Word_B **)
Definition: sh8.c:2836
void InitialiseCharacterTypes()
Definition: sh8.c:1421
void ChangeFileDescriptorStatus(int fd, bool InUse)
Definition: sh8.c:3415
int S_dup(int old_fid)
Definition: sh8.c:555
static void near SaveFileDescriptor(FILE *)
Definition: sh8.c:1656
#define _KEYBRD_READ
Definition: sh9.c:105
unsigned char CharTypes[UCHAR_MAX+1]
Definition: sh6.c:362
int _osminor
Definition: sh.h:2461
char CurrentDirLiteral[]
Definition: sh6.c:201
#define OS2_APPMASK
Definition: sh.h:853
char ** ParameterArray
Definition: sh6.c:117
#define F_LOCAL
Definition: sh.h:121
#define CHAR_TILDE
Definition: sh.h:1025
#define DESCRIPTOR_PIPE
Definition: sh.h:1173
#define NT_OPTIONAL_HEADER
Definition: sh.h:922
#define EXETYPE_OS2_GUI
Definition: sh.h:963
#define FindPathCharacter(a)
Definition: sh.h:1142
#define EXETYPE_OS2_CUI
Definition: sh.h:961
#define CHAR_NEW_LINE
Definition: sh.h:1007
#define EXPAND_TILDE
Definition: sh.h:1485
#define CHAR_BACKQUOTE
Definition: sh.h:1010
#define EXETYPE_NT_WINDOWS_CUI
Definition: sh.h:967
#define DESCRIPTOR_DEVICE
Definition: sh.h:1175
char ** ExpandWordList(char **, int, ExeMode *)
Definition: sh4.c:178
#define IsPathCharacter(a)
Definition: sh.h:1140
#define CHAR_PERIOD
Definition: sh.h:1042
#define EXETYPE_NT_NATIVE
Definition: sh.h:965
#define OS2_16_UNKNOWN
Definition: sh.h:782
#define IS_VariableSC(c)
Definition: sh.h:1084
#define FDBASE
Definition: sh.h:1000
#define C_SUBOP
Definition: sh.h:1070
int Execute_stack_depth
Definition: sh6.c:188
#define OS_FILE_ATTRIBUTES
Definition: sh.h:526
#define EXETYPE_UNKNOWN
Definition: sh.h:951
#define EXETYPE_NOT_EXE
Definition: sh.h:953
#define OS2_NOPMW
Definition: sh.h:852
#define DESCRIPTOR_FILE
Definition: sh.h:1174
#define DosInterrupt(a, b)
Definition: sh.h:587
#define IsDriveCharacter(a)
Definition: sh.h:1137
void * GetAllocatedSpace(size_t)
Definition: sh1.c:1241
#define OS2_16_WINCOMPAT
Definition: sh.h:775
#define C_LEX1
Definition: sh.h:1068
#define C2bool(c)
Definition: sh.h:1476
bool RestrictedShellFlag
Definition: sh6.c:147
#define LEN_DEVICE_NAME_HEADER
Definition: sh.h:996
#define EXETYPE_OS2_32
Definition: sh.h:947
#define C_IFS
Definition: sh.h:1071
#define CHAR_META
Definition: sh.h:1058
#define OS2_NOLOAD
Definition: sh.h:849
int ParameterCount
Definition: sh6.c:118
#define FFNAME_MAX
Definition: sh.h:981
#define NT_SS_OS2_CUI
Definition: sh.h:932
#define SIG_OS2_16LE
Definition: sh.h:697
#define C_DIGIT
Definition: sh.h:1067
#define NT_SS_POSIX_CUI
Definition: sh.h:933
#define O_RMASK
Definition: sh.h:1106
int CountNumberArguments(char **)
Definition: system.c:1950
#define CHAR_ASSIGN
Definition: sh.h:1054
#define NT_SS_WINDOWS_CUI
Definition: sh.h:931
#define OS2_16_NOTWINCOMPAT
Definition: sh.h:774
#define OSCALL_PARAM
Definition: sh.h:651
#define EXETYPE_DOS_BOUND
Definition: sh.h:959
#define EXPAND_GLOBBING
Definition: sh.h:1483
#define O_NOINHERIT
Definition: sh.h:435
#define CHAR_VARIABLE
Definition: sh.h:1030
#define OS2_16_BOUND
Definition: sh.h:772
#define OS2_16_OS2
Definition: sh.h:783
void PrintErrorMessage(char *,...)
Definition: sh1.c:1053
char * GenerateFullExecutablePath(char *)
Definition: system.c:1309
#define EXETYPE_UNIX_NATIVE
Definition: sh.h:971
#define CHAR_DOUBLE_QUOTE
Definition: sh.h:1009
#define OS2_16_APPTYP
Definition: sh.h:773
int NSave_IO_E
Definition: sh6.c:180
char * Outofmemory1
Definition: sh6.c:265
#define CHAR_INDIRECT
Definition: sh.h:1057
char * StringSave(char *)
Definition: sh1.c:1308
char * sOpenReadMode
Definition: sh6.c:290
#define CHAR_SINGLE_QUOTE
Definition: sh.h:1008
#define DESCRIPTOR_CONSOLE
Definition: sh.h:1176
#define OS2_16_WINDOWS
Definition: sh.h:784
#define OS2_16_IERR
Definition: sh.h:771
void SetVariableFromNumeric(char *, long)
Definition: sh1.c:3519
#define DESCRIPTOR_UNKNOWN
Definition: sh.h:1172
ShellFileEnvironment e
Definition: sh6.c:388
#define NOWORD
Definition: sh.h:1149
char ParentDirLiteral[]
Definition: sh6.c:202
#define CHAR_OPEN_BRACES
Definition: sh.h:1021
void ReleaseMemoryCell(void *)
Definition: sh1.c:2141
#define SIG_NT
Definition: sh.h:699
#define EXETYPE_NT_WINDOWS_GUI
Definition: sh.h:966
Save_IO * SSave_IO
Definition: sh6.c:179
#define EXETYPE_NT_POSIX
Definition: sh.h:969
#define CHAR_COMMENT
Definition: sh.h:1028
#define EXETYPE_DOS_CUI
Definition: sh.h:956
char KSHELLExtension[]
Definition: sh6.c:235
#define C_WILD
Definition: sh.h:1072
char * StringCopy(char *)
Definition: sh1.c:1325
#define EXETYPE_NT_OS2
Definition: sh.h:968
#define EXETYPE_BAD_IMAGE
Definition: sh.h:952
#define NOWORDS
Definition: sh.h:1150
#define FindLastPathCharacter(a)
Definition: sh.h:1141
#define IS_VariableFC(c)
Definition: sh.h:1083
void * ReAllocateSpace(void *, size_t)
Definition: sh1.c:1255
#define OS2_NOTP
Definition: sh.h:848
#define OS2_PMW
Definition: sh.h:851
#define EXETYPE_BAD_FILE
Definition: sh.h:954
#define IsHPFSFileSystem(a)
Definition: sh.h:1127
#define NT_SS_NATIVE
Definition: sh.h:929
int _osmajor
Definition: sh1.c:1
#define WAIT_GRANDCHILD
Definition: sh.h:360
#define CHAR_DRIVE
Definition: sh.h:1044
#define OS2_PMAPI
Definition: sh.h:850
char SHELLExtension[]
Definition: sh6.c:234
#define C_VAR1
Definition: sh.h:1069
char * DirectorySeparator
Definition: sh6.c:243
int ReMapIOHandler(int)
Definition: sh5.c:1216
void SetMemoryAreaNumber(void *, int)
Definition: sh1.c:2302
#define EXETYPE_DOS_GUI
Definition: sh.h:957
#define OS2_MODMASK
Definition: sh.h:861
#define CHAR_CLOSE_BRACES
Definition: sh.h:1022
#define SystemInterrupt(a, b, c)
Definition: sh.h:585
#define SIG_DOS
Definition: sh.h:695
char * RootDirectory
Definition: sh6.c:215
char * AllocateMemoryCell(size_t)
Definition: sh1.c:2071
#define CHAR_RETURN
Definition: sh.h:1011
#define CHAR_DOS_PATH
Definition: sh.h:1059
#define OS2_16_WINAPI
Definition: sh.h:776
#define C_SEMICOLON
Definition: sh.h:1073
#define PATH_TO_UNIX(x)
Definition: sh.h:1112
#define C_ALPHA
Definition: sh.h:1066
int MSave_IO_E
Definition: sh6.c:181
#define SSAVE_IO_SIZE
Definition: sh.h:995
#define CHAR_SPACE
Definition: sh.h:1012
#define NT_SS_WINDOWS_GUI
Definition: sh.h:930
char * ParameterCountVariable
Definition: sh6.c:209
#define OSCALL_RET
Definition: sh.h:650
#define EXETYPE_OS2_CGUI
Definition: sh.h:962
struct save_io Save_IO
#define EXETYPE_DOS_32
Definition: sh.h:958
void ReleaseAList(char **)
Definition: sh1.c:2126
#define PATH_TO_LOWER_CASE(a)
Definition: sh.h:1126
char * DeviceNameHeader
Definition: sh6.c:377
#define O_PMASK
Definition: sh.h:1102
#define CHAR_PATH_SEPARATOR
Definition: sh.h:1050
char * GenerateTemporaryFileName(void)
Definition: system.c:1228
#define SIG_OS2_16
Definition: sh.h:696
#define OS2_16_NOTP
Definition: sh.h:770
#define CHAR_UNIX_DIRECTORY
Definition: sh.h:1006
char * BasicErrorMessage
Definition: sh6.c:242
#define SIG_OS2_32
Definition: sh.h:698
Definition: dirent.h:44
int dd_loc
Definition: DIRENT.H:103
Definition: sh.h:1945
FILE * FP
Definition: sh.h:1946
char * Line
Definition: sh.h:1947
Word_B * Fields
Definition: sh.h:1949
int LineLength
Definition: sh.h:1948
A string of characters.
Definition: t1part.c:49
Definition: dir.c:365
Definition: dirent.h:34
Definition: ttf.h:33
unsigned long IOMap
Definition: sh.h:1691
Word_B * OpenStreams
Definition: sh.h:1696
Definition: filedef.h:30
Definition: sh8.c:130
int fl_count
Definition: sh8.c:135
int * fl_fd
Definition: sh8.c:137
int fl_mode
Definition: sh8.c:136
char * fl_name
Definition: sh8.c:132
bool fl_close
Definition: sh8.c:133
int fl_size
Definition: sh8.c:134
struct flist * fl_next
Definition: sh8.c:131
Definition: bdf.c:133
Definition: tpic.c:45
Definition: sh2.c:920
Definition: sh.h:1569
Definition: sh.h:1559
short w_bsize
Definition: sh.h:1560
short w_nword
Definition: sh.h:1561
char * w_words[1]
Definition: sh.h:1562
static unsigned char * save
Definition: t1disasm.c:278
#define FILE
Definition: t1stdio.h:34
#define ferror(f)
Definition: t1stdio.h:110
ch
Definition: t4ht.c:1443
int j
Definition: t4ht.c:1589
void signal(SIGFPE, sig_err)
*job_name strlen((char *) job_name) - 4)
char * file
Definition: t4ht.c:931
char fmt[256]
Definition: tex4ht.c:3925
int diff
Definition: tex4ht.c:3815
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)
#define sp
Definition: stack.c:11
int pid
Definition: ttf2pfb.c:129
@ L
Definition: ubidiimp.h:45
Definition: obx.h:51
#define BUFSIZ
Definition: ps.c:61
#define va_start(pvar)
Definition: varargs.h:30
#define va_end(pvar)
Definition: varargs.h:38
char * va_list
Definition: varargs.h:22
static const char * bName
Definition: wrtjava.cpp:91
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269
#define return(val)