martin-helmich/libcintelhex — pull request #17 by acolomb (2014-03-22 13:27:29+00:00)
Title: Add new API function ihex_byte_copy().

This new implementation avoids the issues #12 and #14 by copying byte-wise. Therefore, no endian conversion is necessary.

An important detail is the difference to ihex_mem_copy() regarding the initialization of destination memory. This new function **does NOT zero** the destination memory prior to copying. In some applications (such as mine) this may be more desireable. If necessary, the user can still call ihex_mem_zero() in advance.

Record contents whose address lies beyond the given destination range are silently discarded instead of aborting with an IHEX_ERR_ADDRESS_OUT_OF_RANGE error code, which makes partial extraction of the ihex record data possible.

As usual, one could come up with a better function name, but I think this is rather descriptive and allows later adding ihex_word_copy() etc.