368 Commits

Author SHA1 Message Date
Bernhard Voelker
c56b96a54f maint: prefer NULL to nullptr
NULL is best for C as discussed - for coreutils - at:
  https://bugs.gnu.org/66221#53

* bootstrap.conf: Remove dependency on nullptr.
* s/nullptr/NULL/.

This effectively reverts 93ce19f0d5a1.
2026-01-20 23:03:54 +01:00
Bernhard Voelker
3c2af8a185 doc: avoid man-lint errors due to deprecated .HP macro
The .HP macro introduced only recently triggers a 'make check' errors:

   env GROFF=groff ../build-aux/man-lint.sh . find.1
   check_manpages_format_without_error_messages  (         find.1): OK
   check_manpages_with_groff_checkstyle_2        (         find.1): FAILED
   an.tmac:./find.1:23: style: use of deprecated macro: .HP
   make[3]: *** [Makefile:3112: findutils-check-manpages] Error 1

and

   env GROFF=groff ../build-aux/man-lint.sh . locate.1 updatedb.1 locatedb.5
   check_manpages_format_without_error_messages  (       locate.1): OK
   check_manpages_format_without_error_messages  (     updatedb.1): OK
   check_manpages_format_without_error_messages  (     locatedb.5): OK
   check_manpages_with_groff_checkstyle_2        (       locate.1): FAILED
   an.tmac:./locate.1:18: style: use of deprecated macro: .HP
   make[3]: *** [Makefile:3287: findutils-check-manpages] Error 1
   make[3]: Target 'check-local' not remade because of errors.

The HP hanging paragraph would work nicely, but is marked as deprecated
in groff-1.23; the deprecations warning will disappear in groff-1.24.
Until then, use .TP instead to avoid the check errors.

* find/find.1: Change '.HP' to the '.TP' tagged paragraph macro.
Add a FIXME for 2027 to switch to .HP when groff-1.24 is more commonly
available.
* locate/locate.1: Likewise.
2026-01-05 16:52:58 +01:00
G. Branden Robinson
5a000f9a50 locate.1: access ^ character portably
The `\(ha` special character escape sequence is not universally
portable.  Indirect it through a string definition.  (GNU Bash also uses
this technique.[1])

* locate/locate.1: Do the above.

[1] a8a1c2fac0/doc/bash.1 (L26)

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
a64197a3d8 locatedb.5: fix unescaped hyphens
These instances represent hyphen-minus characters, so should be spelled
in man(7) source as `\-`.

* locate/locatedb.5: Do the above.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
2923a0d78f doc: access en dash character portably
The `\(en` special character escape sequence is not universally
portable.  Indirect it through a string definition.

* find/find.1:
* locate/locate.1:
* locate/locatedb.5:
* locate/updatedb.1:
* xargs/xargs.1: Do the above.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
10235e591a locate.1: improve table formatting
* locate/locate.1 (HISTORY):
- Use paragraphing macro to put vertical space above the table so that
  it looks more like a typographical "display".[1]
- Set table cells that overset the line on AT&T nroff (where the line
  length is 65n) using text blocks.
- Issue `na` request in these text blocks to prevent the cell contents
  from adjusting in the event the formatter/package/user has configured
  man pages to employ adjustment by default.  (Practices vary; it's a
  long story.[2])
- Remove spaces around the configured tbl(1) tab character of `|`.  This
  certainly does make the table uglier in source form.  Unfortunately,
  AT&T tbl(1) takes those spaces deadly seriously and they impact the
  computed cell (and therefore column) widths.  GNU tbl has for decades
  supported a "nospaces" region option to address precisely this
  problem; unfortunately it is not portable to DWB 3.3, Plan 9, or
  Solaris 10 troffs, and I suspect not to _any_ surviving System V
  troff.

Fixes warning from tbl(1) in groff 1.23.0:

locate/locate.1:289: warning: table wider than line length minus indentation

[1] man(7) implementations are historically inconsistent with respect to
    whether a `TS` macro call should put any vertical space on the
    output, and compositional practices on the part of man page authors
    have thus been, to quote Ingo Schwarze, "wildly inconsistent".

    https://savannah.gnu.org/bugs/?62841

