--- psiconv/trunk/lib/psiconv/parse_driver.c 1999/12/03 23:13:55 42 +++ psiconv/trunk/lib/psiconv/parse_driver.c 2000/12/10 20:27:27 60 @@ -24,6 +24,8 @@ #include "parse_routines.h" #include "data.h" +int psiconv_verbosity = PSICONV_VERB_WARN; + psiconv_file_type_t psiconv_file_type(psiconv_buffer buf,int *length, psiconv_header_section *result) { @@ -84,8 +86,29 @@ psiconv_u32 off, psiconv_clipart_f *result) { int res=0; + int i; + psiconv_jumptable_section table; + psiconv_clipart_section clipart; + psiconv_u32 *entry; + + psiconv_progress(lev+1,off,"Going to read a clipart file"); (*result) = malloc(sizeof(**result)); - return 0; + + psiconv_progress(lev+2,off,"Going to read the MBM jumptable"); + res |= psiconv_parse_jumptable_section(buf,lev+2,off, NULL,&table); + + psiconv_progress(lev+2,off,"Going to read the clipart sections"); + (*result)->sections = psiconv_list_new(sizeof(*clipart)); + for (i = 0; i < psiconv_list_length(table); i ++) { + entry = psiconv_list_get(table,i); + psiconv_progress(lev+3,off,"Going to read clipart section %i",i); + psiconv_parse_clipart_section(buf,lev+3,*entry,NULL,&clipart); + psiconv_list_add((*result)->sections,clipart); + } + + psiconv_free_jumptable_section(table); + psiconv_progress(lev+1,off,"End of clipart file"); + return res; } int psiconv_parse_mbm_file(const psiconv_buffer buf,int lev, psiconv_u32 off, @@ -113,7 +136,7 @@ for (i = 0; i < psiconv_list_length(table); i ++) { entry = psiconv_list_get(table,i); psiconv_progress(lev+3,off,"Going to read picture section %i",i); - psiconv_parse_paint_data_section(buf,lev+3,*entry,NULL,&paint); + psiconv_parse_paint_data_section(buf,lev+3,*entry,NULL,0,&paint); psiconv_list_add((*result)->sections,paint); }