--- psiconv/trunk/lib/psiconv/data.c 2001/01/22 20:36:50 97 +++ psiconv/trunk/lib/psiconv/data.c 2001/01/29 21:57:05 98 @@ -43,7 +43,7 @@ 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_formula_list psiconv_empty_sheet_formula_list(void); +static psiconv_formula_list psiconv_empty_formula_list(void); static psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void); static psiconv_sheet_f psiconv_empty_sheet_f(void); @@ -547,13 +547,14 @@ free(section); } -void psiconv_free_sheet_formula(psiconv_sheet_formula formula) +/* TODO: Free sublists, strings etc. depending on formula->type */ +void psiconv_free_formula(psiconv_formula formula) { - if (formula) + if (formula) free(formula); } -void psiconv_free_sheet_formula_list(psiconv_sheet_formula_list list) +void psiconv_free_formula_list(psiconv_formula_list list) { if (list) psiconv_list_free(list); @@ -562,7 +563,7 @@ void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) { if (section) { - psiconv_free_sheet_formula_list(section->formulas); + psiconv_free_formula_list(section->formulas); free(section); } } @@ -979,9 +980,9 @@ return result; } -psiconv_sheet_formula_list psiconv_empty_sheet_formula_list(void) +psiconv_formula_list psiconv_empty_formula_list(void) { - return psiconv_list_new(sizeof(struct psiconv_sheet_formula_s)); + return psiconv_list_new(sizeof(struct psiconv_formula_s)); } psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void) @@ -989,7 +990,7 @@ psiconv_sheet_workbook_section result; if (!(result = malloc(sizeof(*result)))) goto ERROR1; - if (!(result->formulas = psiconv_empty_sheet_formula_list())) + if (!(result->formulas = psiconv_empty_formula_list())) goto ERROR2; return result; ERROR2: