I have a long hex string (around 8000 bytes) that I want to convert into what I think is called a byte array. (Please be kind if I’ve got the name wrong.) In other words, the string begins
69636E
etc.
and I want a way to make this into a string that looks this in C source code:
0x69, 0x63, 0x6e,
etc.
Is there a tool that can do this? I’m working in Windows but can also work in a Mac.
Ideally, it would break the resulting string with a newline after every 16 bytes, but I know I can do that by hand if needed.
My goal is to replace an existing string in some C code (from the source code for the Basilisk II classic-Mac emulator). The code I’m trying to replace is the long string beginning at line 113 in this file:
posix_emu.cpp
4