--- psiconv/trunk/lib/psiconv/data.c 2001/01/17 00:05:08 94 +++ psiconv/trunk/lib/psiconv/data.c 2001/01/17 12:04:12 95 @@ -43,6 +43,8 @@ static psiconv_word_status_section psiconv_empty_word_status_section(void); static psiconv_word_f psiconv_empty_word_f(void); static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void); +static psiconv_sheet_workbook_section + psiconv_empty_sheet_workbook_section(void); static psiconv_sheet_f psiconv_empty_sheet_f(void); static psiconv_texted_f psiconv_empty_texted_f(void); static psiconv_paint_data_section psiconv_empty_paint_data_section(void); @@ -544,11 +546,18 @@ free(section); } +void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) +{ + if (section) + free(section); +} + void psiconv_free_sheet_f(psiconv_sheet_f file) { if (file) { psiconv_free_page_layout_section(file->page_sec); psiconv_free_sheet_status_section(file->status_sec); + psiconv_free_sheet_workbook_section(file->workbook_sec); free(file); } } @@ -955,6 +964,14 @@ return result; } +psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void) +{ + psiconv_sheet_workbook_section result; + if (!(result = malloc(sizeof(*result)))) + return NULL; + return result; +} + psiconv_sheet_f psiconv_empty_sheet_f(void) { psiconv_sheet_f result; @@ -964,7 +981,11 @@ goto ERROR2; if (!(result->status_sec = psiconv_empty_sheet_status_section())) goto ERROR3; + if (!(result->workbook_sec = psiconv_empty_sheet_workbook_section())) + goto ERROR4; return result; +ERROR4: + psiconv_free_sheet_status_section(result->status_sec); ERROR3: psiconv_free_page_layout_section(result->page_sec); ERROR2: