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)  

reslist.cpp
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 *
6 * Copyright (C) 2000-2015, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 *******************************************************************************
10 *
11 * File reslist.cpp
12 *
13 * Modification History:
14 *
15 * Date Name Description
16 * 02/21/00 weiv Creation.
17 *******************************************************************************
18 */
19 
20 // Safer use of UnicodeString.
21 #ifndef UNISTR_FROM_CHAR_EXPLICIT
22 # define UNISTR_FROM_CHAR_EXPLICIT explicit
23 #endif
24 
25 // Less important, but still a good idea.
26 #ifndef UNISTR_FROM_STRING_EXPLICIT
27 # define UNISTR_FROM_STRING_EXPLICIT explicit
28 #endif
29 
30 #include <assert.h>
31 #include <iostream>
32 #include <set>
33 #include <stdio.h>
34 
35 #include "unicode/localpointer.h"
36 #include "reslist.h"
37 #include "unewdata.h"
38 #include "unicode/ures.h"
39 #include "unicode/putil.h"
40 #include "errmsg.h"
41 #include "filterrb.h"
42 #include "toolutil.h"
43 
44 #include "uarrsort.h"
45 #include "uelement.h"
46 #include "uhash.h"
47 #include "uinvchar.h"
48 #include "ustr_imp.h"
49 #include "unicode/utf16.h"
50 #include "uassert.h"
51 
52 /*
53  * Align binary data at a 16-byte offset from the start of the resource bundle,
54  * to be safe for any data type it may contain.
55  */
56 #define BIN_ALIGNMENT 16
57 
58 // This numeric constant must be at least 1.
59 // If StringResource.fNumUnitsSaved == 0 then the string occurs only once,
60 // and it makes no sense to move it to the pool bundle.
61 // The larger the threshold for fNumUnitsSaved
62 // the smaller the savings, and the smaller the pool bundle.
63 // We trade some total size reduction to reduce the pool bundle a bit,
64 // so that one can reasonably save data size by
65 // removing bundle files without rebuilding the pool bundle.
66 // This can also help to keep the pool and total (pool+local) string indexes
67 // within 16 bits, that is, within range of Table16 and Array16 containers.
68 #ifndef GENRB_MIN_16BIT_UNITS_SAVED_FOR_POOL_STRING
69 # define GENRB_MIN_16BIT_UNITS_SAVED_FOR_POOL_STRING 10
70 #endif
71 
73 
78 
79 /* How do we store string values? */
80 enum {
81  STRINGS_UTF16_V1, /* formatVersion 1: int length + UChars + NUL + padding to 4 bytes */
82  STRINGS_UTF16_V2 /* formatVersion 2 & up: optional length in 1..3 UChars + UChars + NUL */
83 };
84 
85 static const int32_t MAX_IMPLICIT_STRING_LENGTH = 40; /* do not store the length explicitly for such strings */
86 
87 static const ResFile kNoPoolBundle;
88 
89 /*
90  * res_none() returns the address of kNoResource,
91  * for use in non-error cases when no resource is to be added to the bundle.
92  * (NULL is used in error cases.)
93  */
94 static SResource kNoResource; // TODO: const
95 
97  sizeof(UDataInfo),
98  0,
99 
102  sizeof(UChar),
103  0,
104 
105  {0x52, 0x65, 0x73, 0x42}, /* dataFormat="ResB" */
106  {1, 3, 0, 0}, /* formatVersion */
107  {1, 4, 0, 0} /* dataVersion take a look at version inside parsed resb*/
108 };
109 
110 static const UVersionInfo gFormatVersions[4] = { /* indexed by a major-formatVersion integer */
111  { 0, 0, 0, 0 },
112  { 1, 3, 0, 0 },
113  { 2, 0, 0, 0 },
114  { 3, 0, 0, 0 }
115 };
116 // Remember to update genrb.h GENRB_VERSION when changing the data format.
117 // (Or maybe we should remove GENRB_VERSION and report the ICU version number?)
118 
120  /* returns space we need to pad */
121  return (uint8_t) ((size % sizeof(uint32_t)) ? (sizeof(uint32_t) - (size % sizeof(uint32_t))) : 0);
122 
123 }
124 
127 }
128 
130  return gIncludeCopyright;
131 }
132 
133 void setFormatVersion(int32_t formatVersion) {
135  gFormatVersion = formatVersion;
136 }
137 
139  return gFormatVersion;
140 }
141 
143  gUsePoolBundle = use;
144 }
145 
146 // TODO: return const pointer, or find another way to express "none"
147 struct SResource* res_none() {
148  return &kNoResource;
149 }
150 
152  : fType(URES_NONE), fWritten(FALSE), fRes(RES_BOGUS), fRes16(-1), fKey(-1), fKey16(-1),
153  line(0), fNext(NULL) {
155 }
156 
157 SResource::SResource(SRBRoot *bundle, const char *tag, int8_t type, const UString* comment,
160  fKey(bundle != NULL ? bundle->addTag(tag, errorCode) : -1), fKey16(-1),
161  line(0), fNext(NULL) {
163  if(comment != NULL) {
165  }
166 }
167 
170 }
171 
174  while (current != NULL) {
175  SResource *next = current->fNext;
176  delete current;
177  current = next;
178  }
179 }
180 
182 
183 // TODO: clarify that containers adopt new items, even in error cases; use LocalPointer
185  if (U_FAILURE(errorCode) || res == NULL || res == &kNoResource) {
186  return;
187  }
188 
189  /* remember this linenumber to report to the user if there is a duplicate key */
190  res->line = linenumber;
191 
192  /* here we need to traverse the list */
193  ++fCount;
194 
195  /* is the list still empty? */
196  if (fFirst == NULL) {
197  fFirst = res;
198  res->fNext = NULL;
199  return;
200  }
201 
202  const char *resKeyString = fRoot->fKeys + res->fKey;
203 
205 
206  SResource *prev = NULL;
207  while (current != NULL) {
208  const char *currentKeyString = fRoot->fKeys + current->fKey;
209  int diff;
210  /*
211  * formatVersion 1: compare key strings in native-charset order
212  * formatVersion 2 and up: compare key strings in ASCII order
213  */
215  diff = uprv_strcmp(currentKeyString, resKeyString);
216  } else {
217  diff = uprv_compareInvCharsAsAscii(currentKeyString, resKeyString);
218  }
219  if (diff < 0) {
220  prev = current;
221  current = current->fNext;
222  } else if (diff > 0) {
223  /* we're either in front of the list, or in the middle */
224  if (prev == NULL) {
225  /* front of the list */
226  fFirst = res;
227  } else {
228  /* middle of the list */
229  prev->fNext = res;
230  }
231 
232  res->fNext = current;
233  return;
234  } else {
235  /* Key already exists! ERROR! */
236  error(linenumber, "duplicate key '%s' in table, first appeared at line %d", currentKeyString, current->line);
238  return;
239  }
240  }
241 
242  /* end of list */
243  prev->fNext = res;
244  res->fNext = NULL;
245 }
246 
248 
250  if (res != NULL && res != &kNoResource) {
251  if (fFirst == NULL) {
252  fFirst = res;
253  } else {
254  fLast->fNext = res;
255  }
256  fLast = res;
257  ++fCount;
258  }
259 }
260 
262 
264  if (res != NULL && res != &kNoResource) {
265  res->fNext = fFirst;
266  fFirst = res;
267  ++fCount;
268  }
269 }
270 
272  const UChar *value, int32_t len,
274  : SResource(bundle, tag, type, comment, errorCode) {
275  if (len == 0 && gFormatVersion > 1) {
277  fWritten = TRUE;
278  return;
279  }
280 
281  fString.setTo(ConstChar16Ptr(value), len);
282  fString.getTerminatedBuffer(); // Some code relies on NUL-termination.
283  if (U_SUCCESS(errorCode) && fString.isBogus()) {
285  }
286 }
287 
289  const icu::UnicodeString &value, UErrorCode &errorCode)
290  : SResource(bundle, NULL, type, NULL, errorCode), fString(value) {
291  if (value.isEmpty() && gFormatVersion > 1) {
293  fWritten = TRUE;
294  return;
295  }
296 
297  fString.getTerminatedBuffer(); // Some code relies on NUL-termination.
298  if (U_SUCCESS(errorCode) && fString.isBogus()) {
300  }
301 }
302 
303 // Pool bundle string, alias the buffer. Guaranteed NUL-terminated and not empty.
306  : SResource(NULL, NULL, type, NULL, errorCode), fString(TRUE, value, len) {
307  assert(len > 0);
308  assert(!fString.isBogus());
309 }
310 
312 
313 static int32_t U_CALLCONV
315  const StringResource *res = static_cast<const StringResource *>(key.pointer);
316  return res->fString.hashCode();
317 }
318 
319 static UBool U_CALLCONV
320 string_comp(const UElement key1, const UElement key2) {
321  const StringResource *res1 = static_cast<const StringResource *>(key1.pointer);
322  const StringResource *res2 = static_cast<const StringResource *>(key2.pointer);
323  return res1->fString == res2->fString;
324 }
325 
327 
329 
332  : SResource(bundle, tag, URES_INT, comment, errorCode) {
333  fValue = value;
335  fWritten = TRUE;
336 }
337 
339 
343  fCount(0), fArray(new uint32_t[RESLIST_MAX_INT_VECTOR]) {
344  if (fArray == NULL) {
346  return;
347  }
348 }
349 
351  delete[] fArray;
352 }
353 
355  if (U_SUCCESS(errorCode)) {
356  fArray[fCount++] = value;
357  }
358 }
359 
361  uint32_t length, uint8_t *data, const char* fileName,
363  : SResource(bundle, tag, URES_BINARY, comment, errorCode),
364  fLength(length), fData(NULL), fFileName(NULL) {
365  if (U_FAILURE(errorCode)) {
366  return;
367  }
368  if (fileName != NULL && *fileName != 0){
369  fFileName = new char[uprv_strlen(fileName)+1];
370  if (fFileName == NULL) {
372  return;
373  }
375  }
376  if (length > 0) {
377  fData = new uint8_t[length];
378  if (fData == NULL) {
380  return;
381  }
383  } else {
384  if (gFormatVersion > 1) {
386  fWritten = TRUE;
387  }
388  }
389 }
390 
392  delete[] fData;
393  delete[] fFileName;
394 }
395 
396 /* Writing Functions */
397 
398 void
401  assert(fSame == NULL);
402  fSame = static_cast<StringResource *>(uhash_get(stringSet, this));
403  if (fSame != NULL) {
404  // This is a duplicate of a pool bundle string or of an earlier-visited string.
405  if (++fSame->fNumCopies == 1) {
407  int32_t poolStringIndex = (int32_t)RES_GET_OFFSET(fSame->fRes);
408  if (poolStringIndex >= bundle->fPoolStringIndexLimit) {
409  bundle->fPoolStringIndexLimit = poolStringIndex + 1;
410  }
411  }
412  return;
413  }
414  /* Put this string into the set for finding duplicates. */
415  fNumCopies = 1;
416  uhash_put(stringSet, this, this, &errorCode);
417 
418  if (bundle->fStringsForm != STRINGS_UTF16_V1) {
419  int32_t len = length();
421  !U16_IS_TRAIL(fString[0]) && fString.indexOf((UChar)0) < 0) {
422  /*
423  * This string will be stored without an explicit length.
424  * Runtime will detect !U16_IS_TRAIL(s[0]) and call u_strlen().
425  */
426  fNumCharsForLength = 0;
427  } else if (len <= 0x3ee) {
428  fNumCharsForLength = 1;
429  } else if (len <= 0xfffff) {
430  fNumCharsForLength = 2;
431  } else {
432  fNumCharsForLength = 3;
433  }
434  bundle->f16BitStringsLength += fNumCharsForLength + len + 1; /* +1 for the NUL */
435  }
436 }
437 
438 void
441  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
442  current->preflightStrings(bundle, stringSet, errorCode);
443  }
444 }
445 
446 void
448  if (U_FAILURE(errorCode)) {
449  return;
450  }
451  if (fRes != RES_BOGUS) {
452  /*
453  * The resource item word was already precomputed, which means
454  * no further data needs to be written.
455  * This might be an integer, or an empty string/binary/etc.
456  */
457  return;
458  }
459  handlePreflightStrings(bundle, stringSet, errorCode);
460 }
461 
462 void
464  UErrorCode & /*errorCode*/) {
465  /* Neither a string nor a container. */
466 }
467 
468 int32_t
469 SRBRoot::makeRes16(uint32_t resWord) const {
470  if (resWord == 0) {
471  return 0; /* empty string */
472  }
473  uint32_t type = RES_GET_TYPE(resWord);
474  int32_t offset = (int32_t)RES_GET_OFFSET(resWord);
475  if (type == URES_STRING_V2) {
476  assert(offset > 0);
479  return offset;
480  }
481  } else {
483  if (offset <= 0xffff) {
484  return offset;
485  }
486  }
487  }
488  return -1;
489 }
490 
491 int32_t
492 SRBRoot::mapKey(int32_t oldpos) const {
493  const KeyMapEntry *map = fKeyMap;
494  if (map == NULL) {
495  return oldpos;
496  }
497  int32_t i, start, limit;
498 
499  /* do a binary search for the old, pre-compactKeys() key offset */
501  limit = start + fKeysCount;
502  while (start < limit - 1) {
503  i = (start + limit) / 2;
504  if (oldpos < map[i].oldpos) {
505  limit = i;
506  } else {
507  start = i;
508  }
509  }
510  assert(oldpos == map[start].oldpos);
511  return map[start].newpos;
512 }
513 
514 /*
515  * Only called for UTF-16 v1 strings and duplicate UTF-16 v2 strings.
516  * For unique UTF-16 v2 strings, write16() sees fRes != RES_BOGUS
517  * and exits early.
518  */
519 void
521  SResource *same;
522  if ((same = fSame) != NULL) {
523  /* This is a duplicate. */
524  assert(same->fRes != RES_BOGUS && same->fWritten);
525  fRes = same->fRes;
526  fWritten = same->fWritten;
527  }
528 }
529 
530 void
532  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
533  bundle->f16BitUnits.append((UChar)current->fRes16);
534  }
535  fWritten = TRUE;
536 }
537 
538 void
540  if (fCount == 0 && gFormatVersion > 1) {
542  fWritten = TRUE;
543  return;
544  }
545 
546  int32_t res16 = 0;
547  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
548  current->write16(bundle);
549  res16 |= current->fRes16;
550  }
551  if (fCount <= 0xffff && res16 >= 0 && gFormatVersion > 1) {
552  fRes = URES_MAKE_RESOURCE(URES_ARRAY16, bundle->f16BitUnits.length());
553  bundle->f16BitUnits.append((UChar)fCount);
554  writeAllRes16(bundle);
555  }
556 }
557 
558 void
560  if (fCount == 0 && gFormatVersion > 1) {
562  fWritten = TRUE;
563  return;
564  }
565  /* Find the smallest table type that fits the data. */
566  int32_t key16 = 0;
567  int32_t res16 = 0;
568  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
569  current->write16(bundle);
570  key16 |= current->fKey16;
571  res16 |= current->fRes16;
572  }
573  if(fCount > (uint32_t)bundle->fMaxTableLength) {
574  bundle->fMaxTableLength = fCount;
575  }
576  if (fCount <= 0xffff && key16 >= 0) {
577  if (res16 >= 0 && gFormatVersion > 1) {
578  /* 16-bit count, key offsets and values */
579  fRes = URES_MAKE_RESOURCE(URES_TABLE16, bundle->f16BitUnits.length());
580  bundle->f16BitUnits.append((UChar)fCount);
581  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
582  bundle->f16BitUnits.append((UChar)current->fKey16);
583  }
584  writeAllRes16(bundle);
585  } else {
586  /* 16-bit count, 16-bit key offsets, 32-bit values */
588  }
589  } else {
590  /* 32-bit count, key offsets and values */
592  }
593 }
594 
595 void
598  fWritten = TRUE;
599 }
600 
601 void
603  if (fKey >= 0) {
604  // A tagged resource has a non-negative key index into the parsed key strings.
605  // compactKeys() built a map from parsed key index to the final key index.
606  // After the mapping, negative key indexes are used for shared pool bundle keys.
607  fKey = bundle->mapKey(fKey);
608  // If the key index fits into a Key16 for a Table or Table16,
609  // then set the fKey16 field accordingly.
610  // Otherwise keep it at -1.
611  if (fKey >= 0) {
612  if (fKey < bundle->fLocalKeyLimit) {
613  fKey16 = fKey;
614  }
615  } else {
616  int32_t poolKeyIndex = fKey & 0x7fffffff;
617  if (poolKeyIndex <= 0xffff) {
618  poolKeyIndex += bundle->fLocalKeyLimit;
619  if (poolKeyIndex <= 0xffff) {
620  fKey16 = poolKeyIndex;
621  }
622  }
623  }
624  }
625  /*
626  * fRes != RES_BOGUS:
627  * The resource item word was already precomputed, which means
628  * no further data needs to be written.
629  * This might be an integer, or an empty or UTF-16 v2 string,
630  * an empty binary, etc.
631  */
632  if (fRes == RES_BOGUS) {
633  handleWrite16(bundle);
634  }
635  // Compute fRes16 for precomputed as well as just-computed fRes.
636  fRes16 = bundle->makeRes16(fRes);
637 }
638 
639 void
641  /* Only a few resource types write 16-bit units. */
642 }
643 
644 /*
645  * Only called for UTF-16 v1 strings, and for aliases.
646  * For UTF-16 v2 strings, preWrite() sees fRes != RES_BOGUS
647  * and exits early.
648  */
649 void
651  /* Write the UTF-16 v1 string. */
652  fRes = URES_MAKE_RESOURCE(fType, *byteOffset >> 2);
653  *byteOffset += 4 + (length() + 1) * U_SIZEOF_UCHAR;
654 }
655 
656 void
658  if (fCount == 0 && gFormatVersion > 1) {
660  fWritten = TRUE;
661  } else {
662  fRes = URES_MAKE_RESOURCE(URES_INT_VECTOR, *byteOffset >> 2);
663  *byteOffset += (1 + fCount) * 4;
664  }
665 }
666 
667 void
669  uint32_t pad = 0;
670  uint32_t dataStart = *byteOffset + sizeof(fLength);
671 
672  if (dataStart % BIN_ALIGNMENT) {
673  pad = (BIN_ALIGNMENT - dataStart % BIN_ALIGNMENT);
674  *byteOffset += pad; /* pad == 4 or 8 or 12 */
675  }
676  fRes = URES_MAKE_RESOURCE(URES_BINARY, *byteOffset >> 2);
677  *byteOffset += 4 + fLength;
678 }
679 
680 void
682  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
683  current->preWrite(byteOffset);
684  }
685 }
686 
687 void
689  preWriteAllRes(byteOffset);
690  fRes = URES_MAKE_RESOURCE(URES_ARRAY, *byteOffset >> 2);
691  *byteOffset += (1 + fCount) * 4;
692 }
693 
694 void
696  preWriteAllRes(byteOffset);
697  if (fTableType == URES_TABLE) {
698  /* 16-bit count, 16-bit key offsets, 32-bit values */
699  fRes = URES_MAKE_RESOURCE(URES_TABLE, *byteOffset >> 2);
700  *byteOffset += 2 + fCount * 6;
701  } else {
702  /* 32-bit count, key offsets and values */
703  fRes = URES_MAKE_RESOURCE(URES_TABLE32, *byteOffset >> 2);
704  *byteOffset += 4 + fCount * 8;
705  }
706 }
707 
708 void
710  if (fRes != RES_BOGUS) {
711  /*
712  * The resource item word was already precomputed, which means
713  * no further data needs to be written.
714  * This might be an integer, or an empty or UTF-16 v2 string,
715  * an empty binary, etc.
716  */
717  return;
718  }
719  handlePreWrite(byteOffset);
720  *byteOffset += calcPadding(*byteOffset);
721 }
722 
723 void
725  assert(FALSE);
726 }
727 
728 /*
729  * Only called for UTF-16 v1 strings, and for aliases. For UTF-16 v2 strings,
730  * write() sees fWritten and exits early.
731  */
732 void
734  /* Write the UTF-16 v1 string. */
735  int32_t len = length();
738  *byteOffset += 4 + (len + 1) * U_SIZEOF_UCHAR;
739  fWritten = TRUE;
740 }
741 
742 void
744  uint32_t i = 0;
745  for (SResource *current = fFirst; current != NULL; ++i, current = current->fNext) {
746  current->write(mem, byteOffset);
747  }
748  assert(i == fCount);
749 }
750 
751 void
753  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
754  udata_write32(mem, current->fRes);
755  }
756  *byteOffset += fCount * 4;
757 }
758 
759 void
761  writeAllRes(mem, byteOffset);
763  *byteOffset += 4;
764  writeAllRes32(mem, byteOffset);
765 }
766 
767 void
770  for(uint32_t i = 0; i < fCount; ++i) {
772  }
773  *byteOffset += (1 + fCount) * 4;
774 }
775 
776 void
778  uint32_t pad = 0;
779  uint32_t dataStart = *byteOffset + sizeof(fLength);
780 
781  if (dataStart % BIN_ALIGNMENT) {
782  pad = (BIN_ALIGNMENT - dataStart % BIN_ALIGNMENT);
783  udata_writePadding(mem, pad); /* pad == 4 or 8 or 12 */
784  *byteOffset += pad;
785  }
786 
788  if (fLength > 0) {
790  }
791  *byteOffset += 4 + fLength;
792 }
793 
794 void
796  writeAllRes(mem, byteOffset);
797  if(fTableType == URES_TABLE) {
799  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
800  udata_write16(mem, current->fKey16);
801  }
802  *byteOffset += (1 + fCount)* 2;
803  if ((fCount & 1) == 0) {
804  /* 16-bit count and even number of 16-bit key offsets need padding before 32-bit resource items */
806  *byteOffset += 2;
807  }
808  } else /* URES_TABLE32 */ {
810  for (SResource *current = fFirst; current != NULL; current = current->fNext) {
812  }
813  *byteOffset += (1 + fCount)* 4;
814  }
815  writeAllRes32(mem, byteOffset);
816 }
817 
818 void
820  if (fWritten) {
821  assert(fRes != RES_BOGUS);
822  return;
823  }
824  handleWrite(mem, byteOffset);
825  uint8_t paddingSize = calcPadding(*byteOffset);
826  if (paddingSize > 0) {
827  udata_writePadding(mem, paddingSize);
828  *byteOffset += paddingSize;
829  }
830  fWritten = TRUE;
831 }
832 
833 void
834 SResource::handleWrite(UNewDataMemory * /*mem*/, uint32_t * /*byteOffset*/) {
835  assert(FALSE);
836 }
837 
838 void SRBRoot::write(const char *outputDir, const char *outputPkg,
839  char *writtenFilename, int writtenFilenameLen,
842  uint32_t byteOffset = 0;
843  uint32_t top, size;
844  char dataName[1024];
846 
848  /*
849  * Add padding bytes to fKeys so that fKeysTop is 4-aligned.
850  * Safe because the capacity is a multiple of 4.
851  */
852  while (fKeysTop & 3) {
853  fKeys[fKeysTop++] = (char)0xaa;
854  }
855  /*
856  * In URES_TABLE, use all local key offsets that fit into 16 bits,
857  * and use the remaining 16-bit offsets for pool key offsets
858  * if there are any.
859  * If there are no local keys, then use the whole 16-bit space
860  * for pool key offsets.
861  * Note: This cannot be changed without changing the major formatVersion.
862  */
863  if (fKeysBottom < fKeysTop) {
864  if (fKeysTop <= 0x10000) {
866  } else {
867  fLocalKeyLimit = 0x10000;
868  }
869  } else {
870  fLocalKeyLimit = 0;
871  }
872 
873  UHashtable *stringSet;
874  if (gFormatVersion > 1) {
876  if (U_SUCCESS(errorCode) &&
879  current != NULL;
880  current = current->fNext) {
881  StringResource *sr = static_cast<StringResource *>(current);
882  sr->fNumCopies = 0;
883  sr->fNumUnitsSaved = 0;
884  uhash_put(stringSet, sr, sr, &errorCode);
885  }
886  }
887  fRoot->preflightStrings(this, stringSet, errorCode);
888  } else {
889  stringSet = NULL;
890  }
892  compactStringsV2(stringSet, errorCode);
893  }
894  uhash_close(stringSet);
895  if (U_FAILURE(errorCode)) {
896  return;
897  }
898 
899  int32_t formatVersion = gFormatVersion;
900  if (fPoolStringIndexLimit != 0) {
902  if ((sum - 1) > RES_MAX_OFFSET) {
904  return;
905  }
906  if (fPoolStringIndexLimit < 0x10000 && sum <= 0x10000) {
907  // 16-bit indexes work for all pool + local strings.
909  } else {
910  // Set the pool index threshold so that 16-bit indexes work
911  // for some pool strings and some local strings.
913  ((int64_t)fPoolStringIndexLimit * 0xffff) / sum);
914  }
915  } else if (gIsDefaultFormatVersion && formatVersion == 3 && !fIsPoolBundle) {
916  // If we just default to formatVersion 3
917  // but there are no pool bundle strings to share
918  // and we do not write a pool bundle,
919  // then write formatVersion 2 which is just as good.
920  formatVersion = 2;
921  }
922 
923  fRoot->write16(this);
924  if (f16BitUnits.isBogus()) {
926  return;
927  }
928  if (f16BitUnits.length() & 1) {
929  f16BitUnits.append((UChar)0xaaaa); /* pad to multiple of 4 bytes */
930  }
931 
932  byteOffset = fKeysTop + f16BitUnits.length() * 2;
933  fRoot->preWrite(&byteOffset);
934 
935  /* total size including the root item */
936  top = byteOffset;
937 
938  if (writtenFilename && writtenFilenameLen) {
939  *writtenFilename = 0;
940  }
941 
942  if (writtenFilename) {
943  int32_t off = 0, len = 0;
944  if (outputDir) {
945  len = (int32_t)uprv_strlen(outputDir);
946  if (len > writtenFilenameLen) {
947  len = writtenFilenameLen;
948  }
949  uprv_strncpy(writtenFilename, outputDir, len);
950  }
951  if (writtenFilenameLen -= len) {
952  off += len;
953  writtenFilename[off] = U_FILE_SEP_CHAR;
954  if (--writtenFilenameLen) {
955  ++off;
956  if(outputPkg != NULL)
957  {
958  uprv_strcpy(writtenFilename+off, outputPkg);
959  off += (int32_t)uprv_strlen(outputPkg);
960  writtenFilename[off] = '_';
961  ++off;
962  }
963 
965  if (len > writtenFilenameLen) {
966  len = writtenFilenameLen;
967  }
968  uprv_strncpy(writtenFilename + off, fLocale, len);
969  if (writtenFilenameLen -= len) {
970  off += len;
971  len = 5;
972  if (len > writtenFilenameLen) {
973  len = writtenFilenameLen;
974  }
975  uprv_strncpy(writtenFilename + off, ".res", len);
976  }
977  }
978  }
979  }
980 
981  if(outputPkg)
982  {
983  uprv_strcpy(dataName, outputPkg);
984  uprv_strcat(dataName, "_");
985  uprv_strcat(dataName, fLocale);
986  }
987  else
988  {
989  uprv_strcpy(dataName, fLocale);
990  }
991 
993 
994  mem = udata_create(outputDir, "res", dataName,
996  if(U_FAILURE(errorCode)){
997  return;
998  }
999 
1000  /* write the root item */
1002 
1003  /*
1004  * formatVersion 1.1 (ICU 2.8):
1005  * write int32_t indexes[] after root and before the key strings
1006  * to make it easier to parse resource bundles in icuswap or from Java etc.
1007  */
1008  uprv_memset(indexes, 0, sizeof(indexes));
1014 
1015  /*
1016  * formatVersion 1.2 (ICU 3.6):
1017  * write indexes[URES_INDEX_ATTRIBUTES] with URES_ATT_NO_FALLBACK set or not set
1018  * the memset() above initialized all indexes[] to 0
1019  */
1020  if (fNoFallback) {
1022  }
1023  /*
1024  * formatVersion 2.0 (ICU 4.4):
1025  * more compact string value storage, optional pool bundle
1026  */
1028  indexes[URES_INDEX_16BIT_TOP] = (fKeysTop>>2) + (f16BitUnits.length()>>1);
1029  }
1031  if (fIsPoolBundle) {
1033  uint32_t checksum = computeCRC((const char *)(fKeys + fKeysBottom),
1034  (uint32_t)(fKeysTop - fKeysBottom), 0);
1035  if (f16BitUnits.length() <= 1) {
1036  // no pool strings to checksum
1037  } else if (U_IS_BIG_ENDIAN) {
1038  checksum = computeCRC(reinterpret_cast<const char *>(f16BitUnits.getBuffer()),
1039  (uint32_t)f16BitUnits.length() * 2, checksum);
1040  } else {
1041  // Swap to big-endian so we get the same checksum on all platforms
1042  // (except for charset family, due to the key strings).
1043  UnicodeString s(f16BitUnits);
1044  assert(!s.isBogus());
1045  // .getBuffer(capacity) returns a mutable buffer
1046  char16_t* p = s.getBuffer(f16BitUnits.length());
1047  for (int32_t count = f16BitUnits.length(); count > 0; --count) {
1048  uint16_t x = *p;
1049  *p++ = (uint16_t)((x << 8) | (x >> 8));
1050  }
1051  s.releaseBuffer(f16BitUnits.length());
1052  checksum = computeCRC((const char *)s.getBuffer(),
1053  (uint32_t)f16BitUnits.length() * 2, checksum);
1054  }
1056  } else if (gUsePoolBundle) {
1059  }
1060  }
1061  // formatVersion 3 (ICU 56):
1062  // share string values via pool bundle strings
1063  indexes[URES_INDEX_LENGTH] |= fPoolStringIndexLimit << 8; // bits 23..0 -> 31..8
1064  indexes[URES_INDEX_ATTRIBUTES] |= (fPoolStringIndexLimit >> 12) & 0xf000; // bits 27..24 -> 15..12
1066 
1067  /* write the indexes[] */
1069 
1070  /* write the table key strings */
1073 
1074  /* write the v2 UTF-16 strings, URES_TABLE16 and URES_ARRAY16 */
1075  udata_writeBlock(mem, f16BitUnits.getBuffer(), f16BitUnits.length()*2);
1076 
1077  /* write all of the bundle contents: the root item and its children */
1078  byteOffset = fKeysTop + f16BitUnits.length() * 2;
1079  fRoot->write(mem, &byteOffset);
1080  assert(byteOffset == top);
1081 
1083  if(top != size) {
1084  fprintf(stderr, "genrb error: wrote %u bytes but counted %u\n",
1085  (int)size, (int)top);
1087  }
1088 }
1089 
1090 /* Opening Functions */
1091 
1092 TableResource* table_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1093  LocalPointer<TableResource> res(new TableResource(bundle, tag, comment, *status), *status);
1094  return U_SUCCESS(*status) ? res.orphan() : NULL;
1095 }
1096 
1097 ArrayResource* array_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1098  LocalPointer<ArrayResource> res(new ArrayResource(bundle, tag, comment, *status), *status);
1099  return U_SUCCESS(*status) ? res.orphan() : NULL;
1100 }
1101 
1102 struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) {
1103  LocalPointer<SResource> res(
1104  new StringResource(bundle, tag, value, len, comment, *status), *status);
1105  return U_SUCCESS(*status) ? res.orphan() : NULL;
1106 }
1107 
1108 struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) {
1109  LocalPointer<SResource> res(
1110  new AliasResource(bundle, tag, value, len, comment, *status), *status);
1111  return U_SUCCESS(*status) ? res.orphan() : NULL;
1112 }
1113 
1114 IntVectorResource *intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1115  LocalPointer<IntVectorResource> res(
1116  new IntVectorResource(bundle, tag, comment, *status), *status);
1117  return U_SUCCESS(*status) ? res.orphan() : NULL;
1118 }
1119 
1120 struct SResource *int_open(struct SRBRoot *bundle, const char *tag, int32_t value, const struct UString* comment, UErrorCode *status) {
1121  LocalPointer<SResource> res(new IntResource(bundle, tag, value, comment, *status), *status);
1122  return U_SUCCESS(*status) ? res.orphan() : NULL;
1123 }
1124 
1125 struct SResource *bin_open(struct SRBRoot *bundle, const char *tag, uint32_t length, uint8_t *data, const char* fileName, const struct UString* comment, UErrorCode *status) {
1126  LocalPointer<SResource> res(
1127  new BinaryResource(bundle, tag, length, data, fileName, comment, *status), *status);
1128  return U_SUCCESS(*status) ? res.orphan() : NULL;
1129 }
1130 
1132  : fRoot(NULL), fLocale(NULL), fIndexLength(0), fMaxTableLength(0), fNoFallback(FALSE),
1133  fStringsForm(STRINGS_UTF16_V1), fIsPoolBundle(isPoolBundle),
1134  fKeys(NULL), fKeyMap(NULL),
1135  fKeysBottom(0), fKeysTop(0), fKeysCapacity(0),
1136  fKeysCount(0), fLocalKeyLimit(0),
1137  f16BitUnits(), f16BitStringsLength(0),
1138  fUsePoolBundle(&kNoPoolBundle),
1139  fPoolStringIndexLimit(0), fPoolStringIndex16Limit(0), fLocalStringIndexLimit(0),
1140  fWritePoolBundle(NULL) {
1141  if (U_FAILURE(errorCode)) {
1142  return;
1143  }
1144 
1145  if (gFormatVersion > 1) {
1146  // f16BitUnits must start with a zero for empty resources.
1147  // We might be able to omit it if there are no empty 16-bit resources.
1148  f16BitUnits.append((UChar)0);
1149  }
1150 
1151  fKeys = (char *) uprv_malloc(sizeof(char) * KEY_SPACE_SIZE);
1152  if (isPoolBundle) {
1153  fRoot = new PseudoListResource(this, errorCode);
1154  } else {
1155  fRoot = new TableResource(this, NULL, comment, errorCode);
1156  }
1157  if (fKeys == NULL || fRoot == NULL || U_FAILURE(errorCode)) {
1158  if (U_SUCCESS(errorCode)) {
1160  }
1161  return;
1162  }
1163 
1165  /* formatVersion 1.1 and up: start fKeysTop after the root item and indexes[] */
1166  if (gUsePoolBundle || isPoolBundle) {
1168  } else if (gFormatVersion >= 2) {
1170  } else /* formatVersion 1 */ {
1172  }
1173  fKeysBottom = (1 /* root */ + fIndexLength) * 4;
1176 
1177  if (gFormatVersion == 1) {
1179  } else {
1181  }
1182 }
1183 
1184 /* Closing Functions */
1185 
1186 void res_close(struct SResource *res) {
1187  delete res;
1188 }
1189 
1191  delete fRoot;
1192  uprv_free(fLocale);
1193  uprv_free(fKeys);
1194  uprv_free(fKeyMap);
1195 }
1196 
1197 /* Misc Functions */
1198 
1200  if(U_FAILURE(errorCode)) {
1201  return;
1202  }
1203 
1204  uprv_free(fLocale);
1205  fLocale = (char*) uprv_malloc(sizeof(char) * (u_strlen(locale)+1));
1206  if(fLocale == NULL) {
1208  return;
1209  }
1210 
1212 }
1213 
1214 const char *
1216  if (key < 0) {
1217  return fUsePoolBundle->fKeys + (key & 0x7fffffff);
1218  } else {
1219  return fKeys + key;
1220  }
1221 }
1222 
1223 const char *
1224 SResource::getKeyString(const SRBRoot *bundle) const {
1225  if (fKey == -1) {
1226  return NULL;
1227  }
1228  return bundle->getKeyString(fKey);
1229 }
1230 
1231 const char *
1233  *pLength = fKeysTop - fKeysBottom;
1234  return fKeys + fKeysBottom;
1235 }
1236 
1237 int32_t
1239  int32_t keypos;
1240 
1241  // It is not legal to add new key bytes after compactKeys is run!
1242  U_ASSERT(fKeyMap == nullptr);
1243 
1244  if (U_FAILURE(errorCode)) {
1245  return -1;
1246  }
1247  if (length < 0 || (keyBytes == NULL && length != 0)) {
1249  return -1;
1250  }
1251  if (length == 0) {
1252  return fKeysTop;
1253  }
1254 
1255  keypos = fKeysTop;
1256  fKeysTop += length;
1257  if (fKeysTop >= fKeysCapacity) {
1258  /* overflow - resize the keys buffer */
1260  fKeys = static_cast<char *>(uprv_realloc(fKeys, fKeysCapacity));
1261  if(fKeys == NULL) {
1263  return -1;
1264  }
1265  }
1266 
1267  uprv_memcpy(fKeys + keypos, keyBytes, length);
1268 
1269  return keypos;
1270 }
1271 
1272 int32_t
1274  int32_t keypos;
1275 
1276  if (U_FAILURE(errorCode)) {
1277  return -1;
1278  }
1279 
1280  if (tag == NULL) {
1281  /* no error: the root table and array items have no keys */
1282  return -1;
1283  }
1284 
1285  keypos = addKeyBytes(tag, (int32_t)(uprv_strlen(tag) + 1), errorCode);
1286  if (U_SUCCESS(errorCode)) {
1287  ++fKeysCount;
1288  }
1289  return keypos;
1290 }
1291 
1292 static int32_t
1294  /*
1295  * Compare possibly-negative key offsets. Don't just return lPos - rPos
1296  * because that is prone to negative-integer underflows.
1297  */
1298  if (lPos < rPos) {
1299  return -1;
1300  } else if (lPos > rPos) {
1301  return 1;
1302  } else {
1303  return 0;
1304  }
1305 }
1306 
1307 static int32_t U_CALLCONV
1308 compareKeySuffixes(const void *context, const void *l, const void *r) {
1309  const struct SRBRoot *bundle=(const struct SRBRoot *)context;
1310  int32_t lPos = ((const KeyMapEntry *)l)->oldpos;
1311  int32_t rPos = ((const KeyMapEntry *)r)->oldpos;
1312  const char *lStart = bundle->getKeyString(lPos);
1313  const char *lLimit = lStart;
1314  const char *rStart = bundle->getKeyString(rPos);
1315  const char *rLimit = rStart;
1316  int32_t diff;
1317  while (*lLimit != 0) { ++lLimit; }
1318  while (*rLimit != 0) { ++rLimit; }
1319  /* compare keys in reverse character order */
1320  while (lStart < lLimit && rStart < rLimit) {
1321  diff = (int32_t)(uint8_t)*--lLimit - (int32_t)(uint8_t)*--rLimit;
1322  if (diff != 0) {
1323  return diff;
1324  }
1325  }
1326  /* sort equal suffixes by descending key length */
1327  diff = (int32_t)(rLimit - rStart) - (int32_t)(lLimit - lStart);
1328  if (diff != 0) {
1329  return diff;
1330  }
1331  /* Sort pool bundle keys first (negative oldpos), and otherwise keys in parsing order. */
1332  return compareInt32(lPos, rPos);
1333 }
1334 
1335 static int32_t U_CALLCONV
1336 compareKeyNewpos(const void * /*context*/, const void *l, const void *r) {
1337  return compareInt32(((const KeyMapEntry *)l)->newpos, ((const KeyMapEntry *)r)->newpos);
1338 }
1339 
1340 static int32_t U_CALLCONV
1341 compareKeyOldpos(const void * /*context*/, const void *l, const void *r) {
1342  return compareInt32(((const KeyMapEntry *)l)->oldpos, ((const KeyMapEntry *)r)->oldpos);
1343 }
1344 
1345 void SResource::collectKeys(std::function<void(int32_t)> collector) const {
1346  collector(fKey);
1347 }
1348 
1349 void ContainerResource::collectKeys(std::function<void(int32_t)> collector) const {
1350  collector(fKey);
1351  for (SResource* curr = fFirst; curr != NULL; curr = curr->fNext) {
1352  curr->collectKeys(collector);
1353  }
1354 }
1355 
1356 void
1358  KeyMapEntry *map;
1359  char *keys;
1360  int32_t i;
1361 
1362  // Except for pool bundles, keys might not be used.
1363  // Do not add unused keys to the final bundle.
1364  std::set<int32_t> keysInUse;
1365  if (!fIsPoolBundle) {
1366  fRoot->collectKeys([&keysInUse](int32_t key) {
1367  if (key >= 0) {
1368  keysInUse.insert(key);
1369  }
1370  });
1371  fKeysCount = static_cast<int32_t>(keysInUse.size());
1372  }
1373 
1375  if (U_FAILURE(errorCode) || fKeyMap != NULL) {
1376  return;
1377  }
1378  map = (KeyMapEntry *)uprv_malloc(keysCount * sizeof(KeyMapEntry));
1379  if (map == NULL) {
1381  return;
1382  }
1383  keys = (char *)fUsePoolBundle->fKeys;
1384  for (i = 0; i < fUsePoolBundle->fKeysCount; ++i) {
1385  map[i].oldpos =
1386  (int32_t)(keys - fUsePoolBundle->fKeys) | 0x80000000; /* negative oldpos */
1387  map[i].newpos = 0;
1388  while (*keys != 0) { ++keys; } /* skip the key */
1389  ++keys; /* skip the NUL */
1390  }
1391  keys = fKeys + fKeysBottom;
1392  while (i < keysCount) {
1393  int32_t keyOffset = static_cast<int32_t>(keys - fKeys);
1394  if (!fIsPoolBundle && keysInUse.count(keyOffset) == 0) {
1395  // Mark the unused key as deleted
1396  while (*keys != 0) { *keys++ = 1; }
1397  *keys++ = 1;
1398  } else {
1399  map[i].oldpos = keyOffset;
1400  map[i].newpos = 0;
1401  while (*keys != 0) { ++keys; } /* skip the key */
1402  ++keys; /* skip the NUL */
1403  i++;
1404  }
1405  }
1406  if (keys != fKeys + fKeysTop) {
1407  // Throw away any unused keys from the end
1408  fKeysTop = static_cast<int32_t>(keys - fKeys);
1409  }
1410  /* Sort the keys so that each one is immediately followed by all of its suffixes. */
1411  uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
1413  /*
1414  * Make suffixes point into earlier, longer strings that contain them
1415  * and mark the old, now unused suffix bytes as deleted.
1416  */
1417  if (U_SUCCESS(errorCode)) {
1418  keys = fKeys;
1419  for (i = 0; i < keysCount;) {
1420  /*
1421  * This key is not a suffix of the previous one;
1422  * keep this one and delete the following ones that are
1423  * suffixes of this one.
1424  */
1425  const char *key;
1426  const char *keyLimit;
1427  int32_t j = i + 1;
1428  map[i].newpos = map[i].oldpos;
1429  if (j < keysCount && map[j].oldpos < 0) {
1430  /* Key string from the pool bundle, do not delete. */
1431  i = j;
1432  continue;
1433  }
1434  key = getKeyString(map[i].oldpos);
1435  for (keyLimit = key; *keyLimit != 0; ++keyLimit) {}
1436  for (; j < keysCount && map[j].oldpos >= 0; ++j) {
1437  const char *k;
1438  char *suffix;
1439  const char *suffixLimit;
1440  int32_t offset;
1441  suffix = keys + map[j].oldpos;
1442  for (suffixLimit = suffix; *suffixLimit != 0; ++suffixLimit) {}
1443  offset = static_cast<int32_t>((keyLimit - key) - (suffixLimit - suffix));
1444  if (offset < 0) {
1445  break; /* suffix cannot be longer than the original */
1446  }
1447  /* Is it a suffix of the earlier, longer key? */
1448  for (k = keyLimit; suffix < suffixLimit && *--k == *--suffixLimit;) {}
1449  if (suffix == suffixLimit && *k == *suffixLimit) {
1450  map[j].newpos = map[i].oldpos + offset; /* yes, point to the earlier key */
1451  // Mark the suffix as deleted
1452  while (*suffix != 0) { *suffix++ = 1; }
1453  *suffix = 1;
1454  } else {
1455  break; /* not a suffix, restart from here */
1456  }
1457  }
1458  i = j;
1459  }
1460  /*
1461  * Re-sort by newpos, then modify the key characters array in-place
1462  * to squeeze out unused bytes, and readjust the newpos offsets.
1463  */
1464  uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
1466  if (U_SUCCESS(errorCode)) {
1467  int32_t oldpos, newpos, limit;
1468  oldpos = newpos = fKeysBottom;
1469  limit = fKeysTop;
1470  /* skip key offsets that point into the pool bundle rather than this new bundle */
1471  for (i = 0; i < keysCount && map[i].newpos < 0; ++i) {}
1472  if (i < keysCount) {
1473  while (oldpos < limit) {
1474  if (keys[oldpos] == 1) {
1475  ++oldpos; /* skip unused bytes */
1476  } else {
1477  /* adjust the new offsets for keys starting here */
1478  while (i < keysCount && map[i].newpos == oldpos) {
1479  map[i++].newpos = newpos;
1480  }
1481  /* move the key characters to their new position */
1482  keys[newpos++] = keys[oldpos++];
1483  }
1484  }
1485  U_ASSERT(i == keysCount);
1486  }
1487  fKeysTop = newpos;
1488  /* Re-sort once more, by old offsets for binary searching. */
1489  uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
1491  if (U_SUCCESS(errorCode)) {
1492  /* key size reduction by limit - newpos */
1493  fKeyMap = map;
1494  map = NULL;
1495  }
1496  }
1497  }
1498  uprv_free(map);
1499 }
1500 
1501 static int32_t U_CALLCONV
1502 compareStringSuffixes(const void * /*context*/, const void *l, const void *r) {
1503  const StringResource *left = *((const StringResource **)l);
1504  const StringResource *right = *((const StringResource **)r);
1505  const UChar *lStart = left->getBuffer();
1506  const UChar *lLimit = lStart + left->length();
1507  const UChar *rStart = right->getBuffer();
1508  const UChar *rLimit = rStart + right->length();
1509  int32_t diff;
1510  /* compare keys in reverse character order */
1511  while (lStart < lLimit && rStart < rLimit) {
1512  diff = (int32_t)*--lLimit - (int32_t)*--rLimit;
1513  if (diff != 0) {
1514  return diff;
1515  }
1516  }
1517  /* sort equal suffixes by descending string length */
1518  return right->length() - left->length();
1519 }
1520 
1521 static int32_t U_CALLCONV
1522 compareStringLengths(const void * /*context*/, const void *l, const void *r) {
1523  const StringResource *left = *((const StringResource **)l);
1524  const StringResource *right = *((const StringResource **)r);
1525  int32_t diff;
1526  /* Make "is suffix of another string" compare greater than a non-suffix. */
1527  diff = (int)(left->fSame != NULL) - (int)(right->fSame != NULL);
1528  if (diff != 0) {
1529  return diff;
1530  }
1531  /* sort by ascending string length */
1532  diff = left->length() - right->length();
1533  if (diff != 0) {
1534  return diff;
1535  }
1536  // sort by descending size reduction
1537  diff = right->fNumUnitsSaved - left->fNumUnitsSaved;
1538  if (diff != 0) {
1539  return diff;
1540  }
1541  // sort lexically
1542  return left->fString.compare(right->fString);
1543 }
1544 
1545 void
1547  int32_t len = length();
1549  fWritten = TRUE;
1550  switch(fNumCharsForLength) {
1551  case 0:
1552  break;
1553  case 1:
1554  dest.append((UChar)(0xdc00 + len));
1555  break;
1556  case 2:
1557  dest.append((UChar)(0xdfef + (len >> 16)));
1558  dest.append((UChar)len);
1559  break;
1560  case 3:
1561  dest.append((UChar)0xdfff);
1562  dest.append((UChar)(len >> 16));
1563  dest.append((UChar)len);
1564  break;
1565  default:
1566  break; /* will not occur */
1567  }
1568  dest.append(fString);
1569  dest.append((UChar)0);
1570 }
1571 
1572 void
1574  if (U_FAILURE(errorCode)) {
1575  return;
1576  }
1577  // Store the StringResource pointers in an array for
1578  // easy sorting and processing.
1579  // We enumerate a set of strings, so there are no duplicates.
1580  int32_t count = uhash_count(stringSet);
1581  LocalArray<StringResource *> array(new StringResource *[count], errorCode);
1582  if (U_FAILURE(errorCode)) {
1583  return;
1584  }
1585  for (int32_t pos = UHASH_FIRST, i = 0; i < count; ++i) {
1586  array[i] = (StringResource *)uhash_nextElement(stringSet, &pos)->key.pointer;
1587  }
1588  /* Sort the strings so that each one is immediately followed by all of its suffixes. */
1589  uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **),
1591  if (U_FAILURE(errorCode)) {
1592  return;
1593  }
1594  /*
1595  * Make suffixes point into earlier, longer strings that contain them.
1596  * Temporarily use fSame and fSuffixOffset for suffix strings to
1597  * refer to the remaining ones.
1598  */
1599  for (int32_t i = 0; i < count;) {
1600  /*
1601  * This string is not a suffix of the previous one;
1602  * write this one and subsume the following ones that are
1603  * suffixes of this one.
1604  */
1605  StringResource *res = array[i];
1606  res->fNumUnitsSaved = (res->fNumCopies - 1) * res->get16BitStringsLength();
1607  // Whole duplicates of pool strings are already account for in fPoolStringIndexLimit,
1608  // see StringResource::handlePreflightStrings().
1609  int32_t j;
1610  for (j = i + 1; j < count; ++j) {
1611  StringResource *suffixRes = array[j];
1612  /* Is it a suffix of the earlier, longer string? */
1613  if (res->fString.endsWith(suffixRes->fString)) {
1614  assert(res->length() != suffixRes->length()); // Set strings are unique.
1615  if (suffixRes->fWritten) {
1616  // Pool string, skip.
1617  } else if (suffixRes->fNumCharsForLength == 0) {
1618  /* yes, point to the earlier string */
1619  suffixRes->fSame = res;
1620  suffixRes->fSuffixOffset = res->length() - suffixRes->length();
1621  if (res->fWritten) {
1622  // Suffix-share res which is a pool string.
1623  // Compute the resource word and collect the maximum.
1624  suffixRes->fRes =
1625  res->fRes + res->fNumCharsForLength + suffixRes->fSuffixOffset;
1626  int32_t poolStringIndex = (int32_t)RES_GET_OFFSET(suffixRes->fRes);
1627  if (poolStringIndex >= fPoolStringIndexLimit) {
1628  fPoolStringIndexLimit = poolStringIndex + 1;
1629  }
1630  suffixRes->fWritten = TRUE;
1631  }
1632  res->fNumUnitsSaved += suffixRes->fNumCopies * suffixRes->get16BitStringsLength();
1633  } else {
1634  /* write the suffix by itself if we need explicit length */
1635  }
1636  } else {
1637  break; /* not a suffix, restart from here */
1638  }
1639  }
1640  i = j;
1641  }
1642  /*
1643  * Re-sort the strings by ascending length (except suffixes last)
1644  * to optimize for URES_TABLE16 and URES_ARRAY16:
1645  * Keep as many as possible within reach of 16-bit offsets.
1646  */
1647  uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **),
1649  if (U_FAILURE(errorCode)) {
1650  return;
1651  }
1652  if (fIsPoolBundle) {
1653  // Write strings that are sufficiently shared.
1654  // Avoid writing other strings.
1655  int32_t numStringsWritten = 0;
1656  int32_t numUnitsSaved = 0;
1657  int32_t numUnitsNotSaved = 0;
1658  for (int32_t i = 0; i < count; ++i) {
1659  StringResource *res = array[i];
1660  // Maximum pool string index when suffix-sharing the last character.
1661  int32_t maxStringIndex =
1662  f16BitUnits.length() + res->fNumCharsForLength + res->length() - 1;
1663  if (res->fNumUnitsSaved >= GENRB_MIN_16BIT_UNITS_SAVED_FOR_POOL_STRING &&
1664  maxStringIndex < RES_MAX_OFFSET) {
1665  res->writeUTF16v2(0, f16BitUnits);
1666  ++numStringsWritten;
1667  numUnitsSaved += res->fNumUnitsSaved;
1668  } else {
1669  numUnitsNotSaved += res->fNumUnitsSaved;
1671  res->fWritten = TRUE;
1672  }
1673  }
1674  if (f16BitUnits.isBogus()) {
1676  }
1677  if (getShowWarning()) { // not quiet
1678  printf("number of shared strings: %d\n", (int)numStringsWritten);
1679  printf("16-bit units for strings: %6d = %6d bytes\n",
1680  (int)f16BitUnits.length(), (int)f16BitUnits.length() * 2);
1681  printf("16-bit units saved: %6d = %6d bytes\n",
1682  (int)numUnitsSaved, (int)numUnitsSaved * 2);
1683  printf("16-bit units not saved: %6d = %6d bytes\n",
1684  (int)numUnitsNotSaved, (int)numUnitsNotSaved * 2);
1685  }
1686  } else {
1687  assert(fPoolStringIndexLimit <= fUsePoolBundle->fStringIndexLimit);
1688  /* Write the non-suffix strings. */
1689  int32_t i;
1690  for (i = 0; i < count && array[i]->fSame == NULL; ++i) {
1691  StringResource *res = array[i];
1692  if (!res->fWritten) {
1693  int32_t localStringIndex = f16BitUnits.length();
1694  if (localStringIndex >= fLocalStringIndexLimit) {
1695  fLocalStringIndexLimit = localStringIndex + 1;
1696  }
1697  res->writeUTF16v2(fPoolStringIndexLimit, f16BitUnits);
1698  }
1699  }
1700  if (f16BitUnits.isBogus()) {
1702  return;
1703  }
1704  if (fWritePoolBundle != NULL && gFormatVersion >= 3) {
1705  PseudoListResource *poolStrings =
1706  static_cast<PseudoListResource *>(fWritePoolBundle->fRoot);
1707  for (i = 0; i < count && array[i]->fSame == NULL; ++i) {
1708  assert(!array[i]->fString.isEmpty());
1709  StringResource *poolString =
1710  new StringResource(fWritePoolBundle, array[i]->fString, errorCode);
1711  if (poolString == NULL) {
1713  break;
1714  }
1715  poolStrings->add(poolString);
1716  }
1717  }
1718  /* Write the suffix strings. Make each point to the real string. */
1719  for (; i < count; ++i) {
1720  StringResource *res = array[i];
1721  if (res->fWritten) {
1722  continue;
1723  }
1724  StringResource *same = res->fSame;
1725  assert(res->length() != same->length()); // Set strings are unique.
1726  res->fRes = same->fRes + same->fNumCharsForLength + res->fSuffixOffset;
1727  int32_t localStringIndex = (int32_t)RES_GET_OFFSET(res->fRes) - fPoolStringIndexLimit;
1728  // Suffixes of pool strings have been set already.
1729  assert(localStringIndex >= 0);
1730  if (localStringIndex >= fLocalStringIndexLimit) {
1731  fLocalStringIndexLimit = localStringIndex + 1;
1732  }
1733  res->fWritten = TRUE;
1734  }
1735  }
1736  // +1 to account for the initial zero in f16BitUnits
1737  assert(f16BitUnits.length() <= (f16BitStringsLength + 1));
1738 }
1739 
1741  const PathFilter& /*filter*/,
1742  ResKeyPath& /*path*/,
1743  const SRBRoot* /*bundle*/) {
1744  // Only a few resource types (tables) are capable of being filtered.
1745 }
1746 
1748  const PathFilter& filter,
1749  ResKeyPath& path,
1750  const SRBRoot* bundle) {
1751  SResource* prev = nullptr;
1752  SResource* curr = fFirst;
1753  for (; curr != nullptr;) {
1754  path.push(curr->getKeyString(bundle));
1755  auto inclusion = filter.match(path);
1756  if (inclusion == PathFilter::EInclusion::INCLUDE) {
1757  // Include whole subtree
1758  // no-op
1759  if (isVerbose()) {
1760  std::cout << "genrb subtree: " << bundle->fLocale << ": INCLUDE: " << path << std::endl;
1761  }
1762  } else if (inclusion == PathFilter::EInclusion::EXCLUDE) {
1763  // Reject the whole subtree
1764  // Remove it from the linked list
1765  if (isVerbose()) {
1766  std::cout << "genrb subtree: " << bundle->fLocale << ": DELETE: " << path << std::endl;
1767  }
1768  if (prev == nullptr) {
1769  fFirst = curr->fNext;
1770  } else {
1771  prev->fNext = curr->fNext;
1772  }
1773  fCount--;
1774  delete curr;
1775  curr = prev;
1776  } else {
1778  // Recurse into the child
1779  curr->applyFilter(filter, path, bundle);
1780  }
1781  path.pop();
1782 
1783  prev = curr;
1784  if (curr == nullptr) {
1785  curr = fFirst;
1786  } else {
1787  curr = curr->fNext;
1788  }
1789  }
1790 }
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
#define type(a)
Definition: aptex-macros.h:171
#define count(a)
Definition: aptex-macros.h:781
#define next(a)
Definition: aptex-macros.h:924
virtual ~AliasResource()
Definition: reslist.cpp:328
virtual void handlePreWrite(uint32_t *byteOffset)
Definition: reslist.cpp:688
virtual void handleWrite16(SRBRoot *bundle)
Definition: reslist.cpp:539
virtual void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:760
SResource * fLast
Definition: reslist.h:301
virtual ~ArrayResource()
Definition: reslist.cpp:247
void add(SResource *res)
Definition: reslist.cpp:249
virtual ~BinaryResource()
Definition: reslist.cpp:391
virtual void handlePreWrite(uint32_t *byteOffset)
Definition: reslist.cpp:668
char * fFileName
Definition: reslist.h:426
uint8_t * fData
Definition: reslist.h:424
BinaryResource(SRBRoot *bundle, const char *tag, uint32_t length, uint8_t *data, const char *fileName, const UString *comment, UErrorCode &errorCode)
Definition: reslist.cpp:360
virtual void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:777
uint32_t fLength
Definition: reslist.h:423
void preWriteAllRes(uint32_t *byteOffset)
Definition: reslist.cpp:681
void writeAllRes16(SRBRoot *bundle)
Definition: reslist.cpp:531
SResource * fFirst
Definition: reslist.h:264
virtual ~ContainerResource()
Definition: reslist.cpp:172
void collectKeys(std::function< void(int32_t)> collector) const override
Definition: reslist.cpp:1349
void writeAllRes32(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:752
uint32_t fCount
Definition: reslist.h:263
void handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet, UErrorCode &errorCode) override
Definition: reslist.cpp:439
void writeAllRes(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:743
int32_t fValue
Definition: reslist.h:393
IntResource(SRBRoot *bundle, const char *tag, int32_t value, const UString *comment, UErrorCode &errorCode)
Definition: reslist.cpp:330
virtual ~IntResource()
Definition: reslist.cpp:338
uint32_t fCount
Definition: reslist.h:408
IntVectorResource(SRBRoot *bundle, const char *tag, const UString *comment, UErrorCode &errorCode)
Definition: reslist.cpp:340
virtual void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:768
uint32_t * fArray
Definition: reslist.h:409
virtual void handlePreWrite(uint32_t *byteOffset)
Definition: reslist.cpp:657
void add(int32_t value, UErrorCode &errorCode)
Definition: reslist.cpp:354
virtual ~IntVectorResource()
Definition: reslist.cpp:350
virtual void handleWrite16(SRBRoot *bundle)
Definition: reslist.cpp:596
void add(SResource *res)
Definition: reslist.cpp:263
virtual ~PseudoListResource()
Definition: reslist.cpp:261
const UChar * getBuffer() const
Definition: reslist.h:329
virtual ~StringBaseResource()
Definition: reslist.cpp:311
icu::UnicodeString fString
Definition: reslist.h:336
StringBaseResource(SRBRoot *bundle, const char *tag, int8_t type, const UChar *value, int32_t len, const UString *comment, UErrorCode &errorCode)
Definition: reslist.cpp:271
int32_t length() const
Definition: reslist.h:330
virtual void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:733
virtual void handlePreWrite(uint32_t *byteOffset)
Definition: reslist.cpp:650
StringResource * fSame
Definition: reslist.h:371
int8_t fNumCharsForLength
Definition: reslist.h:375
virtual void handleWrite16(SRBRoot *bundle)
Definition: reslist.cpp:520
virtual void handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet, UErrorCode &errorCode)
Definition: reslist.cpp:399
void writeUTF16v2(int32_t base, icu::UnicodeString &dest)
Definition: reslist.cpp:1546
int32_t fNumUnitsSaved
Definition: reslist.h:374
int32_t fNumCopies
Definition: reslist.h:373
int32_t fSuffixOffset
Definition: reslist.h:372
int32_t get16BitStringsLength() const
Definition: reslist.h:362
virtual ~StringResource()
Definition: reslist.cpp:326
SRBRoot * fRoot
Definition: reslist.h:284
int8_t fTableType
Definition: reslist.h:283
void applyFilter(const PathFilter &filter, ResKeyPath &path, const SRBRoot *bundle) override
Definition: reslist.cpp:1747
void handlePreWrite(uint32_t *byteOffset) override
Definition: reslist.cpp:695
void add(SResource *res, int linenumber, UErrorCode &errorCode)
Definition: reslist.cpp:184
void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset) override
Definition: reslist.cpp:795
void handleWrite16(SRBRoot *bundle) override
Definition: reslist.cpp:559
virtual ~TableResource()
Definition: reslist.cpp:181
#define uprv_memcpy(dst, src, size)
Definition: cmemory.h:40
#define uprv_memset(buffer, mark, size)
Definition: cmemory.h:51
#define uprv_strcmp(s1, s2)
Definition: cstring.h:38
#define uprv_strncpy(dst, src, size)
Definition: cstring.h:43
#define uprv_strcpy(dst, src)
Definition: cstring.h:36
#define uprv_strcat(dst, src)
Definition: cstring.h:39
#define uprv_strlen(str)
Definition: cstring.h:37
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
int linenumber
Definition: devnag.c:401
int printf()
#define error(a)
Definition: dviinfo.c:48
struct keys keys[]
struct rect data
Definition: dvipdfm.c:64
UBool getShowWarning()
Definition: errmsg.c:44
UBool isVerbose()
Definition: errmsg.c:56
#define s
Definition: afcover.h:80
static FIELD_PTR prev
Definition: genind.c:36
static FIELD_PTR curr
Definition: genind.c:35
int base
Definition: gsftopk.c:1502
char comment[255+1]
Definition: hbf2gf.c:350
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
pad
Definition: in_pcx.cpp:455
unsigned char UChar
Definition: bzip2.c:163
#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
for(n=0;n< outline->n_points;n++)
Definition: ftbbox.c:494
@ right
Definition: annotate.c:15
int int double double double char double char * top
Definition: gdfx.h:19
unsigned short uint16_t
Definition: stdint.h:79
signed __int64 int64_t
Definition: stdint.h:89
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
signed char int8_t
Definition: stdint.h:75
void * new(uint32_t size)
Definition: mem.c:34
#define fprintf
Definition: mendex.h:64
#define length(c)
Definition: ctangleboot.c:65
#define mem
Definition: synctex.c:171
#define dest
#define INCLUDE
Definition: lacheck.c:2194
#define U_CALLCONV
Definition: platform.h:877
#define U_IS_BIG_ENDIAN
Definition: platform.h:403
#define U_CHARSET_FAMILY
Definition: platform.h:632
#define U_ASCII_FAMILY
Definition: platform.h:575
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
const int * pos
Definition: combiners.h:905
float x
Definition: cordic.py:15
dictionary off
Definition: fc-lang.py:226
union value value
Definition: obx.h:44
int k
Definition: otp-parser.c:70
integer checksum
Definition: pbmtopk.c:63
#define res(length)
Definition: picttoppm.c:287
static struct Point current
Definition: picttoppm.c:134
const char * suffix
Definition: pkg_icu.cpp:27
static int filter
Definition: pnmtopng.c:113
static int size
Definition: ppmlabel.c:24
int r
Definition: ppmqvga.c:68
static int offset
Definition: ppmtogif.c:642
#define map
#define status
C API: Platform Utilities.
#define U_FILE_SEP_CHAR
Definition: putil.h:130
#define same(n, f, k)
Definition: pdffont.c:103
static int32_t compareKeyOldpos(const void *, const void *l, const void *r)
Definition: reslist.cpp:1341
void setUsePoolBundle(UBool use)
Definition: reslist.cpp:142
static int32_t compareKeyNewpos(const void *, const void *l, const void *r)
Definition: reslist.cpp:1336
void res_close(struct SResource *res)
Definition: reslist.cpp:1186
ArrayResource * array_open(struct SRBRoot *bundle, const char *tag, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1097
UBool getIncludeCopyright(void)
Definition: reslist.cpp:129
static UBool gIsDefaultFormatVersion
Definition: reslist.cpp:76
struct SResource * bin_open(struct SRBRoot *bundle, const char *tag, uint32_t length, uint8_t *data, const char *fileName, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1125
static SResource kNoResource
Definition: reslist.cpp:94
struct SResource * alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1108
static const ResFile kNoPoolBundle
Definition: reslist.cpp:87
@ STRINGS_UTF16_V1
Definition: reslist.cpp:81
@ STRINGS_UTF16_V2
Definition: reslist.cpp:82
static U_NAMESPACE_USE UBool gIncludeCopyright
Definition: reslist.cpp:74
static int32_t compareKeySuffixes(const void *context, const void *l, const void *r)
Definition: reslist.cpp:1308
struct SResource * int_open(struct SRBRoot *bundle, const char *tag, int32_t value, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1120
#define GENRB_MIN_16BIT_UNITS_SAVED_FOR_POOL_STRING
Definition: reslist.cpp:69
TableResource * table_open(struct SRBRoot *bundle, const char *tag, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1092
int32_t getFormatVersion()
Definition: reslist.cpp:138
static int32_t compareStringLengths(const void *, const void *l, const void *r)
Definition: reslist.cpp:1522
static int32_t string_hash(const UElement key)
Definition: reslist.cpp:314
static const int32_t MAX_IMPLICIT_STRING_LENGTH
Definition: reslist.cpp:85
static UBool string_comp(const UElement key1, const UElement key2)
Definition: reslist.cpp:320
IntVectorResource * intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1114
#define BIN_ALIGNMENT
Definition: reslist.cpp:56
static int32_t compareInt32(int32_t lPos, int32_t rPos)
Definition: reslist.cpp:1293
static int32_t compareStringSuffixes(const void *, const void *l, const void *r)
Definition: reslist.cpp:1502
static UBool gUsePoolBundle
Definition: reslist.cpp:75
struct SResource * res_none()
Definition: reslist.cpp:147
static const UVersionInfo gFormatVersions[4]
Definition: reslist.cpp:110
void setFormatVersion(int32_t formatVersion)
Definition: reslist.cpp:133
static uint8_t calcPadding(uint32_t size)
Definition: reslist.cpp:119
static UDataInfo dataInfo
Definition: reslist.cpp:96
void setIncludeCopyright(UBool val)
Definition: reslist.cpp:125
static int32_t gFormatVersion
Definition: reslist.cpp:77
struct SResource * string_open(struct SRBRoot *bundle, const char *tag, const UChar *value, int32_t len, const struct UString *comment, UErrorCode *status)
Definition: reslist.cpp:1102
uint32_t computeCRC(const char *ptr, uint32_t len, uint32_t lastcrc)
Definition: wrtxml.cpp:141
#define KEY_SPACE_SIZE
Definition: reslist.h:23
#define RESLIST_MAX_INT_VECTOR
Definition: reslist.h:24
#define uint32_t
Definition: stdint.in.h:168
#define int32_t
Definition: stdint.in.h:167
#define uint16_t
Definition: stdint.in.h:161
static int32_t indexes[_SPREP_INDEX_TOP]
Definition: store.c:154
int32_t fKeysCount
Definition: reslist.h:59
const char * fKeys
Definition: reslist.h:57
PseudoListResource * fStrings
Definition: reslist.h:61
int32_t fChecksum
Definition: reslist.h:64
int32_t fKeysBottom
Definition: reslist.h:110
int32_t makeRes16(uint32_t resWord) const
Definition: reslist.cpp:469
int32_t fMaxTableLength
Definition: reslist.h:103
UBool fNoFallback
Definition: reslist.h:104
int32_t fLocalKeyLimit
Definition: reslist.h:113
int32_t addKeyBytes(const char *keyBytes, int32_t length, UErrorCode &errorCode)
Definition: reslist.cpp:1238
int32_t fIndexLength
Definition: reslist.h:102
SRBRoot * fWritePoolBundle
Definition: reslist.h:122
int32_t fKeysTop
Definition: reslist.h:110
int32_t fPoolStringIndexLimit
Definition: reslist.h:119
int32_t fKeysCapacity
Definition: reslist.h:111
int32_t f16BitStringsLength
Definition: reslist.h:116
icu::UnicodeString f16BitUnits
Definition: reslist.h:115
char * fKeys
Definition: reslist.h:108
char * fLocale
Definition: reslist.h:101
void setLocale(UChar *locale, UErrorCode &errorCode)
Definition: reslist.cpp:1199
int32_t fPoolStringIndex16Limit
Definition: reslist.h:120
int32_t fKeysCount
Definition: reslist.h:112
UBool fIsPoolBundle
Definition: reslist.h:106
int8_t fStringsForm
Definition: reslist.h:105
SResource * fRoot
Definition: reslist.h:100
int32_t addTag(const char *tag, UErrorCode &errorCode)
Definition: reslist.cpp:1273
const char * getKeyBytes(int32_t *pLength) const
Definition: reslist.cpp:1232
void compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode)
Definition: reslist.cpp:1573
const ResFile * fUsePoolBundle
Definition: reslist.h:118
KeyMapEntry * fKeyMap
Definition: reslist.h:109
void write(const char *outputDir, const char *outputPkg, char *writtenFilename, int writtenFilenameLen, UErrorCode &errorCode)
Definition: reslist.cpp:838
~SRBRoot()
Definition: reslist.cpp:1190
int32_t fLocalStringIndexLimit
Definition: reslist.h:121
int32_t mapKey(int32_t oldpos) const
Definition: reslist.cpp:492
SRBRoot(const UString *comment, UBool isPoolBundle, UErrorCode &errorCode)
Definition: reslist.cpp:1131
const char * getKeyString(int32_t key) const
Definition: reslist.cpp:1215
void compactKeys(UErrorCode &errorCode)
Definition: reslist.cpp:1357
virtual void handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet, UErrorCode &errorCode)
Definition: reslist.cpp:463
void preflightStrings(SRBRoot *bundle, UHashtable *stringSet, UErrorCode &errorCode)
Definition: reslist.cpp:447
struct UString fComment
Definition: reslist.h:240
void write(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:819
void preWrite(uint32_t *byteOffset)
Definition: reslist.cpp:709
int32_t fKey
Definition: reslist.h:236
void write16(SRBRoot *bundle)
Definition: reslist.cpp:602
virtual void handlePreWrite(uint32_t *byteOffset)
Definition: reslist.cpp:724
virtual void handleWrite(UNewDataMemory *mem, uint32_t *byteOffset)
Definition: reslist.cpp:834
virtual ~SResource()
Definition: reslist.cpp:168
const char * getKeyString(const SRBRoot *bundle) const
Definition: reslist.cpp:1224
int8_t fType
Definition: reslist.h:232
int32_t fKey16
Definition: reslist.h:237
virtual void collectKeys(std::function< void(int32_t)> collector) const
Definition: reslist.cpp:1345
SResource * fNext
Definition: reslist.h:239
UBool fWritten
Definition: reslist.h:233
int32_t fRes16
Definition: reslist.h:235
uint32_t fRes
Definition: reslist.h:234
virtual void applyFilter(const PathFilter &filter, ResKeyPath &path, const SRBRoot *bundle)
Definition: reslist.cpp:1740
virtual void handleWrite16(SRBRoot *bundle)
Definition: reslist.cpp:640
uint8_t formatVersion[4]
Definition: udata.h:148
Definition: ustr.h:54
Definition: psspecial.c:52
Definition: bdf.c:133
Definition: tpic.c:45
Definition: sh2.c:920
Definition: xmlparse.c:179
Definition: strexpr.c:21
int j
Definition: t4ht.c:1589
#define key
Definition: tex2xindy.c:753
val
Definition: tex4ht.c:3227
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 U_ASSERT(exp)
Definition: uassert.h:37
const char * fileName
Definition: ugrep.cpp:52
#define UHASH_FIRST
Definition: uhash.h:517
#define uprv_compareInvCharsAsAscii(s1, s2)
Definition: uinvchar.h:153
int8_t UBool
Definition: umachine.h:269
#define U_SIZEOF_UCHAR
Definition: umachine.h:358
void udata_write16(UNewDataMemory *pData, uint16_t word)
Definition: unewdata.cpp:213
uint32_t udata_finish(UNewDataMemory *pData, UErrorCode *pErrorCode)
Definition: unewdata.cpp:154
void udata_write32(UNewDataMemory *pData, uint32_t wyde)
Definition: unewdata.cpp:220
void udata_writeBlock(UNewDataMemory *pData, const void *s, int32_t length)
Definition: unewdata.cpp:227
UNewDataMemory * udata_create(const char *dir, const char *type, const char *name, const UDataInfo *pInfo, const char *comment, UErrorCode *pErrorCode)
Definition: unewdata.cpp:36
void udata_writePadding(UNewDataMemory *pData, int32_t length)
Definition: unewdata.cpp:236
void udata_writeUString(UNewDataMemory *pData, const UChar *s, int32_t length)
Definition: unewdata.cpp:267
void * pointer
Definition: uelement.h:40
Definition: obx.h:51
#define uprv_sortArray
Definition: urename.h:1449
#define uhash_nextElement
Definition: urename.h:988
#define uhash_put
Definition: urename.h:991
#define uprv_realloc
Definition: urename.h:1447
#define uhash_get
Definition: urename.h:971
#define uhash_count
Definition: urename.h:965
#define uhash_close
Definition: urename.h:957
#define uprv_malloc
Definition: urename.h:1435
#define uprv_free
Definition: urename.h:1414
#define uhash_open
Definition: urename.h:989
#define u_UCharsToChars
Definition: urename.h:205
#define u_strlen
Definition: urename.h:384
C API: Resource Bundle.
@ URES_TABLE
Definition: ures.h:80
@ URES_INT_VECTOR
Definition: ures.h:108
@ URES_BINARY
Definition: ures.h:77
@ URES_ARRAY
Definition: ures.h:101
@ URES_NONE
Definition: ures.h:71
@ URES_STRING
Definition: ures.h:74
@ URES_INT
Definition: ures.h:98
static const char * locale
Definition: uresb.c:52
#define URES_MAKE_EMPTY_RESOURCE(type)
Definition: uresdata.h:88
@ URES_INDEX_KEYS_TOP
Definition: uresdata.h:109
@ URES_INDEX_ATTRIBUTES
Definition: uresdata.h:126
@ URES_INDEX_BUNDLE_TOP
Definition: uresdata.h:116
@ URES_INDEX_MAX_TABLE_LENGTH
Definition: uresdata.h:118
@ URES_INDEX_POOL_CHECKSUM
Definition: uresdata.h:133
@ URES_INDEX_16BIT_TOP
Definition: uresdata.h:131
@ URES_INDEX_RESOURCES_TOP
Definition: uresdata.h:111
@ URES_INDEX_LENGTH
Definition: uresdata.h:104
@ URES_INDEX_TOP
Definition: uresdata.h:134
#define URES_MAKE_RESOURCE(type, offset)
Definition: uresdata.h:87
#define RES_MAX_OFFSET
Definition: uresdata.h:66
#define RES_GET_TYPE(res)
Definition: uresdata.h:68
#define URES_ATT_USES_POOL_BUNDLE
Definition: uresdata.h:157
#define RES_BOGUS
Definition: uresdata.h:65
#define URES_ATT_NO_FALLBACK
Definition: uresdata.h:148
@ URES_STRING_V2
Definition: uresdata.h:47
@ URES_TABLE16
Definition: uresdata.h:44
@ URES_ARRAY16
Definition: uresdata.h:53
@ URES_TABLE32
Definition: uresdata.h:38
#define RES_GET_OFFSET(res)
Definition: uresdata.h:69
#define URES_ATT_IS_POOL_BUNDLE
Definition: uresdata.h:156
void ustr_deinit(struct UString *s)
Definition: ustr.c:72
void ustr_cpy(struct UString *dst, const struct UString *src, UErrorCode *status)
Definition: ustr.c:82
void ustr_init(struct UString *s)
Definition: ustr.c:34
C API: 16-bit Unicode handling macros.
#define U16_IS_TRAIL(c)
Definition: utf16.h:67
@ start
Definition: preamble.c:52
UErrorCode
Definition: utypes.h:431
@ U_MEMORY_ALLOCATION_ERROR
Definition: utypes.h:473
@ U_BUFFER_OVERFLOW_ERROR
Definition: utypes.h:481
@ U_ILLEGAL_ARGUMENT_ERROR
Definition: utypes.h:467
@ U_UNSUPPORTED_ERROR
Definition: utypes.h:482
@ U_INTERNAL_PROGRAM_ERROR
Definition: utypes.h:471
#define U_FAILURE(x)
Definition: utypes.h:735
#define U_SUCCESS(x)
Definition: utypes.h:730
#define U_COPYRIGHT_STRING
Definition: uvernum.h:56
uint8_t UVersionInfo[4]
Definition: uversion.h:59
#define errorCode
Definition: xmlparse.c:601
#define limit(x)
Definition: yuvsplittoppm.c:26