};
/* Just to store "TRUE" */
-static const UChar trueValue[] = {0x0054, 0x0052, 0x0055, 0x0045, 0x0000};
+//static const UChar trueValue[] = {0x0054, 0x0052, 0x0055, 0x0045, 0x0000};
typedef struct {
struct Lookahead lookahead[MAX_LOOKAHEAD + 1];
cleanupLookahead(ParseState* state)
{
uint32_t i;
- for (i = 0; i < MAX_LOOKAHEAD; i++)
+ for (i = 0; i <= MAX_LOOKAHEAD; i++)
{
ustr_deinit(&state->lookahead[i].value);
ustr_deinit(&state->lookahead[i].comment);
return NULL;
}
- result = reinterpret_cast<char *>(uprv_malloc(count+1));
+ result = static_cast<char *>(uprv_malloc(count+1));
if (result == NULL)
{
char filename[256] = { '\0' };
char cs[128] = { '\0' };
uint32_t line;
- int len=0;
UBool quoted = FALSE;
UCHARBUF *ucbuf=NULL;
UChar32 c = 0;
* append at the end of the loop
*/
while(c != ENDCOMMAND) {
- U_APPEND_CHAR32(c, target,len);
+ U_APPEND_CHAR32_ONLY(c, target);
c = ucbuf_getc(ucbuf, status);
}
}
/* Append UChar * after dissembling if c > 0xffff*/
if (c != (UChar32)U_EOF)
{
- U_APPEND_CHAR32(c, target,len);
+ U_APPEND_CHAR32_ONLY(c, target);
}
else
{
count = (uint32_t)uprv_strlen(string);
if (count > 0){
if((count % 2)==0){
- value = reinterpret_cast<uint8_t *>(uprv_malloc(sizeof(uint8_t) * count));
+ value = static_cast<uint8_t *>(uprv_malloc(sizeof(uint8_t) * count));
if (value == NULL)
{
uBuffer = ucbuf_getBuffer(ucbuf,&len,status);
result = string_open(state->bundle, tag, uBuffer, len, comment, status);
+ ucbuf_close(ucbuf);
+
uprv_free(pTarget);
uprv_free(filename);
U_STRING_DECL(k_type_intvector, "intvector", 9);
U_STRING_DECL(k_type_import, "import", 6);
U_STRING_DECL(k_type_include, "include", 7);
-U_STRING_DECL(k_type_reserved, "reserved", 8);
/* Various non-standard processing plugins that create one or more special resources. */
U_STRING_DECL(k_type_plugin_uca_rules, "process(uca_rules)", 18);
U_STRING_INIT(k_type_alias, "alias", 5);
U_STRING_INIT(k_type_intvector, "intvector", 9);
U_STRING_INIT(k_type_import, "import", 6);
- U_STRING_INIT(k_type_reserved, "reserved", 8);
U_STRING_INIT(k_type_include, "include", 7);
U_STRING_INIT(k_type_plugin_uca_rules, "process(uca_rules)", 18);