/[public]/psiconv/trunk/lib/psiconv/data.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 97 Revision 98
41static psiconv_page_header psiconv_empty_page_header(void); 41static psiconv_page_header psiconv_empty_page_header(void);
42static psiconv_page_layout_section psiconv_empty_page_layout_section(void); 42static psiconv_page_layout_section psiconv_empty_page_layout_section(void);
43static psiconv_word_status_section psiconv_empty_word_status_section(void); 43static psiconv_word_status_section psiconv_empty_word_status_section(void);
44static psiconv_word_f psiconv_empty_word_f(void); 44static psiconv_word_f psiconv_empty_word_f(void);
45static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void); 45static psiconv_sheet_status_section psiconv_empty_sheet_status_section(void);
46static psiconv_sheet_formula_list psiconv_empty_sheet_formula_list(void); 46static psiconv_formula_list psiconv_empty_formula_list(void);
47static psiconv_sheet_workbook_section 47static psiconv_sheet_workbook_section
48 psiconv_empty_sheet_workbook_section(void); 48 psiconv_empty_sheet_workbook_section(void);
49static psiconv_sheet_f psiconv_empty_sheet_f(void); 49static psiconv_sheet_f psiconv_empty_sheet_f(void);
50static psiconv_texted_f psiconv_empty_texted_f(void); 50static psiconv_texted_f psiconv_empty_texted_f(void);
51static psiconv_paint_data_section psiconv_empty_paint_data_section(void); 51static psiconv_paint_data_section psiconv_empty_paint_data_section(void);
545{ 545{
546 if (section) 546 if (section)
547 free(section); 547 free(section);
548} 548}
549 549
550/* TODO: Free sublists, strings etc. depending on formula->type */
550void psiconv_free_sheet_formula(psiconv_sheet_formula formula) 551void psiconv_free_formula(psiconv_formula formula)
551{ 552{
552 if (formula) 553 if (formula)
553 free(formula); 554 free(formula);
554} 555}
555 556
556void psiconv_free_sheet_formula_list(psiconv_sheet_formula_list list) 557void psiconv_free_formula_list(psiconv_formula_list list)
557{ 558{
558 if (list) 559 if (list)
559 psiconv_list_free(list); 560 psiconv_list_free(list);
560} 561}
561 562
562void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section) 563void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
563{ 564{
564 if (section) { 565 if (section) {
565 psiconv_free_sheet_formula_list(section->formulas); 566 psiconv_free_formula_list(section->formulas);
566 free(section); 567 free(section);
567 } 568 }
568} 569}
569 570
570void psiconv_free_sheet_f(psiconv_sheet_f file) 571void psiconv_free_sheet_f(psiconv_sheet_f file)
977 result->cursor_row = result->cursor_column = 0; 978 result->cursor_row = result->cursor_column = 0;
978 result->sheet_display_size = result->graph_display_size = 1000; 979 result->sheet_display_size = result->graph_display_size = 1000;
979 return result; 980 return result;
980} 981}
981 982
982psiconv_sheet_formula_list psiconv_empty_sheet_formula_list(void) 983psiconv_formula_list psiconv_empty_formula_list(void)
983{ 984{
984 return psiconv_list_new(sizeof(struct psiconv_sheet_formula_s)); 985 return psiconv_list_new(sizeof(struct psiconv_formula_s));
985} 986}
986 987
987psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void) 988psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void)
988{ 989{
989 psiconv_sheet_workbook_section result; 990 psiconv_sheet_workbook_section result;
990 if (!(result = malloc(sizeof(*result)))) 991 if (!(result = malloc(sizeof(*result))))
991 goto ERROR1; 992 goto ERROR1;
992 if (!(result->formulas = psiconv_empty_sheet_formula_list())) 993 if (!(result->formulas = psiconv_empty_formula_list()))
993 goto ERROR2; 994 goto ERROR2;
994 return result; 995 return result;
995ERROR2: 996ERROR2:
996 free(result); 997 free(result);
997ERROR1: 998ERROR1:

Legend:
Removed from v.97  
changed lines
  Added in v.98

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26