[2] "Some people do hate adjustment of nroff output, though, which is
    why I added a feature to groff man(7) to support disabling it.

    The history of this practice is inconsistent.  Seventh Edition Unix
    (1979) disabled adjustment of man pages when rendering in nroff
    mode,[3] and BSD retained that disablement until death.  SunOS
    commented it as early as SunOS 2.0 (1985), thus restoring adjustment
    in nroff mode, and retained that all the way through Solaris 10
    (2005).  When James Clark wrote groff starting in about 1989, his
    man(7) implementation closely emulated SunOS.  With the Solaris 11
    release in 2010, Oracle discarded its AT&T-descended troff in favor
    of the then-current groff release.  [That's not quite true--see
    below.]  They're still on groff 1.22.2 (2013) today, and so they've
    been adjusting their man pages in nroff mode for at least 40 years,
    as has groff for about 35[].  I don't know what other System V
    Unices did."

    https://lists.gnu.org/archive/html/groff/2025-05/msg00001.html

    (I made an incorrect claim in the foregoing; Solaris 11 still has
    its AT&T troff around, but its man page rendering is now performed
    by [an old version of] groff.)

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
c2b67c7c92 doc: improve formatting of command synopses (2/2)
* find/find.1:
* locate/locate.1: Use unbreakable spaces between options and their
  arguments, potentially improving legibility.

The existing synopses are short enough that they don't break in such a
way as to promote confusion even on old-fashioned AT&T troffs that use a
line length of 65n in nroff mode (vs. groff man(7)'s historical 78n and
present-day 80n).  Thus this change merely makes the synopses robust to
future changes.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
d9cef9e7da doc: improve formatting of command synopses (1/2)
* find/find.1:
* locate/locate.1: Use `HP` hanging paragraph macro to indent
  non-initial lines of synopsis.  Temporarily disable adjustment.

An alternative approach would be to use groff man(7)'s `SY` and `YS`
extension macros; each man page would then need to define local versions
for portability to DWB 3.3, Plan 9, and Solaris 10 troffs.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
3d398b07cd doc: improve typography of synopses
* find/find.1:
* locate/locate.1: Place thin space escape sequences between ellipsis
  dots for more pleasant output when typesetting.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
7e8712f0ca doc: use man(7) macros to style command synopses
* find/find.1:
* locate/locate.1:
* locate/updatedb.1:
* xargs/xargs.1: Favor man(7) font alternation macros over *roff font
  escape sequences.  When typesetting with groff(1), the macros
  automatically apply italic corrections.

* locate/locate.1: Protect long option name literals from hyphenation.
  GNU troff, Heirloom Doctools troff, and mandoc all support use of the
  `\%` hyphenation control escape sequence at the _beginning_ of a word
  suppress its hyphenation.  Other troffs do not.  Indirect this
  application of the escape sequence through a string, interpolating
  nothing on formatters that don't advertise GNU compatibility via the
  `.g` register.  (This means that literals can hyphenate undesirably on
  DWB, Solaris, and Plan 9 troffs.)

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:58 +01:00
G. Branden Robinson
ad7e34650a doc: delete blank lines from man page sources
* find/find.1:
* xargs/xargs.1: Replace blank lines with empty requests or paragraphing
  macro calls as seems to be intended.
* find/find.1: Delete blank lines preceding paragraphing or sectioning
  macros that serve only to put excess vertical space in the output.
* locate/locatedb.5: Replace blank lines with a dummy character
  producing a blank output line as _might_ be intended.

groff_man_style(7):
     ?  The empty request (.), which does nothing, vertically spaces the
        input file for readability by the document maintainer.  Do not
        put blank (empty) lines in a man page source document.  Some
        man(1) programs ?squeeze? multiple blank output lines into one.

Fixes style warnings from `groff -rCHECKSTYLE=3 -man`:
an.tmac:/.../share/man/man1/find.1:87: style: blank line in input
...
an.tmac:/.../share/man/man1/xargs.1:231: style: blank line in input
...
an.tmac:/.../share/man/man5/locatedb.5:118: style: blank line in input
...

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-05 16:52:37 +01:00
G. Branden Robinson
627072f022 doc: populate man pages' headers and footers more
Style warnings from `groff -rCHECKSTYLE=3 -man`.
an.tmac:/.../share/man/man1/locate.1:1: style: .TH missing third argument; \
  consider document modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:/.../share/man/man1/locate.1:1: style: .TH missing fourth argument; \
  consider package/project name and version (e.g., "groff 1.23.0")
...and similar.

groff_man_style(7):
     .TH identifier section [footer‐middle [footer‐inside [header‐
     middle]]]
