Skip to contentSkip to conversation

src: build: Stop build_man.sh from deleting short Detailed Descriptions

PATCH Applied Duncan Roe 2 participants 2 messages Sep 17, 2021 – Sep 20, 2021 netfilter

lore
Share & tools
lore

Duncan Roe

author
#0 lore raw

PATCH 1/1 src: build: Stop build_man.sh from deleting short Detailed Descriptions

An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty.

---
 doxygen/build_man.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
doxygen/build_man.sh +5 -1
index 63e02dc..852c7b8 100755
@@ -116,7 +116,11 @@ del_empty_det_desc(){
   mygrep "^\\.SH \"Detailed Description" $target
   [ $linnum -ne 0  ] || return 0
   [ $(($i - $linnum)) -eq 3 ] || return 0
-  delete_lines $linnum $(($i -1))
+  # A 1-line Detailed Description is also 3 lines long,
+  # but the 3rd line is not empty
+  i=$(($i -1))
+  [ $(tail -n+$i $target | head -n1 | wc -c) -le 2 ] || return 0
+  delete_lines $linnum $i
 }
 
 move_synopsis(){
Signature · 1 line
2.17.5
maintainer Applied
#1 lore raw
Quoted 2 lines · Duncan Roe

An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty.

applied.