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)  

ucurr.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 * Copyright (c) 2002-2016, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 */
9 
10 #include "unicode/utypes.h"
11 
12 #if !UCONFIG_NO_FORMATTING
13 
14 #include "unicode/ucurr.h"
15 #include "unicode/locid.h"
16 #include "unicode/ures.h"
17 #include "unicode/ustring.h"
18 #include "unicode/parsepos.h"
19 #include "unicode/uniset.h"
20 #include "unicode/usetiter.h"
21 #include "unicode/utf16.h"
22 #include "ustr_imp.h"
23 #include "charstr.h"
24 #include "cmemory.h"
25 #include "cstring.h"
26 #include "static_unicode_sets.h"
27 #include "uassert.h"
28 #include "umutex.h"
29 #include "ucln_cmn.h"
30 #include "uenumimp.h"
31 #include "uhash.h"
32 #include "hash.h"
33 #include "uinvchar.h"
34 #include "uresimp.h"
35 #include "ulist.h"
36 #include "uresimp.h"
37 #include "ureslocs.h"
38 #include "ulocimp.h"
39 
40 using namespace icu;
41 
42 //#define UCURR_DEBUG_EQUIV 1
43 #ifdef UCURR_DEBUG_EQUIV
44 #include "stdio.h"
45 #endif
46 //#define UCURR_DEBUG 1
47 #ifdef UCURR_DEBUG
48 #include "stdio.h"
49 #endif
50 
51 typedef struct IsoCodeEntry {
52  const UChar *isoCode; /* const because it's a reference to a resource bundle string. */
56 
57 //------------------------------------------------------------
58 // Constants
59 
60 // Default currency meta data of last resort. We try to use the
61 // defaults encoded in the meta data resource bundle. If there is a
62 // configuration/build error and these are not available, we use these
63 // hard-coded defaults (which should be identical).
64 static const int32_t LAST_RESORT_DATA[] = { 2, 0, 2, 0 };
65 
66 // POW10[i] = 10^i, i=0..MAX_POW10
67 static const int32_t POW10[] = { 1, 10, 100, 1000, 10000, 100000,
68  1000000, 10000000, 100000000, 1000000000 };
69 
70 static const int32_t MAX_POW10 = UPRV_LENGTHOF(POW10) - 1;
71 
72 #define ISO_CURRENCY_CODE_LENGTH 3
73 
74 //------------------------------------------------------------
75 // Resource tags
76 //
77 
78 static const char CURRENCY_DATA[] = "supplementalData";
79 // Tag for meta-data, in root.
80 static const char CURRENCY_META[] = "CurrencyMeta";
81 
82 // Tag for map from countries to currencies, in root.
83 static const char CURRENCY_MAP[] = "CurrencyMap";
84 
85 // Tag for default meta-data, in CURRENCY_META
86 static const char DEFAULT_META[] = "DEFAULT";
87 
88 // Variant delimiter
89 static const char VAR_DELIM = '_';
90 
91 // Tag for localized display names (symbols) of currencies
92 static const char CURRENCIES[] = "Currencies";
93 static const char CURRENCIES_NARROW[] = "Currencies%narrow";
94 static const char CURRENCIES_FORMAL[] = "Currencies%formal";
95 static const char CURRENCIES_VARIANT[] = "Currencies%variant";
96 static const char CURRENCYPLURALS[] = "CurrencyPlurals";
97 
98 // ISO codes mapping table
99 static const UHashtable* gIsoCodes = NULL;
101 
102 // Currency symbol equivalances
103 static const icu::Hashtable* gCurrSymbolsEquiv = NULL;
105 
107 
108 // EquivIterator iterates over all strings that are equivalent to a given
109 // string, s. Note that EquivIterator will never yield s itself.
110 class EquivIterator : public icu::UMemory {
111 public:
112  // Constructor. hash stores the equivalence relationships; s is the string
113  // for which we find equivalent strings.
114  inline EquivIterator(const icu::Hashtable& hash, const icu::UnicodeString& s)
115  : _hash(hash) {
116  _start = _current = &s;
117  }
118  inline ~EquivIterator() { }
119 
120  // next returns the next equivalent string or NULL if there are no more.
121  // If s has no equivalent strings, next returns NULL on the first call.
122  const icu::UnicodeString *next();
123 private:
124  const icu::Hashtable& _hash;
125  const icu::UnicodeString* _start;
126  const icu::UnicodeString* _current;
127 };
128 
129 const icu::UnicodeString *
131  const icu::UnicodeString* _next = (const icu::UnicodeString*) _hash.get(*_current);
132  if (_next == NULL) {
134  return NULL;
135  }
136  if (*_next == *_start) {
137  return NULL;
138  }
139  _current = _next;
140  return _next;
141 }
142 
144 
145 // makeEquivalent makes lhs and rhs equivalent by updating the equivalence
146 // relations in hash accordingly.
147 static void makeEquivalent(
148  const icu::UnicodeString &lhs,
149  const icu::UnicodeString &rhs,
150  icu::Hashtable* hash, UErrorCode &status) {
151  if (U_FAILURE(status)) {
152  return;
153  }
154  if (lhs == rhs) {
155  // already equivalent
156  return;
157  }
158  icu::EquivIterator leftIter(*hash, lhs);
159  icu::EquivIterator rightIter(*hash, rhs);
160  const icu::UnicodeString *firstLeft = leftIter.next();
161  const icu::UnicodeString *firstRight = rightIter.next();
162  const icu::UnicodeString *nextLeft = firstLeft;
163  const icu::UnicodeString *nextRight = firstRight;
164  while (nextLeft != NULL && nextRight != NULL) {
165  if (*nextLeft == rhs || *nextRight == lhs) {
166  // Already equivalent
167  return;
168  }
169  nextLeft = leftIter.next();
170  nextRight = rightIter.next();
171  }
172  // Not equivalent. Must join.
173  icu::UnicodeString *newFirstLeft;
174  icu::UnicodeString *newFirstRight;
175  if (firstRight == NULL && firstLeft == NULL) {
176  // Neither lhs or rhs belong to an equivalence circle, so we form
177  // a new equivalnce circle of just lhs and rhs.
178  newFirstLeft = new icu::UnicodeString(rhs);
179  newFirstRight = new icu::UnicodeString(lhs);
180  } else if (firstRight == NULL) {
181  // lhs belongs to an equivalence circle, but rhs does not, so we link
182  // rhs into lhs' circle.
183  newFirstLeft = new icu::UnicodeString(rhs);
184  newFirstRight = new icu::UnicodeString(*firstLeft);
185  } else if (firstLeft == NULL) {
186  // rhs belongs to an equivlance circle, but lhs does not, so we link
187  // lhs into rhs' circle.
188  newFirstLeft = new icu::UnicodeString(*firstRight);
189  newFirstRight = new icu::UnicodeString(lhs);
190  } else {
191  // Both lhs and rhs belong to different equivalnce circles. We link
192  // them together to form one single, larger equivalnce circle.
193  newFirstLeft = new icu::UnicodeString(*firstRight);
194  newFirstRight = new icu::UnicodeString(*firstLeft);
195  }
196  if (newFirstLeft == NULL || newFirstRight == NULL) {
197  delete newFirstLeft;
198  delete newFirstRight;
200  return;
201  }
202  hash->put(lhs, (void *) newFirstLeft, status);
203  hash->put(rhs, (void *) newFirstRight, status);
204 }
205 
206 // countEquivalent counts how many strings are equivalent to s.
207 // hash stores all the equivalnce relations.
208 // countEquivalent does not include s itself in the count.
209 static int32_t countEquivalent(const icu::Hashtable &hash, const icu::UnicodeString &s) {
210  int32_t result = 0;
211  icu::EquivIterator iter(hash, s);
212  while (iter.next() != NULL) {
213  ++result;
214  }
215 #ifdef UCURR_DEBUG_EQUIV
216  {
217  char tmp[200];
218  s.extract(0,s.length(),tmp, "UTF-8");
219  printf("CountEquivalent('%s') = %d\n", tmp, result);
220  }
221 #endif
222  return result;
223 }
224 
225 static const icu::Hashtable* getCurrSymbolsEquiv();
226 
227 //------------------------------------------------------------
228 // Code
229 
230 /**
231  * Cleanup callback func
232  */
233 static UBool U_CALLCONV
235 {
236  if (gIsoCodes != NULL) {
237  uhash_close(const_cast<UHashtable *>(gIsoCodes));
238  gIsoCodes = NULL;
239  }
240  gIsoCodesInitOnce.reset();
241  return TRUE;
242 }
243 
244 /**
245  * Cleanup callback func
246  */
247 static UBool U_CALLCONV
249 {
250  delete const_cast<icu::Hashtable *>(gCurrSymbolsEquiv);
253  return TRUE;
254 }
255 
256 /**
257  * Deleter for OlsonToMetaMappingEntry
258  */
259 static void U_CALLCONV
260 deleteIsoCodeEntry(void *obj) {
262  uprv_free(entry);
263 }
264 
265 /**
266  * Deleter for gCurrSymbolsEquiv.
267  */
268 static void U_CALLCONV
269 deleteUnicode(void *obj) {
270  icu::UnicodeString *entry = (icu::UnicodeString*)obj;
271  delete entry;
272 }
273 
274 /**
275  * Unfortunately, we have to convert the UChar* currency code to char*
276  * to use it as a resource key.
277  */
278 static inline char*
279 myUCharsToChars(char* resultOfLen4, const UChar* currency) {
280  u_UCharsToChars(currency, resultOfLen4, ISO_CURRENCY_CODE_LENGTH);
281  resultOfLen4[ISO_CURRENCY_CODE_LENGTH] = 0;
282  return resultOfLen4;
283 }
284 
285 /**
286  * Internal function to look up currency data. Result is an array of
287  * four integers. The first is the fraction digits. The second is the
288  * rounding increment, or 0 if none. The rounding increment is in
289  * units of 10^(-fraction_digits). The third and fourth are the same
290  * except that they are those used in cash transations ( cashDigits
291  * and cashRounding ).
292  */
293 static const int32_t*
294 _findMetaData(const UChar* currency, UErrorCode& ec) {
295 
296  if (currency == 0 || *currency == 0) {
297  if (U_SUCCESS(ec)) {
299  }
300  return LAST_RESORT_DATA;
301  }
302 
303  // Get CurrencyMeta resource out of root locale file. [This may
304  // move out of the root locale file later; if it does, update this
305  // code.]
307  UResourceBundle* currencyMeta = ures_getByKey(currencyData, CURRENCY_META, currencyData, &ec);
308 
309  if (U_FAILURE(ec)) {
310  ures_close(currencyMeta);
311  // Config/build error; return hard-coded defaults
312  return LAST_RESORT_DATA;
313  }
314 
315  // Look up our currency, or if that's not available, then DEFAULT
317  UErrorCode ec2 = U_ZERO_ERROR; // local error code: soft failure
318  UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), NULL, &ec2);
319  if (U_FAILURE(ec2)) {
320  ures_close(rb);
321  rb = ures_getByKey(currencyMeta,DEFAULT_META, NULL, &ec);
322  if (U_FAILURE(ec)) {
323  ures_close(currencyMeta);
324  ures_close(rb);
325  // Config/build error; return hard-coded defaults
326  return LAST_RESORT_DATA;
327  }
328  }
329 
330  int32_t len;
331  const int32_t *data = ures_getIntVector(rb, &len, &ec);
332  if (U_FAILURE(ec) || len != 4) {
333  // Config/build error; return hard-coded defaults
334  if (U_SUCCESS(ec)) {
336  }
337  ures_close(currencyMeta);
338  ures_close(rb);
339  return LAST_RESORT_DATA;
340  }
341 
342  ures_close(currencyMeta);
343  ures_close(rb);
344  return data;
345 }
346 
347 // -------------------------------------
348 
349 static void
350 idForLocale(const char* locale, char* countryAndVariant, int capacity, UErrorCode* ec)
351 {
353 }
354 
355 // ------------------------------------------
356 //
357 // Registration
358 //
359 //-------------------------------------------
360 
361 // don't use ICUService since we don't need fallback
362 
364 static UBool U_CALLCONV currency_cleanup(void);
366 
367 #if !UCONFIG_NO_SERVICE
368 struct CReg;
369 
371 static CReg* gCRegHead = 0;
372 
373 struct CReg : public icu::UMemory {
377 
378  CReg(const UChar* _iso, const char* _id)
379  : next(0)
380  {
381  int32_t len = (int32_t)uprv_strlen(_id);
382  if (len > (int32_t)(sizeof(id)-1)) {
383  len = (sizeof(id)-1);
384  }
385  uprv_strncpy(id, _id, len);
386  id[len] = 0;
389  }
390 
391  static UCurrRegistryKey reg(const UChar* _iso, const char* _id, UErrorCode* status)
392  {
393  if (status && U_SUCCESS(*status) && _iso && _id) {
394  CReg* n = new CReg(_iso, _id);
395  if (n) {
397  if (!gCRegHead) {
398  /* register for the first time */
400  }
401  n->next = gCRegHead;
402  gCRegHead = n;
404  return n;
405  }
407  }
408  return 0;
409  }
410 
412  UBool found = FALSE;
414 
415  CReg** p = &gCRegHead;
416  while (*p) {
417  if (*p == key) {
418  *p = ((CReg*)key)->next;
419  delete (CReg*)key;
420  found = TRUE;
421  break;
422  }
423  p = &((*p)->next);
424  }
425 
427  return found;
428  }
429 
430  static const UChar* get(const char* id) {
431  const UChar* result = NULL;
433  CReg* p = gCRegHead;
434 
435  /* register cleanup of the mutex */
437  while (p) {
438  if (uprv_strcmp(id, p->id) == 0) {
439  result = p->iso;
440  break;
441  }
442  p = p->next;
443  }
445  return result;
446  }
447 
448  /* This doesn't need to be thread safe. It's for u_cleanup only. */
449  static void cleanup(void) {
450  while (gCRegHead) {
451  CReg* n = gCRegHead;
453  delete n;
454  }
455  }
456 };
457 
458 // -------------------------------------
459 
461 ucurr_register(const UChar* isoCode, const char* locale, UErrorCode *status)
462 {
463  if (status && U_SUCCESS(*status)) {
464  char id[ULOC_FULLNAME_CAPACITY];
465  idForLocale(locale, id, sizeof(id), status);
466  return CReg::reg(isoCode, id, status);
467  }
468  return NULL;
469 }
470 
471 // -------------------------------------
472 
475 {
476  if (status && U_SUCCESS(*status)) {
477  return CReg::unreg(key);
478  }
479  return FALSE;
480 }
481 #endif /* UCONFIG_NO_SERVICE */
482 
483 // -------------------------------------
484 
485 /**
486  * Release all static memory held by currency.
487  */
488 /*The declaration here is needed so currency_cleanup(void)
489  * can call this function.
490  */
491 static UBool U_CALLCONV
493 
496 #if !UCONFIG_NO_SERVICE
497  CReg::cleanup();
498 #endif
499  /*
500  * There might be some cached currency data or isoCodes data.
501  */
505 
506  return TRUE;
507 }
509 
510 // -------------------------------------
511 
514  UChar* buff,
515  int32_t buffCapacity,
516  UErrorCode* ec) {
517  if (U_FAILURE(*ec)) { return 0; }
518  if (buffCapacity < 0 || (buff == nullptr && buffCapacity > 0)) {
520  return 0;
521  }
522 
523  char currency[4]; // ISO currency codes are alpha3 codes.
524  UErrorCode localStatus = U_ZERO_ERROR;
525  int32_t resLen = uloc_getKeywordValue(locale, "currency",
526  currency, UPRV_LENGTHOF(currency), &localStatus);
527  if (U_SUCCESS(localStatus) && resLen == 3 && uprv_isInvariantString(currency, resLen)) {
528  if (resLen < buffCapacity) {
529  T_CString_toUpperCase(currency);
530  u_charsToUChars(currency, buff, resLen);
531  }
532  return u_terminateUChars(buff, buffCapacity, resLen, ec);
533  }
534 
535  // get country or country_variant in `id'
536  char id[ULOC_FULLNAME_CAPACITY];
537  idForLocale(locale, id, UPRV_LENGTHOF(id), ec);
538  if (U_FAILURE(*ec)) {
539  return 0;
540  }
541 
542 #if !UCONFIG_NO_SERVICE
543  const UChar* result = CReg::get(id);
544  if (result) {
545  if(buffCapacity > u_strlen(result)) {
546  u_strcpy(buff, result);
547  }
548  resLen = u_strlen(result);
549  return u_terminateUChars(buff, buffCapacity, resLen, ec);
550  }
551 #endif
552  // Remove variants, which is only needed for registration.
553  char *idDelim = uprv_strchr(id, VAR_DELIM);
554  if (idDelim) {
555  idDelim[0] = 0;
556  }
557 
558  const UChar* s = NULL; // Currency code from data file.
559  if (id[0] == 0) {
560  // No point looking in the data for an empty string.
561  // This is what we would get.
562  localStatus = U_MISSING_RESOURCE_ERROR;
563  } else {
564  // Look up the CurrencyMap element in the root bundle.
565  localStatus = U_ZERO_ERROR;
567  UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus);
568  UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus);
569  UResourceBundle *currencyReq = ures_getByIndex(countryArray, 0, NULL, &localStatus);
570  s = ures_getStringByKey(currencyReq, "id", &resLen, &localStatus);
571  ures_close(currencyReq);
572  ures_close(countryArray);
573  }
574 
575  if ((U_FAILURE(localStatus)) && strchr(id, '_') != 0) {
576  // We don't know about it. Check to see if we support the variant.
579  // TODO: Loop over the shortened id rather than recursing and
580  // looking again for a currency keyword.
581  return ucurr_forLocale(id, buff, buffCapacity, ec);
582  }
583  if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR) {
584  // There is nothing to fallback to. Report the failure/warning if possible.
585  *ec = localStatus;
586  }
587  if (U_SUCCESS(*ec)) {
588  if(buffCapacity > resLen) {
589  u_strcpy(buff, s);
590  }
591  }
592  return u_terminateUChars(buff, buffCapacity, resLen, ec);
593 }
594 
595 // end registration
596 
597 /**
598  * Modify the given locale name by removing the rightmost _-delimited
599  * element. If there is none, empty the string ("" == root).
600  * NOTE: The string "root" is not recognized; do not use it.
601  * @return TRUE if the fallback happened; FALSE if locale is already
602  * root ("").
603  */
604 static UBool fallback(char *loc) {
605  if (!*loc) {
606  return FALSE;
607  }
609  if (uprv_strcmp(loc, "en_GB") == 0) {
610  // HACK: See #13368. We need "en_GB" to fall back to "en_001" instead of "en"
611  // in order to consume the correct data strings. This hack will be removed
612  // when proper data sink loading is implemented here.
613  // NOTE: "001" adds 1 char over "GB". However, both call sites allocate
614  // arrays with length ULOC_FULLNAME_CAPACITY (plenty of room for en_001).
615  uprv_strcpy(loc + 3, "001");
616  } else {
618  }
619  /*
620  char *i = uprv_strrchr(loc, '_');
621  if (i == NULL) {
622  i = loc;
623  }
624  *i = 0;
625  */
626  return TRUE;
627 }
628 
629 
630 U_CAPI const UChar* U_EXPORT2
631 ucurr_getName(const UChar* currency,
632  const char* locale,
633  UCurrNameStyle nameStyle,
634  UBool* isChoiceFormat, // fillin
635  int32_t* len, // fillin
636  UErrorCode* ec) {
637 
638  // Look up the Currencies resource for the given locale. The
639  // Currencies locale data looks like this:
640  //|en {
641  //| Currencies {
642  //| USD { "US$", "US Dollar" }
643  //| CHF { "Sw F", "Swiss Franc" }
644  //| INR { "=0#Rs|1#Re|1<Rs", "=0#Rupees|1#Rupee|1<Rupees" }
645  //| //...
646  //| }
647  //|}
648 
649  if (U_FAILURE(*ec)) {
650  return 0;
651  }
652 
653  int32_t choice = (int32_t) nameStyle;
654  if (choice < 0 || choice > 4) {
656  return 0;
657  }
658 
659  // In the future, resource bundles may implement multi-level
660  // fallback. That is, if a currency is not found in the en_US
661  // Currencies data, then the en Currencies data will be searched.
662  // Currently, if a Currencies datum exists in en_US and en, the
663  // en_US entry hides that in en.
664 
665  // We want multi-level fallback for this resource, so we implement
666  // it manually.
667 
668  // Use a separate UErrorCode here that does not propagate out of
669  // this function.
670  UErrorCode ec2 = U_ZERO_ERROR;
671 
673  uloc_getName(locale, loc, sizeof(loc), &ec2);
674  if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) {
676  return 0;
677  }
678 
680  myUCharsToChars(buf, currency);
681 
682  /* Normalize the keyword value to uppercase */
684 
685  const UChar* s = NULL;
686  ec2 = U_ZERO_ERROR;
687  LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc, &ec2));
688 
689  if (nameStyle == UCURR_NARROW_SYMBOL_NAME || nameStyle == UCURR_FORMAL_SYMBOL_NAME || nameStyle == UCURR_VARIANT_SYMBOL_NAME) {
690  CharString key;
691  switch (nameStyle) {
693  key.append(CURRENCIES_NARROW, ec2);
694  break;
696  key.append(CURRENCIES_FORMAL, ec2);
697  break;
699  key.append(CURRENCIES_VARIANT, ec2);
700  break;
701  default:
703  return 0;
704  }
705  key.append("/", ec2);
706  key.append(buf, ec2);
707  s = ures_getStringByKeyWithFallback(rb.getAlias(), key.data(), len, &ec2);
708  if (ec2 == U_MISSING_RESOURCE_ERROR) {
710  ec2 = U_ZERO_ERROR;
712  }
713  }
714  if (s == NULL) {
715  ures_getByKey(rb.getAlias(), CURRENCIES, rb.getAlias(), &ec2);
716  ures_getByKeyWithFallback(rb.getAlias(), buf, rb.getAlias(), &ec2);
717  s = ures_getStringByIndex(rb.getAlias(), choice, len, &ec2);
718  }
719 
720  // If we've succeeded we're done. Otherwise, try to fallback.
721  // If that fails (because we are already at root) then exit.
722  if (U_SUCCESS(ec2)) {
723  if (ec2 == U_USING_DEFAULT_WARNING
725  *ec = ec2;
726  }
727  }
728 
729  // We no longer support choice format data in names. Data should not contain
730  // choice patterns.
731  if (isChoiceFormat != NULL) {
732  *isChoiceFormat = FALSE;
733  }
734  if (U_SUCCESS(ec2)) {
735  U_ASSERT(s != NULL);
736  return s;
737  }
738 
739  // If we fail to find a match, use the ISO 4217 code
740  *len = u_strlen(currency); // Should == ISO_CURRENCY_CODE_LENGTH, but maybe not...?
742  return currency;
743 }
744 
745 U_CAPI const UChar* U_EXPORT2
746 ucurr_getPluralName(const UChar* currency,
747  const char* locale,
748  UBool* isChoiceFormat,
749  const char* pluralCount,
750  int32_t* len, // fillin
751  UErrorCode* ec) {
752  // Look up the Currencies resource for the given locale. The
753  // Currencies locale data looks like this:
754  //|en {
755  //| CurrencyPlurals {
756  //| USD{
757  //| one{"US dollar"}
758  //| other{"US dollars"}
759  //| }
760  //| }
761  //|}
762 
763  if (U_FAILURE(*ec)) {
764  return 0;
765  }
766 
767  // Use a separate UErrorCode here that does not propagate out of
768  // this function.
769  UErrorCode ec2 = U_ZERO_ERROR;
770 
772  uloc_getName(locale, loc, sizeof(loc), &ec2);
773  if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) {
775  return 0;
776  }
777 
779  myUCharsToChars(buf, currency);
780 
781  const UChar* s = NULL;
782  ec2 = U_ZERO_ERROR;
784 
785  rb = ures_getByKey(rb, CURRENCYPLURALS, rb, &ec2);
786 
787  // Fetch resource with multi-level resource inheritance fallback
788  rb = ures_getByKeyWithFallback(rb, buf, rb, &ec2);
789 
790  s = ures_getStringByKeyWithFallback(rb, pluralCount, len, &ec2);
791  if (U_FAILURE(ec2)) {
792  // fall back to "other"
793  ec2 = U_ZERO_ERROR;
794  s = ures_getStringByKeyWithFallback(rb, "other", len, &ec2);
795  if (U_FAILURE(ec2)) {
796  ures_close(rb);
797  // fall back to long name in Currencies
798  return ucurr_getName(currency, locale, UCURR_LONG_NAME,
799  isChoiceFormat, len, ec);
800  }
801  }
802  ures_close(rb);
803 
804  // If we've succeeded we're done. Otherwise, try to fallback.
805  // If that fails (because we are already at root) then exit.
806  if (U_SUCCESS(ec2)) {
807  if (ec2 == U_USING_DEFAULT_WARNING
809  *ec = ec2;
810  }
811  U_ASSERT(s != NULL);
812  return s;
813  }
814 
815  // If we fail to find a match, use the ISO 4217 code
816  *len = u_strlen(currency); // Should == ISO_CURRENCY_CODE_LENGTH, but maybe not...?
818  return currency;
819 }
820 
821 
822 //========================================================================
823 // Following are structure and function for parsing currency names
824 
825 #define NEED_TO_BE_DELETED 0x1
826 
827 // TODO: a better way to define this?
828 #define MAX_CURRENCY_NAME_LEN 100
829 
830 typedef struct {
831  const char* IsoCode; // key
832  UChar* currencyName; // value
833  int32_t currencyNameLen; // value length
834  int32_t flag; // flags
836 
837 
838 #ifndef MIN
839 #define MIN(a,b) (((a)<(b)) ? (a) : (b))
840 #endif
841 
842 #ifndef MAX
843 #define MAX(a,b) (((a)<(b)) ? (b) : (a))
844 #endif
845 
846 
847 // Comparason function used in quick sort.
848 static int U_CALLCONV currencyNameComparator(const void* a, const void* b) {
849  const CurrencyNameStruct* currName_1 = (const CurrencyNameStruct*)a;
850  const CurrencyNameStruct* currName_2 = (const CurrencyNameStruct*)b;
851  for (int32_t i = 0;
852  i < MIN(currName_1->currencyNameLen, currName_2->currencyNameLen);
853  ++i) {
854  if (currName_1->currencyName[i] < currName_2->currencyName[i]) {
855  return -1;
856  }
857  if (currName_1->currencyName[i] > currName_2->currencyName[i]) {
858  return 1;
859  }
860  }
861  if (currName_1->currencyNameLen < currName_2->currencyNameLen) {
862  return -1;
863  } else if (currName_1->currencyNameLen > currName_2->currencyNameLen) {
864  return 1;
865  }
866  return 0;
867 }
868 
869 
870 // Give a locale, return the maximum number of currency names associated with
871 // this locale.
872 // It gets currency names from resource bundles using fallback.
873 // It is the maximum number because in the fallback chain, some of the
874 // currency names are duplicated.
875 // For example, given locale as "en_US", the currency names get from resource
876 // bundle in "en_US" and "en" are duplicated. The fallback mechanism will count
877 // all currency names in "en_US" and "en".
878 static void
879 getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_t* total_currency_symbol_count) {
881  *total_currency_name_count = 0;
882  *total_currency_symbol_count = 0;
883  const UChar* s = NULL;
884  char locale[ULOC_FULLNAME_CAPACITY] = "";
886  const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv();
887  for (;;) {
888  UErrorCode ec2 = U_ZERO_ERROR;
889  // TODO: ures_openDirect?
893  for (int32_t i=0; i<n; ++i) {
895  int32_t len;
897  ++(*total_currency_symbol_count); // currency symbol
898  if (currencySymbolsEquiv != NULL) {
899  *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(TRUE, s, len));
900  }
901  ++(*total_currency_symbol_count); // iso code
902  ++(*total_currency_name_count); // long name
903  ures_close(names);
904  }
905 
906  // currency plurals
907  UErrorCode ec3 = U_ZERO_ERROR;
908  UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, NULL, &ec3);
909  n = ures_getSize(curr_p);
910  for (int32_t i=0; i<n; ++i) {
911  UResourceBundle* names = ures_getByIndex(curr_p, i, NULL, &ec3);
912  *total_currency_name_count += ures_getSize(names);
913  ures_close(names);
914  }
915  ures_close(curr_p);
916  ures_close(curr);
917  ures_close(rb);
918 
919  if (!fallback(locale)) {
920  break;
921  }
922  }
923 }
924 
925 static UChar*
926 toUpperCase(const UChar* source, int32_t len, const char* locale) {
927  UChar* dest = NULL;
929  int32_t destLen = u_strToUpper(dest, 0, source, len, locale, &ec);
930 
931  ec = U_ZERO_ERROR;
932  dest = (UChar*)uprv_malloc(sizeof(UChar) * MAX(destLen, len));
933  u_strToUpper(dest, destLen, source, len, locale, &ec);
934  if (U_FAILURE(ec)) {
935  u_memcpy(dest, source, len);
936  }
937  return dest;
938 }
939 
940 
941 // Collect all available currency names associated with the given locale
942 // (enable fallback chain).
943 // Read currenc names defined in resource bundle "Currencies" and
944 // "CurrencyPlural", enable fallback chain.
945 // return the malloc-ed currency name arrays and the total number of currency
946 // names in the array.
947 static void
949  CurrencyNameStruct** currencyNames,
950  int32_t* total_currency_name_count,
951  CurrencyNameStruct** currencySymbols,
952  int32_t* total_currency_symbol_count,
953  UErrorCode& ec) {
955  const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv();
956  // Look up the Currencies resource for the given locale.
957  UErrorCode ec2 = U_ZERO_ERROR;
958 
959  char loc[ULOC_FULLNAME_CAPACITY] = "";
960  uloc_getName(locale, loc, sizeof(loc), &ec2);
961  if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) {
963  }
964 
965  // Get maximum currency name count first.
966  getCurrencyNameCount(loc, total_currency_name_count, total_currency_symbol_count);
967 
968  *currencyNames = (CurrencyNameStruct*)uprv_malloc
969  (sizeof(CurrencyNameStruct) * (*total_currency_name_count));
970  *currencySymbols = (CurrencyNameStruct*)uprv_malloc
971  (sizeof(CurrencyNameStruct) * (*total_currency_symbol_count));
972 
973  if(currencyNames == NULL || currencySymbols == NULL) {
975  }
976 
977  if (U_FAILURE(ec)) return;
978 
979  const UChar* s = NULL; // currency name
980  char* iso = NULL; // currency ISO code
981 
982  *total_currency_name_count = 0;
983  *total_currency_symbol_count = 0;
984 
985  UErrorCode ec3 = U_ZERO_ERROR;
986  UErrorCode ec4 = U_ZERO_ERROR;
987 
988  // Using hash to remove duplicates caused by locale fallback
989  UHashtable* currencyIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &ec3);
990  UHashtable* currencyPluralIsoCodes = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &ec4);
991  for (int32_t localeLevel = 0; ; ++localeLevel) {
992  ec2 = U_ZERO_ERROR;
993  // TODO: ures_openDirect
997  for (int32_t i=0; i<n; ++i) {
999  int32_t len;
1001  // TODO: uhash_put wont change key/value?
1002  iso = (char*)ures_getKey(names);
1003  if (localeLevel == 0) {
1004  uhash_put(currencyIsoCodes, iso, iso, &ec3);
1005  } else {
1006  if (uhash_get(currencyIsoCodes, iso) != NULL) {
1007  ures_close(names);
1008  continue;
1009  } else {
1010  uhash_put(currencyIsoCodes, iso, iso, &ec3);
1011  }
1012  }
1013  // Add currency symbol.
1014  (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
1015  (*currencySymbols)[*total_currency_symbol_count].currencyName = (UChar*)s;
1016  (*currencySymbols)[*total_currency_symbol_count].flag = 0;
1017  (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = len;
1018  // Add equivalent symbols
1019  if (currencySymbolsEquiv != NULL) {
1020  UnicodeString str(TRUE, s, len);
1021  icu::EquivIterator iter(*currencySymbolsEquiv, str);
1022  const UnicodeString *symbol;
1023  while ((symbol = iter.next()) != NULL) {
1024  (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
1025  (*currencySymbols)[*total_currency_symbol_count].currencyName =
1026  const_cast<UChar*>(symbol->getBuffer());
1027  (*currencySymbols)[*total_currency_symbol_count].flag = 0;
1028  (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = symbol->length();
1029  }
1030  }
1031 
1032  // Add currency long name.
1034  (*currencyNames)[*total_currency_name_count].IsoCode = iso;
1035  UChar* upperName = toUpperCase(s, len, locale);
1036  (*currencyNames)[*total_currency_name_count].currencyName = upperName;
1037  (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
1038  (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
1039 
1040  // put (iso, 3, and iso) in to array
1041  // Add currency ISO code.
1042  (*currencySymbols)[*total_currency_symbol_count].IsoCode = iso;
1043  (*currencySymbols)[*total_currency_symbol_count].currencyName = (UChar*)uprv_malloc(sizeof(UChar)*3);
1044  // Must convert iso[] into Unicode
1045  u_charsToUChars(iso, (*currencySymbols)[*total_currency_symbol_count].currencyName, 3);
1046  (*currencySymbols)[*total_currency_symbol_count].flag = NEED_TO_BE_DELETED;
1047  (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = 3;
1048 
1049  ures_close(names);
1050  }
1051 
1052  // currency plurals
1053  UErrorCode ec5 = U_ZERO_ERROR;
1054  UResourceBundle* curr_p = ures_getByKey(rb, CURRENCYPLURALS, NULL, &ec5);
1055  n = ures_getSize(curr_p);
1056  for (int32_t i=0; i<n; ++i) {
1057  UResourceBundle* names = ures_getByIndex(curr_p, i, NULL, &ec5);
1058  iso = (char*)ures_getKey(names);
1059  // Using hash to remove duplicated ISO codes in fallback chain.
1060  if (localeLevel == 0) {
1061  uhash_put(currencyPluralIsoCodes, iso, iso, &ec4);
1062  } else {
1063  if (uhash_get(currencyPluralIsoCodes, iso) != NULL) {
1064  ures_close(names);
1065  continue;
1066  } else {
1067  uhash_put(currencyPluralIsoCodes, iso, iso, &ec4);
1068  }
1069  }
1071  int32_t len;
1072  for (int32_t j = 0; j < num; ++j) {
1073  // TODO: remove duplicates between singular name and
1074  // currency long name?
1075  s = ures_getStringByIndex(names, j, &len, &ec5);
1076  (*currencyNames)[*total_currency_name_count].IsoCode = iso;
1077  UChar* upperName = toUpperCase(s, len, locale);
1078  (*currencyNames)[*total_currency_name_count].currencyName = upperName;
1079  (*currencyNames)[*total_currency_name_count].flag = NEED_TO_BE_DELETED;
1080  (*currencyNames)[(*total_currency_name_count)++].currencyNameLen = len;
1081  }
1082  ures_close(names);
1083  }
1084  ures_close(curr_p);
1085  ures_close(curr);
1086  ures_close(rb);
1087 
1088  if (!fallback(loc)) {
1089  break;
1090  }
1091  }
1092 
1093  uhash_close(currencyIsoCodes);
1094  uhash_close(currencyPluralIsoCodes);
1095 
1096  // quick sort the struct
1097  qsort(*currencyNames, *total_currency_name_count,
1099  qsort(*currencySymbols, *total_currency_symbol_count,
1101 
1102 #ifdef UCURR_DEBUG
1103  printf("currency name count: %d\n", *total_currency_name_count);
1104  for (int32_t index = 0; index < *total_currency_name_count; ++index) {
1105  printf("index: %d\n", index);
1106  printf("iso: %s\n", (*currencyNames)[index].IsoCode);
1107  char curNameBuf[1024];
1108  memset(curNameBuf, 0, 1024);
1109  u_austrncpy(curNameBuf, (*currencyNames)[index].currencyName, (*currencyNames)[index].currencyNameLen);
1110  printf("currencyName: %s\n", curNameBuf);
1111  printf("len: %d\n", (*currencyNames)[index].currencyNameLen);
1112  }
1113  printf("currency symbol count: %d\n", *total_currency_symbol_count);
1114  for (int32_t index = 0; index < *total_currency_symbol_count; ++index) {
1115  printf("index: %d\n", index);
1116  printf("iso: %s\n", (*currencySymbols)[index].IsoCode);
1117  char curNameBuf[1024];
1118  memset(curNameBuf, 0, 1024);
1119  u_austrncpy(curNameBuf, (*currencySymbols)[index].currencyName, (*currencySymbols)[index].currencyNameLen);
1120  printf("currencySymbol: %s\n", curNameBuf);
1121  printf("len: %d\n", (*currencySymbols)[index].currencyNameLen);
1122  }
1123 #endif
1124  // fail on hashtable errors
1125  if (U_FAILURE(ec3)) {
1126  ec = ec3;
1127  return;
1128  }
1129  if (U_FAILURE(ec4)) {
1130  ec = ec4;
1131  return;
1132  }
1133 }
1134 
1135 // @param currencyNames: currency names array
1136 // @param indexInCurrencyNames: the index of the character in currency names
1137 // array against which the comparison is done
1138 // @param key: input text char to compare against
1139 // @param begin(IN/OUT): the begin index of matching range in currency names array
1140 // @param end(IN/OUT): the end index of matching range in currency names array.
1141 static int32_t
1142 binarySearch(const CurrencyNameStruct* currencyNames,
1143  int32_t indexInCurrencyNames,
1144  const UChar key,
1145  int32_t* begin, int32_t* end) {
1146 #ifdef UCURR_DEBUG
1147  printf("key = %x\n", key);
1148 #endif
1149  int32_t first = *begin;
1150  int32_t last = *end;
1151  while (first <= last) {
1152  int32_t mid = (first + last) / 2; // compute mid point.
1153  if (indexInCurrencyNames >= currencyNames[mid].currencyNameLen) {
1154  first = mid + 1;
1155  } else {
1156  if (key > currencyNames[mid].currencyName[indexInCurrencyNames]) {
1157  first = mid + 1;
1158  }
1159  else if (key < currencyNames[mid].currencyName[indexInCurrencyNames]) {
1160  last = mid - 1;
1161  }
1162  else {
1163  // Find a match, and looking for ranges
1164  // Now do two more binary searches. First, on the left side for
1165  // the greatest L such that CurrencyNameStruct[L] < key.
1166  int32_t L = *begin;
1167  int32_t R = mid;
1168 
1169 #ifdef UCURR_DEBUG
1170  printf("mid = %d\n", mid);
1171 #endif
1172  while (L < R) {
1173  int32_t M = (L + R) / 2;
1174 #ifdef UCURR_DEBUG
1175  printf("L = %d, R = %d, M = %d\n", L, R, M);
1176 #endif
1177  if (indexInCurrencyNames >= currencyNames[M].currencyNameLen) {
1178  L = M + 1;
1179  } else {
1180  if (currencyNames[M].currencyName[indexInCurrencyNames] < key) {
1181  L = M + 1;
1182  } else {
1183 #ifdef UCURR_DEBUG
1184  U_ASSERT(currencyNames[M].currencyName[indexInCurrencyNames] == key);
1185 #endif
1186  R = M;
1187  }
1188  }
1189  }
1190 #ifdef UCURR_DEBUG
1191  U_ASSERT(L == R);
1192 #endif
1193  *begin = L;
1194 #ifdef UCURR_DEBUG
1195  printf("begin = %d\n", *begin);
1196  U_ASSERT(currencyNames[*begin].currencyName[indexInCurrencyNames] == key);
1197 #endif
1198 
1199  // Now for the second search, finding the least R such that
1200  // key < CurrencyNameStruct[R].
1201  L = mid;
1202  R = *end;
1203  while (L < R) {
1204  int32_t M = (L + R) / 2;
1205 #ifdef UCURR_DEBUG
1206  printf("L = %d, R = %d, M = %d\n", L, R, M);
1207 #endif
1208  if (currencyNames[M].currencyNameLen < indexInCurrencyNames) {
1209  L = M + 1;
1210  } else {
1211  if (currencyNames[M].currencyName[indexInCurrencyNames] > key) {
1212  R = M;
1213  } else {
1214 #ifdef UCURR_DEBUG
1215  U_ASSERT(currencyNames[M].currencyName[indexInCurrencyNames] == key);
1216 #endif
1217  L = M + 1;
1218  }
1219  }
1220  }
1221 #ifdef UCURR_DEBUG
1222  U_ASSERT(L == R);
1223 #endif
1224  if (currencyNames[R].currencyName[indexInCurrencyNames] > key) {
1225  *end = R - 1;
1226  } else {
1227  *end = R;
1228  }
1229 #ifdef UCURR_DEBUG
1230  printf("end = %d\n", *end);
1231 #endif
1232 
1233  // now, found the range. check whether there is exact match
1234  if (currencyNames[*begin].currencyNameLen == indexInCurrencyNames + 1) {
1235  return *begin; // find range and exact match.
1236  }
1237  return -1; // find range, but no exact match.
1238  }
1239  }
1240  }
1241  *begin = -1;
1242  *end = -1;
1243  return -1; // failed to find range.
1244 }
1245 
1246 
1247 // Linear search "text" in "currencyNames".
1248 // @param begin, end: the begin and end index in currencyNames, within which
1249 // range should the search be performed.
1250 // @param textLen: the length of the text to be compared
1251 // @param maxMatchLen(IN/OUT): passing in the computed max matching length
1252 // pass out the new max matching length
1253 // @param maxMatchIndex: the index in currencyName which has the longest
1254 // match with input text.
1255 static void
1256 linearSearch(const CurrencyNameStruct* currencyNames,
1258  const UChar* text, int32_t textLen,
1259  int32_t *partialMatchLen,
1260  int32_t *maxMatchLen, int32_t* maxMatchIndex) {
1261  int32_t initialPartialMatchLen = *partialMatchLen;
1262  for (int32_t index = begin; index <= end; ++index) {
1263  int32_t len = currencyNames[index].currencyNameLen;
1264  if (len > *maxMatchLen && len <= textLen &&
1265  uprv_memcmp(currencyNames[index].currencyName, text, len * sizeof(UChar)) == 0) {
1266  *partialMatchLen = MAX(*partialMatchLen, len);
1267  *maxMatchIndex = index;
1268  *maxMatchLen = len;
1269 #ifdef UCURR_DEBUG
1270  printf("maxMatchIndex = %d, maxMatchLen = %d\n",
1271  *maxMatchIndex, *maxMatchLen);
1272 #endif
1273  } else {
1274  // Check for partial matches.
1275  for (int32_t i=initialPartialMatchLen; i<MIN(len, textLen); i++) {
1276  if (currencyNames[index].currencyName[i] != text[i]) {
1277  break;
1278  }
1279  *partialMatchLen = MAX(*partialMatchLen, i + 1);
1280  }
1281  }
1282  }
1283 }
1284 
1285 #define LINEAR_SEARCH_THRESHOLD 10
1286 
1287 // Find longest match between "text" and currency names in "currencyNames".
1288 // @param total_currency_count: total number of currency names in CurrencyNames.
1289 // @param textLen: the length of the text to be compared
1290 // @param maxMatchLen: passing in the computed max matching length
1291 // pass out the new max matching length
1292 // @param maxMatchIndex: the index in currencyName which has the longest
1293 // match with input text.
1294 static void
1296  int32_t total_currency_count,
1297  const UChar* text, int32_t textLen,
1298  int32_t *partialMatchLen,
1299  int32_t* maxMatchLen, int32_t* maxMatchIndex) {
1300  *maxMatchIndex = -1;
1301  *maxMatchLen = 0;
1302  int32_t matchIndex = -1;
1303  int32_t binarySearchBegin = 0;
1304  int32_t binarySearchEnd = total_currency_count - 1;
1305  // It is a variant of binary search.
1306  // For example, given the currency names in currencyNames array are:
1307  // A AB ABC AD AZ B BB BBEX BBEXYZ BS C D E....
1308  // and the input text is BBEXST
1309  // The first round binary search search "B" in the text against
1310  // the first char in currency names, and find the first char matching range
1311  // to be "B BB BBEX BBEXYZ BS" (and the maximum matching "B").
1312  // The 2nd round binary search search the second "B" in the text against
1313  // the 2nd char in currency names, and narrow the matching range to
1314  // "BB BBEX BBEXYZ" (and the maximum matching "BB").
1315  // The 3rd round returnes the range as "BBEX BBEXYZ" (without changing
1316  // maximum matching).
1317  // The 4th round returns the same range (the maximum matching is "BBEX").
1318  // The 5th round returns no matching range.
1319  for (int32_t index = 0; index < textLen; ++index) {
1320  // matchIndex saves the one with exact match till the current point.
1321  // [binarySearchBegin, binarySearchEnd] saves the matching range.
1322  matchIndex = binarySearch(currencyNames, index,
1323  text[index],
1324  &binarySearchBegin, &binarySearchEnd);
1325  if (binarySearchBegin == -1) { // did not find the range
1326  break;
1327  }
1328  *partialMatchLen = MAX(*partialMatchLen, index + 1);
1329  if (matchIndex != -1) {
1330  // find an exact match for text from text[0] to text[index]
1331  // in currencyNames array.
1332  *maxMatchLen = index + 1;
1333  *maxMatchIndex = matchIndex;
1334  }
1335  if (binarySearchEnd - binarySearchBegin < LINEAR_SEARCH_THRESHOLD) {
1336  // linear search if within threshold.
1337  linearSearch(currencyNames, binarySearchBegin, binarySearchEnd,
1338  text, textLen,
1339  partialMatchLen,
1340  maxMatchLen, maxMatchIndex);
1341  break;
1342  }
1343  }
1344  return;
1345 }
1346 
1347 //========================= currency name cache =====================
1348 typedef struct {
1350  // currency names, case insensitive
1352  int32_t totalCurrencyNameCount; // currency name count
1353  // currency symbols and ISO code, case sensitive
1356  // reference count.
1357  // reference count is set to 1 when an entry is put to cache.
1358  // it increases by 1 before accessing, and decreased by 1 after accessing.
1359  // The entry is deleted when ref count is zero, which means
1360  // the entry is replaced out of cache and no process is accessing it.
1363 
1364 
1365 #define CURRENCY_NAME_CACHE_NUM 10
1366 
1367 // Reserve 10 cache entries.
1369 // Using an index to indicate which entry to be replaced when cache is full.
1370 // It is a simple round-robin replacement strategy.
1372 
1374 
1375 // Cache deletion
1376 static void
1378  for (int32_t index = 0; index < count; ++index) {
1379  if ( (currencyNames[index].flag & NEED_TO_BE_DELETED) ) {
1380  uprv_free(currencyNames[index].currencyName);
1381  }
1382  }
1383  uprv_free(currencyNames);
1384 }
1385 
1386 
1387 static void
1389  deleteCurrencyNames(entry->currencyNames, entry->totalCurrencyNameCount);
1390  deleteCurrencyNames(entry->currencySymbols, entry->totalCurrencySymbolCount);
1391  uprv_free(entry);
1392 }
1393 
1394 
1395 // Cache clean up
1396 static UBool U_CALLCONV
1398  for (int32_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
1399  if (currCache[i]) {
1401  currCache[i] = 0;
1402  }
1403  }
1404  return TRUE;
1405 }
1406 
1407 
1408 /**
1409  * Loads the currency name data from the cache, or from resource bundles if necessary.
1410  * The refCount is automatically incremented. It is the caller's responsibility
1411  * to decrement it when done!
1412  */
1413 static CurrencyNameCacheEntry*
1415 
1416  int32_t total_currency_name_count = 0;
1417  CurrencyNameStruct* currencyNames = NULL;
1418  int32_t total_currency_symbol_count = 0;
1419  CurrencyNameStruct* currencySymbols = NULL;
1420  CurrencyNameCacheEntry* cacheEntry = NULL;
1421 
1423  // in order to handle racing correctly,
1424  // not putting 'search' in a separate function.
1425  int8_t found = -1;
1426  for (int8_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
1427  if (currCache[i]!= NULL &&
1428  uprv_strcmp(locale, currCache[i]->locale) == 0) {
1429  found = i;
1430  break;
1431  }
1432  }
1433  if (found != -1) {
1434  cacheEntry = currCache[found];
1435  ++(cacheEntry->refCount);
1436  }
1438  if (found == -1) {
1439  collectCurrencyNames(locale, &currencyNames, &total_currency_name_count, &currencySymbols, &total_currency_symbol_count, ec);
1440  if (U_FAILURE(ec)) {
1441  return NULL;
1442  }
1444  // check again.
1445  for (int8_t i = 0; i < CURRENCY_NAME_CACHE_NUM; ++i) {
1446  if (currCache[i]!= NULL &&
1447  uprv_strcmp(locale, currCache[i]->locale) == 0) {
1448  found = i;
1449  break;
1450  }
1451  }
1452  if (found == -1) {
1453  // insert new entry to
1454  // currentCacheEntryIndex % CURRENCY_NAME_CACHE_NUM
1455  // and remove the existing entry
1456  // currentCacheEntryIndex % CURRENCY_NAME_CACHE_NUM
1457  // from cache.
1458  cacheEntry = currCache[currentCacheEntryIndex];
1459  if (cacheEntry) {
1460  --(cacheEntry->refCount);
1461  // delete if the ref count is zero
1462  if (cacheEntry->refCount == 0) {
1463  deleteCacheEntry(cacheEntry);
1464  }
1465  }
1467  currCache[currentCacheEntryIndex] = cacheEntry;
1468  uprv_strcpy(cacheEntry->locale, locale);
1469  cacheEntry->currencyNames = currencyNames;
1470  cacheEntry->totalCurrencyNameCount = total_currency_name_count;
1471  cacheEntry->currencySymbols = currencySymbols;
1472  cacheEntry->totalCurrencySymbolCount = total_currency_symbol_count;
1473  cacheEntry->refCount = 2; // one for cache, one for reference
1476  } else {
1477  deleteCurrencyNames(currencyNames, total_currency_name_count);
1478  deleteCurrencyNames(currencySymbols, total_currency_symbol_count);
1479  cacheEntry = currCache[found];
1480  ++(cacheEntry->refCount);
1481  }
1483  }
1484 
1485  return cacheEntry;
1486 }
1487 
1488 static void releaseCacheEntry(CurrencyNameCacheEntry* cacheEntry) {
1490  --(cacheEntry->refCount);
1491  if (cacheEntry->refCount == 0) { // remove
1492  deleteCacheEntry(cacheEntry);
1493  }
1495 }
1496 
1497 U_CAPI void
1499  const icu::UnicodeString& text,
1500  icu::ParsePosition& pos,
1501  int8_t type,
1502  int32_t* partialMatchLen,
1503  UChar* result,
1504  UErrorCode& ec) {
1506  if (U_FAILURE(ec)) {
1507  return;
1508  }
1510  if (U_FAILURE(ec)) {
1511  return;
1512  }
1513 
1514  int32_t total_currency_name_count = cacheEntry->totalCurrencyNameCount;
1515  CurrencyNameStruct* currencyNames = cacheEntry->currencyNames;
1516  int32_t total_currency_symbol_count = cacheEntry->totalCurrencySymbolCount;
1517  CurrencyNameStruct* currencySymbols = cacheEntry->currencySymbols;
1518 
1519  int32_t start = pos.getIndex();
1520 
1521  UChar inputText[MAX_CURRENCY_NAME_LEN];
1522  UChar upperText[MAX_CURRENCY_NAME_LEN];
1524  text.extract(start, textLen, inputText);
1525  UErrorCode ec1 = U_ZERO_ERROR;
1526  textLen = u_strToUpper(upperText, MAX_CURRENCY_NAME_LEN, inputText, textLen, locale, &ec1);
1527 
1528  // Make sure partialMatchLen is initialized
1529  *partialMatchLen = 0;
1530 
1531  int32_t max = 0;
1532  int32_t matchIndex = -1;
1533  // case in-sensitive comparision against currency names
1534  searchCurrencyName(currencyNames, total_currency_name_count,
1535  upperText, textLen, partialMatchLen, &max, &matchIndex);
1536 
1537 #ifdef UCURR_DEBUG
1538  printf("search in names, max = %d, matchIndex = %d\n", max, matchIndex);
1539 #endif
1540 
1541  int32_t maxInSymbol = 0;
1542  int32_t matchIndexInSymbol = -1;
1543  if (type != UCURR_LONG_NAME) { // not name only
1544  // case sensitive comparison against currency symbols and ISO code.
1545  searchCurrencyName(currencySymbols, total_currency_symbol_count,
1546  inputText, textLen,
1547  partialMatchLen,
1548  &maxInSymbol, &matchIndexInSymbol);
1549  }
1550 
1551 #ifdef UCURR_DEBUG
1552  printf("search in symbols, maxInSymbol = %d, matchIndexInSymbol = %d\n", maxInSymbol, matchIndexInSymbol);
1553  if(matchIndexInSymbol != -1) {
1554  printf("== ISO=%s\n", currencySymbols[matchIndexInSymbol].IsoCode);
1555  }
1556 #endif
1557 
1558  if (max >= maxInSymbol && matchIndex != -1) {
1559  u_charsToUChars(currencyNames[matchIndex].IsoCode, result, 4);
1560  pos.setIndex(start + max);
1561  } else if (maxInSymbol >= max && matchIndexInSymbol != -1) {
1562  u_charsToUChars(currencySymbols[matchIndexInSymbol].IsoCode, result, 4);
1563  pos.setIndex(start + maxInSymbol);
1564  }
1565 
1566  // decrease reference count
1567  releaseCacheEntry(cacheEntry);
1568 }
1569 
1570 void uprv_currencyLeads(const char* locale, icu::UnicodeSet& result, UErrorCode& ec) {
1572  if (U_FAILURE(ec)) {
1573  return;
1574  }
1576  if (U_FAILURE(ec)) {
1577  return;
1578  }
1579 
1580  for (int32_t i=0; i<cacheEntry->totalCurrencySymbolCount; i++) {
1581  const CurrencyNameStruct& info = cacheEntry->currencySymbols[i];
1582  UChar32 cp;
1583  U16_GET(info.currencyName, 0, 0, info.currencyNameLen, cp);
1584  result.add(cp);
1585  }
1586 
1587  for (int32_t i=0; i<cacheEntry->totalCurrencyNameCount; i++) {
1588  const CurrencyNameStruct& info = cacheEntry->currencyNames[i];
1589  UChar32 cp;
1590  U16_GET(info.currencyName, 0, 0, info.currencyNameLen, cp);
1591  result.add(cp);
1592  }
1593 
1594  // decrease reference count
1595  releaseCacheEntry(cacheEntry);
1596 }
1597 
1598 
1599 /**
1600  * Internal method. Given a currency ISO code and a locale, return
1601  * the "static" currency name. This is usually the same as the
1602  * UCURR_SYMBOL_NAME, but if the latter is a choice format, then the
1603  * format is applied to the number 2.0 (to yield the more common
1604  * plural) to return a static name.
1605  *
1606  * This is used for backward compatibility with old currency logic in
1607  * DecimalFormat and DecimalFormatSymbols.
1608  */
1609 U_CAPI void
1610 uprv_getStaticCurrencyName(const UChar* iso, const char* loc,
1611  icu::UnicodeString& result, UErrorCode& ec)
1612 {
1614 
1615  int32_t len;
1616  const UChar* currname = ucurr_getName(iso, loc, UCURR_SYMBOL_NAME,
1617  nullptr /* isChoiceFormat */, &len, &ec);
1618  if (U_SUCCESS(ec)) {
1619  result.setTo(currname, len);
1620  }
1621 }
1622 
1626 }
1627 
1630  int32_t fracDigits = 0;
1631  if (U_SUCCESS(*ec)) {
1632  switch (usage) {
1633  case UCURR_USAGE_STANDARD:
1634  fracDigits = (_findMetaData(currency, *ec))[0];
1635  break;
1636  case UCURR_USAGE_CASH:
1637  fracDigits = (_findMetaData(currency, *ec))[2];
1638  break;
1639  default:
1641  }
1642  }
1643  return fracDigits;
1644 }
1645 
1646 U_CAPI double U_EXPORT2
1649 }
1650 
1651 U_CAPI double U_EXPORT2
1653  double result = 0.0;
1654 
1655  const int32_t *data = _findMetaData(currency, *ec);
1656  if (U_SUCCESS(*ec)) {
1657  int32_t fracDigits;
1658  int32_t increment;
1659  switch (usage) {
1660  case UCURR_USAGE_STANDARD:
1661  fracDigits = data[0];
1662  increment = data[1];
1663  break;
1664  case UCURR_USAGE_CASH:
1665  fracDigits = data[2];
1666  increment = data[3];
1667  break;
1668  default:
1670  return result;
1671  }
1672 
1673  // If the meta data is invalid, return 0.0
1674  if (fracDigits < 0 || fracDigits > MAX_POW10) {
1676  } else {
1677  // A rounding value of 0 or 1 indicates no rounding.
1678  if (increment >= 2) {
1679  // Return (increment) / 10^(fracDigits). The only actual rounding data,
1680  // as of this writing, is CHF { 2, 5 }.
1681  result = double(increment) / POW10[fracDigits];
1682  }
1683  }
1684  }
1685 
1686  return result;
1687 }
1688 
1690 
1691 typedef struct UCurrencyContext {
1692  uint32_t currType; /* UCurrCurrencyType */
1695 
1696 /*
1697 Please keep this list in alphabetical order.
1698 You can look at the CLDR supplemental data or ISO-4217 for the meaning of some
1699 of these items.
1700 ISO-4217: http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html
1701 */
1702 static const struct CurrencyList {
1703  const char *currency;
1705 } gCurrencyList[] = {
1706  {"ADP", UCURR_COMMON|UCURR_DEPRECATED},
1708  {"AFA", UCURR_COMMON|UCURR_DEPRECATED},
1710  {"ALK", UCURR_COMMON|UCURR_DEPRECATED},
1715  {"AOK", UCURR_COMMON|UCURR_DEPRECATED},
1716  {"AON", UCURR_COMMON|UCURR_DEPRECATED},
1717  {"AOR", UCURR_COMMON|UCURR_DEPRECATED},
1718  {"ARA", UCURR_COMMON|UCURR_DEPRECATED},
1719  {"ARL", UCURR_COMMON|UCURR_DEPRECATED},
1720  {"ARM", UCURR_COMMON|UCURR_DEPRECATED},
1721  {"ARP", UCURR_COMMON|UCURR_DEPRECATED},
1723  {"ATS", UCURR_COMMON|UCURR_DEPRECATED},
1726  {"AZM", UCURR_COMMON|UCURR_DEPRECATED},
1728  {"BAD", UCURR_COMMON|UCURR_DEPRECATED},
1730  {"BAN", UCURR_COMMON|UCURR_DEPRECATED},
1734  {"BEF", UCURR_COMMON|UCURR_DEPRECATED},
1736  {"BGL", UCURR_COMMON|UCURR_DEPRECATED},
1737  {"BGM", UCURR_COMMON|UCURR_DEPRECATED},
1739  {"BGO", UCURR_COMMON|UCURR_DEPRECATED},
1745  {"BOL", UCURR_COMMON|UCURR_DEPRECATED},
1746  {"BOP", UCURR_COMMON|UCURR_DEPRECATED},
1748  {"BRB", UCURR_COMMON|UCURR_DEPRECATED},
1749  {"BRC", UCURR_COMMON|UCURR_DEPRECATED},
1750  {"BRE", UCURR_COMMON|UCURR_DEPRECATED},
1752  {"BRN", UCURR_COMMON|UCURR_DEPRECATED},
1753  {"BRR", UCURR_COMMON|UCURR_DEPRECATED},
1754  {"BRZ", UCURR_COMMON|UCURR_DEPRECATED},
1757  {"BUK", UCURR_COMMON|UCURR_DEPRECATED},
1759  {"BYB", UCURR_COMMON|UCURR_DEPRECATED},
1761  {"BYR", UCURR_COMMON|UCURR_DEPRECATED},
1768  {"CLE", UCURR_COMMON|UCURR_DEPRECATED},
1777  {"CSD", UCURR_COMMON|UCURR_DEPRECATED},
1778  {"CSK", UCURR_COMMON|UCURR_DEPRECATED},
1782  {"CYP", UCURR_COMMON|UCURR_DEPRECATED},
1784  {"DDM", UCURR_COMMON|UCURR_DEPRECATED},
1785  {"DEM", UCURR_COMMON|UCURR_DEPRECATED},
1790  {"ECS", UCURR_COMMON|UCURR_DEPRECATED},
1792  {"EEK", UCURR_COMMON|UCURR_DEPRECATED},
1794  {"EQE", UCURR_COMMON|UCURR_DEPRECATED}, // questionable, remove?
1798  {"ESP", UCURR_COMMON|UCURR_DEPRECATED},
1801  {"FIM", UCURR_COMMON|UCURR_DEPRECATED},
1804  {"FRF", UCURR_COMMON|UCURR_DEPRECATED},
1806  {"GEK", UCURR_COMMON|UCURR_DEPRECATED},
1808  {"GHC", UCURR_COMMON|UCURR_DEPRECATED},
1813  {"GNS", UCURR_COMMON|UCURR_DEPRECATED},
1814  {"GQE", UCURR_COMMON|UCURR_DEPRECATED},
1815  {"GRD", UCURR_COMMON|UCURR_DEPRECATED},
1817  {"GWE", UCURR_COMMON|UCURR_DEPRECATED},
1818  {"GWP", UCURR_COMMON|UCURR_DEPRECATED},
1822  {"HRD", UCURR_COMMON|UCURR_DEPRECATED},
1827  {"IEP", UCURR_COMMON|UCURR_DEPRECATED},
1828  {"ILP", UCURR_COMMON|UCURR_DEPRECATED},
1829  {"ILR", UCURR_COMMON|UCURR_DEPRECATED},
1834  {"ISJ", UCURR_COMMON|UCURR_DEPRECATED},
1836  {"ITL", UCURR_COMMON|UCURR_DEPRECATED},
1845  {"KRH", UCURR_COMMON|UCURR_DEPRECATED},
1846  {"KRO", UCURR_COMMON|UCURR_DEPRECATED},
1856  {"LSM", UCURR_COMMON|UCURR_DEPRECATED}, // questionable, remove?
1857  {"LTL", UCURR_COMMON|UCURR_DEPRECATED},
1858  {"LTT", UCURR_COMMON|UCURR_DEPRECATED},
1860  {"LUF", UCURR_COMMON|UCURR_DEPRECATED},
1862  {"LVL", UCURR_COMMON|UCURR_DEPRECATED},
1863  {"LVR", UCURR_COMMON|UCURR_DEPRECATED},
1866  {"MAF", UCURR_COMMON|UCURR_DEPRECATED},
1867  {"MCF", UCURR_COMMON|UCURR_DEPRECATED},
1868  {"MDC", UCURR_COMMON|UCURR_DEPRECATED},
1871  {"MGF", UCURR_COMMON|UCURR_DEPRECATED},
1873  {"MKN", UCURR_COMMON|UCURR_DEPRECATED},
1874  {"MLF", UCURR_COMMON|UCURR_DEPRECATED},
1878  {"MRO", UCURR_COMMON|UCURR_DEPRECATED},
1880  {"MTL", UCURR_COMMON|UCURR_DEPRECATED},
1881  {"MTP", UCURR_COMMON|UCURR_DEPRECATED},
1883  {"MVP", UCURR_COMMON|UCURR_DEPRECATED}, // questionable, remove?
1887  {"MXP", UCURR_COMMON|UCURR_DEPRECATED},
1890  {"MZE", UCURR_COMMON|UCURR_DEPRECATED},
1891  {"MZM", UCURR_COMMON|UCURR_DEPRECATED},
1895  {"NIC", UCURR_COMMON|UCURR_DEPRECATED},
1897  {"NLG", UCURR_COMMON|UCURR_DEPRECATED},
1903  {"PEI", UCURR_COMMON|UCURR_DEPRECATED},
1905  {"PES", UCURR_COMMON|UCURR_DEPRECATED},
1910  {"PLZ", UCURR_COMMON|UCURR_DEPRECATED},
1911  {"PTE", UCURR_COMMON|UCURR_DEPRECATED},
1914  {"RHD", UCURR_COMMON|UCURR_DEPRECATED},
1915  {"ROL", UCURR_COMMON|UCURR_DEPRECATED},
1919  {"RUR", UCURR_COMMON|UCURR_DEPRECATED},
1924  {"SDD", UCURR_COMMON|UCURR_DEPRECATED},
1926  {"SDP", UCURR_COMMON|UCURR_DEPRECATED},
1930  {"SIT", UCURR_COMMON|UCURR_DEPRECATED},
1931  {"SKK", UCURR_COMMON|UCURR_DEPRECATED},
1935  {"SRG", UCURR_COMMON|UCURR_DEPRECATED},
1937  {"STD", UCURR_COMMON|UCURR_DEPRECATED},
1939  {"SUR", UCURR_COMMON|UCURR_DEPRECATED},
1940  {"SVC", UCURR_COMMON|UCURR_DEPRECATED},
1944  {"TJR", UCURR_COMMON|UCURR_DEPRECATED},
1946  {"TMM", UCURR_COMMON|UCURR_DEPRECATED},
1950  {"TPE", UCURR_COMMON|UCURR_DEPRECATED},
1951  {"TRL", UCURR_COMMON|UCURR_DEPRECATED},
1957  {"UAK", UCURR_COMMON|UCURR_DEPRECATED},
1958  {"UGS", UCURR_COMMON|UCURR_DEPRECATED},
1964  {"UYP", UCURR_COMMON|UCURR_DEPRECATED},
1967  {"VEB", UCURR_COMMON|UCURR_DEPRECATED},
1970  {"VNN", UCURR_COMMON|UCURR_DEPRECATED},
1994  {"YDD", UCURR_COMMON|UCURR_DEPRECATED},
1996  {"YUD", UCURR_COMMON|UCURR_DEPRECATED},
1997  {"YUM", UCURR_COMMON|UCURR_DEPRECATED},
1998  {"YUN", UCURR_COMMON|UCURR_DEPRECATED},
1999  {"YUR", UCURR_COMMON|UCURR_DEPRECATED},
2002  {"ZMK", UCURR_COMMON|UCURR_DEPRECATED},
2004  {"ZRN", UCURR_COMMON|UCURR_DEPRECATED},
2005  {"ZRZ", UCURR_COMMON|UCURR_DEPRECATED},
2006  {"ZWD", UCURR_COMMON|UCURR_DEPRECATED},
2007  {"ZWL", UCURR_COMMON|UCURR_DEPRECATED},
2008  {"ZWR", UCURR_COMMON|UCURR_DEPRECATED},
2009  { NULL, 0 } // Leave here to denote the end of the list.
2010 };
2011 
2012 #define UCURR_MATCHES_BITMASK(variable, typeToMatch) \
2013  ((typeToMatch) == UCURR_ALL || ((variable) & (typeToMatch)) == (typeToMatch))
2014 
2015 static int32_t U_CALLCONV
2016 ucurr_countCurrencyList(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/) {
2017  UCurrencyContext *myContext = (UCurrencyContext *)(enumerator->context);
2018  uint32_t currType = myContext->currType;
2019  int32_t count = 0;
2020 
2021  /* Count the number of items matching the type we are looking for. */
2022  for (int32_t idx = 0; gCurrencyList[idx].currency != NULL; idx++) {
2023  if (UCURR_MATCHES_BITMASK(gCurrencyList[idx].currType, currType)) {
2024  count++;
2025  }
2026  }
2027  return count;
2028 }
2029 
2030 static const char* U_CALLCONV
2032  int32_t* resultLength,
2033  UErrorCode * /*pErrorCode*/)
2034 {
2035  UCurrencyContext *myContext = (UCurrencyContext *)(enumerator->context);
2036 
2037  /* Find the next in the list that matches the type we are looking for. */
2038  while (myContext->listIdx < UPRV_LENGTHOF(gCurrencyList)-1) {
2039  const struct CurrencyList *currItem = &gCurrencyList[myContext->listIdx++];
2040  if (UCURR_MATCHES_BITMASK(currItem->currType, myContext->currType))
2041  {
2042  if (resultLength) {
2043  *resultLength = 3; /* Currency codes are only 3 chars long */
2044  }
2045  return currItem->currency;
2046  }
2047  }
2048  /* We enumerated too far. */
2049  if (resultLength) {
2050  *resultLength = 0;
2051  }
2052  return NULL;
2053 }
2054 
2055 static void U_CALLCONV
2056 ucurr_resetCurrencyList(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/) {
2057  ((UCurrencyContext *)(enumerator->context))->listIdx = 0;
2058 }
2059 
2060 static void U_CALLCONV
2062  uprv_free(enumerator->context);
2063  uprv_free(enumerator);
2064 }
2065 
2066 static void U_CALLCONV
2068  UErrorCode localStatus = U_ZERO_ERROR;
2069 
2070  // Look up the CurrencyMap element in the root bundle.
2072  UResourceBundle *currencyMapArray = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus);
2073 
2074  if (U_SUCCESS(localStatus)) {
2075  // process each entry in currency map
2076  for (int32_t i=0; i<ures_getSize(currencyMapArray); i++) {
2077  // get the currency resource
2078  UResourceBundle *currencyArray = ures_getByIndex(currencyMapArray, i, NULL, &localStatus);
2079  // process each currency
2080  if (U_SUCCESS(localStatus)) {
2081  for (int32_t j=0; j<ures_getSize(currencyArray); j++) {
2082  // get the currency resource
2083  UResourceBundle *currencyRes = ures_getByIndex(currencyArray, j, NULL, &localStatus);
2085  if (entry == NULL) {
2087  return;
2088  }
2089 
2090  // get the ISO code
2091  int32_t isoLength = 0;
2092  UResourceBundle *idRes = ures_getByKey(currencyRes, "id", NULL, &localStatus);
2093  if (idRes == NULL) {
2094  continue;
2095  }
2096  const UChar *isoCode = ures_getString(idRes, &isoLength, &localStatus);
2097 
2098  // get from date
2099  UDate fromDate = U_DATE_MIN;
2100  UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
2101 
2102  if (U_SUCCESS(localStatus)) {
2103  int32_t fromLength = 0;
2104  const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
2105  int64_t currDate64 = (int64_t)fromArray[0] << 32;
2106  currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2107  fromDate = (UDate)currDate64;
2108  }
2109  ures_close(fromRes);
2110 
2111  // get to date
2112  UDate toDate = U_DATE_MAX;
2113  localStatus = U_ZERO_ERROR;
2114  UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
2115 
2116  if (U_SUCCESS(localStatus)) {
2117  int32_t toLength = 0;
2118  const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
2119  int64_t currDate64 = (int64_t)toArray[0] << 32;
2120  currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2121  toDate = (UDate)currDate64;
2122  }
2123  ures_close(toRes);
2124 
2125  ures_close(idRes);
2126  ures_close(currencyRes);
2127 
2128  entry->isoCode = isoCode;
2129  entry->from = fromDate;
2130  entry->to = toDate;
2131 
2132  localStatus = U_ZERO_ERROR;
2133  uhash_put(isoCodes, (UChar *)isoCode, entry, &localStatus);
2134  }
2135  } else {
2136  *status = localStatus;
2137  }
2138  ures_close(currencyArray);
2139  }
2140  } else {
2141  *status = localStatus;
2142  }
2143 
2144  ures_close(currencyMapArray);
2145 }
2146 
2148  NULL,
2149  NULL,
2155 };
2157 
2158 
2160  U_ASSERT(gIsoCodes == NULL);
2162 
2164  if (U_FAILURE(status)) {
2165  return;
2166  }
2168 
2169  ucurr_createCurrencyList(isoCodes, &status);
2170  if (U_FAILURE(status)) {
2171  uhash_close(isoCodes);
2172  return;
2173  }
2174  gIsoCodes = isoCodes; // Note: gIsoCodes is const. Once set up here it is never altered,
2175  // and read only access is safe without synchronization.
2176 }
2177 
2178 static void populateCurrSymbolsEquiv(icu::Hashtable *hash, UErrorCode &status) {
2179  if (U_FAILURE(status)) { return; }
2180  for (auto& entry : unisets::kCurrencyEntries) {
2181  UnicodeString exemplar(entry.exemplar);
2182  const UnicodeSet* set = unisets::get(entry.key);
2183  if (set == nullptr) { return; }
2184  UnicodeSetIterator it(*set);
2185  while (it.next()) {
2186  UnicodeString value = it.getString();
2187  if (value == exemplar) {
2188  // No need to mark the exemplar character as an equivalent
2189  continue;
2190  }
2192  if (U_FAILURE(status)) { return; }
2193  }
2194  }
2195 }
2196 
2201  icu::Hashtable *temp = new icu::Hashtable(status);
2202  if (temp == NULL) {
2203  return;
2204  }
2205  if (U_FAILURE(status)) {
2206  delete temp;
2207  return;
2208  }
2209  temp->setValueDeleter(deleteUnicode);
2211  if (U_FAILURE(status)) {
2212  delete temp;
2213  return;
2214  }
2216 }
2217 
2219 ucurr_isAvailable(const UChar* isoCode, UDate from, UDate to, UErrorCode* eErrorCode) {
2221  if (U_FAILURE(*eErrorCode)) {
2222  return FALSE;
2223  }
2224 
2226  if (result == NULL) {
2227  return FALSE;
2228  } else if (from > to) {
2229  *eErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
2230  return FALSE;
2231  } else if ((from > result->to) || (to < result->from)) {
2232  return FALSE;
2233  }
2234  return TRUE;
2235 }
2236 
2237 static const icu::Hashtable* getCurrSymbolsEquiv() {
2239  return gCurrSymbolsEquiv;
2240 }
2241 
2244  UEnumeration *myEnum = NULL;
2245  UCurrencyContext *myContext;
2246 
2247  myEnum = (UEnumeration*)uprv_malloc(sizeof(UEnumeration));
2248  if (myEnum == NULL) {
2249  *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
2250  return NULL;
2251  }
2252  uprv_memcpy(myEnum, &gEnumCurrencyList, sizeof(UEnumeration));
2253  myContext = (UCurrencyContext*)uprv_malloc(sizeof(UCurrencyContext));
2254  if (myContext == NULL) {
2255  *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
2256  uprv_free(myEnum);
2257  return NULL;
2258  }
2259  myContext->currType = currType;
2260  myContext->listIdx = 0;
2261  myEnum->context = myContext;
2262  return myEnum;
2263 }
2264 
2267  UDate date,
2268  UErrorCode* ec)
2269 {
2270  int32_t currCount = 0;
2271 
2272  if (ec != NULL && U_SUCCESS(*ec))
2273  {
2274  // local variables
2275  UErrorCode localStatus = U_ZERO_ERROR;
2276  char id[ULOC_FULLNAME_CAPACITY];
2277 
2278  // get country or country_variant in `id'
2279  idForLocale(locale, id, sizeof(id), ec);
2280 
2281  if (U_FAILURE(*ec))
2282  {
2283  return 0;
2284  }
2285 
2286  // Remove variants, which is only needed for registration.
2287  char *idDelim = strchr(id, VAR_DELIM);
2288  if (idDelim)
2289  {
2290  idDelim[0] = 0;
2291  }
2292 
2293  // Look up the CurrencyMap element in the root bundle.
2295  UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus);
2296 
2297  // Using the id derived from the local, get the currency data
2298  UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus);
2299 
2300  // process each currency to see which one is valid for the given date
2301  if (U_SUCCESS(localStatus))
2302  {
2303  for (int32_t i=0; i<ures_getSize(countryArray); i++)
2304  {
2305  // get the currency resource
2306  UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, NULL, &localStatus);
2307 
2308  // get the from date
2309  int32_t fromLength = 0;
2310  UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
2311  const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
2312 
2313  int64_t currDate64 = (int64_t)fromArray[0] << 32;
2314  currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2315  UDate fromDate = (UDate)currDate64;
2316 
2317  if (ures_getSize(currencyRes)> 2)
2318  {
2319  int32_t toLength = 0;
2320  UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
2321  const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
2322 
2323  currDate64 = (int64_t)toArray[0] << 32;
2324  currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2325  UDate toDate = (UDate)currDate64;
2326 
2327  if ((fromDate <= date) && (date < toDate))
2328  {
2329  currCount++;
2330  }
2331 
2332  ures_close(toRes);
2333  }
2334  else
2335  {
2336  if (fromDate <= date)
2337  {
2338  currCount++;
2339  }
2340  }
2341 
2342  // close open resources
2343  ures_close(currencyRes);
2344  ures_close(fromRes);
2345 
2346  } // end For loop
2347  } // end if (U_SUCCESS(localStatus))
2348 
2349  ures_close(countryArray);
2350 
2351  // Check for errors
2352  if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR)
2353  {
2354  // There is nothing to fallback to.
2355  // Report the failure/warning if possible.
2356  *ec = localStatus;
2357  }
2358 
2359  if (U_SUCCESS(*ec))
2360  {
2361  // no errors
2362  return currCount;
2363  }
2364 
2365  }
2366 
2367  // If we got here, either error code is invalid or
2368  // some argument passed is no good.
2369  return 0;
2370 }
2371 
2374  UDate date,
2375  int32_t index,
2376  UChar* buff,
2377  int32_t buffCapacity,
2378  UErrorCode* ec)
2379 {
2380  int32_t resLen = 0;
2381  int32_t currIndex = 0;
2382  const UChar* s = NULL;
2383 
2384  if (ec != NULL && U_SUCCESS(*ec))
2385  {
2386  // check the arguments passed
2387  if ((buff && buffCapacity) || !buffCapacity )
2388  {
2389  // local variables
2390  UErrorCode localStatus = U_ZERO_ERROR;
2391  char id[ULOC_FULLNAME_CAPACITY];
2392 
2393  // get country or country_variant in `id'
2394  idForLocale(locale, id, sizeof(id), ec);
2395  if (U_FAILURE(*ec))
2396  {
2397  return 0;
2398  }
2399 
2400  // Remove variants, which is only needed for registration.
2401  char *idDelim = strchr(id, VAR_DELIM);
2402  if (idDelim)
2403  {
2404  idDelim[0] = 0;
2405  }
2406 
2407  // Look up the CurrencyMap element in the root bundle.
2409  UResourceBundle *cm = ures_getByKey(rb, CURRENCY_MAP, rb, &localStatus);
2410 
2411  // Using the id derived from the local, get the currency data
2412  UResourceBundle *countryArray = ures_getByKey(rb, id, cm, &localStatus);
2413 
2414  // process each currency to see which one is valid for the given date
2415  bool matchFound = false;
2416  if (U_SUCCESS(localStatus))
2417  {
2418  if ((index <= 0) || (index> ures_getSize(countryArray)))
2419  {
2420  // requested index is out of bounds
2421  ures_close(countryArray);
2422  return 0;
2423  }
2424 
2425  for (int32_t i=0; i<ures_getSize(countryArray); i++)
2426  {
2427  // get the currency resource
2428  UResourceBundle *currencyRes = ures_getByIndex(countryArray, i, NULL, &localStatus);
2429  s = ures_getStringByKey(currencyRes, "id", &resLen, &localStatus);
2430 
2431  // get the from date
2432  int32_t fromLength = 0;
2433  UResourceBundle *fromRes = ures_getByKey(currencyRes, "from", NULL, &localStatus);
2434  const int32_t *fromArray = ures_getIntVector(fromRes, &fromLength, &localStatus);
2435 
2436  int64_t currDate64 = (int64_t)fromArray[0] << 32;
2437  currDate64 |= ((int64_t)fromArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2438  UDate fromDate = (UDate)currDate64;
2439 
2440  if (ures_getSize(currencyRes)> 2)
2441  {
2442  int32_t toLength = 0;
2443  UResourceBundle *toRes = ures_getByKey(currencyRes, "to", NULL, &localStatus);
2444  const int32_t *toArray = ures_getIntVector(toRes, &toLength, &localStatus);
2445 
2446  currDate64 = (int64_t)toArray[0] << 32;
2447  currDate64 |= ((int64_t)toArray[1] & (int64_t)INT64_C(0x00000000FFFFFFFF));
2448  UDate toDate = (UDate)currDate64;
2449 
2450  if ((fromDate <= date) && (date < toDate))
2451  {
2452  currIndex++;
2453  if (currIndex == index)
2454  {
2455  matchFound = true;
2456  }
2457  }
2458 
2459  ures_close(toRes);
2460  }
2461  else
2462  {
2463  if (fromDate <= date)
2464  {
2465  currIndex++;
2466  if (currIndex == index)
2467  {
2468  matchFound = true;
2469  }
2470  }
2471  }
2472 
2473  // close open resources
2474  ures_close(currencyRes);
2475  ures_close(fromRes);
2476 
2477  // check for loop exit
2478  if (matchFound)
2479  {
2480  break;
2481  }
2482 
2483  } // end For loop
2484  }
2485 
2486  ures_close(countryArray);
2487 
2488  // Check for errors
2489  if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR)
2490  {
2491  // There is nothing to fallback to.
2492  // Report the failure/warning if possible.
2493  *ec = localStatus;
2494  }
2495 
2496  if (U_SUCCESS(*ec))
2497  {
2498  // no errors
2499  if((buffCapacity> resLen) && matchFound)
2500  {
2501  // write out the currency value
2502  u_strcpy(buff, s);
2503  }
2504  else
2505  {
2506  return 0;
2507  }
2508  }
2509 
2510  // return null terminated currency string
2511  return u_terminateUChars(buff, buffCapacity, resLen, ec);
2512  }
2513  else
2514  {
2515  // illegal argument encountered
2517  }
2518 
2519  }
2520 
2521  // If we got here, either error code is invalid or
2522  // some argument passed is no good.
2523  return resLen;
2524 }
2525 
2527  NULL,
2528  NULL,
2534 };
2535 
2537  // Resolve region
2538  char prefRegion[ULOC_COUNTRY_CAPACITY];
2539  ulocimp_getRegionForSupplementalData(locale, TRUE, prefRegion, sizeof(prefRegion), status);
2540 
2541  // Read value from supplementalData
2543  UList *otherValues = ulist_createEmptyList(status);
2545  if (U_FAILURE(*status) || en == NULL) {
2546  if (en == NULL) {
2548  } else {
2549  uprv_free(en);
2550  }
2552  ulist_deleteList(otherValues);
2553  return NULL;
2554  }
2555  memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
2556  en->context = values;
2557 
2558  UResourceBundle *bundle = ures_openDirect(U_ICUDATA_CURR, "supplementalData", status);
2559  ures_getByKey(bundle, "CurrencyMap", bundle, status);
2560  UResourceBundle bundlekey, regbndl, curbndl, to;
2561  ures_initStackObject(&bundlekey);
2562  ures_initStackObject(&regbndl);
2563  ures_initStackObject(&curbndl);
2565 
2566  while (U_SUCCESS(*status) && ures_hasNext(bundle)) {
2567  ures_getNextResource(bundle, &bundlekey, status);
2568  if (U_FAILURE(*status)) {
2569  break;
2570  }
2571  const char *region = ures_getKey(&bundlekey);
2572  UBool isPrefRegion = uprv_strcmp(region, prefRegion) == 0 ? TRUE : FALSE;
2573  if (!isPrefRegion && commonlyUsed) {
2574  // With commonlyUsed=true, we do not put
2575  // currencies for other regions in the
2576  // result list.
2577  continue;
2578  }
2579  ures_getByKey(bundle, region, &regbndl, status);
2580  if (U_FAILURE(*status)) {
2581  break;
2582  }
2583  while (U_SUCCESS(*status) && ures_hasNext(&regbndl)) {
2584  ures_getNextResource(&regbndl, &curbndl, status);
2585  if (ures_getType(&curbndl) != URES_TABLE) {
2586  // Currently, an empty ARRAY is mixed in.
2587  continue;
2588  }
2589  char *curID = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY);
2590  int32_t curIDLength = ULOC_KEYWORDS_CAPACITY;
2591  if (curID == NULL) {
2593  break;
2594  }
2595 
2596 #if U_CHARSET_FAMILY==U_ASCII_FAMILY
2597  ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, TRUE, status);
2598  /* optimize - use the utf-8 string */
2599 #else
2600  {
2601  const UChar* defString = ures_getStringByKey(&curbndl, "id", &curIDLength, status);
2602  if(U_SUCCESS(*status)) {
2603  if(curIDLength+1 > ULOC_KEYWORDS_CAPACITY) {
2605  } else {
2606  u_UCharsToChars(defString, curID, curIDLength+1);
2607  }
2608  }
2609  }
2610 #endif
2611 
2612  if (U_FAILURE(*status)) {
2613  break;
2614  }
2615  UBool hasTo = FALSE;
2616  ures_getByKey(&curbndl, "to", &to, status);
2617  if (U_FAILURE(*status)) {
2618  // Do nothing here...
2619  *status = U_ZERO_ERROR;
2620  } else {
2621  hasTo = TRUE;
2622  }
2623  if (isPrefRegion && !hasTo && !ulist_containsString(values, curID, (int32_t)uprv_strlen(curID))) {
2624  // Currently active currency for the target country
2626  } else if (!ulist_containsString(otherValues, curID, (int32_t)uprv_strlen(curID)) && !commonlyUsed) {
2627  ulist_addItemEndList(otherValues, curID, TRUE, status);
2628  } else {
2629  uprv_free(curID);
2630  }
2631  }
2632 
2633  }
2634  if (U_SUCCESS(*status)) {
2635  if (commonlyUsed) {
2636  if (ulist_getListSize(values) == 0) {
2637  // This could happen if no valid region is supplied in the input
2638  // locale. In this case, we use the CLDR's default.
2639  uenum_close(en);
2641  }
2642  } else {
2643  // Consolidate the list
2644  char *value = NULL;
2645  ulist_resetList(otherValues);
2646  while ((value = (char *)ulist_getNext(otherValues)) != NULL) {
2648  char *tmpValue = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY);
2649  uprv_memcpy(tmpValue, value, uprv_strlen(value) + 1);
2650  ulist_addItemEndList(values, tmpValue, TRUE, status);
2651  if (U_FAILURE(*status)) {
2652  break;
2653  }
2654  }
2655  }
2656  }
2657 
2658  ulist_resetList((UList *)(en->context));
2659  } else {
2661  uprv_free(en);
2662  values = NULL;
2663  en = NULL;
2664  }
2665  ures_close(&to);
2666  ures_close(&curbndl);
2667  ures_close(&regbndl);
2668  ures_close(&bundlekey);
2669  ures_close(bundle);
2670 
2671  ulist_deleteList(otherValues);
2672 
2673  return en;
2674 }
2675 
2676 
2679  int32_t code = 0;
2682 
2683  UResourceBundle *bundle = ures_openDirect(0, "currencyNumericCodes", &status);
2684  ures_getByKey(bundle, "codeMap", bundle, &status);
2685  if (U_SUCCESS(status)) {
2686  char alphaCode[ISO_CURRENCY_CODE_LENGTH+1];
2687  myUCharsToChars(alphaCode, currency);
2688  T_CString_toUpperCase(alphaCode);
2689  ures_getByKey(bundle, alphaCode, bundle, &status);
2690  int tmpCode = ures_getInt(bundle, &status);
2691  if (U_SUCCESS(status)) {
2692  code = tmpCode;
2693  }
2694  }
2695  ures_close(bundle);
2696  }
2697  return code;
2698 }
2699 #endif /* #if !UCONFIG_NO_FORMATTING */
2700 
2701 //eof
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
cp
Definition: action.c:1035
int code
Definition: aftopl.c:52
#define type(a)
Definition: aptex-macros.h:171
#define loc
Definition: aptex-macros.h:65
#define count(a)
Definition: aptex-macros.h:781
#define hash
Definition: aptex.h:388
~EquivIterator()
Definition: ucurr.cpp:118
const icu::UnicodeString * _start
Definition: ucurr.cpp:125
const icu::Hashtable & _hash
Definition: ucurr.cpp:124
const icu::UnicodeString * next()
Definition: ucurr.cpp:130
EquivIterator(const icu::Hashtable &hash, const icu::UnicodeString &s)
Definition: ucurr.cpp:114
const icu::UnicodeString * _current
Definition: ucurr.cpp:126
Definition: umutex.h:223
#define UPRV_LENGTHOF(array)
Definition: cmemory.h:50
#define uprv_memcmp(buffer1, buffer2, size)
Definition: cmemory.h:52
#define uprv_memcpy(dst, src, size)
Definition: cmemory.h:40
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define uprv_strcmp(s1, s2)
Definition: cstring.h:38
#define uprv_strncpy(dst, src, size)
Definition: cstring.h:43
#define uprv_strchr(s, c)
Definition: cstring.h:40
#define uprv_strcpy(dst, src)
Definition: cstring.h:36
#define uprv_strlen(str)
Definition: cstring.h:37
static void date(UDate when, const UChar *tz, UDateFormatStyle style, const char *format, const char *locale, UErrorCode *status)
Definition: date.c:253
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
int printf()
char * temp
Definition: dvidvi.c:137
#define info
Definition: dviinfo.c:42
struct rect data
Definition: dvipdfm.c:64
long int flag
Definition: f2c.h:53
#define s
Definition: afcover.h:80
static char buff[2 *10240]
Definition: genind.c:46
static FIELD_PTR curr
Definition: genind.c:35
static FIELD_PTR begin
Definition: genind.c:37
static char usage[]
Definition: giftopnm.c:59
char choice
Definition: globals.c:17
#define a(n)
Definition: gpos-common.c:148
#define ec
Definition: gsftopk.c:502
#define strchr
Definition: gsftopk.c:59
#define memcpy(d, s, n)
Definition: gsftopk.c:64
const unsigned M
Definition: image.cpp:28
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
FT_UInt idx
Definition: cffcmap.c:135
#define INT64_C(val)
Definition: stdint.h:233
signed __int64 int64_t
Definition: stdint.h:89
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
signed char int8_t
Definition: stdint.h:75
int num
Definition: disdvi.c:621
#define buf
int capacity
Definition: pdfcolor.c:1335
pdf_obj * entry
Definition: pdfdoc.c:64
#define dest
#define symbol(x)
Definition: web2c-parser.c:71
#define U_CALLCONV
Definition: platform.h:877
#define U_EXPORT2
Definition: platform.h:844
#define qsort
Definition: includes.h:72
const int * pos
Definition: combiners.h:905
list names
Definition: fc-lang.py:151
static const struct unisets::@1138 kCurrencyEntries[]
const UnicodeSet * get(Key key)
UChar32 exemplar
#define max(a, b)
Definition: pbmto4425.c:11
#define index(s, c)
Definition: plain2.h:351
real to[600]
Definition: pmxab.c:87
static int32_t last
Definition: ppagelist.c:29
static int32_t first
Definition: ppagelist.c:29
bstring c int memset(void *s, int c, int length)
#define status
C API: Unicode string handling functions.
#define str(s)
Definition: sh6.c:399
#define int32_t
Definition: stdint.in.h:167
#define int64_t
Definition: stdint.in.h:194
Definition: ucurr.cpp:373
CReg * next
Definition: ucurr.cpp:374
static const UChar * get(const char *id)
Definition: ucurr.cpp:430
static void cleanup(void)
Definition: ucurr.cpp:449
CReg(const UChar *_iso, const char *_id)
Definition: ucurr.cpp:378
char id[157]
Definition: ucurr.cpp:376
static UBool unreg(UCurrRegistryKey key)
Definition: ucurr.cpp:411
static UCurrRegistryKey reg(const UChar *_iso, const char *_id, UErrorCode *status)
Definition: ucurr.cpp:391
UChar iso[3+1]
Definition: ucurr.cpp:375
const char * currency
Definition: ucurr.cpp:1703
uint32_t currType
Definition: ucurr.cpp:1704
int32_t totalCurrencySymbolCount
Definition: ucurr.cpp:1355
CurrencyNameStruct * currencySymbols
Definition: ucurr.cpp:1354
CurrencyNameStruct * currencyNames
Definition: ucurr.cpp:1351
int32_t totalCurrencyNameCount
Definition: ucurr.cpp:1352
int32_t currencyNameLen
Definition: ucurr.cpp:833
UChar * currencyName
Definition: ucurr.cpp:832
const char * IsoCode
Definition: ucurr.cpp:831
UDate from
Definition: ucurr.cpp:53
UDate to
Definition: ucurr.cpp:54
const UChar * isoCode
Definition: ucurr.cpp:52
uint32_t listIdx
Definition: ucurr.cpp:1693
uint32_t currType
Definition: ucurr.cpp:1692
void * context
Definition: uenumimp.h:113
Definition: ulist.cpp:26
Definition: inftrees.h:24
Definition: mendex.h:20
Definition: regions.h:31
Definition: sh.h:1345
short length
Definition: plain2.h:55
int j
Definition: t4ht.c:1589
#define key
Definition: tex2xindy.c:753
found
Definition: tex4ht.c:5000
#define U_ASSERT(exp)
Definition: uassert.h:37
@ R
Definition: ubidiimp.h:46
@ L
Definition: ubidiimp.h:45
@ UCLN_COMMON_CURRENCY
Definition: ucln_cmn.h:47
static const char CURRENCIES_VARIANT[]
Definition: ucurr.cpp:95
static icu::UInitOnce gIsoCodesInitOnce
Definition: ucurr.cpp:100
static void populateCurrSymbolsEquiv(icu::Hashtable *hash, UErrorCode &status)
Definition: ucurr.cpp:2178
static int currencyNameComparator(const void *a, const void *b)
Definition: ucurr.cpp:848
static const char * ucurr_nextCurrencyList(UEnumeration *enumerator, int32_t *resultLength, UErrorCode *)
Definition: ucurr.cpp:2031
#define UCURR_MATCHES_BITMASK(variable, typeToMatch)
Definition: ucurr.cpp:2012
static UBool fallback(char *loc)
Definition: ucurr.cpp:604
static const struct CurrencyList gCurrencyList[]
static void releaseCacheEntry(CurrencyNameCacheEntry *cacheEntry)
Definition: ucurr.cpp:1488
static UMutex gCRegLock
Definition: ucurr.cpp:368
static const UHashtable * gIsoCodes
Definition: ucurr.cpp:99
#define CURRENCY_NAME_CACHE_NUM
Definition: ucurr.cpp:1365
#define ISO_CURRENCY_CODE_LENGTH
Definition: ucurr.cpp:72
#define MIN(a, b)
Definition: ucurr.cpp:839
static const char CURRENCIES_FORMAL[]
Definition: ucurr.cpp:94
static void linearSearch(const CurrencyNameStruct *currencyNames, int32_t begin, int32_t end, const UChar *text, int32_t textLen, int32_t *partialMatchLen, int32_t *maxMatchLen, int32_t *maxMatchIndex)
Definition: ucurr.cpp:1256
static const UEnumeration gEnumCurrencyList
Definition: ucurr.cpp:2147
static UBool currency_cache_cleanup(void)
Definition: ucurr.cpp:1397
static UBool currSymbolsEquiv_cleanup(void)
Definition: ucurr.cpp:248
void uprv_currencyLeads(const char *locale, icu::UnicodeSet &result, UErrorCode &ec)
Definition: ucurr.cpp:1570
static const int32_t * _findMetaData(const UChar *currency, UErrorCode &ec)
Definition: ucurr.cpp:294
static const icu::Hashtable * getCurrSymbolsEquiv()
Definition: ucurr.cpp:2237
static void ucurr_closeCurrencyList(UEnumeration *enumerator)
Definition: ucurr.cpp:2061
#define NEED_TO_BE_DELETED
Definition: ucurr.cpp:825
static void ucurr_createCurrencyList(UHashtable *isoCodes, UErrorCode *status)
Definition: ucurr.cpp:2067
static int32_t countEquivalent(const icu::Hashtable &hash, const icu::UnicodeString &s)
Definition: ucurr.cpp:209
static const int32_t MAX_POW10
Definition: ucurr.cpp:70
static const char CURRENCIES_NARROW[]
Definition: ucurr.cpp:93
static const char CURRENCY_DATA[]
Definition: ucurr.cpp:78
static void deleteCurrencyNames(CurrencyNameStruct *currencyNames, int32_t count)
Definition: ucurr.cpp:1377
static void collectCurrencyNames(const char *locale, CurrencyNameStruct **currencyNames, int32_t *total_currency_name_count, CurrencyNameStruct **currencySymbols, int32_t *total_currency_symbol_count, UErrorCode &ec)
Definition: ucurr.cpp:948
static const int32_t LAST_RESORT_DATA[]
Definition: ucurr.cpp:64
static const char VAR_DELIM
Definition: ucurr.cpp:89
static void getCurrencyNameCount(const char *loc, int32_t *total_currency_name_count, int32_t *total_currency_symbol_count)
Definition: ucurr.cpp:879
static const char CURRENCYPLURALS[]
Definition: ucurr.cpp:96
static const char CURRENCY_META[]
Definition: ucurr.cpp:80
#define MAX_CURRENCY_NAME_LEN
Definition: ucurr.cpp:828
static void deleteUnicode(void *obj)
Definition: ucurr.cpp:269
static char * myUCharsToChars(char *resultOfLen4, const UChar *currency)
Definition: ucurr.cpp:279
static const char CURRENCY_MAP[]
Definition: ucurr.cpp:83
static void searchCurrencyName(const CurrencyNameStruct *currencyNames, int32_t total_currency_count, const UChar *text, int32_t textLen, int32_t *partialMatchLen, int32_t *maxMatchLen, int32_t *maxMatchIndex)
Definition: ucurr.cpp:1295
static UBool isoCodes_cleanup(void)
Definition: ucurr.cpp:234
#define LINEAR_SEARCH_THRESHOLD
Definition: ucurr.cpp:1285
static int32_t binarySearch(const CurrencyNameStruct *currencyNames, int32_t indexInCurrencyNames, const UChar key, int32_t *begin, int32_t *end)
Definition: ucurr.cpp:1142
static const int32_t POW10[]
Definition: ucurr.cpp:67
static UChar * toUpperCase(const UChar *source, int32_t len, const char *locale)
Definition: ucurr.cpp:926
static const char DEFAULT_META[]
Definition: ucurr.cpp:86
static void deleteCacheEntry(CurrencyNameCacheEntry *entry)
Definition: ucurr.cpp:1388
static UBool currency_cleanup(void)
Definition: ucurr.cpp:495
struct UCurrencyContext UCurrencyContext
static UMutex gCurrencyCacheMutex
Definition: ucurr.cpp:1373
static CurrencyNameCacheEntry * getCacheEntry(const char *locale, UErrorCode &ec)
Definition: ucurr.cpp:1414
static int8_t currentCacheEntryIndex
Definition: ucurr.cpp:1371
static const UEnumeration defaultKeywordValues
Definition: ucurr.cpp:2526
static void initIsoCodes(UErrorCode &status)
Definition: ucurr.cpp:2159
static const icu::Hashtable * gCurrSymbolsEquiv
Definition: ucurr.cpp:103
static void idForLocale(const char *locale, char *countryAndVariant, int capacity, UErrorCode *ec)
Definition: ucurr.cpp:350
struct IsoCodeEntry IsoCodeEntry
static CurrencyNameCacheEntry * currCache[10]
Definition: ucurr.cpp:1368
static U_NAMESPACE_END void makeEquivalent(const icu::UnicodeString &lhs, const icu::UnicodeString &rhs, icu::Hashtable *hash, UErrorCode &status)
Definition: ucurr.cpp:147
static void deleteIsoCodeEntry(void *obj)
Definition: ucurr.cpp:260
static int32_t ucurr_countCurrencyList(UEnumeration *enumerator, UErrorCode *)
Definition: ucurr.cpp:2016
static void initCurrSymbolsEquiv()
Definition: ucurr.cpp:2197
static const char CURRENCIES[]
Definition: ucurr.cpp:92
static icu::UInitOnce gCurrSymbolsEquivInitOnce
Definition: ucurr.cpp:104
static void ucurr_resetCurrencyList(UEnumeration *enumerator, UErrorCode *)
Definition: ucurr.cpp:2056
#define MAX(a, b)
Definition: ucurr.cpp:843
static CReg * gCRegHead
Definition: ucurr.cpp:371
C API: Encapsulates information about a currency.
@ UCURR_UNCOMMON
Definition: ucurr.h:327
@ UCURR_NON_DEPRECATED
Definition: ucurr.h:339
@ UCURR_DEPRECATED
Definition: ucurr.h:333
@ UCURR_COMMON
Definition: ucurr.h:319
const void * UCurrRegistryKey
Definition: ucurr.h:145
UCurrNameStyle
Definition: ucurr.h:93
@ UCURR_FORMAL_SYMBOL_NAME
Definition: ucurr.h:127
@ UCURR_VARIANT_SYMBOL_NAME
Definition: ucurr.h:136
@ UCURR_SYMBOL_NAME
Definition: ucurr.h:99
@ UCURR_NARROW_SYMBOL_NAME
Definition: ucurr.h:116
@ UCURR_LONG_NAME
Definition: ucurr.h:106
UCurrencyUsage
Definition: ucurr.h:41
@ UCURR_USAGE_STANDARD
Definition: ucurr.h:48
@ UCURR_USAGE_CASH
Definition: ucurr.h:54
#define ULOC_COUNTRY_CAPACITY
Definition: uloc.h:258
#define ULOC_KEYWORDS_CAPACITY
Definition: uloc.h:277
#define ULOC_FULLNAME_CAPACITY
Definition: uloc.h:264
int32_t UChar32
Definition: umachine.h:467
#define U_CDECL_END
Definition: umachine.h:86
int8_t UBool
Definition: umachine.h:269
#define U_CAPI
Definition: umachine.h:110
#define U_CDECL_BEGIN
Definition: umachine.h:85
void umtx_initOnce(UInitOnce &uio, T *obj, void(T::*fp)())
Definition: umutex.h:114
#define U_INITONCE_INITIALIZER
Definition: umutex.h:108
Definition: obx.h:51
#define ulocimp_getRegionForSupplementalData
Definition: urename.h:1131
#define ures_getStringByKeyWithFallback
Definition: urename.h:1588
#define ulist_next_keyword_value
Definition: urename.h:1052
#define u_memcpy
Definition: urename.h:326
#define ulist_close_keyword_values_iterator
Definition: urename.h:1044
#define ures_getType
Definition: urename.h:1589
#define ucurr_getDefaultFractionDigits
Definition: urename.h:819
#define ulist_containsString
Definition: urename.h:1045
#define uenum_unextDefault
Definition: urename.h:934
#define uhash_put
Definition: urename.h:991
#define ucurr_forLocale
Definition: urename.h:817
#define ucurr_register
Definition: urename.h:829
#define ucurr_unregister
Definition: urename.h:830
#define ucurr_getRoundingIncrement
Definition: urename.h:825
#define u_austrncpy
Definition: urename.h:208
#define uhash_get
Definition: urename.h:971
#define ulist_count_keyword_values
Definition: urename.h:1046
#define uprv_parseCurrency
Definition: urename.h:1443
#define T_CString_toUpperCase
Definition: urename.h:65
#define ures_getByKeyWithFallback
Definition: urename.h:1572
#define uhash_setValueDeleter
Definition: urename.h:1002
#define uprv_isInvariantString
Definition: urename.h:1428
#define uenum_close
Definition: urename.h:925
#define ulist_resetList
Definition: urename.h:1054
#define u_terminateUChars
Definition: urename.h:399
#define ures_open
Definition: urename.h:1601
#define ures_getIntVector
Definition: urename.h:1575
#define ulist_addItemEndList
Definition: urename.h:1043
#define ures_getInt
Definition: urename.h:1574
#define ucurr_openISOCurrencies
Definition: urename.h:828
#define ures_getKey
Definition: urename.h:1576
#define uhash_hashChars
Definition: urename.h:974
#define uprv_getStaticCurrencyName
Definition: urename.h:1422
#define ulist_reset_keyword_values_iterator
Definition: urename.h:1055
#define u_charsToUChars
Definition: urename.h:220
#define ures_hasNext
Definition: urename.h:1599
#define ures_getNextResource
Definition: urename.h:1582
#define ulist_createEmptyList
Definition: urename.h:1047
#define ucurr_getDefaultFractionDigitsForUsage
Definition: urename.h:820
#define ures_getStringByIndex
Definition: urename.h:1586
#define uloc_getParent
Definition: urename.h:1094
#define ucurr_getName
Definition: urename.h:822
#define u_strToUpper
Definition: urename.h:373
#define uloc_getName
Definition: urename.h:1093
#define ures_getSize
Definition: urename.h:1584
#define uhash_close
Definition: urename.h:957
#define ures_getByKey
Definition: urename.h:1571
#define uloc_getKeywordValue
Definition: urename.h:1088
#define uprv_malloc
Definition: urename.h:1435
#define ures_getStringByKey
Definition: urename.h:1587
#define u_strcpy
Definition: urename.h:382
#define ulist_deleteList
Definition: urename.h:1048
#define ures_initStackObject
Definition: urename.h:1600
#define ucurr_isAvailable
Definition: urename.h:827
#define uprv_free
Definition: urename.h:1414
#define uhash_open
Definition: urename.h:989
#define ures_getUTF8StringByKey
Definition: urename.h:1593
#define ucurr_forLocaleAndDate
Definition: urename.h:818
#define ucln_common_registerCleanup
Definition: urename.h:604
#define ulist_getListSize
Definition: urename.h:1050
#define ures_getByIndex
Definition: urename.h:1570
#define ulist_getNext
Definition: urename.h:1051
#define umtx_lock
Definition: urename.h:1165
#define umtx_unlock
Definition: urename.h:1166
#define ures_getString
Definition: urename.h:1585
#define uhash_compareChars
Definition: urename.h:959
#define uhash_hashUChars
Definition: urename.h:978
#define ucurr_getNumericCode
Definition: urename.h:823
#define uhash_compareUChars
Definition: urename.h:963
#define u_UCharsToChars
Definition: urename.h:205
#define ures_close
Definition: urename.h:1563
#define ucurr_getKeywordValuesForLocale
Definition: urename.h:821
#define ucurr_getRoundingIncrementForUsage
Definition: urename.h:826
#define ures_openDirect
Definition: urename.h:1603
#define u_strlen
Definition: urename.h:384
#define ucurr_countCurrencies
Definition: urename.h:816
#define ucurr_getPluralName
Definition: urename.h:824
C API: Resource Bundle.
@ URES_TABLE
Definition: ures.h:80
static const char * locale
Definition: uresb.c:52
#define U_ICUDATA_CURR
Definition: ureslocs.h:21
C API: 16-bit Unicode handling macros.
#define U16_GET(s, start, i, length, c)
Definition: utf16.h:201
@ start
Definition: preamble.c:52
Basic definitions for ICU, for both C and C++ APIs.
#define U_DATE_MIN
Definition: utypes.h:224
UErrorCode
Definition: utypes.h:431
@ U_MISSING_RESOURCE_ERROR
Definition: utypes.h:468
@ 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_STRING_NOT_TERMINATED_WARNING
Definition: utypes.h:447
@ U_INVALID_FORMAT_ERROR
Definition: utypes.h:469
@ U_UNSUPPORTED_ERROR
Definition: utypes.h:482
@ U_ZERO_ERROR
Definition: utypes.h:465
@ U_USING_FALLBACK_WARNING
Definition: utypes.h:437
@ U_USING_DEFAULT_WARNING
Definition: utypes.h:441
#define U_FAILURE(x)
Definition: utypes.h:735
#define U_SUCCESS(x)
Definition: utypes.h:730
double UDate
Definition: utypes.h:203
#define U_DATE_MAX
Definition: utypes.h:218
#define end(cp)
Definition: zic.c:71