...
            By convention, footer‐middle is the date of the most recent
            modification to the man page source document, and footer‐
            inside is the name and version or release of the project
            providing it.

* find/find.1:
* locate/locate.1:
* locate/locatedb.5:
* locate/updatedb.1:
* xargs/xargs.1: Add appropriate third and fourth arguments to `TH` macro calls.

To determine the revision date to include in the page, I used the Git
"AuthorDate" of the last commit consituting anything but a "bump" to the
copyright notice.

Discussed at:
https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html

Copyright-paperwork-exempt: Yes
2026-01-02 22:48:58 +01:00
Bernhard Voelker
733bb9a054 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.
2026-01-02 11:46:15 +01:00
James Youngman
99cfb6cf42 [maint] Stricter manpage checks.
From a suggestion by G. Branden Robinson to use `groff -t -z -ww
-rCHECKSTYLE=2 -man`, by pointing to and example in
https://lists.gnu.org/archive/html/bug-findutils/2025-11/msg00004.html.

* configure.ac: discover the location of the groff binary.
* build-aux/man-lint.sh: also run groff with -rCHECKSTYLE=2.   Use
  groff at the path discovered during configuration.
* find/Makefile.am: Lint-check manpages during "make check",
  not "make dist". Set the environment variable GROFF to the
  location of the groff binary.
* locate/Makefile.am: Likewise.
* xargs/Makefile.am: Likewise.
2025-11-17 10:08:13 +00:00
Bernhard Voelker
93ce19f0d5 maint: prefer C23-style nullptr
* bootstrap.conf (gnulib_modules): Add nullptr.
In code, prefer nullptr to NULL where either will do.
* cfg.mk (sc_prohibit_NULL): Direct to use nullptr instead.
(begword, endword): Add regex helper macros.
2025-11-15 19:39:43 +01:00
Bernhard Voelker
deb3f7066d maint: use consistent references to standard files in messages
Use standard input instead of stdin, standard output instead of stdout,
and standard error instead of stderr in messages and documentation.
Inspired by coreutils commit:
https://cgit.git.sv.gnu.org/cgit/coreutils.git/commit/?id=c9a30d6781

* cfg.mk (sc_standard_outputs): Add syntax-check rule.
* doc/find.texi: Do the above.
* find/find.1: Likewise.
* locate/locate.1: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.1: Likewise.
* xargs/xargs.c: Likewise.
2025-11-15 19:39:43 +01:00
Collin Funk
c18bba5c59 maint: ensure that new "make syntax-check"-run sc_codespell passes
* cfg.mk (codespell_ignore_words_list): Ignore false-positives.
(exclude_file_name_regexp--sc_codespell): Skip some file names.
* NEWS: Fix typos.
* README-hacking: Likewise.
* doc/find-maint.texi: Likewise.
* doc/find.texi: Likewise.
* bootstrap.conf: Fix typos in comments.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/print.c: Likewise.
* find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise.
* find/testsuite/find.posix/bracket-depth.exp: Likewise.
* find/testsuite/find.posix/exec-nogaps.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions1.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions2.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions3.exp: Likewise.
* find/util.c: Likewise.
* init.cfg: Likewise.
* lib/regextype.h: Likewise.
* lib/splitstring.h: Likewise.
* locate/locate.c: Likewise.
* locate/updatedb.sh: Likewise.
* tests/find/exec-plus-last-file.sh: Likewise.
* tests/find/files0-from.sh: Likewise.
* tests/xargs/test-sigusr.c: Likewise.
* tests/xargs/verbose-quote.sh: Likewise.
* xargs/xargs.c: Likewise.
2025-11-15 19:39:02 +01:00
Bernhard Voelker
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
Bernhard Voelker
eac8aecaad maint: update further Makefile variables used by Gnulib
Like in the recent commit, also change the following variables to follow
the renaming done in gnulib:
- LIB_SETLOCALE_NULL -> SETLOCALE_NULL_LIB,
- LIB_MBRTOWC -> MBRTOWC_LIB,
- LIB_EACCESS -> EUIDACCESS_LIBGEN.

