From 0db324e2e5d9d3347ea0e93138372fb65aac09e6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:09 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- scripts/find_dots_no_parens.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'scripts/find_dots_no_parens.sh') diff --git a/scripts/find_dots_no_parens.sh b/scripts/find_dots_no_parens.sh index 79d1c32..27072d3 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 -- cgit v1.2.3