--- psiconv/trunk/lib/psiconv/parse_common.c 2000/12/15 01:16:43 65 +++ psiconv/trunk/lib/psiconv/parse_common.c 2003/11/19 21:04:06 159 @@ -22,8 +22,13 @@ #include #include -#include "data.h" #include "parse_routines.h" +#include "error.h" + +#ifdef DMALLOC +#include +#endif + static int psiconv_parse_layout_section(const psiconv_buffer buf, int lev,psiconv_u32 off, @@ -89,7 +94,10 @@ } else if ((*result)->uid3 == PSICONV_ID_SKETCH) { (*result)->file = psiconv_sketch_file; psiconv_debug(lev+2,off+len,"File is a Sketch file"); - } + } else if ((*result)->uid3 == PSICONV_ID_SHEET) { + (*result)->file = psiconv_sheet_file; + psiconv_debug(lev+2,off+len,"File is a Sheet file"); + } } else if ((*result)->uid2 == PSICONV_ID_MBM_FILE) { (*result)->file = psiconv_mbm_file; if ((*result)->uid3 != 0x00) @@ -708,6 +716,7 @@ psiconv_debug(lev+3,off+len,"Can't read element!"); } else { total ++; + in_line.object = NULL; if (!(in_line.layout = psiconv_clone_character_layout (para->base_character))) goto ERROR4; @@ -716,8 +725,8 @@ if (res) goto ERROR4; len += 1; - psiconv_debug(lev+4,off,"Type: %02x",temp); - psiconv_progress(lev+4,off, + psiconv_debug(lev+4,off+len,"Type: %02x",temp); + psiconv_progress(lev+4,off+len, "Going to read the number of characters it applies to"); in_line.length = psiconv_read_u32(buf,lev+4,len+off,&res); if (res) @@ -769,7 +778,7 @@ if (length) *length = len; - psiconv_progress(lev+1,off+len-1,"End of layout section (total length: %08x", + psiconv_progress(lev+1,off+len-1,"End of layout section (total length: %08x)", len); return 0; @@ -824,11 +833,11 @@ } int psiconv_parse_styleless_layout_section(const psiconv_buffer buf, - int lev,psiconv_u32 off, - int *length, - psiconv_text_and_layout result, - psiconv_character_layout base_char, - psiconv_paragraph_layout base_para) + int lev,psiconv_u32 off, + int *length, + psiconv_text_and_layout result, + const psiconv_character_layout base_char, + const psiconv_paragraph_layout base_para) { int res = 0; psiconv_word_styles_section styles_section;