]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
*: Remove trailing white space
authorAlejandro Colomar <alx@kernel.org>
Wed, 22 Nov 2023 16:23:23 +0000 (17:23 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 24 Nov 2023 11:22:52 +0000 (12:22 +0100)
Scripted change:

$ grep -rl '\s$' | xargs sed -i 's/ * * *$//g'

Signed-off-by: Alejandro Colomar <alx@kernel.org>
13 files changed:
LICENSES/BSD-2-Clause.txt
LICENSES/BSD-3-Clause.txt
LICENSES/Linux-man-pages-copyleft-var.txt
scripts/FIXME_list.sh
scripts/README
scripts/add_parens_for_own_funcs.sh
scripts/convert_to_utf_8.sh
scripts/find_dots_no_parens.sh
scripts/find_repeated_words.sh
scripts/find_slashes_no_parens.sh
scripts/man_show_fixme.sh
scripts/unformat_parens.sh
share/lint/mandoc/mdoc.ignore.grep

index 5f662b354cd40cd5339d5aa05d74b15405138230..eb3c575b88d226e12e2f60b4d597e7296e43a41b 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (c) <year> <owner> 
+Copyright (c) <year> <owner>
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
index ea890afbc70c94011b765722a95e2c8c7d4f1233..086d3992cb3a8f7000127bda96d6cbe673c8e788 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (c) <year> <owner>. 
+Copyright (c) <year> <owner>.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
index 1742303553b29dfde3ccb6318fac4ba5d2743250..79e836982d97a2f47352c5b9adc2142cd0d62212 100644 (file)
@@ -1,16 +1,16 @@
-Permission is granted to make and distribute verbatim copies of 
-this manual provided the copyright notice and this permission 
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission
 notice are preserved on all copies.
 
-Permission is granted to copy and distribute modified versions of 
-this manual under the conditions for verbatim copying, provided 
-that the entire resulting derived work is distributed under the 
+Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided
+that the entire resulting derived work is distributed under the
 terms of a permission notice identical to this one.
 
-Since the Linux kernel and libraries are constantly changing, this 
-manual page may be incorrect or out-of-date. The author(s) assume 
-no responsibility for errors or omissions, or for damages resulting 
+Since the Linux kernel and libraries are constantly changing, this
+manual page may be incorrect or out-of-date. The author(s) assume
+no responsibility for errors or omissions, or for damages resulting
 from the use of the information contained herein.
 
-Formatted or processed versions of this manual, if unaccompanied by 
+Formatted or processed versions of this manual, if unaccompanied by
 the source, must acknowledge the copyright and authors of this work.
index 59ba3c0cb9b0b9a426cb67e89ac255777a01372d..cdaef7691c11268a1747042e3f6f048f69c294ff 100755 (executable)
@@ -9,7 +9,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -23,7 +23,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -40,10 +40,10 @@ while getopts "a" optname; do
         # Even show FIXMEs that aren't generally interesting.  (Typically
        # these FIXMEs are notes to the maintainer to reverify something
        # at a future date.)
-    
-       show_all="y"    
+
+       show_all="y"
         ;;
-    
+
     *)  echo "Unknown option: $OPTARG"
        exit 1
        ;;
@@ -64,15 +64,15 @@ for dir in "$@"; do
     do
         cat "$page" | awk -v SHOW_ALL=$show_all -v PAGE_NAME="$page" \
            '