* find/Makefile.am (LDADD): Change as described above.
* lib/Makefile.am: Likewise.
* locate/Makefile.am: Likewise.
* xargs/Makefile.am: Likewise.
2024-12-02 19:54:19 +01:00
Collin Funk
e65a91d2fb maint: update Makefile variables used by Gnulib
* locate/Makefile.am (LDADD): Remove $(LIB_CLOSE) as it is no longer
required per Gnulib NEWS 2009-03-20.
* xargs/Makefile.am (LADD): Likewise.
* find/Makefile.am (LDADD): Likewise. Change $(LIB_EACCESS) to
$(EUIDACCESS_LIBGEN) per Gnulib NEWS 2023-01-07.
2024-12-02 19:54:19 +01:00
Bernhard Voelker
744da6ddcc maint: prefer endian.h for byte order conversions
Now that <endian.h> is a part of POSIX 2024 it should become more
portable than <byteswap.h>.

* bootstrap.conf (gnulib_modules): Remove byteswap; add endian.
* locate/word_io.c: Include endian.h instead of byteswap.h.
(decode_value): Use htobe32 instead of bswap_32.
2024-11-03 21:32:30 +01:00
Bernhard Voelker
4a719e65d2 maint: pacify GCC 14.2
Avoid the following warnings:
tree.c:1573:19: warning: no previous declaration for 'cost_table' [-Wmissing-variable-declarations]
 1573 | struct cost_assoc cost_table[] =
      |                   ^~~~~~~~~~
findutils-version.c:37:13: warning: no previous declaration for 'version_string' [-Wmissing-variable-declarations]
   37 | const char *version_string = VERSION;
      |             ^~~~~~~~~~~~~~

* find/tree.c (cost_table): Declare static.
* lib/findutils-version.c (version_string): Likewise.
* locate/frcode.c (version_string): Remove extern declaration.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.
2024-09-17 21:49:18 +02:00
James Youngman
e178314ae3 maint: convert tabs to spaces in C source files. 2024-06-01 21:41:05 +01:00
Bernhard Voelker
b9c9310eec maint: avoid gnulib sc_prefer_angle_bracket_headers failure
The following syntax-check rule fails:

  $ make syntax-check
  ...
  maint.mk: Use #include <hdr.h>, not #include "hdr.h" for the above
  make: *** [maint.mk:619: sc_prefer_angle_bracket_headers] Error 1

The rule suggests using '#include <header.h>' instead of
'#include "header.h"' for headers that override system headers.
See gnulib documentation, section "Style of #include statements".

