summaryrefslogtreecommitdiffstats
path: root/contrib/gen_manual
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2017-01-23 15:33:03 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2017-01-23 15:33:03 (GMT)
commitd56ee32b394f95e4403ccce4a38fe633e77c752b (patch)
tree9e90f921858b10092713e3d84968c00fc26cd375 /contrib/gen_manual
parentf54c7e0e771e09ca6575148ea5a4bc4dd005e1d3 (diff)
downloadlz4-d56ee32b394f95e4403ccce4a38fe633e77c752b.zip
lz4-d56ee32b394f95e4403ccce4a38fe633e77c752b.tar.gz
lz4-d56ee32b394f95e4403ccce4a38fe633e77c752b.tar.bz2
updated gen-lz4-manual.sh
Diffstat (limited to 'contrib/gen_manual')
-rw-r--r--contrib/gen_manual/gen-lz4-manual.sh3
-rw-r--r--contrib/gen_manual/gen_manual.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/contrib/gen_manual/gen-lz4-manual.sh b/contrib/gen_manual/gen-lz4-manual.sh
index 55d31a4..73a7214 100644
--- a/contrib/gen_manual/gen-lz4-manual.sh
+++ b/contrib/gen_manual/gen-lz4-manual.sh
@@ -6,4 +6,5 @@ LIBVER_PATCH_SCRIPT=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][
LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT
echo LZ4_VERSION=$LIBVER_SCRIPT
-./gen_manual $LIBVER_SCRIPT ../../lib/lz4.h ./lz4_manual.html
+./gen_manual "lz4 $LIBVER_SCRIPT" ../../lib/lz4.h ./lz4_manual.html
+./gen_manual "lz4frame $LIBVER_SCRIPT" ../../lib/lz4frame.h ./lz4frame_manual.html
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()) {