]> git.ipfire.org Git - thirdparty/man-pages.git/commit
Various pages: Add missing commas in SEE ALSO part II
authorKir Kolyshkin <kolyshkin@gmail.com>
Sat, 16 May 2020 23:34:25 +0000 (16:34 -0700)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 18 May 2020 19:37:48 +0000 (21:37 +0200)
commitbba4bbbd9acfbee4353ebb5956a65f4153a1e21b
tree4bde6053f0668ebacd825fbc3a649c50f717e99f
parentaa02339ca45030711b42a1af12e3ee3405c1c5c7
Various pages: Add missing commas in SEE ALSO part II

This is a sequel to commit baf17bc4f2a3f3b02d, addressing the
issues with missing commas in the middle of SEE ALSO lists that
emerged since.

The awk script from the original commit was not working and had to
be slightly modified (s/["]SEE ALSO["]/"?SEE ALSO/), otherwise it
works like a charm. Here's the fixed script and its output just
before this commit:

for f in man*/*; do
awk '
    /^.SH "?SEE ALSO/ {
sa=1; print "== " FILENAME " =="; print; next
    }
    /^\.(PP|SH)/ {
sa=0; no=0; next
    }
    /^\.BR/ {
if (sa==1) {
    print;
    if (no == 1)
print "Missing comma in " FILENAME " +" FNR-1; no=0
}
    }
    /^\.BR .*)$/ {
if (sa==1)
    no=1;
next
    }
    /\.\\"/ {next}
    /.*/ {
if (sa==1) {
    print; next
}
    }
' $f; done | grep Missing
Missing comma in man1/memusage.1 +272
Missing comma in man2/adjtimex.2 +597
Missing comma in man2/adjtimex.2 +598
Missing comma in man2/mkdir.2 +252
Missing comma in man2/sigaction.2 +1045
Missing comma in man2/sigaction.2 +1047
Missing comma in man3/mbsnrtowcs.3 +198
Missing comma in man3/ntp_gettime.3 +142
Missing comma in man3/strcmp.3 +219
Missing comma in man3/strtol.3 +302
Missing comma in man3/wcstombs.3 +120
Missing comma in man7/user_namespaces.7 +1378
Missing comma in man7/xattr.7 +198

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man1/memusage.1
man2/adjtimex.2
man2/mkdir.2
man2/sigaction.2
man3/mbsnrtowcs.3
man3/ntp_gettime.3
man3/strcmp.3
man3/strtol.3
man3/wcstombs.3
man7/user_namespaces.7
man7/xattr.7