| Age | Commit message (Collapse) | Author | Files | Lines |
|
This is a scripted change:
$ mkdir man/;
$ mv man* man/;
$ ln -st . man/man*;
$ find share/mk/ -type f \
| xargs grep -l '^MANDIR *:=' \
| xargs sed -i '/^MANDIR *:=/s,$,/man,';
$ find share/mk/dist/ -type f \
| xargs grep -l man \
| xargs sed -i 's,man%,man/%,g';
Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/>
Cc: Petr Vorel <pvorel@suse.cz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This page is about singly linked lists, not doubly linked lists.
Signed-off-by: Simon Barth <simon.barth@gmx.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ cat debian/debhelper.in/glibc-doc.links \
| while read l; do \
echo $l \
| awk '{print $1}' \
| sed 's,usr/share/man/,.so ,' \
| sed 's,\.gz,,' \
> "$(echo $l \
| awk '{print $2}' \
| sed 's,usr/share/man/,,' \
| sed 's,\.gz,,')";
done;
$ rm debian/debhelper.in/glibc-doc.links
Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068188>
Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068166>
Link: <https://lore.kernel.org/linux-man/703ec07e-dd2b-bbc6-f1bc-f495e53b764f@gmail.com/T/>
Cc: Marcos Fouces <marcos@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>
Cc: Bas Couwenberg <sebastic@xs4all.nl>
Cc: Andreas Beckmann <anbe@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
S_ISSOCK.3: Add link pages to inode(7)
These function-like macros are described in inode(7).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
sigtimedwait(2)/NOTES
This comes from a real user complaint. sigwait(3) is the most obvious
of the family, and it doesn't mention any of the usage details.
Most of these can be crosslinked, but not mentioning the sigprocmask(2)
requirement is malice.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Fedor Lapshin <fe.lap.prog@gmail.com>
Co-developed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This removes a warning.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
From <https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html>:
Upon successful completion, the dprintf(), fprintf(), and printf()
functions shall return the number of bytes transmitted.
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218600>
Reported-by: <quirin.blaeser@freenet.de>
Signed-off-by: Jeremy Baxter <jtbx@disroot.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://inbox.sourceware.org/libc-alpha/20240305150131.GD3653@qaa.vinc17.org/T/#m3ceecda630012995339bcc5448fee451cf277a8b>
Reported-by: Vincent Lefevre <vincent@vinc17.net>
Suggested-by: Vincent Lefevre <vincent@vinc17.net>
Cc: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Guillem Jover <guillem@hadrons.org>
Reviewed-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Morten Welinder <mwelinder@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
On Thu, Feb 29, 2024 at 07:28:10PM -0500, Morten Welinder wrote:
> The phrase "every representable real value has a representable real
> cube root" is wrong. In fact, a representable cube root is quite
> rare.
Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#mff0ab388000c6afdb5e5162804d4a0073de481de>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cowritten-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It's implemented using scalb(), which uses FLT_RADIX.
Reported-by: Morten Welinder <mwelinder@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
log2(3) doesn't accept negative input, but it seems logb(3) does accept
it.
Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#u>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation'
Reported-by: Bruno Haible <bruno@clisp.org>
Cc: Elliott Hughes <enh@google.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It's the most common spelling in this project.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
With groff-1.23.0, which has a base paragraph indentation of 7, this
line was longer than 80 columns.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Found with:
$ grep -rn '"""' man* \
| grep -v '"""""""""""' \
| sed 's/:.*//' \
| sort \
| uniq;
man2/add_key.2
man2/getrlimit.2
man2/keyctl.2
man2/pivot_root.2
man2/request_key.2
man3/isalpha.3
man3/setlocale.3
man3/toupper.3
man7/capabilities.7
man7/cgroups.7
man7/keyrings.7
man7/locale.7
man7/user_namespaces.7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
(Incidentally, the glibc function source does name the parameter
"name" rather than "node", unlike this man page. (The POSIX man
page uses "nodename".))
Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Currently, the page lists 2 of the 3 x86 architectures, no ARM(!),
old PowerPC only, and most egregiously itanium,
which linux doesn't target.
Per glibc 2.38:
$ git grep ARCH_STACK_DEFAULT_SIZE
aarch64 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
arc #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
arm #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
csky #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
loongarch #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
m68k #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
microblaze #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
mips #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
nios2 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
or1k #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
riscv #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
s390 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
sh #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
sparc32 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
x86 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
alpha #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
powerpc #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
sparc64 #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
hppa #define ARCH_STACK_DEFAULT_SIZE (8 * 1024 * 1024)
ia64 #define ARCH_STACK_DEFAULT_SIZE (32 * 1024 * 1024)
I cut PA-RISC and the Alpha. They have 10 and 6 popcon entries,
respectively, and AFAICT they haven't seen a processor released
in over a decade, they aren't relevant to any modern reader.
Similarly, use "POWER" instead of "PowerPC" ‒ the consensus branding
is "POWER"+version (POWER8/POWER9); PowerPC is itself a POWER variant
and doesn't really deserve its own special mention, especially in 2024.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Even in systems where FLT_RADIX != 2, frexp(3) would be 2-based.
This was correctly worded in the DESCRIPTION, but the example program
was incorrect.
Link: <https://lore.kernel.org/linux-man/CANv4PNkqQBPn_oyfdYZfOck-7gGwzP6YPPA9hDaiaJPUj+c3xw@mail.gmail.com/T/#u>
Reported-by: Morten Welinder <mwelinder@gmail.com>
Cc: Matthew House <mattlloydhouse@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org/iso-3166-country-codes.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org/standard/74575.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org/standard/70907.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org/standard/22747.html>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Break lines containing a parametric prefix to a man page name into two
lines, using distinct font alternation macros and the `\c` escape
sequence to "connect" the output. This prepares for adoption of the
`MR` man(7) macro in groff 1.23.0.
The style seen here assumes that the typeface used for man page names is
bold, which is ahistorical and which the `MR` feature makes
configurable. It might be better to recast this shorthand into English.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 2b65a83f2983 ("Documents sched_getcpu(3), a wrapper for getcpu(2), provided since glibc 2.6.")
Reported-by: Shahab Ouraie <shahabouraie@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
I was looking for fmemopen() to remember I was actually looking for
open_memstream(), and it was much more difficult than it ought to've
been.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Zack Weinberg <zack@owlfolio.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Lee Griffiths <poddster@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
scanf("%d foo");
It is impossible to know if scanf(3) consumed " foo" or not.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
One could use "%*1[\n]" for specifying a newline, and "%*[ \t] for other
white space.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Normally, the base need not be tested, and the only interesting errno
value should be ERANGE.
If the base needs to be tested, it should be tested in a call that
would not otherwise fail. Otherwise, it would be easy to trigger
Undefined Behavior. Consider the following example:
errno = 0;
val = strtol("foo", &end, -42);
There's no portable way to know if the call failed due to the string or
the base.
Cc: Matthew House <mattlloydhouse@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Several programmers have been confused about this use of 'deprecated'.
Also, maximum field width can be used with these fields to mitigate the
problem. Still, it's only a mitigation, since it limits the number of
characters read, but that means an input of LONG_MAX+1 --which takes up
the same number of characters than LONG_MAX-- would still cause UB; or
one can limit that to well below the limit of UB, but then it
artificially invalidates valid input. No good way to avoid UB with
sscanf(3), but it's not necessarily bad with trusted input (and
strtol(3) isn't the panacea either: it avoids UB, but error checking is
hard; strtoi(3) is good, though, but not standard).
Link: <https://stackoverflow.com/questions/77601832/man-sscanf-d-is-deprecated-in-c-or-glibc/>
Cc: Lee Griffiths <poddster@gmail.com>
Cc: Zack Weinberg <zack@owlfolio.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Accidentally, I changed the return while changing something else. Fix it.
Fixes: 790795ec4e5e ("strncat.3: Write the null byte with stpcpy(3)")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
That's a guarantee made by POSIX.
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove superfluous words.
Suggested-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Simplify, and make it consistent with malloc(3).
Suggested-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This better clarifies that the size is of dst.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These functions are also used with multi-byte characters, so character
can be confusing.
Suggested-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Truncation is not acceptable in most cases. Don't suggest that it's
just fine.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
fwrite(3) is more appropriate for printing a character sequence with
known lenght. printf(3) has a limitation of INT_MAX, and also requires
more complex (less readable) code.
Suggested-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Don't zero twice, since it can be confusing. Since bzero(3) returns
void, we need memset(3) here.
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
While rewording, use "byte" instead of "character". This function is
also used with multi-byte characters, so character can be confusing.
Suggested-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It was called maxsize, but it was really a number of elements. And it
wasn't maximum; it was exact.
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This better clarifies that the size is of src.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This text is based on a similar one from mbstowcs(3).
Suggested-by: Andriy Utkin <andriy_utkin@fastmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In most cases you'll get them transitively through <string.h>, but it's
misleading for the man page to claim that they're _in_ <string.h>, and
especially weird to claim they're in _different_ headers from each
other!
This is also true of Apple's headers, and FreeBSD (the other BSDs only
have ffs(), not its siblings).
Signed-off-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
So that it appears in the same order as in mbsrtowcs(3), for being able
to diff(1) the two pages.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This allows diffing both pages, which are very similar:
$ diff -u <(man mbstowcs) <(man mbsrtowcs)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This makes it clear that it's a size, not a length.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Say "size" not "width" for byte counts; "width" is for the number of
bits in a word. Say "leading" to make it clear we don’t care about what
the source contains after its first null byte.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These functions are also the way to copy multibyte strings, so be
generic and say that they just copy bytes. Not every byte is a valid
character in (for example) UTF-8 locales.
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cowritten-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Replace “‐” (U+2020 HYPHEN) with “-” (U+002D HYPHEN-MINUS).
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
* Remove man3/stpecpyx.3; no longer present.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
pages that don't correspond to a libc function
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Improve discussion of leap seconds, year-2038 etc.
Cc: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
null bytes
The previous wording could be interpreted as if the nulls were already
in place. Clarify that it's this function which pads with null bytes.
Also, it copies "characters" from the src string. That's a bit more
specific than copying "bytes", and makes it clearer that the terminating
null byte in src is not part of the copy.
Suggested-by: Jonny Grant <jg@jguk.org>
Cc: DJ Delorie <dj@redhat.com>
Cc: Matthew House <mattlloydhouse@gmail.com>
Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Cc: Thorsten Kukuk <kukuk@suse.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These copy *from* a string. But the destination is a simple character
sequence within an array; not a string.
Suggested-by: DJ Delorie <dj@redhat.com>
Acked-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Cc: Jonny Grant <jg@jguk.org>
Cc: Matthew House <mattlloydhouse@gmail.com>
Cc: Thorsten Kukuk <kukuk@suse.com>
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Reported-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Suggested-by: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: c06eb28eb622 ("man-pages 1.41")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 8d332a95081b ("man-pages 1.57")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 30ed4712c794 ("chroot.2, dup.2, nfsservctl.2, utimensat.2, malloc_get_state.3, pthread_setaffinity_np.3, ddp.7, fifo.7, ip.7: Remove some out-of-date/obsolete/irrelevant FIXMEs")
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We're trying to "standardize" on a paragraphing macro from the three
equivalent ones (P, PP, LP). We (somewhat arbitrarily) agreed on P.
Scripted change:
$ find man* -type f | xargs sed -i '/\.PP/s/PP/P/'
$ find man* -type f | xargs sed -i '/\.LP/s/LP/P/'
Suggested-by: "G. Branden Robinson" <branden@debian.org>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Alexander Kozhevnikov <mentalisttraceur@gmail.com>
Link: <https://stackoverflow.com/questions/19885360/how-can-i-print-the-symbolic-name-of-an-errno-in-c/>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
When there are multiple tags for a paragraph, using a single TP and
separating the tags with commas makes the man(7) source more complex.
It also has a disadvantage: when searching through a manual page,
heuristics such as " --option" don't work so well.
By using GNU's TQ, we simplify the source of the pages, and improve the
ability to search them.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
glibc defines PTHREAD_DESTRUCTOR_ITERATIONS in <limits.h>. This means
it must not loop forever.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Replace blank lines by either a no-op '.', the dummy character '\&', or
an appropriate paragraphing macro. I've experimented with two '.' lines
before section headings, which may increase readability.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Xavier asked that his name be removed from the AUTHOR section, and since
we don't use that section in this project, we can just wipe it.
Add copyright notices to the pages, with Xavier as the original author,
and me, who will maintain them from now on. Xavier ACKed the
Linux-man-pages-copyleft license.
Adapt the TH line:
- Specify the date as (date).
- Specify the project name in the 4th arg.
- The first arg, the page name, must be the same as the file name.
Suggested-by: Xavier Leroy <Xavier.Leroy@inria.fr>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
pthread_mutex_init.3, pthread_mutexattr_setkind_np.3, pthread_once.3: Update the glibc pages with the debian/glibc version of them
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
pthread_mutex_init.3, pthread_mutexattr_setkind_np.3, pthread_once.3: Import pages from glibc
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 4131356cd ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections")
Reported-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Acked-by: Elliott Hughes <enh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
[alx: ffix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
time(ptr) was wrong here, because struct utmp::ut_time is a int32_t, not
a time_t. Also, the use of time(ptr) is obsolete, and time(NULL) is
always preferred.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These wrappers result in cleaner code, and prevent many mistakes that
can happen when using malloc(3), calloc(3), realloc(3), and functions of
that family.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: 93f369892aea ("strtol.3: EXAMPLES: Simplify errno checking")
Reported-by: iwyu(1) (`make lint-c-iwyu`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
cpplint(1) complained about the previous indentation of the comment.
Oh well.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Just because we can.
Reported-by: cppcheck(1) (`make lint-c-cppcheck`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
size_t can't ever be `< 0`. Instead, the intention was comparing to
`-1`, a sentinel value that was being converted to `SIZE_MAX`.
Comparing with `!= -1` we can keep the `-1` in the source code, which
will be more readable.
Reported-by: cppcheck(1) (`make lint-c-cppcheck`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Use reallocf(3bsd) to avoid memory leaks with misuses of realloc(3).
- err(3bsd) on allocation errors.
Reported-by: cppcheck(1) (`make lint-c-cppcheck`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: cppcheck(1) (`make lint-c-cppcheck`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
It doesn't make sense linting and building these, as we know they'll
yell at us.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove non-breaking space (0xC2A0) that accidentally landed in the
source of some string pages. Replace by a normal space (0x20).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The information in this patch was obtained from a glibc upstream patch,
commit 28aff047818eb1726394296d27b9c7885340bead ("string: Implement
strerror in terms of strerror_l").
According to the patch above, for glibc versions >=2.32, strerror() is
MT-Safe.
Signed-off-by: Shani Leviim <sleviim@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Sergei Gromeniuk <sgromeni@redhat.com>
Cc: Gobinda Das <godas@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
They were used after a table as a workaround for a groff-1.22.4 bug, but
now, in groff-1.23.0, we can use the usual PP or IP macros.
Link: <https://savannah.gnu.org/bugs/index.php?49390>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted patch:
$ grep -rl '^\.sp ' man* | xargs sed -z -i 's/\n\.TE\n\.sp 1\n\.SH/\n.TE\n.SH/'
$ grep -rl '^\.sp ' man* | xargs sed -z -i 's/\n\.TE\n\.sp 1\n\.PP/\n.TE\n.PP/'
plus a few other cases where roff(7) comments made it more complex.
This was a workaround for some groff-1.22.4 bug, but it has been fixed
in groff-1.23.0.
Link: <https://savannah.gnu.org/bugs/index.php?49390>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Stop attempting to manipulate adjustment outside of tbl(1) text blocks.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clean up in preparation for "MR sed".
Protect (non-cross-referenced) man page names from hyphenation. Use the
hyphenation control escape sequence `\%` to do this rather than
bracketing a region of the page with `na` and `hy` requests, which
enables automatic hyphenation even when it is not desired and uses the
wrong hyphenation mode for English to boot.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clean up in preparation for "MR sed".
Protect man page name from hyphenation. `MR` will take care of
that for us; this change is to detect a regression when migrating to it.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Continue commit 9e54434ead, 19 July.
Fix half-bracketed table that didn't turn hyphenation off prior to the
`TS` call in the first place.
Fizes: 9e54434ead ("man*/: ffix (un-bracket tables)")
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Continue commit 9e54434ead, 19 July.
Fix an anomalously bracketed table, not detected by my sed script
because of the intrusion of a *roff comment.
Fizes: 9e54434ead ("man*/: ffix (un-bracket tables)")
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Continue commit 9e54434ead, 19 July.
4 pages issued requests to manipulate adjustment and automatic
hyphenation around tbl(1) tables in a different order from the other 525
documents in the tree that performed this trick.
I produced this change with the following GNU sed script.
/^\.nh/{N;/\n\.ad l/{N;/\n\.TS/s/.*/.TS/}}
/^\.TE/{N;/\n\.ad/{N;/\n\.hy/s/.*/.TE/}}
Fizes: 9e54434ead ("man*/: ffix (un-bracket tables)")
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use terminology more carefully.
* Refer to the info sec property of confidentiality[1] instead of saying,
vaguely, "security-critical".
* Try not to confuse anyone who's studied the analysis of algorithms:
don't say "constant time" when "deterministic time" is meant. The
time to perform the memory comparison remains linear (O(n)), not
constant (O(1)).
* Tighten wording.
Link: [1] <https://informationsecurity.wustl.edu/items/confidentiality-integrity-and-availability-the-cia-triad/>
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Clarify that atexit(3)/on_exit(3) are not called because those are
called only on normal process termination (as documented on their
respective manual pages).
Check with the following test program:
```c
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <stdlib.h>
void one(void)
{
puts("atexit called");
}
void two(int, void*)
{
puts("on_exit called");
}
int main(void)
{
atexit(one);
on_exit(two, NULL);
puts("terminating");
//abort();
exit(EXIT_SUCCESS);
}
```
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
* Stop disabling adjustment and automatic hyphenation before tables,
and incorrectly "restoring" it afterward. In addition to repetitious
boilerplate around tables, the `ad` and `hy` requests, when not given
arguments, do not behave as many man page authors expect. If
adjustment was initially disabled when rendering the page, it was
being activated after `TE` calls, frustrating the desire of the
reader. Furthermore, `hy` when given no argument enables automatic
hyphenation in mode "1", which is not an appropriate value for the
TeX-based hyphenation patterns for English that groff has used for
over 30 years. And analogously to `ad`, a simple `hy` request would
reactivate automatic hyphenation even if the reader had disabled it.
Moreover, such fiddling is often unnecessary. tbl(1) from groff
1.23.0 describes how tbl(1) has always worked, dating back to Michael
Lesk's original implementation at Bell Labs in the 1970s.
"Ordinarily, a table entry is typeset rigidly. It is not filled,
broken, hyphenated, adjusted, or populated with additional inter-
sentence space. ... Text blocks are formatted as was the text prior
to the table, modified by applicable column descriptors. ... Add na
or ad requests to the beginning of a text block to alter its
adjustment distinctly from other text in the document. As with other
table entries, when a text block ends, any alterations to formatting
parameters are discarded. They do not affect subsequent table
entries, not even other text blocks."
* Apropos of the foregoing, add `na` and `nh` requests to the
"Interface" columns of MT-safety tables in pages' "ATTRIBUTES"
sections, so that C function names are not inappropriately hyphenated.
I produced this change with the following GNU sed script.
:start
/^\.ad l/{N;/\n\.nh/{N;/\n\.TS/s/.*/.TS/}}
/^\.TE/{N;/\n\.hy/{N;/\n\.ad/s/.*/.TE/}}
/^Interface.*Attribute.*Value/{N;/\nT{/s/.*/&\n.na\n.nh/
:loop
n
/T{/s/.*/&\n.na\n.nh/
/^\.TE/b start;
b loop
}
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Protect instances of some literals from hyphenation. These are only
those necessary to improve analyzability of a large-scale (500+ file),
sed-driven change to improve adjustment and hyphenation enablement
management around tables.
* man2/getrlimit.2: Protect some instances of `RLIMIT_MSGQUEUE`,
`RLIMIT_SIGPENDING`, `RLIMIT_FSIZE`, and `getrlimit` from
hyphenation.
* man2/sigaltstack.2: Protect an instance of `setrlimit` from
hyphenation.
* man3/gethostbyname.3: Protect an instance of `endhostent` from
hyphenation.
* man3/getmntent.3: Protect an instance of `getmntinfo` from
hyphenation.
Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
FreeBSD, OpenBSD, and Linux (/dev/ptmx) do all intialisation in open(2),
and grantpt(3) is a no-op (that checks whether the fd is a pty, except
on musl).
The illumos gate and NetBSD do a ioctl (and, indeed, illumos-gate commit
facf4a8d7b59fde89a8662b4f4c73a758e6c402c ("PSARC/2003/246 Filesystem
Driven Device Naming"), which kills pt_chmod, notes that it's been
"6464196 bfu should remove pt_chmod, obsoleted by /dev filesystem").
glibc 2.33 completely kills BSD PTY support on Linux
(Debian hasn't configured with them on any architecture since 2007:
https://bugs.debian.org/338404
and even earlier on some arches; they're really just trivia under
Linux ‒ this may be better served stuffed into HISTORY as an explainer
for the SIGCHLD thing, since regardless of the "version", the behaviour
is well-defined and consistent).
There really aren't many cohesive "versions" of this ‒ indeed, so long
as grantpt(3) exists it behaves precisely as described here ‒
inasmuch as different systems, historically, had different ptys,
and thus different implementations. These are all but trivia.
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
libcrypt is the password hashing library, and libcrypto is a completely
different library (OpenSSL cryptography library). While the encrypt()
function can "encrypt" things, it uses a broken algorithm so let's not
call libcrypt an "encryption" library at all. In crypt.3, also replace
"encrypt" with "hash" except several places where it really means
"encrypt".
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For the few functions that come only in 64-bit off_t flavors,
document their APIs as using off_t instead of off64_t,
and say also that code should #define _FILE_OFFSET_BITS 64.
This documents what user code is (and should be) doing anyway,
if it needs to work on traditional x86 and ARM Linux.
Reported-by: Rich Felker <dalias@libc.org>
Fixes: 9bebb17e5b57 ("splice.2: Use 'off64_t' instead of 'loff_t'")
Fixes: 76c5631fb442 ("copy_file_range.2: Document glibc wrapper instead of kernel syscall")
Fixes: 5cabfa06b407 ("man-pages 1.68")
Fixes: 3ca974e3988a ("New page for sync_file_range(2), new in kernel 2.6.17.")
Fixes: 9bebb17e5b57 ("sync_file_range.2: Document the architecture-specific sync_file_range2() system call")
Fixes: 79bf8cdcf36a ("Document fopencookie(3), a library function that allows custom implementation of a stdio stream.")
Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Reviewed-by: Sam James <sam@gentoo.org>
Cc: Jonathan Wakely <jwakely@redhat.com>
Cc: Szabolcs Nagy <nsz@port70.net>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: A. Wilcox <AWilcox@wilcox-tech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Quoting myself from #musl:
01:59:40 hm, I think this was just invented for symmetry with bfree/bavail
02:00:46 FFS has minfree for space but nothing equivalent for inodes
02:32:31 (this is mirrored in ext4;
a global grep over DragonFlyBSD and the illumos gate
showed just NFSv3 forwarding from the server;
OpenBSD always sets it to the same thing as f_ffree;
oddly, NetBSD /does/ calculate it differently
for LFS and FFS but due to queued writes or
w/e not because of root reservation;
and as expected a lot of "/* what to put in here? */"
and "// XXX same??")
Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Yedidyah Bar David <didi@redhat.com>
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Caused a double space before "not".
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Tested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The /point/ is it's unbounded;
git grep -F 'void "' | grep -F '[]'
didn't return anything so I reverted it to a void*.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Fixes: c64cd13e0025 ("Various pages: SYNOPSIS: Use VLA syntax in 'void *' function parameters")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The wording regarding transliteration is vague, because this man page is not
the right place for going into the details of the transliteration.
Here are the details:
GNU libc and GNU libiconv support transliteration, for example, of "½" to "1/2",
or of "å" to "aa" in a Danish locale. The transliteration maps a multibyte
character of the input encoding to zero or more characters in the output.
There are two kinds of transliteration rules:
- Those that are valid regardless of locale. Typically this means that the
original and the transliterated character have similar glyphs, such as
in the case "½" to "1/2".
In GNU libc, these are collected in the files
glibc/localedata/locales/translit_*.
- Those that are valid in a single locale only. Often such a rule
reflects similar pronounciation of the original and the transliterated
characters. Some locales have script-based transliteration, for example
from the Cyrillic script to the Latin script.
In GNU libc, these are collected in the file
glibc/localedata/locales/<locale>.
In GNU libiconv, transliterations of this kind are not supported.
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29913#c4
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217059
Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Reported-by: Reuben Thomas <rrt@sc3d.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
[ fix semantic newlines ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixes: commit b324e17d3208c940622ab192609b836928d5aa8d ("Many pages: wfix")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Fixed in:
NetBSD 6 src lib/libc/stdlib/putenv.c 1.13
FreeBSD 7 putenv(3) says so
OpenBSD 4.6 src lib/libc/stdlib/setenv.c 1.10
and is correct under current(?) MacOS as well
The current wording implies that all of 4.4BSD's descenants also carry
this bug (at least it did to me): they did until like 2009 but they're
fine now
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://sourceware.org/pipermail/libc-alpha/2023-May/147810.html>
Link: <https://patchwork.sourceware.org/project/glibc/patch/33ec9e0c1e587813b90e8aa771c2c8e6e379dd48.camel@posteo.net/>
Link: <https://lore.kernel.org/linux-man/d79b505c-5b19-331c-5b25-d40adc9cc843@wanadoo.fr/>
Cc: John Scott <jscott@posteo.net>
Cc: Paul Floyd <pjfloyd@wanadoo.fr>
Signed-off-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These functions accept NULL.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Use the dummy character to avoid warnings in examples.
- Re-enable the warning.
Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: groff(1) (`make build-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This section reads like it were (and pretty much is) lifted from POSIX.
That's hard to read, because POSIX is horrendously verbose, as usual.
Instead, synopsise it into something less formal but more reasonable,
and describe the resulting range with a range instead of a paragraph.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This has the benefit that we can use proportional-width fonts in the
SYNOPSIS without misalignment in the structures.
Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/3459b2a0-6a07-40fc-1e66-db906c3f62ac@gmail.com/T/#mb50a957359e029c611d6e0b8f1b1a20101aae670>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
regex_t.3type into regex.3
Move-only commit.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Explicitly spell out the ranges involved. The original wording always
confused me, but it's actually very sane.
Remove "this doesn't change R_NOTBOL & R_NEWLINE" ‒ so does it change
R_NOTEOL? No. That's weird and confusing.
String largeness doesn't matter, known-lengthness does.
Explicitly spell out the influence on returned matches
(relative to string, not start of range).
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use "bitwise OR" instead of "bitwise-or" (with fonts).
No other pages spell it like this.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
"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.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We never bold POSIX, not even anywhere else on this page.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
In the regexec() signature
regmatch_t pmatch[restrict .nmatch],
is a simplification. It's actually
regmatch_t pmatch[restrict
((.preg->flags & REG_NOSUB) ? 0 : .nmatch) ?:
!!(.eflags & REG_STARTEND)],
But speccing that would be insane.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
That extra whitespace cuased issues to the Debian packaging tool that
autodetects the licenses from the SPDX header.
Cc: Marcos Fouces <marcos@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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>
|
|
Reported-by: mandoc(1) (`make lint-man-mandoc`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
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.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
When a precision is given, the 0 flag is ignored only for integer
conversions, not for all numeric conversions.
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Add a new HISTORY section that covers the history of an API, both
regarding implementations and regarding old standards. This was
previously covered in VERSIONS, and in some cases in STANDARDS.
- Repurpose VERSIONS to cover differing implementations in _current_
systems.
- STANDARDS is reduced to only cover current versions of standards.
That basically means only C11 (C99 has been superseeded by C11; C17
is just a bugfix of C11, so not really a new version), and
POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a
bugfix for *-2008). The section also mentions for example 'Linux',
'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if
it's (de-facto) standard in the BSDs.
- In some cases content that should go into one of these sections was
in NOTES. Move it from there to where it corresponds.
- In the SYNOPSIS, I added [[deprecated]] in some functions that I
found are deprecated by the relevant standards.
- A few other related changes...
Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
<sources.redhat.com/bugzilla> seems broken right now.
Apparently it was replaced, quite a long time ago --based on what I can
find on the net-- with <www.sourceware.org/bugzilla>, which does work.
This patch was created with:
$ find man* -type f \
| xargs grep -l 'sources.redhat.com/bugzilla' \
| xargs sed -i 's;http://sources.redhat.com/bugzilla/;https://www.sourceware.org/bugzilla/;g'
Verified with:
$ git diff | sed -n 's;^+.*\(https://www.sourceware.org/bugzilla/show_bug.cgi?id=[0-9]*\).*;\1;p' > URLs
$ mkdir test
$ cd test
$ wget -i ../URLs
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Data copied from libbsd's page.
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
VERSIONS and STANDARDS are closely related (and often the distinction is
not so clear). Now that we're going to add another section, HISTORY,
that is related to both, it makes sense to have the three together.
As a curiosity, the list in man-pages(7) that detailed what each section
should contain had them by accident(?) in the order that we're moving
to, instead of the order that was used elsewhere.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This reverts commit 72b349dd8c209d7375d4d4f76e2315943d654ee9.
This removal caused inconveniences to some programmers. We've agreed to
keep the information about C89, since there's an easy way to keep it
correct by checking against a plain-text copy of the standard itself:
$ stdc89()
{
grep "[[:alpha:]] \**\b$1([[:alnum:]*,. ]*);" /path/to/c89-draft.txt;
}
$ stdc89 printf
int printf(const char *format, ...);
int printf(const char *format, ...);
We will also do a split of the information in STANDARDS, since now it's
a mix of what a proper STANDARDS section would be plus a HISTORY section
commonly-found in other manual pages. C89 will go into HISTORY.
Link: <https://lore.kernel.org/linux-man/b73a9636-1a17-36f3-3718-d9ca3b9293ed@gmail.com/T/>
Link: <https://port70.net/~nsz/c/c89/c89-draft.txt>
Reported-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Reported-by: Matt Jolly <Matt.Jolly@footclan.ninja>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://www.iso.org>
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
These functions are declared as obsolete in the same page.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add missing or remove redundant \" t comments (for tbl(1)).
Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Reported-by: mandoc(1) (make lint-man-mandoc)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
mallocarray() is safer than malloc(3), since it checks for overflow; it
should be preferred almost always (with the exception of non-arrays
maybe).
The macros like MALLOCARRAY() --and MALLOC()-- that perform automatic
casting and sizeof() are also safer than calling the functions directly:
- The type of the allocated object (not the pointer) is specified as an
argument, which improves readability:
- It is directly obvious what is the type of the object just by
reading the macro call.
- It allows grepping for all allocations of a given type.
This is admittedly similar to using sizeof() to get the size of the
object, but we'll see why this is better.
- In the case of reallocation macros, an extra check is performed to
make sure that the previous pointer was compatible with the allocated
type, which can avoid some mistakes.
- The cast is performed automatically, with a pointer type derived from
the type of the object. This is the best point of this macro, since
it does an automatic cast, where there's no chance of typos.
Usually, programmers have to decide whether to cast or not the result
of malloc(3). Casts usually hide warnings, so are to be avoided.
However, these functions already return a void *, so a cast doesn't
really add much danger. Moreover, a cast can even add warnings in
this exceptional case, if the type of the cast is different than the
type of the assigned pointer. Performing a manual cast is still not
perfect, since there are chances that a mistake will be done, and
even ignoring accidents, they clutter code, hurting readability.
And now we have a cast that is synced with sizeof.
- Whenever the type of the object changes, since we perform an explicit
cast to the old type, there will be a warning due to type mismatch in
the assignment, so we'll be able to see all lines that are affected
by such a change. This is especially important, since changing the
type of a variable and missing to update an allocation call far away
from the declaration is easy, and the consequences can be quite bad
Apart from those benefits, there are other minor style benefits:
- Consistency in getting the size of the object from sizeof(type),
instead of a mix of sizeof(type) sometimes and sizeof(*p) other
times.
- More readable code: no casts, and no sizeof(), so also shorter lines
that we don't need to cut.
- Consistency in using array allocation calls for allocations of arrays
of objects, even when the object size is 1.
Link: <https://github.com/shadow-maint/shadow/pull/649>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: "Valentin V. Bartenev" <vbartenev@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This text I forgot to remove it when the page was split from scanf(3).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/27264e6b-bc50-f772-f8d5-1abc4ebcbe62@gmail.com/T/>
Signed-off-by: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Casting sockaddr structures is just a symptom that these APIs were
seriously misdesigned. In GNU C, there's already a better way to handle
this (see [[gnu::transparent_union]]). ISO C should be fixed. Let's
not promote this kind of code.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
register_printf_type.3: Add links to printf.h(3head)
Cc: Walter Harms <wharms@bfs.de>
Cc: <Radisson97@gmx.de>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
|
|
Use correct *roff special character for hat/caret/circumflex accent.
Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|