… | |
… | |
163 | |
163 | |
164 | psiconv_progress(lev+2,off+len,"Going to read border thickness"); |
164 | psiconv_progress(lev+2,off+len,"Going to read border thickness"); |
165 | (*result)->thickness = psiconv_read_size(buf,lev+2,off+len,&leng,&res); |
165 | (*result)->thickness = psiconv_read_size(buf,lev+2,off+len,&leng,&res); |
166 | if (res) |
166 | if (res) |
167 | goto ERROR2; |
167 | goto ERROR2; |
|
|
168 | #if 0 |
|
|
169 | /* This seems no longer necessary to test? */ |
168 | if (((*result)->kind != psiconv_border_solid) && |
170 | if (((*result)->kind != psiconv_border_solid) && |
169 | ((*result)->kind != psiconv_border_double) && |
171 | ((*result)->kind != psiconv_border_double) && |
170 | ((*result)->thickness != 0.0) && |
172 | ((*result)->thickness != 0.0) && |
171 | (fabs((*result)->thickness - 1/20) >= 1/1000)) { |
173 | (fabs((*result)->thickness - 1/20) >= 1/1000)) { |
172 | psiconv_warn(lev+2,off, |
174 | psiconv_warn(lev+2,off, |
173 | "Border thickness specified for unlikely border type"); |
175 | "Border thickness specified for unlikely border type"); |
174 | } |
176 | } |
|
|
177 | #endif |
175 | psiconv_debug(lev+2,off+len,"Thickness: %f",(*result)->thickness); |
178 | psiconv_debug(lev+2,off+len,"Thickness: %f",(*result)->thickness); |
176 | len += leng; |
179 | len += leng; |
177 | |
180 | |
178 | psiconv_progress(lev+2,off+len,"Going to read the border color"); |
181 | psiconv_progress(lev+2,off+len,"Going to read the border color"); |
179 | if ((psiconv_parse_color(buf,lev+2,off+len,&leng,&(*result)->color))) |
182 | if ((psiconv_parse_color(buf,lev+2,off+len,&leng,&(*result)->color))) |
180 | goto ERROR2; |
183 | goto ERROR2; |
181 | len += leng; |
184 | len += leng; |
182 | |
185 | |
183 | psiconv_progress(lev+2,off+len,"Going to read the final unknown byte " |
186 | psiconv_progress(lev+2,off+len,"Going to read the final unknown byte " |
184 | "(0x01 expected)"); |
187 | "(0x00 or 0x01 expected)"); |
185 | temp = psiconv_read_u8(buf,lev+2,off + len,&res); |
188 | temp = psiconv_read_u8(buf,lev+2,off + len,&res); |
186 | if (res) |
189 | if (res) |
187 | goto ERROR3; |
190 | goto ERROR3; |
188 | if (temp != 0x01) { |
191 | if ((temp != 0x01) && (temp != 0x00)) { |
189 | psiconv_warn(lev+2,off,"Unknown last byte in border specification"); |
192 | psiconv_warn(lev+2,off,"Unknown last byte in border specification"); |
190 | psiconv_debug(lev+2,off+len, "Last byte: read %02x, expected %02x", |
193 | psiconv_debug(lev+2,off+len, "Last byte: read %02x, expected %02x or %02x", |
191 | temp,0x01); |
194 | temp,0x00,0x01); |
192 | } |
195 | } |
193 | len ++; |
196 | len ++; |
194 | |
197 | |
195 | if (length) |
198 | if (length) |
196 | *length = len; |
199 | *length = len; |