diff options
Diffstat (limited to 'contrib/gen_manual/gen_manual.cpp')
-rw-r--r-- | contrib/gen_manual/gen_manual.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/gen_manual/gen_manual.cpp b/contrib/gen_manual/gen_manual.cpp index 9aece63..65abd3a 100644 --- a/contrib/gen_manual/gen_manual.cpp +++ b/contrib/gen_manual/gen_manual.cpp @@ -89,11 +89,13 @@ vector<string> get_lines(vector<string>& input, int& linenum, string terminator) /* print line with LZ4LIB_API removed and C++ comments not bold */ void print_line(stringstream &sout, string line) { - size_t spos; + size_t spos, epos; if (line.substr(0,11) == "LZ4LIB_API ") line = line.substr(11); + if (line.substr(0,12) == "LZ4FLIB_API ") line = line.substr(12); spos = line.find("/*"); - if (spos!=string::npos) { + epos = line.find("*/"); + if (spos!=string::npos && epos!=string::npos) { sout << line.substr(0, spos); sout << "</b>" << line.substr(spos) << "<b>" << endl; } else { @@ -118,7 +120,7 @@ int main(int argc, char *argv[]) { return 1; } - version = "lz4 " + string(argv[1]) + " Manual"; + version = string(argv[1]) + " Manual"; istream.open(argv[2], ifstream::in); if (!istream.is_open()) { |