|
cprover
|
#include <fstream>#include <iostream>#include <sstream>#include <vector>#include <cstring>
Include dependency graph for converter.cpp:Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
| Loads a binary file into a c array and creates c and h files to access it from code. More... | |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Loads a binary file into a c array and creates c and h files to access it from code.
This program takes two arguments, a name and a path to a file. It loads the given file (usually a .jar file) and dumps to the standard output a header file with two macros, looking like this:
The name is used as the prefix for the macros (MYNAME in the example above). The output content, when included from a C/C++ file, can be used to define an array initialized to the contents of the file, like this:
Definition at line 36 of file converter.cpp.