-void writeConverterData(UConverterSharedData *mySharedData, const char *cnvName, const char *cnvDir, UErrorCode *status);
-
-static const char NLTC_SEPARATORS[9] = { '\r', '\n', '\t', ' ', '<', '>' ,'"' , 'U', '\0' };
-static const char FALLBACK_SEPARATOR = '|';
-static const char CODEPOINT_SEPARATORS[8] = { '\r', '>', '\\', 'x', '\n', ' ', '\t', '\0' };
-static const char UNICODE_CODEPOINT_SEPARATORS[6] = { '<', '>', 'U', ' ', '\t', '\0' };
-
-static const char *
-skipWhitespace(const char *s) {
- while(*s==' ' || *s=='\t') {
- ++s;
- }
- return s;
-}
-
-static int32_t
-parseCodepageBytes(const char *s, uint32_t *pBytes, const char **pEnd) {
- char *end;
- int32_t length=0;
- uint32_t bytes=0, value;
-
- while(s[0]=='\\' && s[1]=='x') {
- if(length==4) {
- return -1;
- }
- value=uprv_strtoul(s+2, &end, 16);
- s+=4;
- if(end!=s) {
- return -1;
- }
- bytes=(bytes<<8)|value;
- ++length;
- }
- if(length==0) {
- return -1;
- }
- if(pEnd!=NULL) {
- *pEnd=s;
- }
- *pBytes=bytes;
- return length;
-}
-
-/* Remove all characters followed by '#'. There is an exception if there
- * is a fallback sign '|' after the comment and the comment does not
- * start in column 0. In this case, we just blank from '#' to just
- * before the '|' in order to support the fact that IBM official .ucm
- * files have the fallback information in comments!
- */
-static char *
- removeComments (char *line)
-{
- char *pound;
-
- line = (char*)skipWhitespace(line);
- pound = uprv_strchr (line, '#');
- if (pound != NULL)
- {
- char *fallback = pound == line ? 0 : uprv_strchr(pound + 1, '|');
- if (fallback != NULL)
- {
- uprv_memset(pound, ' ', fallback-pound);
- }
- else
- {
- *pound = '\0';
- }
- }
- return line;
-}
-
-/* Returns true in c is a in set 'setOfChars', false otherwise
- */
-static UBool
- isInSet (char c, const char *setOfChars)
-{
- uint8_t i = 0;
-
- while (setOfChars[i] != '\0')
- {
- if (c == setOfChars[i++])
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Returns pointer to the next non-whitespace (or non-separator)
- */
-static int32_t
- nextTokenOffset (const char *line, const char *separators)
-{
- int32_t i = 0;
-
- while (line[i] && isInSet(line[i], separators))
- i++;
-
- return i;
-}
-
-/* Returns pointer to the next token based on the set of separators
- */
-static char *
- getToken (char *token, char *line, const char *separators)
-{
- int32_t i = nextTokenOffset (line, separators);
- int8_t j = 0;
-
- while (line[i] && (!isInSet(line[i], separators)))
- token[j++] = line[i++];
- token[j] = '\0';
-
- return line + i;
-}