… | |
… | |
21 | #include <stdlib.h> |
21 | #include <stdlib.h> |
22 | |
22 | |
23 | #include "data.h" |
23 | #include "data.h" |
24 | #include "parse_routines.h" |
24 | #include "parse_routines.h" |
25 | |
25 | |
26 | int psiconv_parse_mbm_jumptable_section(const psiconv_buffer buf,int lev, |
26 | int psiconv_parse_jumptable_section(const psiconv_buffer buf,int lev, |
27 | psiconv_u32 off, int *length, |
27 | psiconv_u32 off, int *length, |
28 | psiconv_mbm_jumptable_section *result) |
28 | psiconv_jumptable_section *result) |
29 | { |
29 | { |
30 | int res = 0; |
30 | int res = 0; |
31 | int len = 0; |
31 | int len = 0; |
32 | psiconv_u32 listlen,temp; |
32 | psiconv_u32 listlen,temp; |
33 | int i; |
33 | int i; |
34 | |
34 | |
35 | psiconv_progress(lev+1,off+len,"Going to read the mbm jumptable section"); |
35 | psiconv_progress(lev+1,off+len,"Going to read the jumptable section"); |
36 | (*result) = psiconv_list_new(sizeof(psiconv_u32)); |
36 | (*result) = psiconv_list_new(sizeof(psiconv_u32)); |
37 | |
37 | |
38 | psiconv_progress(lev+2,off+len,"Going to read the list length"); |
38 | psiconv_progress(lev+2,off+len,"Going to read the list length"); |
39 | listlen = psiconv_read_u32(buf,lev+2,off+len); |
39 | listlen = psiconv_read_u32(buf,lev+2,off+len); |
40 | psiconv_debug(lev+2,off+len,"List length: %08x",listlen); |
40 | psiconv_debug(lev+2,off+len,"List length: %08x",listlen); |
… | |
… | |
49 | } |
49 | } |
50 | |
50 | |
51 | if (length) |
51 | if (length) |
52 | *length = len; |
52 | *length = len; |
53 | |
53 | |
54 | psiconv_progress(lev+1,off+len-1,"End of mbm jumptable section " |
54 | psiconv_progress(lev+1,off+len-1,"End of jumptable section " |
55 | "(total length: %08x)", len); |
55 | "(total length: %08x)", len); |
56 | |
56 | |
57 | return res; |
57 | return res; |
58 | } |
58 | } |
59 | |
59 | |