/[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 94 Revision 95
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_workbook_section
47 psiconv_empty_sheet_workbook_section(void);
46static psiconv_sheet_f psiconv_empty_sheet_f(void); 48static psiconv_sheet_f psiconv_empty_sheet_f(void);
47static psiconv_texted_f psiconv_empty_texted_f(void); 49static psiconv_texted_f psiconv_empty_texted_f(void);
48static psiconv_paint_data_section psiconv_empty_paint_data_section(void); 50static psiconv_paint_data_section psiconv_empty_paint_data_section(void);
49static psiconv_pictures psiconv_empty_pictures(void); 51static psiconv_pictures psiconv_empty_pictures(void);
50static psiconv_mbm_f psiconv_empty_mbm_f(void); 52static psiconv_mbm_f psiconv_empty_mbm_f(void);
542{ 544{
543 if (section) 545 if (section)
544 free(section); 546 free(section);
545} 547}
546 548
549void psiconv_free_sheet_workbook_section(psiconv_sheet_workbook_section section)
550{
551 if (section)
552 free(section);
553}
554
547void psiconv_free_sheet_f(psiconv_sheet_f file) 555void psiconv_free_sheet_f(psiconv_sheet_f file)
548{ 556{
549 if (file) { 557 if (file) {
550 psiconv_free_page_layout_section(file->page_sec); 558 psiconv_free_page_layout_section(file->page_sec);
551 psiconv_free_sheet_status_section(file->status_sec); 559 psiconv_free_sheet_status_section(file->status_sec);
560 psiconv_free_sheet_workbook_section(file->workbook_sec);
552 free(file); 561 free(file);
553 } 562 }
554} 563}
555 564
556void psiconv_free_texted_f(psiconv_texted_f file) 565void psiconv_free_texted_f(psiconv_texted_f file)
953 result->cursor_row = result->cursor_column = 0; 962 result->cursor_row = result->cursor_column = 0;
954 result->sheet_display_size = result->graph_display_size = 1000; 963 result->sheet_display_size = result->graph_display_size = 1000;
955 return result; 964 return result;
956} 965}
957 966
967psiconv_sheet_workbook_section psiconv_empty_sheet_workbook_section(void)
968{
969 psiconv_sheet_workbook_section result;
970 if (!(result = malloc(sizeof(*result))))
971 return NULL;
972 return result;
973}
974
958psiconv_sheet_f psiconv_empty_sheet_f(void) 975psiconv_sheet_f psiconv_empty_sheet_f(void)
959{ 976{
960 psiconv_sheet_f result; 977 psiconv_sheet_f result;
961 if (!(result = malloc(sizeof(*result)))) 978 if (!(result = malloc(sizeof(*result))))
962 goto ERROR1; 979 goto ERROR1;
963 if (!(result->page_sec = psiconv_empty_page_layout_section())) 980 if (!(result->page_sec = psiconv_empty_page_layout_section()))
964 goto ERROR2; 981 goto ERROR2;
965 if (!(result->status_sec = psiconv_empty_sheet_status_section())) 982 if (!(result->status_sec = psiconv_empty_sheet_status_section()))
966 goto ERROR3; 983 goto ERROR3;
984 if (!(result->workbook_sec = psiconv_empty_sheet_workbook_section()))
985 goto ERROR4;
967 return result; 986 return result;
987ERROR4:
988 psiconv_free_sheet_status_section(result->status_sec);
968ERROR3: 989ERROR3:
969 psiconv_free_page_layout_section(result->page_sec); 990 psiconv_free_page_layout_section(result->page_sec);
970ERROR2: 991ERROR2:
971 free(result); 992 free(result);
972ERROR1: 993ERROR1:

Legend:
Removed from v.94  
changed lines
  Added in v.95

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