diff mbox series

[libnetfilter_queue,27/32] doc: Resolve most issues with man page generated from linux_list.h

Message ID 20240315073347.22628-28-duncan_roe@optusnet.com.au
State New
Headers show
Series [libnetfilter_queue,01/32] src: Convert nfq_open() to use libmnl | expand

Commit Message

Duncan Roe March 15, 2024, 7:33 a.m. UTC
build_man.sh has extra logic to extract documented macros into the "Name"
line.
doxygen.cfg.in excludes the list_head structure.

doxygen 1.10.0 has a bug which appends ".PP" to macro "Value:" headings.
This is fixed in the latest snapshot and should be in the next release.

Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 doxygen/build_man.sh   | 10 ++++++++++
 doxygen/doxygen.cfg.in |  1 +
 2 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/doxygen/build_man.sh b/doxygen/build_man.sh
index 0590009..b3d1989 100755
--- a/doxygen/build_man.sh
+++ b/doxygen/build_man.sh
@@ -261,6 +261,16 @@  fix_name_line(){
     [ -z "$all_funcs" ] && all_funcs=$func ||\
       all_funcs="$all_funcs, $func"
   done
+
+  # macros (if any) come after functions
+  while :
+  do mygrep '^\.SS "#' $fileC
+    [ $linnum -ne 0 ] || break
+    tail -n+$(($linnum + 1)) $fileC >$fileB
+    cp $fileB $fileC
+    func=$(cat $fileG | cut -f3 -d' ' | cut -f1 -d\()
+    [ -z "$all_funcs" ] && all_funcs=$func || all_funcs="$all_funcs, $func"
+  done
   # For now, assume name is at line 5
   head -n4 $target >$fileA
   desc=$(head -n5 $target | tail -n1 | cut -f3- -d" ")
diff --git a/doxygen/doxygen.cfg.in b/doxygen/doxygen.cfg.in
index 601d4ab..ad83581 100644
--- a/doxygen/doxygen.cfg.in
+++ b/doxygen/doxygen.cfg.in
@@ -17,6 +17,7 @@  EXCLUDE_SYMBOLS        = EXPORT_SYMBOL \
                          nfnl_subsys_handle \
                          mnl_socket \
                          ifindex_node \
+                         list_head \
                          nlif_handle \
                          nfnl_callback2 \
                          tcp_flag_word