--- psiconv/trunk/lib/psiconv/parse_common.c 2004/02/26 16:27:43 233 +++ psiconv/trunk/lib/psiconv/parse_common.c 2005/11/15 14:52:48 268 @@ -279,10 +279,9 @@ psiconv_paragraph para; psiconv_ucs2 temp; psiconv_list line; - psiconv_ucs2 *nextcharptr; int nr; - int i,j,leng; + int i,leng; char *str_copy; psiconv_progress(config,lev+1,off,"Going to parse the text section"); @@ -314,17 +313,8 @@ goto ERROR4; } if ((temp == 0x06) || (i + leng == text_len)) { - if (!(para->text = malloc(sizeof(*(para->text)) * - (psiconv_list_length(line) + 1)))) + if (!(para->text = psiconv_unicode_from_list(line))) goto ERROR4; - for (j = 0; j < psiconv_list_length(line); j++) { - if (!(nextcharptr = psiconv_list_get(line,j))) { - psiconv_error(config,lev+2,off+i+len,"Data structure corruption"); - goto ERROR5; - } - para->text[j] = *nextcharptr; - } - para->text[j] = 0; if (!(str_copy = psiconv_make_printable(config,para->text))) goto ERROR5; @@ -1236,7 +1226,6 @@ (*result)->icon_name = psiconv_read_string(config,buf,lev+2,off+len,&leng,&res); if (res) goto ERROR2; - psiconv_debug(config,lev+2,off+len,"Icon name: %s",(*result)->icon_name); len += leng; psiconv_progress(config,lev+2,off+len,"Going to read the icon width");