--- psiconv/trunk/lib/psiconv/data.h 2001/01/22 20:36:50 97 +++ psiconv/trunk/lib/psiconv/data.h 2001/01/29 21:57:05 98 @@ -420,16 +420,30 @@ psiconv_triple_t show_vertical_scrollbar; } *psiconv_sheet_status_section; -typedef struct psiconv_sheet_formula_s +typedef enum psiconv_formula_type { - int dummy; -} *psiconv_sheet_formula; + psiconv_formula_unknown, + psiconv_formula_int, + psiconv_formula_float, + psiconv_formula_string +} psiconv_formula_type_t; -typedef psiconv_list psiconv_sheet_formula_list; /* Of struct psiconv_formula */ +typedef psiconv_list psiconv_formula_list; /* Of struct psiconv_formula_s */ + +typedef struct psiconv_formula_s +{ + psiconv_formula_type_t type; + union { + psiconv_u32 d_int; + double d_real; + char *d_string; + psiconv_formula_list d_subformulas; + } data; +} *psiconv_formula; typedef struct psiconv_sheet_workbook_section_s { - psiconv_sheet_formula_list formulas; + psiconv_formula_list formulas; } *psiconv_sheet_workbook_section; typedef struct psiconv_sheet_f_s @@ -513,8 +527,8 @@ extern void psiconv_free_word_style(psiconv_word_style style); extern void psiconv_free_word_styles_section (psiconv_word_styles_section styles); -extern void psiconv_free_sheet_formula(psiconv_sheet_formula formula); -extern void psiconv_free_sheet_formula_list(psiconv_sheet_formula_list list); +extern void psiconv_free_formula(psiconv_formula formula); +extern void psiconv_free_formula_list(psiconv_formula_list list); extern void psiconv_free_sheet_status_section (psiconv_sheet_status_section section); extern void psiconv_free_sheet_f(psiconv_sheet_f file);