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