diff options
Diffstat (limited to 'src/tools/imgtool/filtbas.cpp')
-rw-r--r-- | src/tools/imgtool/filtbas.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tools/imgtool/filtbas.cpp b/src/tools/imgtool/filtbas.cpp index aad1a025492..1ae9f6f8ea1 100644 --- a/src/tools/imgtool/filtbas.cpp +++ b/src/tools/imgtool/filtbas.cpp @@ -40,8 +40,8 @@ struct basictoken_tableent { - UINT8 shift; - UINT8 base; + uint8_t shift; + uint8_t base; const char *const *tokens; int num_tokens; }; @@ -50,7 +50,7 @@ struct basictoken_tableent struct basictokens { - UINT16 baseaddress; + uint16_t baseaddress; unsigned int skip_bytes : 15; unsigned int be : 1; const basictoken_tableent *entries; @@ -74,9 +74,9 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens, { imgtoolerr_t err; imgtool::stream *mem_stream; - UINT8 line_header[4]; - UINT16 line_number; //, address; - UINT8 b, shift; + uint8_t line_header[4]; + uint16_t line_number; //, address; + uint8_t b, shift; int i; int in_string = FALSE; const basictoken_tableent *token_table; @@ -104,15 +104,15 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens, /* pluck the address and line number out */ if (tokens->be) { - //address = (UINT16) + //address = (uint16_t) pick_integer_be(line_header, 0, 2); - line_number = (UINT16) pick_integer_be(line_header, 2, 2); + line_number = (uint16_t) pick_integer_be(line_header, 2, 2); } else { - //address = (UINT16) + //address = (uint16_t) pick_integer_le(line_header, 0, 2); - line_number = (UINT16) pick_integer_le(line_header, 2, 2); + line_number = (uint16_t) pick_integer_le(line_header, 2, 2); } /* write the line number */ @@ -181,16 +181,16 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens, imgtool::stream *mem_stream; char buf[1024]; int eof = FALSE; - UINT32 len; + uint32_t len; char c; int i, j, pos, in_quotes; - UINT16 line_number; - UINT8 line_header[4]; - UINT8 file_header[3]; + uint16_t line_number; + uint8_t line_header[4]; + uint8_t file_header[3]; const basictoken_tableent *token_table; const char *token; - UINT8 token_shift, token_value; - UINT16 address; + uint8_t token_shift, token_value; + uint16_t address; /* open a memory stream */ mem_stream = imgtool::stream::open_mem(nullptr, 0); @@ -239,7 +239,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens, /* determine address */ if (tokens->baseaddress != 0) { - address = tokens->baseaddress + (UINT16)mem_stream->size() + 4; + address = tokens->baseaddress + (uint16_t)mem_stream->size() + 4; } else { @@ -2970,7 +2970,7 @@ static imgtoolerr_t cocobas_writefile(imgtool::partition &partition, const char return basic_writefile(&cocobas_tokens, partition, filename, fork, sourcef, opts); } -void filter_cocobas_getinfo(UINT32 state, union filterinfo *info) +void filter_cocobas_getinfo(uint32_t state, union filterinfo *info) { switch(state) { @@ -3014,7 +3014,7 @@ static imgtoolerr_t dragonbas_writefile(imgtool::partition &partition, const cha return basic_writefile(&dragonbas_tokens, partition, filename, fork, sourcef, opts); } -void filter_dragonbas_getinfo(UINT32 state, union filterinfo *info) +void filter_dragonbas_getinfo(uint32_t state, union filterinfo *info) { switch(state) { @@ -3059,7 +3059,7 @@ static imgtoolerr_t vzbas_writefile(imgtool::partition &partition, const char *f return basic_writefile(&vzbas_tokens, partition, filename, fork, sourcef, opts); } -void filter_vzbas_getinfo(UINT32 state, union filterinfo *info) +void filter_vzbas_getinfo(uint32_t state, union filterinfo *info) { switch(state) { @@ -3103,7 +3103,7 @@ static imgtoolerr_t bml3bas_writefile(imgtool::partition &partition, const char return basic_writefile(&bml3bas_tokens, partition, filename, fork, sourcef, opts); } -void filter_bml3bas_getinfo(UINT32 state, union filterinfo *info) +void filter_bml3bas_getinfo(uint32_t state, union filterinfo *info) { switch(state) { |