
41: We place the data into the array based upon the address we pulled from the line (address1 + address2) and the byte number.39: Here, we move the line of data from the buffer into the final array.34: We check to see if we actually got data from our attempt.We store this flag to make sure we got something. It can be used to embed the contents of external files to a C or C++ program. If the function was got data, it will return true. bin2c bin2c Brought to you by: cyco130 2 Reviews Downloads: 24 This Week Last Update: Download Summary Files Reviews Support A command line tool to create C files from binary files. The hex file we want to parse (file), the buffer we hold the line data in, the int array which will serve to hold the address of this line of data, a variable to hold the number of bytes in this line. 33: We pass read_line_from_hex() our variables we wish to fill.

We loop until the we have read through all the lines we counted.

C int main ( int argc, char * argv ) // End hex_file_to_array
