… | |
… | |
92 | res = -PSICONV_E_GENERATE; |
92 | res = -PSICONV_E_GENERATE; |
93 | goto ERROR1; |
93 | goto ERROR1; |
94 | } |
94 | } |
95 | |
95 | |
96 | if (!(basepara=psiconv_basic_paragraph_layout())) { |
96 | if (!(basepara=psiconv_basic_paragraph_layout())) { |
|
|
97 | psiconv_error(config,lev+1,0,"Out of memory error"); |
97 | res = -PSICONV_E_NOMEM; |
98 | res = -PSICONV_E_NOMEM; |
98 | goto ERROR1; |
99 | goto ERROR1; |
99 | } |
100 | } |
100 | |
101 | |
101 | if (!(basechar=psiconv_basic_character_layout())) { |
102 | if (!(basechar=psiconv_basic_character_layout())) { |
|
|
103 | psiconv_error(config,lev+1,0,"Out of memory error"); |
102 | res = -PSICONV_E_NOMEM; |
104 | res = -PSICONV_E_NOMEM; |
103 | goto ERROR2; |
105 | goto ERROR2; |
104 | } |
106 | } |
105 | |
107 | |
106 | |
108 | |
… | |
… | |
131 | |
133 | |
132 | |
134 | |
133 | |
135 | |
134 | for (i = 0; i < psiconv_list_length(value->styles); i++) { |
136 | for (i = 0; i < psiconv_list_length(value->styles); i++) { |
135 | if (!(style = psiconv_list_get(value->styles,i))) { |
137 | if (!(style = psiconv_list_get(value->styles,i))) { |
136 | psiconv_error(config,lev,0,"Massive memory corruption"); |
138 | psiconv_error(config,lev,0,"Data structure corruption"); |
137 | res = -PSICONV_E_NOMEM; |
139 | res = -PSICONV_E_NOMEM; |
138 | goto ERROR3; |
140 | goto ERROR3; |
139 | } |
141 | } |
140 | buflen = psiconv_buffer_length(buf); |
142 | buflen = psiconv_buffer_length(buf); |
141 | if ((res = psiconv_unicode_write_char(config,buf,lev+1,style->hotkey))) |
143 | if ((res = psiconv_unicode_write_char(config,buf,lev+1,style->hotkey))) |
… | |
… | |
146 | } |
148 | } |
147 | if ((res = psiconv_write_u8(config,buf,lev+1,psiconv_list_length(value->styles)))) |
149 | if ((res = psiconv_write_u8(config,buf,lev+1,psiconv_list_length(value->styles)))) |
148 | goto ERROR3; |
150 | goto ERROR3; |
149 | for (i = 0; i < psiconv_list_length(value->styles); i++) { |
151 | for (i = 0; i < psiconv_list_length(value->styles); i++) { |
150 | if (!(style = psiconv_list_get(value->styles,i))) { |
152 | if (!(style = psiconv_list_get(value->styles,i))) { |
151 | psiconv_error(config,lev,0,"Massive memory corruption"); |
153 | psiconv_error(config,lev,0,"Data structure corruption"); |
152 | res = -PSICONV_E_NOMEM; |
154 | res = -PSICONV_E_NOMEM; |
153 | goto ERROR3; |
155 | goto ERROR3; |
154 | } |
156 | } |
155 | if (!style->name) { |
157 | if (!style->name) { |
156 | psiconv_error(config,lev,0,"Null style name"); |
158 | psiconv_error(config,lev,0,"Null style name"); |