… | |
… | |
42 | psiconv_character_layout basechar; |
42 | psiconv_character_layout basechar; |
43 | |
43 | |
44 | psiconv_progress(config,lev,0,"Writing page header"); |
44 | psiconv_progress(config,lev,0,"Writing page header"); |
45 | |
45 | |
46 | if (!value) { |
46 | if (!value) { |
47 | psiconv_error(config,0,psiconv_buffer_length(buf),"Null page header"); |
47 | psiconv_error(config,lev,0,"Null page header"); |
48 | res = -PSICONV_E_GENERATE; |
48 | res = -PSICONV_E_GENERATE; |
49 | goto ERROR1; |
49 | goto ERROR1; |
50 | } |
50 | } |
51 | |
51 | |
52 | if (!(basepara=psiconv_basic_paragraph_layout())) { |
52 | if (!(basepara=psiconv_basic_paragraph_layout())) { |
… | |
… | |
82 | ERROR3: |
82 | ERROR3: |
83 | psiconv_free_character_layout(basechar); |
83 | psiconv_free_character_layout(basechar); |
84 | ERROR2: |
84 | ERROR2: |
85 | psiconv_free_paragraph_layout(basepara); |
85 | psiconv_free_paragraph_layout(basepara); |
86 | ERROR1: |
86 | ERROR1: |
|
|
87 | if (res) |
|
|
88 | psiconv_error(config,lev,0,"Writing of page header failed"); |
|
|
89 | else |
|
|
90 | psiconv_progress(config,lev,0,"End of page header"); |
87 | return res; |
91 | return res; |
88 | } |
92 | } |
89 | |
93 | |
90 | int psiconv_write_page_layout_section(const psiconv_config config, |
94 | int psiconv_write_page_layout_section(const psiconv_config config, |
91 | psiconv_buffer buf, int lev, |
95 | psiconv_buffer buf, int lev, |
… | |
… | |
95 | psiconv_buffer header_buf,footer_buf; |
99 | psiconv_buffer header_buf,footer_buf; |
96 | |
100 | |
97 | psiconv_progress(config,lev,0,"Writing page layout section"); |
101 | psiconv_progress(config,lev,0,"Writing page layout section"); |
98 | |
102 | |
99 | if (!value) { |
103 | if (!value) { |
100 | psiconv_error(config,0,psiconv_buffer_length(buf),"Null page section"); |
104 | psiconv_error(config,lev,0,"Null page section"); |
101 | res = -PSICONV_E_GENERATE; |
105 | res = -PSICONV_E_GENERATE; |
102 | goto ERROR1; |
106 | goto ERROR1; |
103 | } |
107 | } |
104 | |
108 | |
105 | if ((res = psiconv_write_u32(config,buf,lev+1,value->first_page_nr))) |
109 | if ((res = psiconv_write_u32(config,buf,lev+1,value->first_page_nr))) |
… | |
… | |
136 | ERROR3: |
140 | ERROR3: |
137 | psiconv_buffer_free(footer_buf); |
141 | psiconv_buffer_free(footer_buf); |
138 | ERROR2: |
142 | ERROR2: |
139 | psiconv_buffer_free(header_buf); |
143 | psiconv_buffer_free(header_buf); |
140 | ERROR1: |
144 | ERROR1: |
|
|
145 | if (res) |
|
|
146 | psiconv_error(config,lev,0,"Writing of page layout section failed"); |
|
|
147 | else |
|
|
148 | psiconv_progress(config,lev,0,"End of page layout section"); |
141 | return res; |
149 | return res; |
142 | } |
150 | } |