Skip to content

Commit

Permalink
lib/export-man: Delete trailing whitespace from man pages after export
Browse files Browse the repository at this point in the history
When generating man pages, the header line is written with a trailing
space. Add a (delete-trailing-whitespace) invocation to the file
postprocessing to get rid of this.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed Jun 8, 2023
1 parent 310f645 commit 7963ac8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/export-man.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
(replace-regexp-in-buffer "VERSION" version)
(replace-regexp-in-buffer "^.SH \"\\([^\"]+\\) - \\([^\"]+\\)\""
".SH \"NAME\"\n\\1 \\\\- \\2\n.SH \"SYNOPSIS\"")
(delete-trailing-whitespace)
(save-buffer))))

(defun export-man-page (outfile infile enabled-features version)
Expand Down
2 changes: 1 addition & 1 deletion xdp-bench/xdp-bench.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdp-bench" "8" "JUNE 2, 2023" "V1.3.1" "A simple XDP benchmarking tool"
.TH "xdp-bench" "8" "JUNE 8, 2023" "V1.3.1" "A simple XDP benchmarking tool"

.SH "NAME"
XDP-bench \- a simple XDP benchmarking tool
Expand Down
6 changes: 3 additions & 3 deletions xdp-dump/xdpdump.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdpdump" "8" "JANUARY 13, 2021" "V1.3.1" "a simple tcpdump like tool for capturing packets at the XDP layer"
.TH "xdpdump" "8" "JANUARY 13, 2021" "V1.3.1" "a simple tcpdump like tool for capturing packets at the XDP layer"

.SH "NAME"
xdpdump \- a simple tcpdump like tool for capturing packets at the XDP layer
Expand Down Expand Up @@ -146,7 +146,7 @@ actual filtering:
Interface Prio Program name Mode ID Tag Chain actions
--------------------------------------------------------------------------------------
lo <No XDP program loaded!>
eth0 xdp_dispatcher skb 10651 d51e469e988d81da
eth0 xdp_dispatcher skb 10651 d51e469e988d81da
=> 10 xdpfilt_alw_all 10669 0b394f43ab24501c XDP_PASS
\fP
.fi
Expand Down Expand Up @@ -217,7 +217,7 @@ One final example capturing specific XDP programs loaded on the interface:
Interface Prio Program name Mode ID Tag Chain actions
--------------------------------------------------------------------------------------
lo <No XDP program loaded!>
eth0 xdp_dispatcher skb 10558 d51e469e988d81da
eth0 xdp_dispatcher skb 10558 d51e469e988d81da
=> 5 xdp_test_prog_w 10576 b5a46c6e9935298c XDP_PASS
=> 10 xdp_pass 10582 3b185187f1855c4c XDP_PASS
=> 10 xdp_pass 10587 3b185187f1855c4c XDP_PASS
Expand Down
2 changes: 1 addition & 1 deletion xdp-filter/xdp-filter.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdp-filter" "8" "SEPTEMBER 5, 2022" "V1.3.1" "A simple XDP-powered packet filter"
.TH "xdp-filter" "8" "SEPTEMBER 5, 2022" "V1.3.1" "A simple XDP-powered packet filter"

.SH "NAME"
xdp-filter \- a simple XDP-powered packet filter
Expand Down
2 changes: 1 addition & 1 deletion xdp-loader/xdp-loader.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdp-loader" "8" "JUNE 7, 2023" "V1.3.1" "XDP program loader"
.TH "xdp-loader" "8" "JUNE 8, 2023" "V1.3.1" "XDP program loader"

.SH "NAME"
xdp-loader \- an XDP program loader
Expand Down
2 changes: 1 addition & 1 deletion xdp-monitor/xdp-monitor.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdp-monitor" "8" "DECEMBER 12, 2022" "V1.3.1" "A simple XDP monitoring tool"
.TH "xdp-monitor" "8" "DECEMBER 12, 2022" "V1.3.1" "A simple XDP monitoring tool"

.SH "NAME"
XDP-monitor \- a simple BPF-powered XDP monitoring tool
Expand Down
2 changes: 1 addition & 1 deletion xdp-trafficgen/xdp-trafficgen.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "xdp-trafficgen" "8" "FEBRUARY 4, 2023" "V1.3.1" "An XDP-based traffic generator"
.TH "xdp-trafficgen" "8" "FEBRUARY 4, 2023" "V1.3.1" "An XDP-based traffic generator"

.SH "NAME"
XDP-trafficgen \- an XDP-based traffic generator
Expand Down

0 comments on commit 7963ac8

Please sign in to comment.