locmap.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. ******************************************************************************
  5. *
  6. * Copyright (C) 1996-2013, International Business Machines
  7. * Corporation and others. All Rights Reserved.
  8. *
  9. ******************************************************************************
  10. *
  11. * File locmap.h : Locale Mapping Classes
  12. *
  13. *
  14. * Created by: Helena Shih
  15. *
  16. * Modification History:
  17. *
  18. * Date Name Description
  19. * 3/11/97 aliu Added setId().
  20. * 4/20/99 Madhu Added T_convertToPosix()
  21. * 09/18/00 george Removed the memory leaks.
  22. * 08/23/01 george Convert to C
  23. *============================================================================
  24. */
  25. #ifndef LOCMAP_H
  26. #define LOCMAP_H
  27. #include "unicode/utypes.h"
  28. #define LANGUAGE_LCID(hostID) (uint16_t)(0x03FF & hostID)
  29. U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char* posixID, int32_t posixIDCapacity, UErrorCode* status);
  30. /* Don't call these functions directly. Use uloc_getLCID instead. */
  31. U_CAPI uint32_t uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status); // Leverage platform conversion if possible
  32. U_CAPI uint32_t uprv_convertToLCID(const char* langID, const char* posixID, UErrorCode* status);
  33. #endif /* LOCMAP_H */