Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wxrc:
FileToCppArray
: Byte-array initialization integer literals ar…
…e now hex; progress is optionally printed. 16 bytes are output on each line. Previously, a variable number of bytes used to be output on each line, depending on the character length of the decimal representation of each bytes. Indeed, the number of output characters used to be lower; the increase is around 20%; but the representation is nicer for some people (I hope). Progress (offset, total size, percentage) is printed (as C++ comments) if the user so demands (via e.g. `--dump-section-size 256`); in this case, progress is also printed at the beginning and at the end (of the per-file dump). Example of output (generated C++ source code): ``` // Temporary file 64h of 65h ( 99.01%) (of size 2723h) 'C:\Adder\Projects\com_github\wxWidgets\Example2.cpp$._Example2.xrc': const size_t xml_res_size_100 = 10019; const unsigned char xml_res_file_100[] = { // Offset 0h of 2723h ( 0.00%): 0x3c,0x3f,0x78,0x6d, 0x6c,0x20,0x76,0x65, 0x72,0x73,0x69,0x6f, 0x6e,0x3d,0x22,0x31, 0x2e,0x30,0x22,0x20, 0x65,0x6e,0x63,0x6f, 0x64,0x69,0x6e,0x67, 0x3d,0x22,0x55,0x54, 0x46,0x2d,0x38,0x22, 0x3f,0x3e,0x0a,0x3c, 0x72,0x65,0x73,0x6f, 0x75,0x72,0x63,0x65, 0x20,0x78,0x6d,0x6c, 0x6e,0x73,0x3d,0x22, 0x68,0x74,0x74,0x70, 0x3a,0x2f,0x2f,0x77, 0x77,0x77,0x2e,0x77, 0x78,0x77,0x69,0x64, 0x67,0x65,0x74,0x73, 0x2e,0x6f,0x72,0x67, 0x2f,0x77,0x78,0x78, 0x72,0x63,0x22,0x20, 0x76,0x65,0x72,0x73, 0x69,0x6f,0x6e,0x3d, 0x22,0x32,0x2e,0x35, 0x2e,0x33,0x2e,0x30, 0x22,0x3e,0x0a,0x20, 0x20,0x3c,0x6f,0x62, 0x6a,0x65,0x63,0x74, 0x20,0x63,0x6c,0x61, 0x73,0x73,0x3d,0x22, 0x77,0x78,0x42,0x69, 0x74,0x6d,0x61,0x70, 0x22,0x20,0x6e,0x61, 0x6d,0x65,0x3d,0x22, 0x43,0x61,0x74,0x5f, 0x30,0x30,0x30,0x30, 0x68,0x22,0x3e,0x45, 0x78,0x61,0x6d,0x70, 0x6c,0x65,0x32,0x2e, 0x63,0x70,0x70,0x24, 0x45,0x78,0x61,0x6d, 0x70,0x6c,0x65,0x5f, 0x49,0x6d,0x61,0x67, 0x65,0x73,0x5f,0x45, 0x78,0x61,0x6d,0x70, 0x6c,0x65,0x5f,0x30, 0x30,0x30,0x30,0x68, 0x2e,0x70,0x6e,0x67, 0x3c,0x2f,0x6f,0x62, 0x6a,0x65,0x63,0x74, 0x3e,0x0a,0x20,0x20, 0x3c,0x6f,0x62,0x6a, 0x65,0x63,0x74,0x20, 0x63,0x6c,0x61,0x73, 0x73,0x3d,0x22,0x77, 0x78,0x42,0x69,0x74, 0x6d,0x61,0x70,0x22, 0x20,0x6e,0x61,0x6d, 0x65,0x3d,0x22,0x43, 0x61,0x74,0x5f,0x30, 0x30,0x30,0x31,0x68, 0x22,0x3e,0x45,0x78, 0x61,0x6d,0x70,0x6c, // Offset 100h of 2723h ( 2.56%): 0x65,0x32,0x2e,0x63, 0x70,0x70,0x24,0x45, 0x78,0x61,0x6d,0x70, 0x6c,0x65,0x5f,0x49, ... // Offset 2700h of 2723h ( 99.65%): 0x70,0x6c,0x65,0x5f, 0x30,0x30,0x36,0x33, 0x68,0x2e,0x70,0x6e, 0x67,0x3c,0x2f,0x6f, 0x62,0x6a,0x65,0x63, 0x74,0x3e,0x0a,0x3c, 0x2f,0x72,0x65,0x73, 0x6f,0x75,0x72,0x63, 0x65,0x3e,0x0a // Offset 2723h of 2723h ( 100.00%). }; ```
- Loading branch information