/[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 82 Revision 151
22 22
23#include <stdlib.h> 23#include <stdlib.h>
24 24
25#include "parse_routines.h" 25#include "parse_routines.h"
26#include "error.h" 26#include "error.h"
27
28#ifdef DMALLOC
29#include <dmalloc.h>
30#endif
27 31
28int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev, 32int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev,
29 psiconv_u32 off, int *length, 33 psiconv_u32 off, int *length,
30 psiconv_word_status_section *result) 34 psiconv_word_status_section *result)
31{ 35{
268 psiconv_progress(lev+2,off+len,"Next style: %d",i); 272 psiconv_progress(lev+2,off+len,"Next style: %d",i);
269 if (i >= psiconv_list_length((*result)->styles)) { 273 if (i >= psiconv_list_length((*result)->styles)) {
270 if (!(style = malloc(sizeof(*style)))) 274 if (!(style = malloc(sizeof(*style))))
271 goto ERROR5; 275 goto ERROR5;
272 style->hotkey = 0; 276 style->hotkey = 0;
273 if (!(psiconv_list_add((*result)->styles,style))) { 277 if (psiconv_list_add((*result)->styles,style)) {
274 free(style); 278 free(style);
275 goto ERROR5; 279 goto ERROR5;
276 } 280 }
277 psiconv_debug(lev+3,off+len,"New entry added in list"); 281 psiconv_debug(lev+3,off+len,"New entry added in list");
278 free(style); 282 free(style);
324 goto ERROR8; 328 goto ERROR8;
325 len += leng; 329 len += leng;
326 } 330 }
327 331
328 psiconv_progress(lev+2,off+len,"Reading trailing bytes"); 332 psiconv_progress(lev+2,off+len,"Reading trailing bytes");
329 for (i = 0; i < 3; i++) { 333 for (i = 0; i < psiconv_list_length((*result)->styles); i++) {
330 temp = psiconv_read_u8(buf,lev+3,off+len,&res); 334 temp = psiconv_read_u8(buf,lev+3,off+len,&res);
331 if (res) 335 if (res)
332 goto ERROR4; 336 goto ERROR4;
333 if (temp != 0xff) { 337 if (temp != 0xff) {
334 psiconv_warn(lev+3,off+len,"Unknown trailing style byte"); 338 psiconv_warn(lev+3,off+len,"Unknown trailing style byte");

Legend:
Removed from v.82  
changed lines
  Added in v.151

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