They're inextricably linked, not cross-referenced at all,
and not used anywhere else.
Now that they (realistically) exist to the reader, add a note
on how big nmatch can be; POSIX even says "The application developer
should note that there is probably no reason for using a value of
nmatch that is larger than preg−>re_nsub+1.".
Also remove the now-duplicate regmatch_t declaration.
regex.3: SYNOPSIS: Add _Nullable qualifier to regerror()'s errbuf
Passing NULL there means that the function returns the size needed for a
copy without actually copying (possibly useful before allocating a
buffer large enough).
Behold:
regerror() is passed the error code, errcode, the pattern buffer,
preg, a pointer to a character string buffer, errbuf, and the size
of the string buffer, errbuf_size.
Absolute soup. This reads to me like an ill-conceived copy from a very
early standard version. It looks fine in source form but is horrific to
read as running text.
Instead, replace all of these with just the descriptions of what they do
with their arguments. What the arguments are is very clearly noted in
big bold in the prototypes.
"Not in POSIX.2", so is it in POSIX.1-2008? POSIX.1-2001?
(or any other combination of standards from this millenion
not mentioned on this page?) It's not: just say POSIX.
ip.7: Add "Special and reserved addresses" section
Break out the discussion of special and reserved IPv4 addresses into
a subsection, formatted as a pair of definition lists, and briefly
describing three cases in which Linux no longer treats addresses
specially, where other systems do or did.
Also add a specific example to the NOTES paragraph that discourages
the use of IP broadcasting, so people can more easily understand
what they are supposed to do instead.
Suggested-by: John Gilmore <gnu@toad.com> Signed-off-by: Seth David Schoen <schoen@loyalty.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Calling man(1) is slow. Since we only need to format the page, calling
mandoc(1) is faster and simpler (we could also use groff(1), but
mandoc(1) is probably faster and simpler than groff(1) too). This
brings times down ~3x in my system.
This pipeline is run for every make(1) invokation, and it was very slow,
due to running a new sed(1) process for every manual page. Remove the
while loop, and rewrite so that all the commands in the pipeline are
only run once. This brings times down ~10x in my system, from 1.5 s, to
just 0.14 s.
Anyone can create a tarball from a release tag, and it should be
identical to the release tarball, so that the PGP signature made at the
release matches. This is useful for distributors.
fts.3: Note fts_open() behaviour with empty strings
This is undocumented in BSD, too, and present in the original SCCS
check-in (5.1 (Berkeley) 12/30/89).
This is very surprising, since in most other cases FTS is rather quite
sane about error reporting, but /any/ empty string in the input vector
blows out the creation entirely.
When running 'make dist' from a tarball (so we don't have git), we'll
see tons of errors saying we're not in a git tree. However, that's not
meaningful, because that command is a no-op in such a scenario: the
(date) placeholder is not there anymore to be replaced. Let's hide the
errors, unless V=1.
RELEASE, dist.mk: Use make(1)'s -B to force recreation of the dist files
Using FORCE unnecessarily restarts the entire build, even if we _know_
nothing changed. That's boring. Trust ourselves, and write the
commands in the RELEASE file as using '-B', to remind ourselves.
Forgetting to use -B will result in incorrect timestamps or versioning
in the distributed pages, so don't forget it ;).
While we're at it, let's also use -j4 directly, so I don't read the
paragraph reminding me to use -j _after_ I've already run it. Let's
write -j4 instead of -j so that we don't crash some innocent's system.
- Add "History" section, with a link to aeb's website with
man-pages-1.* tarballs.
- Move "Maintainers" to a subsection in the new "History" section.
- Organize "Versions" into subsections ("Tarballs", "Git", and
"Online pages").
- Add links to the cgit websites of the git repositories.
- Add link to the PDF online man-pages book.
- wsfix in mtk's entry.
Modelled after tmpfs(5) ‒ there's a listing of mount options, and a
summary of limitations. The feature flags are described in mkfs.erofs,
and they're versioned and maintained upstream quite well there, so no
need to duplicate those, since you only care on image creation.
The real value add is the mount options, but I cannot figure out how
device_id and fsid interact with the system at large, so I just noted
they're there.
State as of Linux 6.3-rc5.
Also, remove explicit .TP indent in filesystems.5 since we're already
touching this hunk: all entries sans iso9660 and Reiserfs fall within
the default prevailing indent, so no need to specify a wide one.
Settle on "no effect", concretify vaguely-described behaviours;
both [to be documented]s replaced with documentation
(these match my 6.2 checkout, if there were subtleties in the history
they got lost).
Added the full system names to the PER_s that lacked them.
Didn't validate or chase down the versions except for PER_RISCOS.
Having these be sorted instead of in the original enumeration order is
really more trouble than it's worth.
PER_LINUX is a base personality, PER_LINUX_{32BIT,FDPIC} are
PER_LINUX|ADDR_LIMIT_32BIT and PER_LINUX|FDPIC_FUNCPTRS, resp.
PER_BSD is a base personality, PER_SUNOS is PER_BSD|STICKY_TIMEOUTS.
PER_LINUX32 is a base personality, PER_LINUX32_3GB is
PER_LINUX32|ADDR_LIMIT_3GB.
I updated these all to be "Same as {base personality},
but implies {...}.". PER_SCOSVR3 has an "also", since it's the only one
where the base case PER_OSR5 has a list.
malloc_usable_size.3: The returned value should not be trusted
It might very well return a value larger than the actual usable size, so
writing to the excess bytes is Undefined Behavior. There's absolutely
no promise about the value, except that it is no less than the size
that was once passed to malloc(3).
Link: <https://github.com/systemd/systemd/issues/22801#issuecomment-1343041481>
Link: <https://inbox.sourceware.org/libc-alpha/20221124213258.305192-1-siddhesh@gotplt.org/T/> Reported-by: Mingye Wang <arthur200126@gmail.com> Reported-by: Siddhesh Poyarekar <siddhesh@gotplt.org> Cc: DJ Delorie <dj@redhat.com> Cc: Sam James <sam@gentoo.org> Cc: Florian Weimer <fweimer@redhat.com> Cc: Andreas Schwab <schwab@linux-m68k.org> Cc: Zack Weinberg <zack@owlfolio.org> Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
mandoc(1) renders pages much faster than groff(1), which is itself much
faster than using man(1). This might seem irrelevant for a single page,
but this function is called in a loop in man_lsfunc() and man_lsvar(),
where this brings times down considerably. For comparison,
`time man_lsfunc man*` took around 55 s (on my system) before this
change. With groff(1), it would take around 14 s, and with mandoc(1)
(this patch), it takes 4 s.
Cc: Ingo Schwarze <schwarze@openbsd.org> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Gavin Smith <gavinsmith0123@gmail.com> Cc: Dirk Gouders <dirk@gouders.net> Cc: Colin Watson <cjwatson@debian.org> Cc: Eli Zaretskii <eliz@gnu.org> Cc: Larry McVoy <lm@mcvoy.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
It is unnecessary to let readers believe it's const. Keep it as a
detail in VERSIONS, which will only be found by those who need it. It
is better to believe it's non-const, and rarely will one need to know
that it isn't true.
While '$(V).SILENT:' is a common idiom in make, it may be more explicit
to put '.SILENT:' inside a conditional. Since we already used the
conditional for something else, it's not a big change. As a nice side
effect, vim now recognizes it and highlights it as a special target.
With the old code, GNU Make 4.4 reported a warning about undefined
variables:
I should have removed this in the previous commit, but somehow I forgot,
and my initial tests didn't reveal the bug. After trying to check a
specific page as a contributor would do, I noticed the problem.
*.mk, CONTRIBUTING, INSTALL: lint, build, check: Reorganize some targets
Some targets which were under lint-* were really building cat pages, so
let's call it build-catman, since it's what it is. As part of the
build, it will report warnings, of course, as any other build system, so
nothing really changed, except for the target names, and the path in the
build tree where the cat pages (and intermediate files) are placed,
which is now directly under <.tmp/man/*>.
Some other targets were checking that the cat pages were correct after
the build, so those targets have been moved to check-* targets.
Document that contributors should run both the 'lint' and 'check'
targets to check the correctness of their patches.
`make all`, a.k.a. `make build`, now builds _all_ that can be built,
including cat pages, and C programs.
Implementation detail: $LINTMAN has been renamed, since now it's used
also for things that are not linters. Call it $NONSO_MAN, since it's a
list of the non-'.so' man pages, which are the ones we want to lint,
build, and check.
Future directions:
I plan to implement 'build-html' using groff(1), which will reuse part
of the build-catman pipeline. That will produce much higher quality
HTML manual pages.