--- psiconv/trunk/lib/psiconv/parse_common.c 1999/10/27 13:09:40 18 +++ psiconv/trunk/lib/psiconv/parse_common.c 2000/09/11 14:02:43 51 @@ -18,6 +18,7 @@ */ #include "config.h" +#include "compat.h" #include #include @@ -45,6 +46,16 @@ psiconv_progress(lev+2,off+len,"Going to read UID1 to UID3"); (*result)->uid1 = psiconv_read_u32(buf,lev+2,off+len); psiconv_debug(lev+2,off+len,"UID1: %08x",(*result)->uid1); + if ((*result)->uid1 == PSICONV_ID_CLIPART) { + /* That's all folks... */ + (*result)->file = psiconv_clipart_file; + (*result)->uid2 = 0; + (*result)->uid3 = 0; + (*result)->checksum = 0; + len += 4; + psiconv_debug(lev+2,off+len,"File is a Clipart file"); + goto DONE; + } if ((*result)->uid1 != PSICONV_ID_PSION5) { psiconv_warn(lev+2,off+len,"UID1 has unknown value. This is probably " "not a (parsable) Psion 5 file"); @@ -67,7 +78,10 @@ } else if ((*result)->uid3 == PSICONV_ID_TEXTED) { (*result)->file = psiconv_texted_file; psiconv_debug(lev+2,off+len,"File is a TextEd file"); - } + } 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)->uid2 == PSICONV_ID_MBM_FILE) { (*result)->file = psiconv_mbm_file; if ((*result)->uid3 != 0x00) @@ -93,7 +107,8 @@ res = -1; } len += 4; - + +DONE: if (length) *length = len; @@ -145,7 +160,7 @@ *length = len; psiconv_progress(lev+1,off+len-1,"End of section table section " - "(total length: %08x", len); + "(total length: %08x)", len); return res; } @@ -439,11 +454,11 @@ ,temp); len += 0x01; if (parse_styles) { - psiconv_progress(lev+4,off+len+psiconv_read_u32(buf,lev+4,off+len), + psiconv_progress(lev+4,off+len+psiconv_read_u32(buf,lev+4,off+len)+4, "Going to read the paragraph element base style"); temp = psiconv_read_u8(buf,lev+4, - off+len+psiconv_read_u32(buf,lev+4,off+len)); - psiconv_debug(lev+4,off+len+psiconv_read_u32(buf,lev+4,off+len), + off+len+psiconv_read_u32(buf,lev+4,off+len)+4); + psiconv_debug(lev+4,off+len+psiconv_read_u32(buf,lev+4,off+len)+4, "Style: %02x",temp); } else temp = 0x00;