mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-3499 Remove dead code. %c has changed to pay attention to the width.
X-SVN-Rev: 15601
This commit is contained in:
parent
7f39c99522
commit
a7c7a8ddeb
2 changed files with 0 additions and 43 deletions
|
@ -190,37 +190,4 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize,
|
|||
return target;
|
||||
}
|
||||
|
||||
char*
|
||||
ufmt_unicodeToDefaultCP(const UChar *s,
|
||||
int32_t len)
|
||||
{
|
||||
int32_t size;
|
||||
char *target, *alias;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UConverter *defConverter = u_getDefaultConverter(&status);
|
||||
|
||||
if(U_FAILURE(status) || defConverter == 0)
|
||||
return 0;
|
||||
|
||||
/* perform the conversion in one swoop */
|
||||
target = (char*)
|
||||
uprv_malloc((len + 1) * ucnv_getMaxCharSize(defConverter) * sizeof(char));
|
||||
size = (len) * ucnv_getMaxCharSize(defConverter) * sizeof(char);
|
||||
if(target != 0) {
|
||||
|
||||
alias = target;
|
||||
ucnv_fromUnicode(defConverter, &alias, alias + size, &s, s + len,
|
||||
NULL, TRUE, &status);
|
||||
|
||||
|
||||
/* add the null terminator */
|
||||
*alias = 0x00;
|
||||
}
|
||||
|
||||
u_releaseDefaultConverter(defConverter);
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -142,16 +142,6 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize,
|
|||
UChar *target, int32_t tSize);
|
||||
|
||||
|
||||
/**
|
||||
* Convert a string from the Unicode to the default codepage.
|
||||
* @param s The string to convert.
|
||||
* @param len The number of characters in s.
|
||||
* @return A pointer to a newly allocated converted version of s, or 0
|
||||
* on error.
|
||||
*/
|
||||
char*
|
||||
ufmt_unicodeToDefaultCP(const UChar *s,
|
||||
int32_t len);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue