38 Commits

Author SHA1 Message Date
f1f6471ae8 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
2025-01-04 11:43:53 +01:00
James Youngman
e178314ae3 maint: convert tabs to spaces in C source files. 2024-06-01 21:41:05 +01:00
ea1abfa968 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
2024-01-02 09:13:29 +01:00
73d020f472 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
2023-01-01 23:51:15 +01:00
841aa66f1e maint: avoid warnings from sparse tool
https://sparse.docs.kernel.org/
Running the tool against unviled the following warnings:

  find/parser.c:328:7: warning: Using plain integer as NULL pointer
  find/parser.c:328:10: warning: Using plain integer as NULL pointer
  find/parser.c:328:13: warning: Using plain integer as NULL pointer
  find/parser.c:466:49: warning: Using plain integer as NULL pointer
  find/parser.c:656:45: warning: Using plain integer as NULL pointer
  find/print.c:1024:30: warning: Using plain integer as NULL pointer
  lib/regexprops.c:531:7: warning: symbol 'options' shadows an earlier one
  lib/regextype.c:48:24: warning: symbol 'regex_map' was not declared. Should it be static?
  locate/locate.c:131:25: warning: symbol 'check_existence' was not declared. Should it be static?
  locate/locate.c:207:12: warning: symbol 'metacharacters' was not declared. Should it be static?
  xargs/xargs.c:902:24: warning: symbol 'state' shadows an earlier one
  xargs/xargs.c:542:23: warning: Using plain integer as NULL pointer

The fixes for these findings are all trivial, so let's apply them.

* find/parser.c (parse_table): Initialize pointer-type members of
the last element with NULL instead of 0.
(get_noop): Compare to NULL as end condition of for-loop.
(find_parser): Likewise.
* find/print.c (do_fprintf): Initialize linkname with NULL instead of 0.
* lib/regexprops.c (describe_all): Rename local variable options
to regopts to avoid name shadowing.
* lib/regextype.c (regex_map): Declare static.
* locate/locate.c (check_existence): Likewise.
(metacharacters): Likewise.
* xargs/xargs.c (main): Set eof_str to NULL instead of 0.
2022-01-06 03:28:38 +01:00
db5ec614a7 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
The format of the copyright year number range in Texinfo files is
"YEAR1--YEAR2" now, i.e., with 2x '-'.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
2022-01-02 18:42:35 +01:00
c5da48bcff maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
The format of the copyright year number range in Texinfo files is
"YEAR1--YEAR2" now, i.e., with 2x '-'.
* tests/sample-test: Likewise, here to avoid starting a year number range.
* All other files: Update copyright years via the above make run.
2021-01-02 01:46:51 +01:00
f7ea96d2b8 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Likewise, here to avoid starting a year number range.
* All other files: Update copyright years via the above make run.
2020-01-01 16:22:52 +01:00
487d0701c5 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* All other files: Update copyright years via the above make run.
2019-01-04 23:47:26 +01:00
8705455ce0 maint: update copyright year number ranges
Run 'make update-copyright'.

* lib/regexprops.c (copying): Update the year number manually.
* All other files: Update copyright years via the above make run.
2018-01-01 19:27:15 +01:00
James Youngman
1b53838ddf regexprops: don't mention regex dialects we're not going to document.
* lib/regextype.c (get_regex_type_synonym): don't return regex
dialect Y as a synonym of dialect X, if we're not in fact going to
include X.  Accept a CONTEXT parameter in order to identify this
situation.  This ensures that the bug fixed in commit
e2c673cbcd stays fixed for any
permutation of regex_map.
* lib/regextype.h: update prototype of get_regex_type_synonym.
* lib/regexprops.c (describe_all): Pass the new context parameter.
* doc/regexprops.texi: regenerate this file.
2017-11-14 22:22:36 +00:00
James Youngman
e2c673cbcd regexprops: fix dangling reference to the `ed' regular expression dialect.
* lib/regextype.c (regex_map): Permute the entries to list POSIX
dialects before other ones, so that we don't end up with a
dangling reference to `ed' regular expressions when
context=findutils.  Remove trailing white space from the output.
* doc/regexprops.texi: Regenerate this file, so that we no longer
have a dangling reference to the `ed' dialect.
* doc/find.texi (Regular Expressions): Point out the difference
between Emacs regular expressions and findutils regular
expressions: in findutils "." will match newline.
* find/find.1: Likewise.
* locate/locate.1: Likewise.  Also document the --regextype option.
2017-11-14 13:43:32 +00:00
ff4701b4ef maint: avoid unused-but-set-variable, unused-parameter warnings from GCC 7
GCC-7.2.1 complained about this occur during 'make check'.

* lib/regexprops.c (menu): Remove set-but-unused-variable 'options'.
* lib/test_splitstring.c (main): Avoid unused-parameter warnings
for 'argc' and 'argv'.
2017-11-13 18:40:29 +01:00
2cb10332af all: prefer https:// URLs where possible
Change from http:// to https:// URLs for the following:
www.gnu.org, gnu.org, savannah.gnu.org, git.sv.gnu.org, lists.gnu.org,
translationproject.org, cve.mitre.org, cwe.mitre.org, xkcd.com,
standards.ieee.org, and gcc.gnu.org.

* COPYING: Do the above replacement.
* ChangeLog-2013: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-hacking: Likewise.
* build-aux/Makefile.am: Likewise.
* build-aux/check-testfiles.sh: Likewise.
* build-aux/gen-changelog.sh: Likewise.
* build-aux/man-lint.sh: Likewise.
* build-aux/src-sniff.py: Likewise.
* cfg.mk: Likewise.
* configure.ac: Likewise.
* doc/Makefile.am: Likewise.
* doc/find-maint.texi: Likewise.
* doc/find.texi: Likewise.
* find/defs.h: Likewise.
* find/exec.c: Likewise.
* find/find.1: Likewise.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/oldfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/print.c: Likewise.
* find/print.h: Likewise.
* find/sharefile.c: Likewise.
* find/sharefile.h: Likewise.
* find/testsuite/Makefile.am: Likewise.
* find/testsuite/binary_locations.sh: Likewise.
* find/testsuite/checklists.py: Likewise.
* find/testsuite/config/unix.exp: Likewise.
* find/testsuite/find.gnu/name-period.exp: Likewise.
* find/testsuite/find.posix/depth1.exp: Likewise.
* find/testsuite/sv-34079.sh: Likewise.
* find/testsuite/sv-34976-execdir-fd-leak.sh: Likewise.
* find/testsuite/sv-48030-exec-plus-bug.sh: Likewise.
* find/testsuite/sv-48180-refuse-noop.sh: Likewise.
* find/testsuite/sv-52220.sh: Likewise.
* find/testsuite/sv-bug-32043.sh: Likewise.
* find/testsuite/test_escape_c.sh: Likewise.
* find/testsuite/test_escapechars.sh: Likewise.
* find/testsuite/test_inode.sh: Likewise.
* find/testsuite/test_type-list.sh: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* gnulib-local/lib/gcc-function-attributes.h: Likewise.
* lib/bugreports.c: Likewise.
* lib/bugreports.h: Likewise.
* lib/buildcmd.c: Likewise.
* lib/buildcmd.h: Likewise.
* lib/check-regexprops.sh: Likewise.
* lib/dircallback.c: Likewise.
* lib/dircallback.h: Likewise.
* lib/extendbuf.c: Likewise.
* lib/extendbuf.h: Likewise.
* lib/fdleak.c: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.c: Likewise.
* lib/findutils-version.h: Likewise.
* lib/listfile.c: Likewise.
* lib/listfile.h: Likewise.
* lib/printquoted.c: Likewise.
* lib/printquoted.h: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/regextype.h: Likewise.
* lib/safe-atoi.c: Likewise.
* lib/safe-atoi.h: Likewise.
* lib/splitstring.c: Likewise.
* lib/splitstring.h: Likewise.
* lib/test_splitstring.c: Likewise.
* lib/unused-result.h: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.1: Likewise.
* locate/locate.c: Likewise.
* locate/locatedb.5: Likewise.
* locate/locatedb.h: Likewise.
* locate/testsuite/Makefile.am: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/updatedb.1: Likewise.
* locate/updatedb.sh: Likewise.
* locate/word_io.c: Likewise.
* po/fetch-po-files: Likewise.
* xargs/testsuite/Makefile.am: Likewise.
* xargs/testsuite/config/unix.exp: Likewise.
* xargs/xargs.1: Likewise.
* xargs/xargs.c: Likewise.
2017-10-23 00:57:57 +02:00
77651af6a8 maint: update copyright year number ranges
Better late than never: run 'make update-copyright'.

* cfg.mk (update-copyright-env): Change UPDATE_COPYRIGHT_USE_INTERVALS
from 1 to 2 to get a minimal containing range of years; also set
UPDATE_COPYRIGHT_MAX_LINE_LENGTH to 79 characters.
* .x-update-copyright: Add an entry for bootstrap which comes from
gnulib.
* lib/qmark.c: While at it, fix a typo: s/courutils/coreutils/.
* lib/regexprops.c (copying): Update the text so that the
copyright years match the result of "make update-copyright".
* po/fi.po: Change copyright header so that "make update-copyright"
can pick it up: s/©/(C)/
* po/it.po: Likewise.
* po/vi.po: Likewise.
* All other files: Update copyright years via the above make run.
2017-10-23 00:45:18 +02:00
James Youngman
265753b4af maint: update copyright years.
* lib/regexprops.c (copying): Update the text so that the
copyright years (and the line breaks) match the
result of "make update-copyright".
* doc/regexprops.texi: Tweak copyright years to match the
result of "make update-copyright".
* All other files: update copyright years if the file has
a copyright statement.
* .x-update-copyright: new file, a list of files to exclude
from automated copyright updates.
2016-01-03 23:27:34 +00:00
James Youngman
c83e75f548 regexprops: Fix compiler warnings and update copyright years.
* lib/regexprops.c (newpara): Function parameter list should be
declared as void in the function definition, instead of leaving it
blank (C++ style).  This fixes a GCC warning controlled by
-Wstrict-prototypes.
(beginenum): Likewise.
(endenum): Likewise.
(endtable): Likewise.
(copying): Update copyright years.
* doc/regexprops.texi: Update copyright years to match the output
of regexprops.c.
2016-01-03 23:20:54 +00:00
Andreas Metzler
783704be4e Use the official FDL license wording in license text.
* README-hacking (footer): use the official FDL license wording as
listed in FDL's "ADDENDUM: How to use this License for your
documents". Update copyright year.
* NEWS (footer): Likewise.
* doc/find-maint.texi: Likewise.
* doc/find.texi: Likewise.
* doc/regexprops.texi: Likewise.
* lib/regexprops.c (copying): Amend the code to emit the updated
wording.  Update the copyright year.
2015-12-27 15:43:53 +00:00
James Youngman
8becd09bb9 Use a consistent order for header-file inclusion.
* find/exec.c: Include config.h, then system headers followed by
gnulib headers and last, find-specific headers.
* find/find.c: Likewise.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/dircallback.c: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.c: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* lib/savedirinfo.c: Likewise.
* lib/splitstring.c: Likewise.
* lib/test_splitstring.c: Likewise.
* lib/waitpid.c: Likewise.
* locate/bigram.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
2011-06-20 10:26:24 +01:00
James Youngman
0caac6fe3d Take gnulib-tool's advice about which header files to include.
* locate/locate.c: Include <regex.h> instead of "regex.h".
Include "fnmatch.h" instead of <fnmatch.h> (because we use
fnmatch-gnu).  Include "gettext.h".
* lib/regexprops.c: Include <regex.h> instead of "regex.h".
* find/tree.c: Include "gettext.h".  Include "fnmatch.h" instead
of <fnmatch.h> (because we use fnmatch-gnu).
* find/parser.c: Include "gettext.h" and <regex.h>.  Include
"fnmatch.h" instead of <fnmatch.h> (because we use fnmatch-gnu).
* find/pred.c: Likewise.
* find/exec.c: Include "gettext.h".
* find/find.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/print.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* find/util.c: Likewise.
* locate/bigram.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
* find/Makefile.am: Add a comment explaining why gnulib-tool
advised us to use each library.
2011-06-20 00:39:20 +01:00
James Youngman
f457e8f05e Update the copyright year in C source files.
* find/defs.h: Update copyright year.
* find/find.c: Update copyright year.
* find/finddata.c: Update copyright year.
* find/ftsfind.c: Update copyright year.
* find/parser.c: Update copyright year.
* find/pred.c: Update copyright year.
* find/sharefile.c: Update copyright year.
* find/sharefile.h: Update copyright year.
* find/tree.c: Update copyright year.
* find/util.c: Update copyright year.
* lib/buildcmd.c: Update copyright year.
* lib/buildcmd.h: Update copyright year.
* lib/dircallback.c: Update copyright year.
* lib/dircallback.h: Update copyright year.
* lib/extendbuf.c: Update copyright year.
* lib/extendbuf.h: Update copyright year.
* lib/fdleak.c: Update copyright year.
* lib/fdleak.h: Update copyright year.
* lib/findutils-version.c: Update copyright year.
* lib/findutils-version.h: Update copyright year.
* lib/forcefindlib.c: Update copyright year.
* lib/listfile.c: Update copyright year.
* lib/listfile.h: Update copyright year.
* lib/nextelem.c: Update copyright year.
* lib/nextelem.h: Update copyright year.
* lib/printquoted.c: Update copyright year.
* lib/printquoted.h: Update copyright year.
* lib/qmark.c: Update copyright year.
* lib/regexprops.c: Update copyright year.
(copying): Update copyright year in the output file, too.
* lib/regextype.c: Update copyright year.
* lib/regextype.h: Update copyright year.
* lib/safe-atoi.c: Update copyright year.
* lib/safe-atoi.h: Update copyright year.
* lib/savedirinfo.c: Update copyright year.
* lib/savedirinfo.h: Update copyright year.
* lib/unused-result.h: Update copyright year.
* lib/waitpid.c: Update copyright year.
* locate/bigram.c: Update copyright year.
* locate/code.c: Update copyright year.
* locate/frcode.c: Update copyright year.
* locate/locate.c: Update copyright year.
* locate/locatedb.h: Update copyright year.
* locate/word_io.c: Update copyright year.
* xargs/xargs.c: Update copyright year.
2011-06-04 13:19:26 +01:00
James Youngman
66a94b60dc Use set_program_name in regexprops.
* lib/regexprops.c: Include "progname.h".  Update function
defintions to have a newline before the function name (to comply
with the GNU coding standard).  Use set_program_name.
2010-04-06 23:32:16 +01:00
James Youngman
765ab106d4 Don't return int to represent a boolean value.
* find/defs.h: fd_leak_check_is_enabled should return boolean, not
int.  Likewise following_links and digest_mode.
* lib/buildcmd.h: Likewise for bc_args_exceed_testing_limit.
Also #include <stdbool.h>.
* find/util.c (fd_leak_check_is_enabled): Now returns boolean.
* find/util.c (following_links): Likewise.
* find/util.c (digest_mode): Likewise.
* lib/buildcmd.c (bc_args_exceed_testing_limit): Likewise.
* find/find.c (get_current_dirfd): Indent definition correctly.
* find/util.c (get_start_dirfd): Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-05 14:19:29 +01:00
James Youngman
7bb738db58 Switch from GNU Free Documentation License 1.2 to 1.3.
* NEWS: Update GFDL version.
* README-hacking: Likewise.
* doc/find-maint.texi: Likewise.
* lib/regexprops.c: Likewise (though the license being changed is the
license for the output).

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-02 21:16:21 +01:00
James Youngman
419e5eff64 Coding style fixes: space after function names.
* lib/buildcmd.c: Insert a space between function name and open
parenthesis.
* lib/dircallback.c: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/forcefindlib.c: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.c: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/savedirinfo.c: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-01 00:06:23 +01:00
James Youngman
5dce9f443c Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
James Youngman
f183ab2db9 Support the generation of regexprops-generic.texi. 2007-11-29 11:17:14 +00:00
James Youngman
1c43fc92b5 Migrated from GPL version 2 to GPL version 3 2007-07-02 08:25:45 +00:00
James Youngman
5a7e83f1d7 Fixed various lint complaints pointed out by build-aux/src-sniff.py 2007-06-21 23:41:08 +00:00
James Youngman
f198887c2e Fixed typo 2007-01-22 10:34:02 +00:00
James Youngman
7046234c8b Fixed many compilation warnings 2005-12-23 18:24:20 +00:00
James Youngman
b070e1fff0 Prefer the word 'Invalid' or the phrase 'not allowed' over 'Illegal', as per the GNU coding standards, and as per the suggestion from Benno Schulenberg 2005-11-29 07:21:41 +00:00
James Youngman
2d8a8ceb77 Fixed compilation failure on Cygwin - Savannah Bug #14025 (tiny change, three lines), reported and fixed by Eric Blake 2005-08-09 21:54:54 +00:00
James Youngman
23704106a8 Further small corrections from Karl. 2005-07-26 16:13:24 +00:00
James Youngman
a2acc374c3 Karl made some more readability suggestions. 2005-07-26 09:03:27 +00:00
James Youngman
cc4c9bbd2e Made Texinfo style corrections suggested by Karl Berry. 2005-07-24 21:13:59 +00:00
James Youngman
8ef983b3db Made Texinfo style corrections suggested by Karl Berry. 2005-07-24 21:02:56 +00:00
James Youngman
6285dd2732 Added --regextype and -regextype options to locate and find respectively, and documented these 2005-07-14 22:13:02 +00:00