Last change
on this file since b93c544 was
634cb80,
checked in by Peter A. Buhr <pabuhr@…>, 12 months ago
|
formatting
|
-
Property mode set to
100644
|
File size:
636 bytes
|
Line | |
---|
1 | #include "Demangle.h" |
---|
2 | #include <iostream> |
---|
3 | #include <fstream> |
---|
4 | |
---|
5 | void demangleAndPrint(const std::string & mangleName) { |
---|
6 | char * demangleName = cforall_demangle(mangleName.c_str(), 0); |
---|
7 | std::cout << mangleName << " => " << demangleName << std::endl; |
---|
8 | free(demangleName); |
---|
9 | } |
---|
10 | |
---|
11 | int main(int argc, char * argv[]) { |
---|
12 | char const * fileName = (1 < argc) ? argv[1] : "in-demangle.txt"; |
---|
13 | std::ifstream in(fileName); |
---|
14 | |
---|
15 | std::string line; |
---|
16 | while (std::getline(in, line)) { |
---|
17 | if (line.empty()) { |
---|
18 | std::cout << "=================================" << std::endl; |
---|
19 | } else if (line[0] == '#') { |
---|
20 | continue; |
---|
21 | } else { |
---|
22 | demangleAndPrint(line); |
---|
23 | } |
---|
24 | } |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.