summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-11-22 17:23:23 +0100
committerAlejandro Colomar <alx@kernel.org>2023-11-24 12:22:52 +0100
commit897e474ee895b4944e461cfcf81218eb64e2f017 (patch)
treef50a8a737ef3cc3a22afac75885f7ab722585618
parentaeae96f6ff55cfc95b2957957cf08f5fc9feb8f0 (diff)
*: Remove trailing white space
Scripted change: $ grep -rl '\s$' | xargs sed -i 's/ * * *$//g' Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--LICENSES/BSD-2-Clause.txt2
-rw-r--r--LICENSES/BSD-3-Clause.txt2
-rw-r--r--LICENSES/Linux-man-pages-copyleft-var.txt18
-rwxr-xr-xscripts/FIXME_list.sh48
-rw-r--r--scripts/README2
-rwxr-xr-xscripts/add_parens_for_own_funcs.sh44
-rwxr-xr-xscripts/convert_to_utf_8.sh2
-rwxr-xr-xscripts/find_dots_no_parens.sh20
-rwxr-xr-xscripts/find_repeated_words.sh6
-rwxr-xr-xscripts/find_slashes_no_parens.sh18
-rwxr-xr-xscripts/man_show_fixme.sh2
-rwxr-xr-xscripts/unformat_parens.sh6
-rw-r--r--share/lint/mandoc/mdoc.ignore.grep10
13 files changed, 90 insertions, 90 deletions
diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt
index 5f662b354..eb3c575b8 100644
--- a/LICENSES/BSD-2-Clause.txt
+++ b/LICENSES/BSD-2-Clause.txt
@@ -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:
diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt
index ea890afbc..086d3992c 100644
--- a/LICENSES/BSD-3-Clause.txt
+++ b/LICENSES/BSD-3-Clause.txt
@@ -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:
diff --git a/LICENSES/Linux-man-pages-copyleft-var.txt b/LICENSES/Linux-man-pages-copyleft-var.txt
index 174230355..79e836982 100644
--- a/LICENSES/Linux-man-pages-copyleft-var.txt
+++ b/LICENSES/Linux-man-pages-copyleft-var.txt
@@ -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.
diff --git a/scripts/FIXME_list.sh b/scripts/FIXME_list.sh
index 59ba3c0cb..cdaef7691 100755
--- a/scripts/FIXME_list.sh
+++ b/scripts/FIXME_list.sh
@@ -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 "";
}
}
diff --git a/scripts/README b/scripts/README
index 6b29c54c1..2ad6bc8a8 100644
--- a/scripts/README
+++ b/scripts/README
@@ -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.
diff --git a/scripts/add_parens_for_own_funcs.sh b/scripts/add_parens_for_own_funcs.sh
index 1bf6d2ac6..49ec62923 100755
--- a/scripts/add_parens_for_own_funcs.sh
+++ b/scripts/add_parens_for_own_funcs.sh
@@ -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
diff --git a/scripts/convert_to_utf_8.sh b/scripts/convert_to_utf_8.sh
index 28f5a72cf..b0d222c12 100755
--- a/scripts/convert_to_utf_8.sh
+++ b/scripts/convert_to_utf_8.sh
@@ -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
diff --git a/scripts/find_dots_no_parens.sh b/scripts/find_dots_no_parens.sh
index 79d1c321c..27072d35c 100755
--- a/scripts/find_dots_no_parens.sh
+++ b/scripts/find_dots_no_parens.sh
@@ -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
diff --git a/scripts/find_repeated_words.sh b/scripts/find_repeated_words.sh
index 747872e3b..23060823f 100755
--- a/scripts/find_repeated_words.sh
+++ b/scripts/find_repeated_words.sh
@@ -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
@@ -24,13 +24,13 @@
#
#
-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
diff --git a/scripts/find_slashes_no_parens.sh b/scripts/find_slashes_no_parens.sh
index 086faac07..c53034ab3 100755
--- a/scripts/find_slashes_no_parens.sh
+++ b/scripts/find_slashes_no_parens.sh
@@ -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
diff --git a/scripts/man_show_fixme.sh b/scripts/man_show_fixme.sh
index 6a42b3321..9c647458d 100755
--- a/scripts/man_show_fixme.sh
+++ b/scripts/man_show_fixme.sh
@@ -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[: ]*", "")
diff --git a/scripts/unformat_parens.sh b/scripts/unformat_parens.sh
index 06bbb48cd..37e183aee 100755
--- a/scripts/unformat_parens.sh
+++ b/scripts/unformat_parens.sh
@@ -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
diff --git a/share/lint/mandoc/mdoc.ignore.grep b/share/lint/mandoc/mdoc.ignore.grep
index 3fe2831d0..4c73c592b 100644
--- a/share/lint/mandoc/mdoc.ignore.grep
+++ b/share/lint/mandoc/mdoc.ignore.grep
@@ -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