… | |
… | |
19 | |
19 | |
20 | #include "config.h" |
20 | #include "config.h" |
21 | #include "compat.h" |
21 | #include "compat.h" |
22 | |
22 | |
23 | #include <stdlib.h> |
23 | #include <stdlib.h> |
|
|
24 | #include <string.h> |
24 | |
25 | |
25 | #include "parse.h" |
26 | #include "parse.h" |
26 | #include "parse_routines.h" |
27 | #include "parse_routines.h" |
|
|
28 | |
|
|
29 | #ifdef DMALLOC |
|
|
30 | #include <dmalloc.h> |
|
|
31 | #endif |
|
|
32 | |
27 | |
33 | |
28 | psiconv_file_type_t psiconv_file_type(psiconv_buffer buf,int *length, |
34 | psiconv_file_type_t psiconv_file_type(psiconv_buffer buf,int *length, |
29 | psiconv_header_section *result) |
35 | psiconv_header_section *result) |
30 | { |
36 | { |
31 | psiconv_header_section header; |
37 | psiconv_header_section header; |
… | |
… | |
296 | psiconv_warn(lev+2,sto, |
302 | psiconv_warn(lev+2,sto, |
297 | "Sketch section not found in the section table"); |
303 | "Sketch section not found in the section table"); |
298 | } else { |
304 | } else { |
299 | psiconv_debug(lev+2,sto, |
305 | psiconv_debug(lev+2,sto, |
300 | "Sketch section at offset %08x",applid_sec); |
306 | "Sketch section at offset %08x",applid_sec); |
301 | if ((res = psiconv_parse_sketch_section(buf,lev+2,sketch_sec,NULL,0, |
307 | if ((res = psiconv_parse_sketch_section(buf,lev+2,sketch_sec,NULL, |
302 | &(*result)->sketch_sec))) |
308 | &(*result)->sketch_sec))) |
303 | goto ERROR4; |
309 | goto ERROR4; |
304 | } |
310 | } |
305 | |
311 | |
306 | psiconv_free_application_id_section(appl_id); |
312 | psiconv_free_application_id_section(appl_id); |