/[public]/psiconv/trunk/lib/psiconv/parse_word.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/parse_word.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 168 Revision 188
159 return 0; 159 return 0;
160 160
161ERROR2: 161ERROR2:
162 free (*result); 162 free (*result);
163ERROR1: 163ERROR1:
164 psiconv_warn(config,lev+1,off,"Reading of Word Status Section failed"); 164 psiconv_error(config,lev+1,off,"Reading of Word Status Section failed");
165 if (length) 165 if (length)
166 *length = 0; 166 *length = 0;
167 if (!res) 167 if (!res)
168 return -PSICONV_E_NOMEM; 168 return -PSICONV_E_NOMEM;
169 else 169 else
211 psiconv_warn(config,lev+3,off+len, 211 psiconv_warn(config,lev+3,off+len,
212 "Normal style hotkey has unknown value (ignored)"); 212 "Normal style hotkey has unknown value (ignored)");
213 psiconv_debug(config,lev+3,off+len,"Hotkey value %08x",temp); 213 psiconv_debug(config,lev+3,off+len,"Hotkey value %08x",temp);
214 temp = 0; 214 temp = 0;
215 } 215 }
216 style->hotkey = temp & 0x000000ff; 216 style->hotkey = psiconv_unicode_from_char(config,temp);
217 if ((style->hotkey >= 32) && (style->hotkey < 127))
218 psiconv_debug(config,lev+3,off+len,"Hotkey: %c",style->hotkey);
219 else if (style->hotkey == 0x00)
220 psiconv_debug(config,lev+3,off+len,"Hotkey: <none>");
221 else
222 psiconv_debug(config,lev+3,off+len,"Hotkey: %02x",style->hotkey);
223 (*result)->normal = style; 217 (*result)->normal = style;
224 len += 0x04; 218 len += 0x04;
225 219
226 psiconv_progress(config,lev+2,off+len,"Going to read hotkeys list"); 220 psiconv_progress(config,lev+2,off+len,"Going to read hotkeys list");
227 if (!((*result)->styles = psiconv_list_new(sizeof(*style)))) 221 if (!((*result)->styles = psiconv_list_new(sizeof(*style))))
375ERROR6: 369ERROR6:
376 free(style->name); 370 free(style->name);
377ERROR5: 371ERROR5:
378 for (j = 0; j < i ;j++) { 372 for (j = 0; j < i ;j++) {
379 if (!(style = psiconv_list_get((*result)->styles,j))) { 373 if (!(style = psiconv_list_get((*result)->styles,j))) {
380 psiconv_warn(config,lev+1,off,"Massive memory corruption"); 374 psiconv_error(config,lev+1,off,"Massive memory corruption");
381 goto ERROR4; 375 goto ERROR4;
382 } 376 }
383 psiconv_free_character_layout(style->character); 377 psiconv_free_character_layout(style->character);
384 psiconv_free_paragraph_layout(style->paragraph); 378 psiconv_free_paragraph_layout(style->paragraph);
385 free(style->name); 379 free(style->name);
389ERROR3: 383ERROR3:
390 psiconv_free_word_style((*result)->normal); 384 psiconv_free_word_style((*result)->normal);
391ERROR2: 385ERROR2:
392 free (*result); 386 free (*result);
393ERROR1: 387ERROR1:
394 psiconv_warn(config,lev+1,off,"Reading of Word Status Section failed"); 388 psiconv_error(config,lev+1,off,"Reading of Word Status Section failed");
395 if (length) 389 if (length)
396 *length = 0; 390 *length = 0;
397 if (!res) 391 if (!res)
398 return -PSICONV_E_NOMEM; 392 return -PSICONV_E_NOMEM;
399 else 393 else

Legend:
Removed from v.168  
changed lines
  Added in v.188

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26