summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* string_copying.7: Remove zustr2stp()Alejandro Colomar2023-12-04-46/+13
| | | | | | Instead, document how to use mempcpy(3) well in that case. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* string_copying.7: Remove zustr2ustp()Alejandro Colomar2023-12-04-39/+10
| | | | | | Instead, document how to use mempcpy(3) well in that case. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* string_copying.7: Remove ustr2stp() and ustpcpy()Alejandro Colomar2023-12-03-67/+23
| | | | | | | | | | | | | | | Users reported complains about having so many invented functions, and the complexity of remembering all of them. In these two cases, open-coding mempcpy(3) isn't so bad. In fact, it's quite readable. It has the problem of type safety, since this function accepts almost everything, but let users come up with a wrapper if they need it; it's not like you would be calling these functions often. Document how to use mempcpy(3) well in those cases. Cc: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* string_copying.7: Fortify source of some functionsAlejandro Colomar2023-12-03-17/+4
| | | | | | | | By setting the terminating null byte via a stpcpy(dst, "") call, the last byte is also protected by _FORTIFY_SOURCE. Reported-by: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* *.mk: build-book: Use sponge(1) to update the book atomicallyAlejandro Colomar2023-12-03-1/+2
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* *.mk: build-book: Add target for building the Linux Man BookAlejandro Colomar2023-12-01-1/+34
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/: Simplify pipelineAlejandro Colomar2023-12-01-851/+110
| | | | | | | | | | | | | | | | | Call the groff(1) pipeline only once. This optimizes around 2 seconds, while also simplifying the code. This change was originally written by Deri, with some parts written by Brian. I took the script that Deri sent, and split it so that the groff(1) pipeline is called from the shell script, and the Perl script is limited to editing the man(7) pages. This helps me understand the process, since my understanding of Perl is very limited. It also makes this change smaller, so that it's less of a big-bang. Link: <https://lore.kernel.org/linux-man/ZWkO4qPC4BxkwBNm@debian/T/#m3d453440b02dd189bc12d2e629c4026206025b40> Co-developed-by: Deri James <deri@chuzzlewit.myzen.co.uk> Co-developed-by: Brian Inglis <Brian.Inglis@Shaw.ca> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strtol.3, strtoul.3: ERRORS: Clarify that these don't set errno on successAlejandro Colomar2023-12-01-0/+6
| | | | | | | | | | 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>
* posix_memalign.3: wfixAlejandro Colomar2023-11-24-2/+0
| | | | | | | Remove superfluous words. Suggested-by: Jonny Grant <jg@jguk.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* posix_memalign.3: ERRORS: wfixAlejandro Colomar2023-11-24-1/+1
| | | | | | | Simplify, and make it consistent with malloc(3). Suggested-by: Jonny Grant <jg@jguk.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/: Shorten names of scriptsAlejandro Colomar2023-11-24-2/+2
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/prepare_linux_man_book.pl: Add new function BuildSec()Alejandro Colomar2023-11-24-1/+10
| | | | | | | | | | | The intention is to move some code from BuildPage() into this function, reducing the complexity of that inner function. As a side effect, just by adding this function, I've already noticed an optimization of 0.3 s. The reason, I guess, is that it starts processing pages without waiting for the entire sort to complete, which reduces the latency of the script. Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: Call pic(1), and call it after ↵Alejandro Colomar2023-11-24-1/+2
| | | | | | | | | | | preconv(1) Call it, just in case we want to use in manual pages in the future. It doesn't hurt performance. And call it after preconv(1), which should be the first program in the groff(1) pipeline. Suggested-by: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* proc_sys_user.5: tfixJakub Wilk2023-11-24-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* proc_pid_oom_score_adj.5: tfixJakub Wilk2023-11-24-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* proc_pid_mountinfo.5: spfixJakub Wilk2023-11-24-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* proc_crypto.5: spfixJakub Wilk2023-11-24-1/+1
| | | | | | | | "Cypher" is a valid but less common spelling of "cipher". The latter is used everywhere else, so let's use it here too. Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* pthread_key_create.3: tfixJakub Wilk2023-11-24-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* CONTRIBUTING: Say it's us who recommend signing emailsAlejandro Colomar2023-11-24-3/+4
| | | | | | | | Also link to <gnupg.org>, since they also recommend it. Suggested-by: "G. Branden Robinson" <branden@debian.org> Acked-by: "G. Branden Robinson" <branden@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/prepare_linux_man_book.pl: Don't support trailing white ↵Alejandro Colomar2023-11-24-2/+0
| | | | | | space nor \r Signed-off-by: Alejandro Colomar <alx@kernel.org>
* *: Remove trailing white spaceAlejandro Colomar2023-11-24-90/+90
| | | | | | | | Scripted change: $ grep -rl '\s$' | xargs sed -i 's/ * * *$//g' Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: Simplify groff(1) callAlejandro Colomar2023-11-22-3/+3
| | | | | | | | | | | We're suppressing formatted device-independent output of troff(1), so it doesn't make sense to pass an option to gropdf(1) with -P. We don't need the fonts either. We don't even need groff(1), since we're only using troff(1). Redirect to /dev/null, instead of using -z. It's more explicit. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: Explicitly preprocess before ↵Alejandro Colomar2023-11-22-2/+6
| | | | | | calling groff(1) Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: Allow running from any working ↵Alejandro Colomar2023-11-22-6/+8
| | | | | | directory Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: Use pipes instead of temporary ↵Alejandro Colomar2023-11-22-15/+15
| | | | | | | | | | files It's still easy to debug, by inserting |tee /dev/tty|, but the script is cleaner if it doesn't generate intermediary files, and it's also faster (on my desktop computer, it goes down from 18.5 s to 16.3 s). Signed-off-by: Alejandro Colomar <alx@kernel.org>
* CONTRIBUTING: Please sign your emails with PGPAlejandro Colomar2023-11-22-0/+23
| | | | | Cc: Matthew House <mattlloydhouse@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* stpncpy.3: Rename third parameter to 'dsize'Alejandro Colomar2023-11-22-9/+9
| | | | | | This better clarifies that the size is of dst. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/build_linux_man_book.sh: LicenseAlejandro Colomar2023-11-22-0/+2
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/prepare_linux_man_book.pl: Use a helper function for ↵Alejandro Colomar2023-11-22-68/+75
| | | | | | building pages Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/prepare_linux_man_book.pl: wsfixAlejandro Colomar2023-11-22-167/+137
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* stpncpy.3: Reword, saying 'byte' instead of 'character'Alejandro Colomar2023-11-22-5/+6
| | | | | | | | | 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>
* stpncpy.3: EXAMPLES: errx(3) instead of warnx(3) if truncation occursAlejandro Colomar2023-11-22-2/+2
| | | | | | | Truncation is not acceptable in most cases. Don't suggest that it's just fine. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* stpncpy.3: EXAMPLES: Use fwrite(3) instead of printf(3)Alejandro Colomar2023-11-22-2/+4
| | | | | | | | | | 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>
* stpncpy.3: NAME: Clarify that these functions only pad if necessaryAlejandro Colomar2023-11-22-2/+2
| | | | | | Suggested-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* stpncpy.3: Optimize possible implementation of stpncpy()Alejandro Colomar2023-11-21-2/+4
| | | | | | | | | 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>
* stpncpy.3: SYNOPSIS: ffixAlejandro Colomar2023-11-21-2/+2
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* stpncpy.3: Don't say 'width' when 'size' is meantAlejandro Colomar2023-11-21-2/+2
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: CAVEATS: wfixAlejandro Colomar2023-11-21-2/+2
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: Reword descriptionAlejandro Colomar2023-11-21-4/+9
| | | | | | | | | 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>
* strncat.3: Say that if dst isn't a string, the behavior is undefinedAlejandro Colomar2023-11-21-3/+5
| | | | | | Suggested-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: SEE ALSO: tfixAlejandro Colomar2023-11-21-1/+1
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: EXAMPLES: Fix name of variableAlejandro Colomar2023-11-21-4/+3
| | | | | | | | 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>
* strncat.3: Simplify possible implementation of strncat()Alejandro Colomar2023-11-21-5/+2
| | | | | Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: Rename third parameter to ssizeAlejandro Colomar2023-11-21-5/+5
| | | | | | This better clarifies that the size is of src. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: Fix bug in possible implementation of strncat(3)Alejandro Colomar2023-11-21-2/+2
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: SYNOPSIS: ffixAlejandro Colomar2023-11-21-1/+1
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: Don't say 'width' when 'size' is meantAlejandro Colomar2023-11-21-2/+2
| | | | | | Reported-by: Paul Eggert <eggert@cs.ucla.edu> Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* strncat.3: Say append instead of (con)catenateAlejandro Colomar2023-11-21-2/+2
| | | | | Cowritten-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* scripts/LinuxManBook/: Split the pipeline for building the Linux Man BookAlejandro Colomar2023-11-21-23/+30
| | | | | | | This helps understand how this book is built. The Perl script was too magic for my taste. Now it does less magic. :) Signed-off-by: Alejandro Colomar <alx@kernel.org>
* README: Versions: Document PDF books in ↵Alejandro Colomar2023-11-20-0/+1
| | | | | | | | | <https://www.alejandro-colomar.es/share/dist/man-pages/> I also publish the books in my server. See for example: <https://www.alejandro-colomar.es/share/dist/man-pages/6/6.05/6.05.01/> Signed-off-by: Alejandro Colomar <alx@kernel.org>