-            BEGIN { 
-               page_FIXME_cnt = 0; 
+            BEGIN {
+               page_FIXME_cnt = 0;
            }
-           
-           /FIXME/ { 
-    
+
+           /FIXME/ {
+
                 # /.\" FIXME . / ==> do not display this FIXME, unless
                 # -a command-line option was supplied
-               
+
                if ($0 ~ /^\.\\" FIXME \./ )
                    FIXME_type = "hidden"
                else if ($0 ~ /^\.\\" FIXME *\?/ )
@@ -85,26 +85,26 @@ for dir in "$@"; do
                        print PAGE_NAME;
                    }
                    page_FIXME_cnt++;
-                   
-                   finished = 0; 
-                   do { 
-                       print $0; 
-                       
-                       # Implicit end of FIXME is end-of-file or a line 
+
+                   finished = 0;
+                   do {
+                       print $0;
+
+                       # Implicit end of FIXME is end-of-file or a line
                        # that is not a comment
-    
+
                        if (getline == 0)
                            finished = 1;
-    
-                       if (!($0 ~ /^.\\"/)) 
+
+                       if (!($0 ~ /^.\\"/))
                            finished = 1;
-        
+
                         # /.\" .$/ ==> Explicit end of FIXME
-        
-                       if ($0 ~ /^.\\" \.$/) 
+
+                       if ($0 ~ /^.\\" \.$/)
                            finished = 1;
                    } while (!finished);
-    
+
                    print "";
                 }
            }
index 6b29c54c1f37a30c83a35ed196d7375229b6146f..2ad6bc8a820f68526db257871e1fef442142126e 100644 (file)
@@ -1,4 +1,4 @@
 The files in this directory are scripts for man-pages maintenance tasks.
-They may be useful for downstream man-pages package maintainers or for 
+They may be useful for downstream man-pages package maintainers or for
 man-pages translators. This directory does not contain any files that
 need to be installed in order to use the manual pages.
index 1bf6d2ac6e2bb9cc47962ff0dafdccd009d6453d..49ec62923a3ce4e32798aaba6dbc79a7c9eb508b 100755 (executable)
@@ -8,13 +8,13 @@
 # The problem is how to determine what is a "function name".
 # The approach this script takes is the following:
 #
-#   For each manual page named in the command line that contains 
+#   For each manual page named in the command line that contains
 #           more than one line (i.e., skip man-page link files)
 #       Create a set of names taken from the .SH section of the
-#               page and from grepping all pages for names that 
+#               page and from grepping all pages for names that
 #               have .so links to this page
 #       For each name obtained above
-#           If we can find something that looks like a prototype on 
+#           If we can find something that looks like a prototype on
 #                   the page, then
 #               Try to substitute instances of that name on the page.
 #                   (instances are considered to be words formatted
@@ -37,7 +37,7 @@
 #
 # and take a good look at the output.  In particular, you can scan
 # the output for *possible* problems by looking for the pattern: /^%%%/
-# The script's output should be enough to help you determine if the 
+# The script's output should be enough to help you determine if the
 # problem is real or not.
 #
 # Suggested usage (in this case to fix pages in Section 2):
@@ -48,7 +48,7 @@
 # Use the "-n" option for a dry run, in order to see what would be
 # done, without actually doing it.
 #
-# (And, yes, there are many ways that this script could probably be 
+# (And, yes, there are many ways that this script could probably be
 # made to work faster...)
 #
 ######################################################################
@@ -58,7 +58,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -66,7 +66,7 @@
 # (http://www.gnu.org/licenses/gpl-2.0.html).
 #
 #
-# 
+#
 
 file_base="tmp.$(basename $0)"
 
@@ -96,7 +96,7 @@ done
 
 shift $(( $OPTIND - 1 ))
 
-# Only process files with > 1 line -- single-line files are link files 
+# Only process files with > 1 line -- single-line files are link files
 
 for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
     grep -v '^total'); do
@@ -108,8 +108,8 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
     # be our guesses about function names to look for
 
     sh_nlist=$(cat $page | \
-        awk 'BEGIN { p = 0 } 
-             /^\.SH NAME/     { p = NR } 
+        awk 'BEGIN { p = 0 }
+             /^\.SH NAME/     { p = NR }
             /^.SH/ && NR > p { p = 0 }     # Stop at the next .SH directive
             p > 0 && NR > p  { print $0 }  # These are the lines between
                                            # the two .SH directives
@@ -117,8 +117,8 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
     sh_nlist=$(echo $sh_nlist | sed -e 's/ *\\-.*//' -e 's/, */ /g')
     echo "### .SH name list:" $sh_nlist
 
-    # Some pages like msgop.2 don't actually list the function names in 
-    # the .SH section -- but we can try using link pages to give us 
+    # Some pages like msgop.2 don't actually list the function names in
+    # the .SH section -- but we can try using link pages to give us
     # another guess at the right function names to look for
 
     so_nlist=$(grep -l "^\\.so.*/$(echo $page| \
@@ -128,11 +128,11 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
     echo "### .so name list:" $so_nlist
 
     # Combine the two lists, eliminate duplicates
-    
+
     nlist=$(echo $sh_nlist $so_nlist | tr ' ' '\012' | sort -u)
 
     maybechanged=0
-    
+
     cp $page $work_dst_file
     rm -f $matches_for_all_names; # touch $matches_for_all_names
 
@@ -146,7 +146,7 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
         echo "########## trying $rname ##########"
 
        rm -f $matches_for_this_name
-       
+
         grep "^.BR* $name *$" $page | \
            >> $matches_for_this_name
         grep "^.BR $name [^(\"]$" $page | \
@@ -155,7 +155,7 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
            >> $matches_for_this_name
         grep '\\fB'"$name"'\\f[PR]$' $page | \
            >> $matches_for_this_name
-       
+
        cat $matches_for_this_name | sed -e 's/^/### MATCH: /'
        cat $matches_for_this_name >> $matches_for_all_names
 
@@ -163,10 +163,10 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
        # like a function prototype for this name in the page
 
         if grep -q "$name *(" $page || \
-           grep -q "$name\\\\f.[\\ ]*(" $page; then 
+           grep -q "$name\\\\f.[\\ ]*(" $page; then
 
            # '.B name$'
-           # '.BR name [^("]*$      
+           # '.BR name [^("]*$
            # (The use of [^"] in the above eliminates lines
            # like: .BR func " and " func
            # Those lines better be done manually.)
@@ -211,7 +211,7 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
 
     # If the file was changed, then:
     # show "diff -U" output to user;
-    # and count number of changed lines and compare it with what 
+    # and count number of changed lines and compare it with what
     # we expected, displaying a warning if it wasn't what was expected
 
     if test $maybechanged -ne 0 && ! cmp -s $page $work_dst_file; then
@@ -220,7 +220,7 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
         made_matches=$(diff -U 0 $page $work_dst_file | grep '^\+[^+]' | \
                wc -l | awk '{print $1}')
 
-       # The following line makes the changes -- comment it out if you 
+       # The following line makes the changes -- comment it out if you
         # just want to do a dry run to see what changes would be made.
 
        if test $really_do_it -ne 0; then
@@ -242,8 +242,8 @@ for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
         echo "%%%%%%%%%% WARNING: NOT ENOUGH MATCHES: " \
            "$made_matches < $min_match"
     fi
-    
-done 
+
+done
 
 # clean up
 
index 28f5a72cf8c7be1332a9ad95d47d066dd4443d1d..b0d222c1270dfd93f42661f490af964720550d99 100755 (executable)
@@ -17,7 +17,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
index 79d1c321cbaf03e891e456b27a422c8ea6467c37..27072d35c86e9e750c761224a4140b1e43949cb6 100755 (executable)
@@ -8,13 +8,13 @@
 # This script is designed to help with "by hand" tidy-ups after
 # the automated changes made by add_parens_for_own_funcs.sh.
 #
-# The first argument to this script names a manual page directory where 
-# 'man2' and 'man3' subdirectories can be found.  The pages names in 
-# these directories are used to generate a series of regular expressions 
-# that can be used to search the manual page files that are named in 
+# The first argument to this script names a manual page directory where
+# 'man2' and 'man3' subdirectories can be found.  The pages names in
+# these directories are used to generate a series of regular expressions
+# that can be used to search the manual page files that are named in
 # the remaining command-line arguments.
 #
-# Example usage: 
+# Example usage:
 #
 #    cd man-pages-x.yy
 #    sh find_dots_no_parens.sh . man?/*.? > matches.log
@@ -26,7 +26,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -53,7 +53,7 @@ echo "This will take probably a few moments..." 1>&2
 awk_script_file=tmp.$0.awk
 rm -f $awk_script_file
 
-# We grep out a few page names that are likely to generate false 
+# We grep out a few page names that are likely to generate false
 # positives...
 
 echo '{' >> $awk_script_file
@@ -63,9 +63,9 @@ echo '    if ( myvar == "NOMATCHESFORTHIS" || ' >> $awk_script_file
 
 for page in $(
 
-       find $dir/man2/* $dir/man3/* -type f -name '*.[23]' | 
+       find $dir/man2/* $dir/man3/* -type f -name '*.[23]' |
        egrep -v '/(stderr|stdin|stdout|errno|termios|string)\..$'); do
-    
+
     base=$(basename $page | sed -e 's/\.[23]$//')
     echo "        myvar == \"$base\" ||" >> $awk_script_file
 
@@ -75,7 +75,7 @@ echo '        myvar == "NOMATCHESFORTHIS" )' >> $awk_script_file
 echo '    print $0' >> $awk_script_file
 echo '}' >> $awk_script_file
 
-grep '^\.[BRI][BRI]* [a-zA-Z0-9_][a-zA-Z0-9_]*[^a-zA-Z_]*$' $* | 
+grep '^\.[BRI][BRI]* [a-zA-Z0-9_][a-zA-Z0-9_]*[^a-zA-Z_]*$' $* |
        awk -f $awk_script_file | grep -v '([0-9]*)'
 
 rm -f $awk_script_file
index 747872e3ba29b92b5dcf1cdd1e8160691c8f1ef6..23060823fade52f4f74f5416e4c03c3b72a105a3 100755 (executable)
@@ -15,7 +15,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #
 #
 
-for file in "$@" ; do 
+for file in "$@" ; do
    # Do not process files that are redirects.
    grep -qE "^\.so man.*" "$file"
    if test $? -ne 0; then
     words=$(MANWIDTH=2000 man -l "$file" 2> /dev/null | col -b | \
        tr ' \008' '\012' | sed -e '/^$/d' | \
-       sed 's/ *$//' | 
+       sed 's/ *$//' |
        awk 'BEGIN {p=""} {if (p==$0) print p; p=$0}' | \
        grep '[a-zA-Z]' | tr '\012' ' ')
     if test -n "$words"; then
index 086faac070093f925ac854765a512cb6038bc03e..c53034ab3a46425972bac742ee0a93355dd84b14 100755 (executable)
@@ -8,13 +8,13 @@
 # This script is designed to help with "by hand" tidy-ups after
 # the automated changes made by add_parens_for_own_funcs.sh.
 #
-# The first argument to this script names a manual page directory where 
-# 'man2' and 'man3' subdirectories can be found.  The pages names in 
-# these directories are used to generate a series of regular expressions 
-# that can be used to search the manual page files that are named in 
+# The first argument to this script names a manual page directory where
+# 'man2' and 'man3' subdirectories can be found.  The pages names in
+# these directories are used to generate a series of regular expressions
+# that can be used to search the manual page files that are named in
 # the remaining command-line arguments.
 #
-# Example usage: 
+# Example usage:
 #
 #    cd man-pages-x.yy
 #    sh find_slashes_no_parens.sh . man?/*.? > matches.log
@@ -26,7 +26,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -53,14 +53,14 @@ echo "This will probably take a few minutes..." 1>&2
 regexp_file=tmp.$0.regexp
 rm -f $regexp_file
 
-# We grep out a few page names that are likely to generate false 
+# We grep out a few page names that are likely to generate false
 # positives...
 
 for page in $(
 
-       find $dir/man2/* $dir/man3/* -type f -name '*.[23]' | 
+       find $dir/man2/* $dir/man3/* -type f -name '*.[23]' |
        egrep -v '/(stderr|stdin|stdout|errno|termios|string)\..$'); do
-    
+
     base=$(basename $page | sed -e 's/\.[23]$//')
 
     echo "\\\\f[BI]$base\\\\f[PB][^(]" >> $regexp_file
index 6a42b33210c9560bfab7f954c2e1becf4420d20f..9c647458dc83c9ec3449de13773ef694a6b8fa05 100755 (executable)
@@ -7,7 +7,7 @@ for f in $*; do
     cat $f | awk '
         /^\.\\" *FIXME/ {
             if ($0 ~ /.*FIXME *\..*/) {
-               # FIXMES of the form "FIXME ." are "private" and 
+               # FIXMES of the form "FIXME ." are "private" and
                # ignored by this script
             } else {
                 sub("FIXME[: ]*", "")
index 06bbb48cd3f22a0213c6bd0d3167e73296ec2c5e..37e183aeea3894ecc4366611d1bd685e28027b77 100755 (executable)
@@ -12,7 +12,7 @@
 #       .BR name ()
 #
 # This script changes instances to the latter format.
-# It does not fix all such instances: some will have to be 
+# It does not fix all such instances: some will have to be
 # done manually.
 #
 # Use the "-n" option for a dry run, in order to see what would be
@@ -25,7 +25,7 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -56,7 +56,7 @@ done
 
 shift $(( $OPTIND - 1 ))
 
-# Only process files with > 1 line -- single-line files are link files 
+# Only process files with > 1 line -- single-line files are link files
 
 for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
     grep -v '^total'); do
index 3fe2831d0af4673b3959cf6e5310cf00a9f8675f..4c73c592ba2fc5c833e38b2fe3cc8ab89b12e2cd 100644 (file)
@@ -1,5 +1,5 @@
-STYLE: legacy man(7) date format: Dd 
-STYLE: lower case character in document title: Dt 
-STYLE: operating system explicitly specified: Os 
-STYLE: referenced manual not found: Xr 
-WARNING: cross reference to self: Xr 
+STYLE: legacy man(7) date format: Dd
+STYLE: lower case character in document title: Dt
+STYLE: operating system explicitly specified: Os
+STYLE: referenced manual not found: Xr
+WARNING: cross reference to self: Xr