--- psiconv/trunk/lib/psiconv/generate_texted.c 2004/02/25 20:56:43 230 +++ psiconv/trunk/lib/psiconv/generate_texted.c 2004/02/25 20:57:10 231 @@ -44,7 +44,7 @@ psiconv_progress(config,lev,0,"Writing texted section"); if (!value) { - psiconv_error(config,0,psiconv_buffer_length(buf),"Null TextEd section"); + psiconv_error(config,lev,0,"Null TextEd section"); res = -PSICONV_E_GENERATE; goto ERROR1; } @@ -90,10 +90,14 @@ if ((res = psiconv_write_u32(config,buf,lev+1,PSICONV_ID_TEXTED_TEXT))) goto ERROR2; - return psiconv_write_text_section(config,buf,lev+1,value->paragraphs); + if ((res = psiconv_write_text_section(config,buf,lev+1,value->paragraphs))) + goto ERROR2; + psiconv_progress(config,lev,0,"End of texted section"); + return 0; ERROR2: psiconv_buffer_free(*extra_buf); ERROR1: + psiconv_error(config,lev,0,"Writing of texted section failed"); return res; }