Showing the changes to src/scripts/raw2code.cpp (1 of 158 files). Show all
Unified · Split
| @@ -0,0 +1,22 @@ | ||
| 1 | +#include <string> | |
| 2 | +#include <iostream> | |
| 3 | +#include <sstream> | |
| 4 | +#include <stdio.h> | |
| 5 | +#include <stdlib.h> | |
| 6 | +#include <string.h> | |
| 7 | +using namespace std; | |
| 8 | + | |
| 9 | + | |
| 10 | +int main( int argc, char ** argv ) | |
| 11 | +{ | |
| 12 | + for( int i = 1; i < argc; i++ ) | |
| 13 | + { | |
| 14 | + ostringstream sout; | |
| 15 | + | |
| 16 | + argv[i][strlen(argv[i])-4] = '\0'; | |
| 17 | + sout << "hexdump -bv " << argv[i] << ".raw | hex2cpp " << argv[i] << " > " << argv[i] << ".c++"; | |
| 18 | + system( sout.str().c_str() ); | |
| 19 | + cout << sout.str() << endl; | |
| 20 | + } | |
| 21 | +} | |
| 22 | + | |