… | |
… | |
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 | |
28 | int psiconv_parse_word_status_section(const psiconv_buffer buf, int lev, |
32 | int 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); |