* find/parser.c (#include "fnmatch.h": Change from "..." to <...> style.
* find/pred.c (#include "fnmatch.h"): Likewise.
* find/tree.c (#include "fnmatch.h"): Likewise.
* lib/system.h (#include "error.h"): Likewise.
* locate/locate.c (#include "fnmatch.h"): Likewise.
* tests/xargs/test-sigusr.c (#include "error.h"): Likewise.
2024-05-20 13:54:38 +02:00
Bernhard Voelker
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
Bernhard Voelker
485693836a updatedb.1: fix typo
* locate/updatedb.1: s/LOCATGE02/LOCATE02/

Bug introduced in commit v4.6.0-44-g89ec0211.
Fixes https://savannah.gnu.org/bugs/?64876
2023-11-10 07:52:55 +01:00
Bernhard Voelker
d76d0f5668 maint: go back to using 'error'
Now that Gnulib's 'error' module does proper static checking
for not returning, we need no longer use the 'die' macro.
This makes code easier to read for people that are used to 'error'.

* cfg.mk (sc_die_EXIT_FAILURE): Remove.
* src/die.h: Remove.  All includes removed.  All calls to 'die'
changed back to calls to 'error'.
* lib/Makefile.am (libfind_a_SOURCES): Remove 'die.h'.
* src/system.h: Include error.h.  Stop including error.h elsewhere.
* find/ftsfind.c (process_all_startpoints): Avoid extra '\n' in error
diagnostics wrt/ -files0-from.  Also avoid redundant "%s" formats.
* find/parser.c (parse_perm, parse_regex):
* lib/buildcmd.c (bc_push_arg):
Wrap calls to 'error' in block when under an if-condition and either
the if-condition or the 'error' invocation is spanning over more
than one line.
* find/tree.c (get_pred_cost): Make error message translatable - found
by sc_unmarked_diagnostics.
2023-09-30 14:57:05 +02:00
Bernhard Voelker
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
Bernhard Voelker
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
Bernhard Voelker
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
Andrew Gaul
caa038677b updatedb: exclude s3fs filesystems by default
s3fs is a popular way to access S3-compatible object storage.
Its users have reported many bugs being surprised that updatedb crawls
these remote storage systems which causes poor performance:
https://github.com/s3fs-fuse/s3fs-fuse/issues?q=is%3Aissue+updatedb

* locate/updatedb.sh (PRUNEFS): Add 'fuse.s3fs'.

Copyright-paperwork-exempt: Yes
2021-02-23 14:36:43 +01:00
Bernhard Voelker
b38464865a build: fix linking on AIX7.2
Linking on AIX7.2 fails:
  ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
  ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock

Bruno Haible noticed that $(LIB_MBRTOWC) and $(LIB_SETLOCALE_NULL)
expand to -lpthread on that platform, so let's add them to LDADD.

Maybe we should better depend on a 'gnulib.mk' file generated by
'gnulib-import' in the long run, but let's fix this issue with the
simpler solution for now.

* find/Makefile.am (LDADD): Add $(LIB_SETLOCALE_NULL) and $(LIB_MBRTOWC).
* locate/Makefile.am (LDADD): Likewise.
* xargs/Makefile.am (LDADD): Likewise.
* lib/Makefile.am (regexprops_LDADD): Add definition.
2021-01-09 17:06:23 +01:00
Bernhard Voelker
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
Bernhard Voelker
5582094307 locate.1: improve formatting in BUGS section
* locate/locate.1 (.SH "BUGS"): Set 'locate' in bold, and the -z option
in italic.
2020-12-30 19:11:18 +01:00
Bernhard Voelker
ab3bb081ba doc: harmonize the end of the man pages
The "BUGS" section also documented how to report bugs.  This is better
done in a separate "REPORTING BUGS" section.  Add this section where
missing.  In it, redirect the user to the "How to get help" section
("#get-help") of the GNU findutils online page; also mention where
to report translation issues.

Bring the sections "SEE ALSO" and "COPYRIGHT" into the correct order,
which is: "REPORTING BUGS", "COPYRIGHT" and finally "SEE ALSO".
See 'man-pages(7)'.

The "SEE ALSO" section now refers to both the corresponding node in
the online HTML version of the Texinfo manual and lists the 'info' command.
Sort the entries referring to other man pages: first by their manual
section numbers, then alphabetically.

While at it, add an empty line (directive '.') before all '.SH' section
headers.

* find/find.1: Do the above.
* locate/locate.1: Likewise.
* locate/locatedb.5: Likewise.
* locate/updatedb.1: Likewise.
* xargs/xargs.1: Likewise.
2020-12-30 19:11:18 +01:00
Bernhard Voelker
90e60a2003 updatedb.1: avoid Texinfo macro in man page
* locate/updatedb.1 (DESCRIPTION): Replace @samp{} macro by .B setting,
introduced in commit v4.6.0-44-g89ec0211.
2020-12-30 19:11:18 +01:00
Bernhard Voelker
160e2f8258 maint: use more *-safer gnulib modules
See section "Handling closed standard file descriptors" in the gnulib
manual.

* bootstrip.conf (gnulib_modules): Add fcntl-safer, openat-safer
and unistd-safer.
* find/exec.c: Include "fcntl--.h" to use the *-safer variant of open()
or openat().
* find/pred.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise, and include "unustd--.h" to use the *-safer
variant of pipe().
2020-12-02 01:12:16 +01:00
Andreas Metzler
003c590ae8 updatedb.1: fix formatting
* locate/updatedb.1 (--prunepaths): Use apostrophe instead of acute accent.
2020-10-25 09:53:11 +01:00
Bjarni Ingi Gislason
de3c6279f2 doc: fix warnings from "mandoc -Tlint" in man pages
mandoc: ./find/find.1:313:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./find/find.1:607:1: WARNING: skipping paragraph macro: sp after PP
mandoc: ./find/find.1:606:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./find/find.1:1678:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ./find/find.1:2063:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./find/find.1:2302:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./find/find.1:2400:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./find/find.1:2455:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./locate/locate.1:282:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./locate/locatedb.5:153:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./locate/updatedb.1:128:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./xargs/xargs.1:316:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./xargs/xargs.1:327:2: STYLE: fill mode already enabled, skipping: fi

* find/find.1: Remove superfluous paragraph macros.
Remove superfluous requests ".fi".
* locate/locate.1: Likewise.
* locate/locatedb.5: Likewise.
* locate/updatedb.1: Likewise.
* xargs/xargs.1: Likewise.
2020-06-22 21:28:02 +02:00
Bjarni Ingi Gislason
8bff322b56 doc: fix warnings from "test-groff" in man pages
Output is from: test-groff -b -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]
  Input file is ././find/find.1
  <./find/find.1>:365 (macro BR): only 1 argument, but more are expected
  <./find/find.1>:380 (macro BR): only 1 argument, but more are expected
  <./find/find.1>:1494 (macro BR): only 1 argument, but more are expected
  <./find/find.1>:1496 (macro BR): only 1 argument, but more are expected
  <./find/find.1>:1513 (macro BR): only 1 argument, but more are expected
  [...]
  Input file is ././locate/locate.1
  troff: <./locate/locate.1>:167: warning: trailing space

* find/find.1: Use a one-font (single letter) macro for a single argument.
* locate/locate.1: Remove a trailing space in a "string".
2020-06-22 21:23:36 +02:00
Bernhard Voelker
6154e419b9 maint: ensure .deps/ in the project root is ignored by git
* .gitignore (.deps/): Add entry.
* find/.gitignore (/.deps/): Remove here.
* lib/.gitignore: Likewise.
* locate/.gitignore: Likewise.
* xargs/.gitignore: Likewise.
2020-03-15 11:07:13 +01:00
Bernhard Voelker
9820a15a43 maint: adjust to split out xstrtol-error gnulib module
* bootstrap.conf (gnulib_modules): Add the new module split from xstrtol.
* locate/locate.c: Include "xstrtol-error.h" for xstrtol_fatal.
2020-01-01 17:44:30 +01:00
Bernhard Voelker
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
Bernhard Voelker
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
Bernhard Voelker
bac58c5178 maint: adjust preprocessor indentation via cppi
Run 'cppi -a' for all *.[ch] files, and add a syntax-check rule for it.

* cfg.mk (sc_preprocessor_indentation): Add rule.
* find/defs.h: Run 'cppi -a' on this file.
* find/fstype.c: Likewise.
* find/oldfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/print.h: Likewise.
* find/sharefile.h: Likewise.
* gnulib-local/lib/gcc-function-attributes.h: Likewise.
* lib/bugreports.h: Likewise.
* lib/buildcmd.c: Likewise.
* lib/buildcmd.h: Likewise.
* lib/extendbuf.h: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.h: Likewise.
* lib/regextype.h: Likewise.
* lib/safe-atoi.h: Likewise.
* lib/splitstring.h: Likewise.
* lib/system.h: Likewise.
* locate/locatedb.h: Likewise.
* xargs/xargs.c: Likewise.
2018-12-02 15:52:44 +01:00
Bernhard Voelker
0e7a378e8c build: port generating updatedb to the BSDs
sed(1) on FreeBSD-11.1 and OpenBSD 6.2 requires the last command inside
'{...}' groups to be terminated with a semicolon, otherwise it fails with:

  sed: 1: "/^# Copyright /{s/^..// ...: extra characters at the end \
  of q command

* locate/Makefile.am (updatedb): Add a ';' after the last command in the
'{...}' group - introduced in commit v4.6.0-133-g6d186665.
2018-03-14 20:44:14 +01:00
Bernhard Voelker
e9340a8bd7 build: avoid use of $(RM)
Some make implementations, e.g. on NetBSD 7.1, lack it; therefore
avoid it in order to prevent error messages during 'make clean'.

* Makefile.am (coverage-clean): Replace $(RM) by 'rm -f'.
* find/Makefile.am: Likewise.
* lib/Makefile.am: Likewise.
* locate/Makefile.am: Likewise.
* xargs/Makefile.am: Likewise.
2018-03-14 20:44:14 +01:00
Bernhard Voelker
e551cfec0f maint: move NLS-related macros to a central place
Add definition like in coreutils, thus also silencing GCC on NetBSD 7.1:
  warning: "textdomain" redefined

* lib/system.h: Include <locale.h> and gnulib's "gettext.h" here,
and define the macros textdomain, bindtextdomain, _ and N_.
* find/exe.c: Use it.
* 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/tree.c: Likewise.
* find/util.c: Likewise.
* lib/bugreports.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/dircallback.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/listfile.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
* cfg.mk (exclude_file_name_regexp--sc_bindtextdomain): Add exemption
for some non-main sources to pass the syntax-check.
2018-03-14 20:44:14 +01:00
Bernhard Voelker
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
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