Update contrib.
2 **********************************************************************
3 * Copyright (C) 1999-2005, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
9 * defines variables and functions pertaining to file access, and name resolution
10 * aspect of the library
16 #include "unicode/utypes.h"
18 #if !UCONFIG_NO_CONVERSION
22 #define UCNV_AMBIGUOUS_ALIAS_MAP_BIT 0x8000
23 #define UCNV_CONVERTER_INDEX_MASK 0xFFF
24 #define UCNV_NUM_RESERVED_TAGS 2
25 #define UCNV_NUM_HIDDEN_TAGS 1
28 * \var ucnv_io_stripForCompare
29 * Remove the underscores, dashes and spaces from the name, and convert
30 * the name to lower case.
31 * @param dst The destination buffer, which is <= the buffer of name.
32 * @param dst The destination buffer, which is <= the buffer of name.
33 * @return the destination buffer.
35 #if U_CHARSET_FAMILY==U_ASCII_FAMILY
36 # define ucnv_io_stripForCompare ucnv_io_stripASCIIForCompare
37 #elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
38 # define ucnv_io_stripForCompare ucnv_io_stripEBCDICForCompare
40 # error U_CHARSET_FAMILY is not valid
43 U_CFUNC char * U_EXPORT2
44 ucnv_io_stripASCIIForCompare(char *dst, const char *name);
46 U_CFUNC char * U_EXPORT2
47 ucnv_io_stripEBCDICForCompare(char *dst, const char *name);
50 * Map a converter alias name to a canonical converter name.
51 * The alias is searched for case-insensitively, the converter name
52 * is returned in mixed-case.
53 * Returns NULL if the alias is not found.
54 * @param alias The alias name to be searched.
55 * @param pErrorCode The error code
56 * @return the converter name in mixed-case, return NULL if the alias is not found.
59 ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode);
62 * The count for ucnv_io_getAliases and ucnv_io_getAlias
63 * @param alias The alias name to be counted
64 * @param pErrorCode The error code
65 * @return the alias count
68 ucnv_io_countAliases(const char *alias, UErrorCode *pErrorCode);
71 * Search case-insensitively for a converter alias and set aliases to
72 * a pointer to the list of aliases for the actual converter.
73 * The first "alias" is the canonical converter name.
74 * The aliases are stored consecutively, in mixed case, each NUL-terminated.
75 * There are as many strings in this list as the return value specifies.
76 * Returns the number of aliases including the canonical converter name,
77 * or 0 if the alias is not found.
78 * @param alias The canonical converter name
80 * @param aliases A pointer to the list of aliases for the actual converter
81 * @return the number of aliases including the canonical converter name, or 0 if the alias is not found.
84 ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErrorCode *pErrorCode);
87 * Search case-insensitively for a converter alias and return
89 * Returns NULL if the alias is not found.
90 * @param alias The converter alias
91 * @param n The number specifies which alias to get
92 * @param pErrorCode The error code
93 * @return the (n)th alias and return NULL if the alias is not found.
96 ucnv_io_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode);
99 * Return the number of all standard names.
100 * @param pErrorCode The error code
101 * @return the number of all standard names
104 ucnv_io_countStandards(UErrorCode *pErrorCode);
107 * Return the number of all aliases (and converter names).
108 * @param pErrorCode The error code
109 * @return the number of all aliases
112 ucnv_io_countTotalAliases(UErrorCode *pErrorCode);
115 * Swap an ICU converter alias table. See ucnv_io.c.
118 U_CAPI int32_t U_EXPORT2
119 ucnv_swapAliases(const UDataSwapper *ds,
120 const void *inData, int32_t length, void *outData,
121 UErrorCode *pErrorCode);
125 #endif /* _UCNV_IO */
128 * Hey, Emacs, please set the following:
131 * indent-tabs-mode: nil