History

core ejected

Ge Wang committed 9 years ago

Commit d38351c1 parent 74cf4d4158 files · +0 −196800Browse files

Showing the changes to src/scripts/raw2code.cpp (1 of 158 files). Show all

Unified · Split

src/scripts/raw2code.cpp+22−0
@@ -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+

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t