xref: /aosp_15_r20/external/lz4/contrib/gen_manual/README.md (revision 27162e4e17433d5aa7cb38e7b6a433a09405fc7f)
1*27162e4eSAndroid Build Coastguard Workergen_manual - a program for automatic generation of manual from source code
2*27162e4eSAndroid Build Coastguard Worker==========================================================================
3*27162e4eSAndroid Build Coastguard Worker
4*27162e4eSAndroid Build Coastguard Worker#### Introduction
5*27162e4eSAndroid Build Coastguard Worker
6*27162e4eSAndroid Build Coastguard WorkerThis simple C++ program generates a single-page HTML manual from `lz4.h`.
7*27162e4eSAndroid Build Coastguard Worker
8*27162e4eSAndroid Build Coastguard WorkerThe format of recognized comment blocks is following:
9*27162e4eSAndroid Build Coastguard Worker- comments of type `/*!` mean: this is a function declaration; switch comments with declarations
10*27162e4eSAndroid Build Coastguard Worker- comments of type `/**` and `/*-` mean: this is a comment; use a `<H2>` header for the first line
11*27162e4eSAndroid Build Coastguard Worker- comments of type `/*=` and `/**=` mean: use a `<H3>` header and show also all functions until first empty line
12*27162e4eSAndroid Build Coastguard Worker- comments of type `/*X` where `X` is different from above-mentioned are ignored
13*27162e4eSAndroid Build Coastguard Worker
14*27162e4eSAndroid Build Coastguard WorkerMoreover:
15*27162e4eSAndroid Build Coastguard Worker- `LZ4LIB_API` is removed to improve readability
16*27162e4eSAndroid Build Coastguard Worker- `typedef` are detected and included even if uncommented
17*27162e4eSAndroid Build Coastguard Worker- comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold)
18*27162e4eSAndroid Build Coastguard Worker
19*27162e4eSAndroid Build Coastguard Worker
20*27162e4eSAndroid Build Coastguard Worker#### Usage
21*27162e4eSAndroid Build Coastguard Worker
22*27162e4eSAndroid Build Coastguard WorkerThe program requires 3 parameters:
23*27162e4eSAndroid Build Coastguard Worker```
24*27162e4eSAndroid Build Coastguard Workergen_manual [lz4_version] [input_file] [output_html]
25*27162e4eSAndroid Build Coastguard Worker```
26*27162e4eSAndroid Build Coastguard Worker
27*27162e4eSAndroid Build Coastguard WorkerTo compile program and generate lz4 manual we have used:
28*27162e4eSAndroid Build Coastguard Worker```
29*27162e4eSAndroid Build Coastguard Workermake
30*27162e4eSAndroid Build Coastguard Worker./gen_manual.exe 1.7.3 ../../lib/lz4.h lz4_manual.html
31*27162e4eSAndroid Build Coastguard Worker```
32