--- psiconv/trunk/lib/psiconv/parse_word.c 2004/02/21 13:24:04 216 +++ psiconv/trunk/lib/psiconv/parse_word.c 2004/02/22 22:24:39 217 @@ -203,19 +203,14 @@ style->character))) goto ERROR2_3; len += leng; + /* Ugly: I really don't know whether this is right for UTF8 */ psiconv_progress(config,lev+3,off+len,"Going to read the hotkey"); - temp = psiconv_read_u32(config,buf,lev+3,off+len,&res); + style->hotkey = psiconv_unicode_read_char(config,buf,lev+3,off+len,NULL,&res); + psiconv_debug(config,lev+3,off+len,"Normal Hotkey value %08x",style->hotkey); if (res) goto ERROR2_3; - if (temp & 0xffffff00) { - psiconv_warn(config,lev+3,off+len, - "Normal style hotkey has unknown value (ignored)"); - psiconv_debug(config,lev+3,off+len,"Hotkey value %08x",temp); - temp = 0; - } - style->hotkey = psiconv_unicode_from_char(config,temp); - (*result)->normal = style; len += 0x04; + (*result)->normal = style; psiconv_progress(config,lev+2,off+len,"Going to read hotkeys list"); if (!((*result)->styles = psiconv_list_new(sizeof(*style)))) @@ -231,24 +226,13 @@ len ++; psiconv_debug(config,lev+3,off+len,"Nummer of hotkeys: %02x",nr); for (i = 0; i < nr; i ++) { - temp = psiconv_read_u32(config,buf,lev+2,off+len,&res); - if (res) - goto ERROR3_2; - if (temp & 0xffffff00) { - psiconv_warn(config,lev+3,off+len,"Style hotkey has unknown value (ignored)"); - psiconv_debug(config,lev+3,off+len,"Hotkey %d value %08x",i,temp); - temp = 0; - } - style->hotkey = temp & 0x000000ff; - if ((style->hotkey >= 32) && (style->hotkey < 127)) - psiconv_debug(config,lev+3,off+len,"Hotkey %d: %c",i,style->hotkey); - else if (style->hotkey == 0x00) - psiconv_debug(config,lev+3,off+len,"Hotkey %d: ",i); - else - psiconv_debug(config,lev+3,off+len,"Hotkey %d: %02x",i,style->hotkey); + /* Ugly: I really don't know whether this is right for UTF8 */ + style->hotkey = psiconv_unicode_read_char(config,buf,lev+3,off+len, + NULL,&res); + psiconv_debug(config,lev+3,off+len,"Hotkey %d value %08x",i,style->hotkey); + len += 0x04; if ((res = psiconv_list_add((*result)->styles,style))) goto ERROR3_2; - len += 0x04; } free(style);