| 1 |
gen_html - a program for automatic generation of zstd manual |
| 2 |
============================================================ |
| 3 |
|
| 4 |
#### Introduction |
| 5 |
|
| 6 |
This simple C++ program generates a single-page HTML manual from `zstd.h`. |
| 7 |
|
| 8 |
The format of recognized comment blocks is following: |
| 9 |
- comments of type `/*!` mean: this is a function declaration; switch comments with declarations |
| 10 |
- comments of type `/**` and `/*-` mean: this is a comment; use a `<H2>` header for the first line |
| 11 |
- comments of type `/*=` and `/**=` mean: use a `<H3>` header and show also all functions until first empty line |
| 12 |
- comments of type `/*X` where `X` is different from above-mentioned are ignored |
| 13 |
|
| 14 |
Moreover: |
| 15 |
- `ZSTDLIB_API` is removed to improve readability |
| 16 |
- `typedef` are detected and included even if uncommented |
| 17 |
- comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold) |
| 18 |
|
| 19 |
|
| 20 |
#### Usage |
| 21 |
|
| 22 |
The program requires 3 parameters: |
| 23 |
``` |
| 24 |
gen_html [zstd_version] [input_file] [output_html] |
| 25 |
``` |
| 26 |
|
| 27 |
To compile program and generate zstd manual we have used: |
| 28 |
``` |
| 29 |
make |
| 30 |
./gen_html.exe 1.1.1 ../../lib/zstd.h zstd_manual.html |
| 31 |
``` |