diff options
Diffstat (limited to '')
637 files changed, 6889 insertions, 6271 deletions
diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3 index aa5d71d..6c13a62 100644 --- a/man3/CPU_SET.3 +++ b/man3/CPU_SET.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH CPU_SET 3 2023-05-03 "Linux man-pages 6.05.01" +.TH CPU_SET 3 2023-10-31 "Linux man-pages 6.7" .SH NAME CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT, CPU_AND, CPU_OR, CPU_XOR, CPU_EQUAL, @@ -19,43 +19,43 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <sched.h> -.PP +.P .BI "void CPU_ZERO(cpu_set_t *" set ); -.PP +.P .BI "void CPU_SET(int " cpu ", cpu_set_t *" set ); .BI "void CPU_CLR(int " cpu ", cpu_set_t *" set ); .BI "int CPU_ISSET(int " cpu ", cpu_set_t *" set ); -.PP +.P .BI "int CPU_COUNT(cpu_set_t *" set ); -.PP +.P .BI "void CPU_AND(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_OR(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_XOR(cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); -.PP +.P .BI "int CPU_EQUAL(cpu_set_t *" set1 ", cpu_set_t *" set2 ); -.PP +.P .BI "cpu_set_t *CPU_ALLOC(int " num_cpus ); .BI "void CPU_FREE(cpu_set_t *" set ); .BI "size_t CPU_ALLOC_SIZE(int " num_cpus ); -.PP +.P .BI "void CPU_ZERO_S(size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "void CPU_SET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); .BI "void CPU_CLR_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); .BI "int CPU_ISSET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "int CPU_COUNT_S(size_t " setsize ", cpu_set_t *" set ); -.PP +.P .BI "void CPU_AND_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_OR_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); .BI "void CPU_XOR_S(size_t " setsize ", cpu_set_t *" destset , .BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); -.PP +.P .BI "int CPU_EQUAL_S(size_t " setsize ", cpu_set_t *" set1 \ ", cpu_set_t *" set2 ); .fi @@ -66,14 +66,14 @@ data structure represents a set of CPUs. CPU sets are used by .BR sched_setaffinity (2) and similar interfaces. -.PP +.P The .I cpu_set_t data type is implemented as a bit mask. However, the data structure should be treated as opaque: all manipulation of CPU sets should be done via the macros described in this page. -.PP +.P The following macros are provided to operate on the CPU set .IR set : .TP @@ -103,12 +103,12 @@ is a member of .BR CPU_COUNT () Return the number of CPUs in .IR set . -.PP +.P Where a .I cpu argument is specified, it should not produce side effects, since the above macros may evaluate the argument more than once. -.PP +.P The first CPU on the system corresponds to a .I cpu value of 0, the next CPU corresponds to a @@ -122,7 +122,7 @@ The constant (currently 1024) specifies a value one greater than the maximum CPU number that can be stored in .IR cpu_set_t . -.PP +.P The following macros perform logical operations on CPU sets: .TP .BR CPU_AND () @@ -165,7 +165,7 @@ size CPU sets (e.g., to allocate sets larger than that defined by the standard .I cpu_set_t data type), glibc nowadays provides a set of macros to support this. -.PP +.P The following macros are used to allocate and deallocate CPU sets: .TP .BR CPU_ALLOC () @@ -186,7 +186,7 @@ macros described below. .BR CPU_FREE () Free a CPU set previously allocated by .BR CPU_ALLOC (). -.PP +.P The macros whose names end with "_S" are the analogs of the similarly named macros without the suffix. These macros perform the same tasks as their analogs, @@ -202,27 +202,27 @@ return nonzero if is in .IR set ; otherwise, it returns 0. -.PP +.P .BR CPU_COUNT () and .BR CPU_COUNT_S () return the number of CPUs in .IR set . -.PP +.P .BR CPU_EQUAL () and .BR CPU_EQUAL_S () return nonzero if the two CPU sets are equal; otherwise they return 0. -.PP +.P .BR CPU_ALLOC () returns a pointer on success, or NULL on failure. (Errors are as for .BR malloc (3).) -.PP +.P .BR CPU_ALLOC_SIZE () returns the number of bytes required to store a CPU set of the specified cardinality. -.PP +.P The other functions do not return a value. .SH STANDARDS Linux. @@ -234,10 +234,10 @@ The and .BR CPU_ISSET () macros were added in glibc 2.3.3. -.PP +.P .BR CPU_COUNT () first appeared in glibc 2.6. -.PP +.P .BR CPU_AND (), .BR CPU_OR (), .BR CPU_XOR (), @@ -258,14 +258,14 @@ first appeared in glibc 2.7. .SH NOTES To duplicate a CPU set, use .BR memcpy (3). -.PP +.P Since CPU sets are bit masks allocated in units of long words, the actual number of CPUs in a dynamically allocated CPU set will be rounded up to the next multiple of .IR "sizeof(unsigned long)" . An application should consider the contents of these extra bits to be undefined. -.PP +.P Notwithstanding the similarity in the names, note that the constant .B CPU_SETSIZE @@ -277,7 +277,7 @@ while the argument of the .BR CPU_*_S () macros is a size in bytes. -.PP +.P The data types for arguments and return values shown in the SYNOPSIS are hints what about is expected in each case. However, since these interfaces are implemented as macros, @@ -298,7 +298,7 @@ These bugs are fixed in glibc 2.9. .SH EXAMPLES The following program demonstrates the use of some of the macros used for dynamically allocated CPU sets. -.PP +.P .\" SRC BEGIN (CPU_SET.c) .EX #define _GNU_SOURCE diff --git a/man3/INFINITY.3 b/man3/INFINITY.3 index aa7ea0c..0f8eab0 100644 --- a/man3/INFINITY.3 +++ b/man3/INFINITY.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH INFINITY 3 2023-03-30 "Linux man-pages 6.05.01" +.TH INFINITY 3 2023-10-31 "Linux man-pages 6.7" .SH NAME INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL \- floating-point constants .SH LIBRARY @@ -12,11 +12,11 @@ Math library .nf .BR "#define _ISOC99_SOURCE" " /* See feature_test_macros(7) */" .B #include <math.h> -.PP +.P .B INFINITY -.PP +.P .B NAN -.PP +.P .B HUGE_VAL .B HUGE_VALF .B HUGE_VALL @@ -27,7 +27,7 @@ The macro expands to a .I float constant representing positive infinity. -.PP +.P The macro .B NAN expands to a @@ -42,7 +42,7 @@ The opposite is a .I signaling NaN. See IEC 60559:1989. -.PP +.P The macros .BR HUGE_VAL , .BR HUGE_VALF , @@ -58,7 +58,7 @@ that represent a large positive value, possibly positive infinity. C11. .SH HISTORY C99. -.PP +.P On a glibc system, the macro .B HUGE_VAL is always available. @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH MAX 3 2023-05-03 "Linux man-pages 6.05.01" +.TH MAX 3 2023-10-31 "Linux man-pages 6.7" .SH NAME MAX, MIN \- maximum or minimum of two values .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/param.h> -.PP +.P .BI MAX( a ", " b ); .BI MIN( a ", " b ); .fi @@ -35,9 +35,9 @@ you might prefer to use or .BR fmin (3), which can handle NaN. -.PP +.P The arguments may be evaluated more than once, or not at all. -.PP +.P Some UNIX systems might provide these macros in a different header, or not at all. .SH BUGS diff --git a/man3/MB_CUR_MAX.3 b/man3/MB_CUR_MAX.3 index c74d563..9aa2089 100644 --- a/man3/MB_CUR_MAX.3 +++ b/man3/MB_CUR_MAX.3 @@ -9,7 +9,7 @@ .\" .\" Modified, aeb, 990824 .\" -.TH MB_CUR_MAX 3 2023-03-30 "Linux man-pages 6.05.01" +.TH MB_CUR_MAX 3 2023-03-30 "Linux man-pages 6.7" .SH NAME MB_CUR_MAX \- maximum length of a multibyte character in the current locale .SH LIBRARY diff --git a/man3/MB_LEN_MAX.3 b/man3/MB_LEN_MAX.3 index b58bdd5..3c56b44 100644 --- a/man3/MB_LEN_MAX.3 +++ b/man3/MB_LEN_MAX.3 @@ -9,7 +9,7 @@ .\" .\" Modified, aeb, 990824 .\" -.TH MB_LEN_MAX 3 2023-03-30 "Linux man-pages 6.05.01" +.TH MB_LEN_MAX 3 2023-03-30 "Linux man-pages 6.7" .SH NAME MB_LEN_MAX \- maximum multibyte length of a character across all locales .SH LIBRARY diff --git a/man3/TIMESPEC_TO_TIMEVAL.3 b/man3/TIMESPEC_TO_TIMEVAL.3 new file mode 100644 index 0000000..30ab755 --- /dev/null +++ b/man3/TIMESPEC_TO_TIMEVAL.3 @@ -0,0 +1 @@ +.so man3/TIMEVAL_TO_TIMESPEC.3 diff --git a/man3/TIMEVAL_TO_TIMESPEC.3 b/man3/TIMEVAL_TO_TIMESPEC.3 new file mode 100644 index 0000000..9559a52 --- /dev/null +++ b/man3/TIMEVAL_TO_TIMESPEC.3 @@ -0,0 +1,32 @@ +.\" Copyright (C) 2024 Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH TIMEVAL_TO_TIMESPEC 3 2024-03-12 "Linux man-pages 6.7" +.SH NAME +TIMEVAL_TO_TIMESPEC, +TIMESPEC_TO_TIMEVAL +\- +convert between time structures +.SH SYNOPSIS +.nf +.B #define _GNU_SOURCE +.B #include <sys/time.h> +.P +.BI "void TIMEVAL_TO_TIMESPEC(const struct timeval *" tv ", struct timespec *" ts ); +.BI "void TIMESPEC_TO_TIMEVAL(struct timeval *" tv ", const struct timespec *" ts ); +.fi +.SH DESCRIPTION +These macros convert from a +.BR timeval (3type) +to a +.BR timespec (3type) +structure, +and vice versa, +respectively. +.P +This is especially useful for writing interfaces that receive a type, +but are implemented with calls to functions that receive the other one. +.SH STANDARDS +GNU, +BSD. diff --git a/man3/_Generic.3 b/man3/_Generic.3 index ef1e2a6..b9bb026 100644 --- a/man3/_Generic.3 +++ b/man3/_Generic.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH _Generic 3 2023-05-03 "Linux man-pages 6.05.01" +.TH _Generic 3 2023-10-31 "Linux man-pages 6.7" .SH NAME _Generic \- type-generic selection .SH SYNOPSIS @@ -18,10 +18,10 @@ that is compatible with the type of the controlling or .B default: if no type is compatible. -.PP +.P .I expression is not evaluated. -.PP +.P This is especially useful for writing type-generic macros, that will behave differently depending on the type of the argument. .SH STANDARDS @@ -44,7 +44,7 @@ seamlessly upgrading to the widest available type. #define my_imaxabs _Generic(INTMAX_C(0), \e long: labs, \e long long: llabs \e - /* long long long: lllabs */ \e +/* long long long: lllabs */ \e ) \& int diff --git a/man3/__ppc_get_timebase.3 b/man3/__ppc_get_timebase.3 index 7ec1e5a..2933787 100644 --- a/man3/__ppc_get_timebase.3 +++ b/man3/__ppc_get_timebase.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH __ppc_get_timebase 3 2023-05-03 "Linux man-pages 6.05.01" +.TH __ppc_get_timebase 3 2023-10-31 "Linux man-pages 6.7" .SH NAME __ppc_get_timebase, __ppc_get_timebase_freq \- get the current value of the Time Base Register on Power architecture and its frequency. @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/platform/ppc.h> -.PP +.P .B uint64_t __ppc_get_timebase(void); .B uint64_t __ppc_get_timebase_freq(void); .fi @@ -22,7 +22,7 @@ reads the current value of the Time Base Register and returns its value, while .BR __ppc_get_timebase_freq () returns the frequency in which the Time Base Register is updated. -.PP +.P The Time Base Register is a 64-bit register provided by Power Architecture processors. It stores a monotonically incremented value that is updated at a @@ -32,7 +32,7 @@ frequency. .BR __ppc_get_timebase () returns a 64-bit unsigned integer that represents the current value of the Time Base Register. -.PP +.P .BR __ppc_get_timebase_freq () returns a 64-bit unsigned integer that represents the frequency at which the Time Base Register is updated. diff --git a/man3/__ppc_set_ppr_med.3 b/man3/__ppc_set_ppr_med.3 index b3effad..6c2e692 100644 --- a/man3/__ppc_set_ppr_med.3 +++ b/man3/__ppc_set_ppr_med.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH __ppc_set_ppr_med 3 2023-07-20 "Linux man-pages 6.05.01" +.TH __ppc_set_ppr_med 3 2023-10-31 "Linux man-pages 6.7" Programmer's Manual" .SH NAME __ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/platform/ppc.h> -.PP +.P .B void __ppc_set_ppr_med(void); .B void __ppc_set_ppr_very_low(void); .B void __ppc_set_ppr_low(void); @@ -26,7 +26,7 @@ Standard C library These functions provide access to the .I Program Priority Register (PPR) on the Power architecture. -.PP +.P The PPR is a 64-bit register that controls the program's priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more @@ -49,7 +49,7 @@ sets the Program Priority Register value to .BR __ppc_set_ppr_med_low () sets the Program Priority Register value to .IR "medium low" . -.PP +.P The privileged state .I medium high may also be set during certain time intervals by problem-state (unprivileged) @@ -58,7 +58,7 @@ programs, with the following function: .BR __ppc_set_ppr_med_high () sets the Program Priority to .IR "medium high" . -.PP +.P If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium. @@ -80,7 +80,6 @@ T{ .BR __ppc_set_ppr_med_high () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -110,5 +109,5 @@ Availability of these functions can be tested using .BR "#ifdef _ARCH_PWR8" . .SH SEE ALSO .BR __ppc_yield (3) -.PP +.P .I Power ISA, Book\~II - Section\ 3.1 (Program Priority Registers) diff --git a/man3/__ppc_yield.3 b/man3/__ppc_yield.3 index 465dd29..c98a74f 100644 --- a/man3/__ppc_yield.3 +++ b/man3/__ppc_yield.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH __ppc_yield 3 2023-07-20 "Linux man-pages 6.05.01" +.TH __ppc_yield 3 2023-10-31 "Linux man-pages 6.7" .SH NAME __ppc_yield, __ppc_mdoio, __ppc_mdoom \- Hint the processor to release shared resources @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/platform/ppc.h> -.PP +.P .B void __ppc_yield(void); .B void __ppc_mdoio(void); .B void __ppc_mdoom(void); @@ -24,18 +24,18 @@ provide hints about the usage of resources that are shared with other processors on the Power architecture. They can be used, for example, if a program waiting on a lock intends to divert the shared resources to be used by other processors. -.PP +.P .BR __ppc_yield () provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors. -.PP +.P .BR __ppc_mdoio () provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed. -.PP +.P .BR __ppc_mdoom () provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all @@ -57,12 +57,11 @@ T{ .BR __ppc_mdoom () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY glibc 2.18. .SH SEE ALSO .BR __ppc_set_ppr_med (3) -.PP +.P .I Power ISA, Book\~II - Section\~3.2 ("or" architecture) diff --git a/man3/__setfpucw.3 b/man3/__setfpucw.3 index 161bbf9..2296268 100644 --- a/man3/__setfpucw.3 +++ b/man3/__setfpucw.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH __setfpucw 3 2023-03-30 "Linux man-pages 6.05.01" +.TH __setfpucw 3 2023-10-31 "Linux man-pages 6.7" .SH NAME __setfpucw \- set FPU control word on i386 architecture (obsolete) .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <i386/fpu_control.h> -.PP +.P .BI "[[deprecated]] void __setfpucw(unsigned short " control_word ); .fi .SH DESCRIPTION @@ -44,7 +44,7 @@ and FPU exception handling, like .BR fesetexceptflag (3), and .BR fetestexcept (3). -.PP +.P If direct access to the FPU control word is still needed, the .B _FPU_GETCW and @@ -54,7 +54,7 @@ macros from can be used. .SH EXAMPLES .B __setfpucw(0x1372) -.PP +.P Set FPU control word on the i386 architecture to .RS .PD 0 @@ -68,5 +68,5 @@ exceptions on overflow, zero divide and NaN .RE .SH SEE ALSO .BR feclearexcept (3) -.PP +.P .I <fpu_control.h> diff --git a/man3/a64l.3 b/man3/a64l.3 index eec0f70..228c259 100644 --- a/man3/a64l.3 +++ b/man3/a64l.3 @@ -6,7 +6,7 @@ .\" .\" Corrected, aeb, 2002-05-30 .\" -.TH a64l 3 2023-07-20 "Linux man-pages 6.05.01" +.TH a64l 3 2023-10-31 "Linux man-pages 6.7" .SH NAME a64l, l64a \- convert between long and base-64 .SH LIBRARY @@ -15,16 +15,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "long a64l(const char *" str64 ); .BI "char *l64a(long " value ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR a64l (), .BR l64a (): .nf @@ -48,9 +48,9 @@ uses only the low order 32 bits of and .BR a64l () sign-extends its 32-bit result. -.PP +.P The 64 digits in the base-64 system are: -.PP +.P .RS .nf \&\[aq].\[aq] represents a 0 @@ -60,7 +60,7 @@ A-Z represent 12-37 a-z represent 38-63 .fi .RE -.PP +.P So 123 = 59*64\[ha]0 + 1*64\[ha]1 = "v/". .SH ATTRIBUTES For an explanation of the terms used in this section, see @@ -81,7 +81,6 @@ T{ .BR a64l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -91,7 +90,7 @@ The value returned by .BR l64a () may be a pointer to a static buffer, possibly overwritten by later calls. -.PP +.P The behavior of .BR l64a () is undefined when @@ -100,10 +99,10 @@ is negative. If .I value is zero, it returns an empty string. -.PP +.P These functions are broken before glibc 2.2.5 (puts most significant digit first). -.PP +.P This is not the encoding used by .BR uuencode (1). .SH SEE ALSO diff --git a/man3/abort.3 b/man3/abort.3 index 952fd13..75f47bd 100644 --- a/man3/abort.3 +++ b/man3/abort.3 @@ -12,7 +12,7 @@ .\" Modified Fri Aug 4 10:51:53 2000 - patch from Joseph S. Myers .\" 2007-12-15, mtk, Mostly rewritten .\" -.TH abort 3 2023-07-28 "Linux man-pages 6.05.01" +.TH abort 3 2023-10-31 "Linux man-pages 6.7" .SH NAME abort \- cause abnormal process termination .SH LIBRARY @@ -21,7 +21,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B [[noreturn]] void abort(void); .fi .SH DESCRIPTION @@ -38,7 +38,7 @@ This results in the abnormal termination of the process unless the signal is caught and the signal handler does not return (see .BR longjmp (3)). -.PP +.P If the .B SIGABRT signal is ignored, or caught by a handler that returns, the @@ -47,7 +47,7 @@ function will still terminate the process. It does this by restoring the default disposition for .B SIGABRT and then raising the signal for a second time. -.PP +.P As with other cases of abnormal termination the functions registered with .BR atexit (3) and @@ -71,12 +71,11 @@ T{ .BR abort () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY SVr4, POSIX.1-2001, 4.3BSD, C89. -.PP +.P Up until glibc 2.26, if the .BR abort () @@ -12,7 +12,7 @@ .\" Modified Sat Jul 24 21:45:37 1993, Rik Faith (faith@cs.unc.edu) .\" Modified Sat Dec 16 15:02:59 2000, Joseph S. Myers .\" -.TH abs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH abs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME abs, labs, llabs, imaxabs \- compute the absolute value of an integer .SH LIBRARY @@ -21,21 +21,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int abs(int " j ); .BI "long labs(long " j ); .BI "long long llabs(long long " j ); -.PP +.P .B #include <inttypes.h> -.PP +.P .BI "intmax_t imaxabs(intmax_t " j ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR llabs (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -72,7 +72,6 @@ T{ .BR imaxabs () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -80,7 +79,7 @@ POSIX.1-2001, C99, SVr4, 4.3BSD. .\" POSIX.1 (1996 edition) requires only the .\" .BR abs () .\" function. -.PP +.P C89 only includes the .BR abs () @@ -94,20 +93,20 @@ were added in C99. .SH NOTES Trying to take the absolute value of the most negative integer is not defined. -.PP +.P The .BR llabs () function is included since glibc 2.0. The .BR imaxabs () function is included since glibc 2.1.1. -.PP +.P For .BR llabs () to be declared, it may be necessary to define \fB_ISOC99_SOURCE\fP or \fB_ISOC9X_SOURCE\fP (depending on the version of glibc) before including any standard headers. -.PP +.P By default, GCC handles .BR abs (), diff --git a/man3/acos.3 b/man3/acos.3 index a81b4ef..b67d1cd 100644 --- a/man3/acos.3 +++ b/man3/acos.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-25 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH acos 3 2023-07-20 "Linux man-pages 6.05.01" +.TH acos 3 2023-10-31 "Linux man-pages 6.7" .SH NAME acos, acosf, acosl \- arc cosine function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double acos(double " x ); .BI "float acosf(float " x ); .BI "long double acosl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR acosf (), .BR acosl (): .nf @@ -50,22 +50,22 @@ the value whose cosine is On success, these functions return the arc cosine of .I x in radians; the return value is in the range [0,\ pi]. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +1, +0 is returned. -.PP +.P If .I x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned. -.PP +.P If .I x is outside the range [\-1,\ 1], @@ -76,7 +76,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is outside the range [\-1,\ 1] @@ -102,12 +102,11 @@ T{ .BR acosl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/acosh.3 b/man3/acosh.3 index b846807..0c8963d 100644 --- a/man3/acosh.3 +++ b/man3/acosh.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-25 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH acosh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH acosh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME acosh, acoshf, acoshl \- inverse hyperbolic cosine function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double acosh(double " x ); .BI "float acoshf(float " x ); .BI "long double acoshl(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR acosh (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -41,7 +41,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR acoshf (), .BR acoshl (): .nf @@ -57,19 +57,19 @@ that is the value whose hyperbolic cosine is .SH RETURN VALUE On success, these functions return the inverse hyperbolic cosine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +1, +0 is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is less than 1, @@ -80,7 +80,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is less than 1 @@ -106,12 +106,11 @@ T{ .BR acoshl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/addseverity.3 b/man3/addseverity.3 index 447725c..9f430e6 100644 --- a/man3/addseverity.3 +++ b/man3/addseverity.3 @@ -5,7 +5,7 @@ .\" adapted glibc info page .\" .\" polished a little, aeb -.TH addseverity 3 2023-07-20 "Linux man-pages 6.05.01" +.TH addseverity 3 2023-10-31 "Linux man-pages 6.7" .SH NAME addseverity \- introduce new severity classes .SH LIBRARY @@ -13,17 +13,17 @@ Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf -.PP +.P .B #include <fmtmsg.h> -.PP +.P .BI "int addseverity(int " severity ", const char *" s ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR addseverity (): .nf Since glibc 2.19: @@ -75,7 +75,6 @@ T{ .BR addseverity () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY diff --git a/man3/adjtime.3 b/man3/adjtime.3 index 1d9da6e..a6fcce5 100644 --- a/man3/adjtime.3 +++ b/man3/adjtime.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH adjtime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH adjtime 3 2024-01-28 "Linux man-pages 6.7" .SH NAME adjtime \- correct the time to synchronize the system clock .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/time.h> -.PP +.P .BI "int adjtime(const struct timeval *" delta ", struct timeval *" olddelta ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR adjtime (): .nf Since glibc 2.19: @@ -37,7 +37,7 @@ The amount of time by which the clock is to be adjusted is specified in the structure pointed to by .IR delta . This structure has the following form: -.PP +.P .in +4n .EX struct timeval { @@ -46,7 +46,7 @@ struct timeval { }; .EE .in -.PP +.P If the adjustment in .I delta is positive, then the system clock is speeded up by some @@ -56,7 +56,7 @@ has been completed. If the adjustment in .I delta is negative, then the clock is slowed down in a similar fashion. -.PP +.P If a clock adjustment from an earlier .BR adjtime () call is already in progress @@ -66,7 +66,7 @@ call, and .I delta is not NULL for the later call, then the earlier adjustment is stopped, but any already completed part of that adjustment is not undone. -.PP +.P If .I olddelta is not NULL, then the buffer that it points to is used to return @@ -105,7 +105,6 @@ T{ .BR adjtime () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -117,11 +116,11 @@ makes to the clock is carried out in such a manner that the clock is always monotonically increasing. Using .BR adjtime () -to adjust the time prevents the problems that can be caused for certain +to adjust the time prevents the problems that could be caused for certain applications (e.g., .BR make (1)) by abrupt positive or negative jumps in the system time. -.PP +.P .BR adjtime () is intended to be used to make small adjustments to the system time. Most systems impose a limit on the adjustment that can be specified in diff --git a/man3/aio_cancel.3 b/man3/aio_cancel.3 index e8ef7d5..1125669 100644 --- a/man3/aio_cancel.3 +++ b/man3/aio_cancel.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_cancel 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_cancel 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_cancel \- cancel an outstanding asynchronous I/O request .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -33,11 +33,11 @@ is canceled. for a description of the .I aiocb structure.) -.PP +.P Normal asynchronous notification occurs for canceled requests (see .BR aio (7) and -.BR sigevent (7)). +.BR sigevent (3type)). The request return status .RB ( aio_return (3)) is set to \-1, and the request error status @@ -45,21 +45,21 @@ is set to \-1, and the request error status is set to .BR ECANCELED . The control block of requests that cannot be canceled is not changed. -.PP +.P If the request could not be canceled, then it will terminate in the usual way after performing the I/O operation. (In this case, .BR aio_error (3) will return the status .BR EINPROGRESSS .) -.PP +.P If .I aiocbp is not NULL, and .I fd differs from the file descriptor with which the asynchronous operation was initiated, unspecified results occur. -.PP +.P Which operations are cancelable is implementation-defined. .\" FreeBSD: not those on raw disk devices. .SH RETURN VALUE @@ -106,7 +106,6 @@ T{ .BR aio_cancel () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/aio_error.3 b/man3/aio_error.3 index 77d33e0..9f8bf8c 100644 --- a/man3/aio_error.3 +++ b/man3/aio_error.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_error 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_error 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_error \- get error status of asynchronous I/O operation .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int aio_error(const struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -76,7 +76,6 @@ T{ .BR aio_error () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/aio_fsync.3 b/man3/aio_fsync.3 index 1dea3d8..4246c56 100644 --- a/man3/aio_fsync.3 +++ b/man3/aio_fsync.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_fsync 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_fsync 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_fsync \- asynchronous file synchronization .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int aio_fsync(int " op ", struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -26,7 +26,7 @@ associated with for a description of the .I aiocb structure.) -.PP +.P More precisely, if .I op is @@ -40,9 +40,9 @@ is .BR O_DSYNC , this call is the asynchronous analog of .BR fdatasync (2). -.PP +.P Note that this is a request only; it does not wait for I/O completion. -.PP +.P Apart from .IR aio_fildes , the only field in the structure pointed to by @@ -52,7 +52,7 @@ that is used by this call is the field (a .I sigevent structure, described in -.BR sigevent (7)), +.BR sigevent (3type)), which indicates the desired type of asynchronous notification at completion. All other fields are ignored. .SH RETURN VALUE @@ -95,7 +95,6 @@ T{ .BR aio_fsync () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -110,4 +109,4 @@ POSIX.1-2001. .BR aio_write (3), .BR lio_listio (3), .BR aio (7), -.BR sigevent (7) +.BR sigevent (3type) diff --git a/man3/aio_init.3 b/man3/aio_init.3 index 4b97839..2e43d03 100644 --- a/man3/aio_init.3 +++ b/man3/aio_init.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH aio_init 3 2023-03-30 "Linux man-pages 6.05.01" +.TH aio_init 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_init \- asynchronous I/O initialization .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B "#include <aio.h>" -.PP +.P .BI "void aio_init(const struct aioinit *" init ); .fi .SH DESCRIPTION @@ -22,11 +22,11 @@ function allows the caller to provide tuning hints to the glibc POSIX AIO implementation. Use of this function is optional, but to be effective, it must be called before employing any other functions in the POSIX AIO API. -.PP +.P The tuning information is provided in the buffer pointed to by the argument .IR init . This buffer is a structure of the following form: -.PP +.P .in +4n .EX struct aioinit { @@ -43,7 +43,7 @@ struct aioinit { }; .EE .in -.PP +.P The following fields are used in the .I aioinit structure: diff --git a/man3/aio_read.3 b/man3/aio_read.3 index 909d444..49de8f8 100644 --- a/man3/aio_read.3 +++ b/man3/aio_read.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_read 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_read 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_read \- asynchronous read .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int aio_read(struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -23,13 +23,13 @@ function queues the I/O request described by the buffer pointed to by This function is the asynchronous analog of .BR read (2). The arguments of the call -.PP +.P .in +4n .EX read(fd, buf, count) .EE .in -.PP +.P correspond (in order) to the fields .IR aio_fildes , .IR aio_buf , @@ -42,13 +42,13 @@ of the structure pointed to by for a description of the .I aiocb structure.) -.PP +.P The data is read starting at the absolute position .IR aiocbp\->aio_offset , regardless of the file offset. After the call, the value of the file offset is unspecified. -.PP +.P The "asynchronous" means that this call returns as soon as the request has been enqueued; the read may or may not have completed when the call returns. @@ -59,20 +59,20 @@ The return status of a completed I/O operation can be obtained by Asynchronous notification of I/O completion can be obtained by setting .I aiocbp\->aio_sigevent appropriately; see -.BR sigevent (7) +.BR sigevent (3type) for details. -.PP +.P If .B _POSIX_PRIORITIZED_IO is defined, and this file supports it, then the asynchronous operation is submitted at a priority equal to that of the calling process minus .IR aiocbp\->aio_reqprio . -.PP +.P The field .I aiocbp\->aio_lio_opcode is ignored. -.PP +.P No data is read from a regular file beyond its maximum offset. .SH RETURN VALUE On success, 0 is returned. @@ -128,7 +128,6 @@ T{ .BR aio_read () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -142,7 +141,7 @@ The buffer area being read into .\" or the control block of the operation must not be accessed during the operation or undefined results may occur. The memory areas involved must remain valid. -.PP +.P Simultaneous I/O operations specifying the same .I aiocb structure produce undefined results. diff --git a/man3/aio_return.3 b/man3/aio_return.3 index c0d14a6..1993d04 100644 --- a/man3/aio_return.3 +++ b/man3/aio_return.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_return 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_return 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_return \- get return status of asynchronous I/O operation .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "ssize_t aio_return(struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -26,7 +26,7 @@ with control block pointed to by for a description of the .I aiocb structure.) -.PP +.P This function should be called only once for any given request, after .BR aio_error (3) returns something other than @@ -41,7 +41,7 @@ or .BR fdatasync (2), call. On error, \-1 is returned, and \fIerrno\fP is set to indicate the error. -.PP +.P If the asynchronous I/O operation has not yet completed, the return value and effect of .BR aio_return () @@ -70,7 +70,6 @@ T{ .BR aio_return () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/aio_suspend.3 b/man3/aio_suspend.3 index b532568..c8f606e 100644 --- a/man3/aio_suspend.3 +++ b/man3/aio_suspend.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_suspend 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_suspend 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_suspend \- wait for asynchronous I/O operation or timeout .SH LIBRARY @@ -12,9 +12,9 @@ Real-time library .RI ( librt ", " \-lrt ) .SH SYNOPSIS .nf -.PP +.P .B "#include <aio.h>" -.PP +.P .BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems , .BI " const struct timespec *restrict " timeout ); .fi @@ -35,7 +35,7 @@ is not NULL and the specified time interval has passed. .I timespec structure, see .BR nanosleep (2).) -.PP +.P The .I nitems argument specifies the number of items in @@ -53,7 +53,7 @@ or for a description of the .I aiocb structure.) -.PP +.P If .B CLOCK_MONOTONIC is supported, this clock is used to measure @@ -96,13 +96,12 @@ T{ .BR aio_suspend () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.1. POSIX.1-2001. -.PP +.P POSIX doesn't specify the parameters to be .IR restrict ; that is specific to glibc. @@ -110,13 +109,13 @@ that is specific to glibc. One can achieve polling by using a non-NULL .I timeout that specifies a zero time interval. -.PP +.P If one or more of the asynchronous I/O operations specified in .I aiocb_list has already completed at the time of the call to .BR aio_suspend (), then the call returns immediately. -.PP +.P To determine which I/O operations have completed after a successful return from .BR aio_suspend (), diff --git a/man3/aio_write.3 b/man3/aio_write.3 index 20b0349..eaba457 100644 --- a/man3/aio_write.3 +++ b/man3/aio_write.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH aio_write 3 2023-07-20 "Linux man-pages 6.05.01" +.TH aio_write 3 2023-10-31 "Linux man-pages 6.7" .SH NAME aio_write \- asynchronous write .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int aio_write(struct aiocb *" aiocbp ); .fi .SH DESCRIPTION @@ -23,13 +23,13 @@ function queues the I/O request described by the buffer pointed to by This function is the asynchronous analog of .BR write (2). The arguments of the call -.PP +.P .in +4n .EX write(fd, buf, count) .EE .in -.PP +.P correspond (in order) to the fields .IR aio_fildes , .IR aio_buf , @@ -42,7 +42,7 @@ of the structure pointed to by for a description of the .I aiocb structure.) -.PP +.P If .B O_APPEND is not set, the data is written starting at the @@ -55,7 +55,7 @@ is set, data is written at the end of the file in the same order as .BR aio_write () calls are made. After the call, the value of the file offset is unspecified. -.PP +.P The "asynchronous" means that this call returns as soon as the request has been enqueued; the write may or may not have completed when the call returns. @@ -66,20 +66,20 @@ The return status of a completed I/O operation can be obtained Asynchronous notification of I/O completion can be obtained by setting .I aiocbp\->aio_sigevent appropriately; see -.BR sigevent (7) +.BR sigevent (3type) for details. -.PP +.P If .B _POSIX_PRIORITIZED_IO is defined, and this file supports it, then the asynchronous operation is submitted at a priority equal to that of the calling process minus .IR aiocbp\->aio_reqprio . -.PP +.P The field .I aiocbp\->aio_lio_opcode is ignored. -.PP +.P No data is written to a regular file beyond its maximum offset. .SH RETURN VALUE On success, 0 is returned. @@ -133,7 +133,6 @@ T{ .BR aio_write () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -147,7 +146,7 @@ The buffer area being written out .\" or the control block of the operation must not be accessed during the operation or undefined results may occur. The memory areas involved must remain valid. -.PP +.P Simultaneous I/O operations specifying the same .I aiocb structure produce undefined results. diff --git a/man3/alloca.3 b/man3/alloca.3 index 6bf1791..7fa61bc 100644 --- a/man3/alloca.3 +++ b/man3/alloca.3 @@ -13,7 +13,7 @@ .\" Various rewrites and additions (notes on longjmp() and SIGSEGV). .\" Weaken warning against use of alloca() (as per Debian bug 461100). .\" -.TH alloca 3 2023-07-20 "Linux man-pages 6.05.01" +.TH alloca 3 2023-10-31 "Linux man-pages 6.7" .SH NAME alloca \- allocate memory that is automatically freed .SH LIBRARY @@ -22,7 +22,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <alloca.h> -.PP +.P .BI "void *alloca(size_t " size ); .fi .SH DESCRIPTION @@ -54,7 +54,6 @@ T{ .BR alloca () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -73,7 +72,7 @@ it can also simplify memory deallocation in applications that use or .BR siglongjmp (3). Otherwise, its use is discouraged. -.PP +.P Because the space allocated by .BR alloca () is allocated within the stack frame, @@ -82,19 +81,19 @@ is jumped over by a call to .BR longjmp (3) or .BR siglongjmp (3). -.PP +.P The space allocated by .BR alloca () is .I not automatically deallocated if the pointer that refers to it simply goes out of scope. -.PP +.P Do not attempt to .BR free (3) space allocated by .BR alloca ()! -.PP +.P By necessity, .BR alloca () is a compiler built-in, also known as @@ -107,12 +106,12 @@ into the built-in, but this is forbidden if standards conformance is requested in which case .I <alloca.h> is required, lest a symbol dependency be emitted. -.PP +.P The fact that .BR alloca () is a built-in means it is impossible to take its address or to change its behavior by linking with a different library. -.PP +.P Variable length arrays (VLAs) are part of the C99 standard, optional since C11, and can be used for a similar purpose. However, they do not port to standard C++, and, being variables, @@ -125,7 +124,7 @@ would overflow the space available, and, hence, neither is indicating an error. (However, the program is likely to receive a .B SIGSEGV signal if it attempts to access unavailable space.) -.PP +.P On many systems .BR alloca () cannot be used inside the list of arguments of a function call, because diff --git a/man3/arc4random.3 b/man3/arc4random.3 index b7e1f4d..b205ca9 100644 --- a/man3/arc4random.3 +++ b/man3/arc4random.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH arc4random 3 2023-07-20 "Linux man-pages 6.05.01" +.TH arc4random 3 2023-10-31 "Linux man-pages 6.7" .SH NAME arc4random, arc4random_uniform, arc4random_buf \- cryptographically-secure pseudorandom number generator @@ -13,29 +13,29 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B uint32_t arc4random(void); .BI "uint32_t arc4random_uniform(uint32_t " upper_bound ); .BI "void arc4random_buf(void " buf [. n "], size_t " n ); .fi .SH DESCRIPTION These functions give cryptographically-secure pseudorandom numbers. -.PP +.P .BR arc4random () returns a uniformly-distributed value. -.PP +.P .BR arc4random_uniform () returns a uniformly-distributed value less than .I upper_bound (see BUGS). -.PP +.P .BR arc4random_buf () fills the memory pointed to by .IR buf , with .I n bytes of pseudorandom data. -.PP +.P The .BR rand (3) and @@ -51,7 +51,7 @@ functions. .SH RETURN VALUE .BR arc4random () returns a pseudorandom number. -.PP +.P .BR arc4random_uniform () returns a pseudorandom number less than .I upper_bound @@ -76,7 +76,6 @@ T{ .BR arc4random_buf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY diff --git a/man3/argz_add.3 b/man3/argz_add.3 index 3654e7b..c61705a 100644 --- a/man3/argz_add.3 +++ b/man3/argz_add.3 @@ -6,7 +6,7 @@ .\" based on the description in glibc source and infopages .\" .\" Corrections and additions, aeb -.TH argz_add 3 2023-07-20 "Linux man-pages 6.05.01" +.TH argz_add 3 2023-10-31 "Linux man-pages 6.7" .SH NAME argz_add, argz_add_sep, argz_append, argz_count, argz_create, argz_create_sep, argz_delete, argz_extract, argz_insert, @@ -17,52 +17,52 @@ Standard C library .SH SYNOPSIS .nf .B "#include <argz.h>" -.PP +.P .BI "error_t argz_add(char **restrict " argz ", size_t *restrict " argz_len , .BI " const char *restrict " str ); -.PP +.P .BI "error_t argz_add_sep(char **restrict " argz \ ", size_t *restrict " argz_len , .BI " const char *restrict " str ", int " delim ); -.PP +.P .BI "error_t argz_append(char **restrict " argz ", size_t *restrict " argz_len , .BI " const char *restrict " buf ", size_t " buf_len ); -.PP +.P .BI "size_t argz_count(const char *" argz ", size_t " argz_len ); -.PP +.P .BI "error_t argz_create(char *const " argv "[], char **restrict " argz , .BI " size_t *restrict " argz_len ); -.PP +.P .BI "error_t argz_create_sep(const char *restrict " str ", int " sep , .BI " char **restrict " argz ", size_t *restrict " argz_len ); -.PP +.P .BI "void argz_delete(char **restrict " argz ", size_t *restrict " argz_len , .BI " char *restrict " entry ); -.PP +.P .BI "void argz_extract(const char *restrict " argz ", size_t " argz_len , .BI " char **restrict " argv ); -.PP +.P .BI "error_t argz_insert(char **restrict " argz ", size_t *restrict " argz_len , .BI " char *restrict " before ", const char *restrict " entry ); -.PP +.P .BI "char *argz_next(const char *restrict " argz ", size_t " argz_len , .BI " const char *restrict " entry ); -.PP +.P .BI "error_t argz_replace(char **restrict " argz \ ", size_t *restrict " argz_len , .BI " const char *restrict " str ", const char *restrict " with , .BI " unsigned int *restrict " replace_count ); -.PP +.P .BI "void argz_stringify(char *" argz ", size_t " len ", int " sep ); .fi .SH DESCRIPTION These functions are glibc-specific. -.PP +.P An argz vector is a pointer to a character buffer together with a length. The intended interpretation of the character buffer is an array of strings, where the strings are separated by null bytes (\[aq]\e0\[aq]). If the length is nonzero, the last byte of the buffer must be a null byte. -.PP +.P These functions are for handling argz vectors. The pair (NULL,0) is an argz vector, and, conversely, argz vectors of length 0 must have null pointer. @@ -71,7 +71,7 @@ Allocation of nonempty argz vectors is done using so that .BR free (3) can be used to dispose of them again. -.PP +.P .BR argz_add () adds the string .I str @@ -81,7 +81,7 @@ and updates .I *argz and .IR *argz_len . -.PP +.P .BR argz_add_sep () is similar, but splits the string .I str @@ -89,7 +89,7 @@ into substrings separated by the delimiter .IR delim . For example, one might use this on a UNIX search path with delimiter \[aq]:\[aq]. -.PP +.P .BR argz_append () appends the argz vector .RI ( buf ,\ buf_len ) @@ -103,12 +103,12 @@ and .I *argz_len will be increased by .IR buf_len .) -.PP +.P .BR argz_count () counts the number of strings, that is, the number of null bytes (\[aq]\e0\[aq]), in .RI ( argz ,\ argz_len ). -.PP +.P .BR argz_create () converts a UNIX-style argument vector .IR argv , @@ -116,7 +116,7 @@ terminated by .IR "(char\ *)\ 0" , into an argz vector .RI ( *argz ,\ *argz_len ). -.PP +.P .BR argz_create_sep () converts the null-terminated string .I str @@ -124,7 +124,7 @@ into an argz vector .RI ( *argz ,\ *argz_len ) by breaking it up at every occurrence of the separator .IR sep . -.PP +.P .BR argz_delete () removes the substring pointed to by .I entry @@ -134,7 +134,7 @@ and updates .I *argz and .IR *argz_len . -.PP +.P .BR argz_extract () is the opposite of .BR argz_create (). @@ -149,7 +149,7 @@ The array must have room for .IR argz_count ( argz ", " argz_len ") + 1" pointers. -.PP +.P .BR argz_insert () is the opposite of .BR argz_delete (). @@ -168,7 +168,7 @@ If is NULL, then .I entry will inserted at the end. -.PP +.P .BR argz_next () is a function to step through the argz vector. If @@ -177,7 +177,7 @@ is NULL, the first entry is returned. Otherwise, the entry following is returned. It returns NULL if there is no following entry. -.PP +.P .BR argz_replace () replaces each occurrence of .I str @@ -189,7 +189,7 @@ If is non-NULL, .I *replace_count will be incremented by the number of replacements. -.PP +.P .BR argz_stringify () is the opposite of .BR argz_create_sep (). @@ -228,7 +228,6 @@ T{ .BR argz_stringify () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH BUGS diff --git a/man3/asin.3 b/man3/asin.3 index 74ac283..3545d5c 100644 --- a/man3/asin.3 +++ b/man3/asin.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-25 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH asin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH asin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME asin, asinf, asinl \- arc sine function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double asin(double " x ); .BI "float asinf(float " x ); .BI "long double asinl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR asinf (), .BR asinl (): .nf @@ -49,16 +49,16 @@ that is the value whose sine is On success, these functions return the principal value of the arc sine of .I x in radians; the return value is in the range [\-pi/2,\ pi/2]. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is outside the range [\-1,\ 1], @@ -72,7 +72,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is outside the range [\-1,\ 1] @@ -98,12 +98,11 @@ T{ .BR asinl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/asinh.3 b/man3/asinh.3 index 3197390..dd0ada0 100644 --- a/man3/asinh.3 +++ b/man3/asinh.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH asinh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH asinh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME asinh, asinhf, asinhl \- inverse hyperbolic sine function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double asinh(double " x ); .BI "float asinhf(float " x ); .BI "long double asinhl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR asinh (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -41,7 +41,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR asinhf (), .BR asinhl (): .nf @@ -57,15 +57,15 @@ that is the value whose hyperbolic sine is .SH RETURN VALUE On success, these functions return the inverse hyperbolic sine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity (negative infinity), @@ -91,12 +91,11 @@ T{ .BR asinhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/asprintf.3 b/man3/asprintf.3 index adc3e5b..40b687b 100644 --- a/man3/asprintf.3 +++ b/man3/asprintf.3 @@ -5,7 +5,7 @@ .\" .\" Text fragments inspired by Martin Schulze <joey@infodrom.org>. .\" -.TH asprintf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH asprintf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME asprintf, vasprintf \- print to allocated string .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <stdio.h> -.PP +.P .BI "int asprintf(char **restrict " strp ", const char *restrict " fmt ", ...);" .BI "int vasprintf(char **restrict " strp ", const char *restrict " fmt , .BI " va_list " ap ); @@ -58,7 +58,6 @@ T{ .BR vasprintf () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS The FreeBSD implementation sets .I strp diff --git a/man3/assert.3 b/man3/assert.3 index b1e8a9d..6f5a242 100644 --- a/man3/assert.3 +++ b/man3/assert.3 @@ -6,7 +6,7 @@ .\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith <faith@cs.unc.edu> .\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond <esr@thyrsus.com> .\" Modified Thu Jun 2 23:44:11 2016 by Nikos Mavrogiannopoulos <nmav@redhat.com> -.TH assert 3 2023-07-20 "Linux man-pages 6.05.01" +.TH assert 3 2023-10-31 "Linux man-pages 6.7" .SH NAME assert \- abort the program if assertion is false .SH LIBRARY @@ -15,14 +15,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <assert.h> -.PP +.P .BI "void assert(scalar " expression ); .fi .SH DESCRIPTION This macro can help programmers find bugs in their programs, or handle exceptional cases via a crash that will produce limited debugging output. -.PP +.P If .I expression is false (i.e., compares equal to zero), @@ -34,13 +34,13 @@ The error message includes the name of the file and function containing the .BR assert () call, the source code line number of the call, and the text of the argument; something like: -.PP +.P .in +4n .EX prog: some_file.c:16: some_func: Assertion \`val == 0\[aq] failed. .EE .in -.PP +.P If the macro .B NDEBUG is defined at the moment @@ -70,12 +70,11 @@ T{ .BR assert () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C89, C99, POSIX.1-2001. -.PP +.P In C89, .I expression is required to be of type diff --git a/man3/assert_perror.3 b/man3/assert_perror.3 index 77d70f1..cde8024 100644 --- a/man3/assert_perror.3 +++ b/man3/assert_perror.3 @@ -6,7 +6,7 @@ .\" This replaces an earlier man page written by Walter Harms .\" <walter.harms@informatik.uni-oldenburg.de>. .\" -.TH assert_perror 3 2023-07-20 "Linux man-pages 6.05.01" +.TH assert_perror 3 2023-10-31 "Linux man-pages 6.7" .SH NAME assert_perror \- test errnum and abort .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <assert.h> -.PP +.P .BI "void assert_perror(int " errnum ); .fi .SH DESCRIPTION @@ -54,7 +54,6 @@ T{ .BR assert_perror () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH BUGS diff --git a/man3/atan.3 b/man3/atan.3 index 5c89c62..8e86698 100644 --- a/man3/atan.3 +++ b/man3/atan.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH atan 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atan 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atan, atanf, atanl \- arc tangent function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double atan(double " x ); .BI "float atanf(float " x ); .BI "long double atanl(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR atanf (), .BR atanl (): .nf @@ -49,16 +49,16 @@ that is the value whose tangent is On success, these functions return the principal value of the arc tangent of .I x in radians; the return value is in the range [\-pi/2,\ pi/2]. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity (negative infinity), +pi/2 (\-pi/2) is returned. @@ -83,12 +83,11 @@ T{ .BR atanl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/atan2.3 b/man3/atan2.3 index 0532b47..9ac661b 100644 --- a/man3/atan2.3 +++ b/man3/atan2.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH atan2 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atan2 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atan2, atan2f, atan2l \- arc tangent function of two variables .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double atan2(double " y ", double " x ); .BI "float atan2f(float " y ", float " x ); .BI "long double atan2l(long double " y ", long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR atan2f (), .BR atan2l (): .nf @@ -49,31 +49,31 @@ the quadrant of the result. On success, these functions return the principal value of the arc tangent of .I y/x in radians; the return value is in the range [\-pi,\ pi]. -.PP +.P If .I y is +0 (\-0) and .I x is less than 0, +pi (\-pi) is returned. -.PP +.P If .I y is +0 (\-0) and .I x is greater than 0, +0 (\-0) is returned. -.PP +.P If .I y is less than 0 and .I x is +0 or \-0, \-pi/2 is returned. -.PP +.P If .I y is greater than 0 and .I x is +0 or \-0, pi/2 is returned. -.PP +.P .\" POSIX.1 says: .\" If .\" .I x @@ -84,7 +84,7 @@ If either or .I y is NaN, a NaN is returned. -.PP +.P .\" POSIX.1 says: .\" If the result underflows, a range error may occur and .\" .I y/x @@ -95,38 +95,38 @@ If is +0 (\-0) and .I x is \-0, +pi (\-pi) is returned. -.PP +.P If .I y is +0 (\-0) and .I x is +0, +0 (\-0) is returned. -.PP +.P If .I y is a finite value greater (less) than 0, and .I x is negative infinity, +pi (\-pi) is returned. -.PP +.P If .I y is a finite value greater (less) than 0, and .I x is positive infinity, +0 (\-0) is returned. -.PP +.P If .I y is positive infinity (negative infinity), and .I x is finite, pi/2 (\-pi/2) is returned. -.PP +.P If .I y is positive infinity (negative infinity) and .I x is negative infinity, +3*pi/4 (\-3*pi/4) is returned. -.PP +.P If .I y is positive infinity (negative infinity) and @@ -155,12 +155,11 @@ T{ .BR atan2l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/atanh.3 b/man3/atanh.3 index f3a9b2e..0220493 100644 --- a/man3/atanh.3 +++ b/man3/atanh.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH atanh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atanh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atanh, atanhf, atanhl \- inverse hyperbolic tangent function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double atanh(double " x ); .BI "float atanhf(float " x ); .BI "long double atanhl(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR atanh (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -41,7 +41,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR atanhf (), .BR atanhl (): .nf @@ -57,15 +57,15 @@ that is the value whose hyperbolic tangent is .SH RETURN VALUE On success, these functions return the inverse hyperbolic tangent of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is +1 or \-1, @@ -76,7 +76,7 @@ and the functions return or .BR HUGE_VALL , respectively, with the mathematically correct sign. -.PP +.P If the absolute value of .I x is greater than 1, @@ -90,7 +90,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP less than \-1 or greater than +1 @@ -125,12 +125,11 @@ T{ .BR atanhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/atexit.3 b/man3/atexit.3 index 4a57ac5..4a9842b 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -11,7 +11,7 @@ .\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu) .\" Modified 2003-10-25, Walter Harms .\" -.TH atexit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atexit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atexit \- register a function to be called at normal process termination .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int atexit(void (*" function )(void)); .fi .SH DESCRIPTION @@ -35,17 +35,17 @@ or via return from the program's .IR main (). Functions so registered are called in the reverse order of their registration; no arguments are passed. -.PP +.P The same function may be registered multiple times: it is called once for each registration. -.PP +.P POSIX.1 requires that an implementation allow at least .\" POSIX.1-2001, POSIX.1-2008 .B ATEXIT_MAX (32) such functions to be registered. The actual limit supported by an implementation can be obtained using .BR sysconf (3). -.PP +.P When a child process is created via .BR fork (2), it inherits copies of its parent's registrations. @@ -72,7 +72,6 @@ T{ .BR atexit () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS POSIX.1 says that the result of calling .\" POSIX.1-2001, POSIX.1-2008 @@ -102,14 +101,14 @@ Functions registered using .BR on_exit (3)) are not called if a process terminates abnormally because of the delivery of a signal. -.PP +.P If one of the registered functions calls .BR _exit (2), then any remaining functions are not invoked, and the other process termination steps performed by .BR exit (3) are not performed. -.PP +.P The .BR atexit () and @@ -118,7 +117,7 @@ functions register functions on the same list: at normal process termination, the registered functions are invoked in reverse order of their registration by these two functions. -.PP +.P According to POSIX.1, the result is undefined if .BR longjmp (3) is used to terminate execution of one of the functions registered using diff --git a/man3/atof.3 b/man3/atof.3 index bb1398a..acb75ae 100644 --- a/man3/atof.3 +++ b/man3/atof.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe .\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu) -.TH atof 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atof 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atof \- convert a string to a double .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "double atof(const char *" nptr ); .fi .SH DESCRIPTION @@ -28,13 +28,13 @@ function converts the initial portion of the string pointed to by \fInptr\fP to .IR double . The behavior is the same as -.PP +.P .in +4n .EX strtod(nptr, NULL); .EE .in -.PP +.P except that .BR atof () does not detect errors. @@ -54,7 +54,6 @@ T{ .BR atof () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/atoi.3 b/man3/atoi.3 index d1d32f5..ebe67f3 100644 --- a/man3/atoi.3 +++ b/man3/atoi.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu) .\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers .\" -.TH atoi 3 2023-07-20 "Linux man-pages 6.05.01" +.TH atoi 3 2023-10-31 "Linux man-pages 6.7" .SH NAME atoi, atol, atoll \- convert a string to an integer .SH LIBRARY @@ -20,17 +20,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int atoi(const char *" nptr ); .BI "long atol(const char *" nptr ); .BI "long long atoll(const char *" nptr ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR atoll (): .nf _ISOC99_SOURCE @@ -43,17 +43,17 @@ function converts the initial portion of the string pointed to by \fInptr\fP to .IR int . The behavior is the same as -.PP +.P .in +4n .EX strtol(nptr, NULL, 10); .EE .in -.PP +.P except that .BR atoi () does not detect errors. -.PP +.P The .BR atol () and @@ -80,7 +80,6 @@ T{ .BR atoll () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS POSIX.1 leaves the return value of .BR atoi () @@ -90,7 +89,7 @@ On glibc, musl libc, and uClibc, 0 is returned on error. C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001, SVr4, 4.3BSD. -.PP +.P C89 and POSIX.1-1996 include the functions .BR atoi () diff --git a/man3/backtrace.3 b/man3/backtrace.3 index ae970ff..399b180 100644 --- a/man3/backtrace.3 +++ b/man3/backtrace.3 @@ -25,7 +25,7 @@ .\" .\" References: .\" glibc manual and source -.TH backtrace 3 2023-07-20 "Linux man-pages 6.05.01" +.TH backtrace 3 2023-10-31 "Linux man-pages 6.7" .SH NAME backtrace, backtrace_symbols, backtrace_symbols_fd \- support for application self-debugging @@ -35,9 +35,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <execinfo.h> -.PP +.P .BI "int backtrace(void *" buffer [. size "], int " size ); -.PP +.P .BI "char **backtrace_symbols(void *const " buffer [. size "], int " size ); .BI "void backtrace_symbols_fd(void *const " buffer [. size "], int " size ", \ int " fd ); @@ -70,7 +70,7 @@ to obtain the complete backtrace, make sure that and .I size are large enough. -.PP +.P Given the set of addresses returned by .BR backtrace () in @@ -95,7 +95,7 @@ by and must be freed by the caller. (The strings pointed to by the array of pointers need not and should not be freed.) -.PP +.P .BR backtrace_symbols_fd () takes the same .I buffer @@ -123,7 +123,7 @@ then the full backtrace was stored; if it is equal to .IR size , then it may have been truncated, in which case the addresses of the oldest stack frames are not returned. -.PP +.P On success, .BR backtrace_symbols () returns a pointer to the array @@ -146,7 +146,6 @@ T{ .BR backtrace_symbols_fd () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -180,7 +179,7 @@ If you need certain calls to these two functions to not allocate memory (in signal handlers, for example), you need to make sure .I libgcc is loaded beforehand. -.PP +.P The symbol names may be unavailable without the use of special linker options. For systems using the GNU linker, it is necessary to use the @@ -195,7 +194,7 @@ and .BR backtrace_symbols (). The following shell session shows what we might see when running the program: -.PP +.P .in +4n .EX .RB "$" " cc \-rdynamic prog.c \-o prog" diff --git a/man3/basename.3 b/man3/basename.3 index 266c49a..a3dc075 100644 --- a/man3/basename.3 +++ b/man3/basename.3 @@ -5,7 +5,7 @@ .\" .\" Created, 14 Dec 2000 by Michael Kerrisk .\" -.TH basename 3 2023-07-20 "Linux man-pages 6.05.01" +.TH basename 3 2023-10-31 "Linux man-pages 6.7" .SH NAME basename, dirname \- parse pathname components .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <libgen.h> -.PP +.P .BI "char *dirname(char *" path ); .BI "char *basename(char *" path ); .fi @@ -22,7 +22,7 @@ Standard C library Warning: there are two different functions .BR basename (); see below. -.PP +.P The functions .BR dirname () and @@ -35,7 +35,7 @@ returns the string up to, but not including, the final \[aq]/\[aq], and .BR basename () returns the component following the final \[aq]/\[aq]. Trailing \[aq]/\[aq] characters are not counted as part of the pathname. -.PP +.P If .I path does not contain a slash, @@ -58,13 +58,13 @@ is a null pointer or points to an empty string, then both and .BR basename () return the string ".". -.PP +.P Concatenating the string returned by .BR dirname (), a "/", and the string returned by .BR basename () yields a complete pathname. -.PP +.P Both .BR dirname () and @@ -73,7 +73,7 @@ may modify the contents of .IR path , so it may be desirable to pass a copy when calling one of these functions. -.PP +.P These functions may return pointers to statically allocated memory which may be overwritten by subsequent calls. Alternatively, they may return a pointer to some part of @@ -82,7 +82,7 @@ so that the string referred to by .I path should not be modified or freed until the pointer returned by the function is no longer required. -.PP +.P The following list of examples (taken from SUSv2) shows the strings returned by .BR dirname () @@ -125,27 +125,26 @@ T{ .BR dirname () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS There are two different versions of .BR basename () - the POSIX version described above, and the GNU version, which one gets after -.PP +.P .in +4n .EX .BR " #define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B " #include <string.h>" .EE .in -.PP +.P The GNU version never modifies its argument, and returns the empty string when .I path has a trailing slash, and in particular also when it is "/". There is no GNU version of .BR dirname (). -.PP +.P With glibc, one gets the POSIX version of .BR basename () when @@ -161,7 +160,7 @@ the POSIX versions of these functions modify the .I path argument, and segfault when called with a static string such as "/usr/". -.PP +.P Before glibc 2.2.1, the glibc version of .BR dirname () did not correctly handle pathnames with trailing \[aq]/\[aq] characters, diff --git a/man3/bcmp.3 b/man3/bcmp.3 index d3cc49d..ef96d9c 100644 --- a/man3/bcmp.3 +++ b/man3/bcmp.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH bcmp 3 2023-03-30 "Linux man-pages 6.05.01" +.TH bcmp 3 2023-11-02 "Linux man-pages 6.7" .SH NAME bcmp \- compare byte sequences .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "[[deprecated]] int bcmp(const void " s1 [. n "], const void " s2 [. n "], \ size_t " n ); .fi @@ -19,7 +19,7 @@ size_t " n ); .BR bcmp () is identical to .BR memcmp (3); -use it instead. +use the latter instead. .SH STANDARDS None. .SH HISTORY diff --git a/man3/bcopy.3 b/man3/bcopy.3 index b8892e9..7f76812 100644 --- a/man3/bcopy.3 +++ b/man3/bcopy.3 @@ -11,7 +11,7 @@ .\" Modified Sun Feb 26 14:52:00 1995 by Rik Faith <faith@cs.unc.edu> .\" Modified Tue Oct 22 23:48:10 1996 by Eric S. Raymond <esr@thyrsus.com> .\" " -.TH bcopy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH bcopy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bcopy \- copy byte sequence .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "[[deprecated]] void bcopy(const void " src [. n "], void " dest [. n "], \ size_t " n ); .fi @@ -50,12 +50,11 @@ T{ .BR bcopy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY 4.3BSD. -.PP +.P Marked as LEGACY in POSIX.1-2001: use .BR memcpy (3) or diff --git a/man3/bindresvport.3 b/man3/bindresvport.3 index d14e580..89cd5d0 100644 --- a/man3/bindresvport.3 +++ b/man3/bindresvport.3 @@ -8,7 +8,7 @@ .\" 2007-05-31, mtk: Rewrite and substantial additional text. .\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors .\" -.TH bindresvport 3 2023-07-20 "Linux man-pages 6.05.01" +.TH bindresvport 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bindresvport \- bind a socket to a privileged IP port .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .B #include <sys/types.h> .B #include <netinet/in.h> -.PP +.P .BI "int bindresvport(int " sockfd ", struct sockaddr_in *" sin ); .fi .SH DESCRIPTION @@ -29,7 +29,7 @@ file descriptor to a privileged anonymous IP port, that is, a port number arbitrarily selected from the range 512 to 1023. .\" glibc actually starts searching with a port # in the range 600 to 1023 -.PP +.P If the .BR bind (2) performed by @@ -39,7 +39,7 @@ is successful, and is not NULL, then .I sin\->sin_port returns the port number actually allocated. -.PP +.P .I sin can be NULL, in which case .I sin\->sin_family @@ -96,8 +96,7 @@ glibc\ >=\ 2.17: MT-Safe; glibc\ <\ 2.17: MT-Unsafe T} .TE -.sp 1 -.PP +.P The .BR bindresvport () function uses a static variable that was not protected by a lock diff --git a/man3/bsd_signal.3 b/man3/bsd_signal.3 index 3294c5c..19c2147 100644 --- a/man3/bsd_signal.3 +++ b/man3/bsd_signal.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH bsd_signal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH bsd_signal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bsd_signal \- signal handling with BSD semantics .SH LIBRARY @@ -12,17 +12,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .B typedef void (*sighandler_t)(int); -.PP +.P .BI "sighandler_t bsd_signal(int " signum ", sighandler_t " handler ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR bsd_signal (): .nf Since glibc 2.26: @@ -37,7 +37,7 @@ The .BR bsd_signal () function takes the same arguments, and performs the same task, as .BR signal (2). -.PP +.P The difference between the two is that .BR bsd_signal () is guaranteed to provide reliable signal semantics, that is: @@ -73,14 +73,13 @@ T{ .BR bsd_signal () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Use of .BR bsd_signal () should be avoided; use .BR sigaction (2) instead. -.PP +.P On modern Linux systems, .BR bsd_signal () and @@ -91,7 +90,7 @@ But on older systems, provided unreliable signal semantics; see .BR signal (2) for details. -.PP +.P The use of .I sighandler_t is a GNU extension; diff --git a/man3/bsearch.3 b/man3/bsearch.3 index f73b939..38a4ac3 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Mon Mar 29 22:41:16 1993, David Metcalfe .\" Modified Sat Jul 24 21:35:16 1993, Rik Faith (faith@cs.unc.edu) -.TH bsearch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH bsearch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bsearch \- binary search of a sorted array .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "void *bsearch(const void " key [. size "], \ const void " base [. size " * ." nmemb ], .BI " size_t " nmemb ", size_t " size , @@ -39,7 +39,7 @@ that matches the object pointed to by The size of each member of the array is specified by .IR size . -.PP +.P The contents of the array should be in ascending sorted order according to the comparison function referenced by .IR compar . @@ -74,7 +74,6 @@ T{ .BR bsearch () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -84,7 +83,7 @@ The example below first sorts an array of structures using .BR qsort (3), then retrieves desired elements using .BR bsearch (). -.PP +.P .\" SRC BEGIN (bsearch.c) .EX #include <stdio.h> diff --git a/man3/bstring.3 b/man3/bstring.3 index 87b133a..68e8ae7 100644 --- a/man3/bstring.3 +++ b/man3/bstring.3 @@ -9,7 +9,7 @@ .\" Modified 1993-04-12, David Metcalfe .\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu) .\" Modified 2002-01-20, Walter Harms -.TH bstring 3 2023-01-07 "Linux man-pages 6.05.01" +.TH bstring 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bcmp, bcopy, bzero, memccpy, memchr, memcmp, memcpy, memfrob, memmem, memmove, memset \- byte string operations @@ -19,29 +19,29 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "int bcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); -.PP +.P .BI "void bcopy(const void " src [. n "], void " dest [. n "], size_t " n ); -.PP +.P .BI "void bzero(void " s [. n "], size_t " n ); -.PP +.P .BI "void *memccpy(void " dest [. n "], const void " src [. n "], int " c ", \ size_t " n ); -.PP +.P .BI "void *memchr(const void " s [. n "], int " c ", size_t " n ); -.PP +.P .BI "int memcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); -.PP +.P .BI "void *memcpy(void " dest [. n "], const void " src [. n "], size_t " n ); -.PP +.P .BI "void *memfrob(void " s [. n "], size_t " n ); -.PP +.P .BI "void *memmem(const void " haystack [. haystacklen "], size_t " haystacklen , .BI " const void " needle [. needlelen "], size_t " needlelen ); -.PP +.P .BI "void *memmove(void " dest [. n "], const void " src [. n "], size_t " n ); -.PP +.P .BI "void *memset(void " s [. n "], int " c ", size_t " n ); .fi .SH DESCRIPTION diff --git a/man3/bswap.3 b/man3/bswap.3 index 1810e9f..53d8c51 100644 --- a/man3/bswap.3 +++ b/man3/bswap.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH bswap 3 2023-05-03 "Linux man-pages 6.05.01" +.TH bswap 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bswap_16, bswap_32, bswap_64 \- reverse order of bytes .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <byteswap.h> -.PP +.P .BI "uint16_t bswap_16(uint16_t " x ); .BI "uint32_t bswap_32(uint32_t " x ); .BI "uint64_t bswap_64(uint64_t " x ); @@ -29,7 +29,7 @@ GNU. The program below swaps the bytes of the 8-byte integer supplied as its command-line argument. The following shell session demonstrates the use of the program: -.PP +.P .in +4n .EX $ \fB./a.out 0x0123456789abcdef\fP diff --git a/man3/btowc.3 b/man3/btowc.3 index 67e0d25..a980864 100644 --- a/man3/btowc.3 +++ b/man3/btowc.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH btowc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH btowc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME btowc \- convert single byte to wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wint_t btowc(int " c ); .fi .SH DESCRIPTION @@ -59,7 +59,6 @@ T{ .BR btowc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -71,7 +70,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P This function should never be used. It does not work for encodings which have state, and unnecessarily treats single bytes differently from multibyte diff --git a/man3/btree.3 b/man3/btree.3 index dfa8f4e..e93e25b 100644 --- a/man3/btree.3 +++ b/man3/btree.3 @@ -5,7 +5,7 @@ .\" .\" @(#)btree.3 8.4 (Berkeley) 8/18/94 .\" -.TH btree 3 2022-12-04 "Linux man-pages 6.05.01" +.TH btree 3 2023-10-31 "Linux man-pages 6.7" .\".UC 7 .SH NAME btree \- btree database access method @@ -26,7 +26,7 @@ Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the .I libdb library instead. -.PP +.P The routine .BR dbopen (3) is the library interface to database files. @@ -34,16 +34,16 @@ One of the supported file formats is btree files. The general description of the database access methods is in .BR dbopen (3), this manual page describes only the btree-specific information. -.PP +.P The btree data structure is a sorted, balanced tree structure storing associated key/data pairs. -.PP +.P The btree access-method-specific data structure provided to .BR dbopen (3) is defined in the .I <db.h> include file as follows: -.PP +.P .in +4n .EX typedef struct { @@ -58,7 +58,7 @@ typedef struct { } BTREEINFO; .EE .in -.PP +.P The elements of this structure are as follows: .TP .I flags @@ -178,7 +178,7 @@ big endian order would be the number 4,321. If .I lorder is 0 (no order is specified), the current host order is used. -.PP +.P If the file already exists (and the .B O_TRUNC flag is not specified), the @@ -189,15 +189,15 @@ and .I psize are ignored in favor of the values used when the tree was created. -.PP +.P Forward sequential scans of a tree are from the least key to the greatest. -.PP +.P Space freed up by deleting key/data pairs from the tree is never reclaimed, although it is normally made available for reuse. This means that the btree storage structure is grow-only. The only solutions are to avoid excessive deletions, or to create a fresh tree periodically from a scan of an existing one. -.PP +.P Searches, insertions, and deletions in a btree will all complete in O lg base N where base is the average fill factor. Often, inserting ordered data into btrees results in a low fill factor. @@ -217,13 +217,13 @@ Only big and little endian byte order is supported. .BR hash (3), .BR mpool (3), .BR recno (3) -.PP +.P .IR "The Ubiquitous B-tree" , Douglas Comer, ACM Comput. Surv. 11, 2 (June 1979), 121-138. -.PP +.P .IR "Prefix B-trees" , Bayer and Unterauer, ACM Transactions on Database Systems, Vol. 2, 1 (March 1977), 11-26. -.PP +.P .IR "The Art of Computer Programming Vol. 3: Sorting and Searching" , D.E. Knuth, 1968, pp 471-480. diff --git a/man3/byteorder.3 b/man3/byteorder.3 index 7040f63..e8a1439 100644 --- a/man3/byteorder.3 +++ b/man3/byteorder.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 21:29:05 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Thu Jul 26 14:06:20 2001 by Andries Brouwer (aeb@cwi.nl) .\" -.TH BYTEORDER 3 2023-07-20 "Linux man-pages 6.05.01" +.TH BYTEORDER 3 2023-10-31 "Linux man-pages 6.7" .SH NAME htonl, htons, ntohl, ntohs \- convert values between host and network byte order @@ -20,10 +20,10 @@ Standard C library .SH SYNOPSIS .nf .B #include <arpa/inet.h> -.PP +.P .BI "uint32_t htonl(uint32_t " hostlong ); .BI "uint16_t htons(uint16_t " hostshort ); -.PP +.P .BI "uint32_t ntohl(uint32_t " netlong ); .BI "uint16_t ntohs(uint16_t " netshort ); .fi @@ -33,25 +33,25 @@ The function converts the unsigned integer .I hostlong from host byte order to network byte order. -.PP +.P The .BR htons () function converts the unsigned short integer .I hostshort from host byte order to network byte order. -.PP +.P The .BR ntohl () function converts the unsigned integer .I netlong from network byte order to host byte order. -.PP +.P The .BR ntohs () function converts the unsigned short integer .I netshort from network byte order to host byte order. -.PP +.P On the i386 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first. @@ -72,7 +72,6 @@ T{ .BR ntohs () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/bzero.3 b/man3/bzero.3 index 35abb18..59b30ab 100644 --- a/man3/bzero.3 +++ b/man3/bzero.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH bzero 3 2023-07-20 "Linux man-pages 6.05.01" +.TH bzero 3 2023-10-31 "Linux man-pages 6.7" .SH NAME bzero, explicit_bzero \- zero a byte string .SH LIBRARY @@ -12,11 +12,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "void bzero(void " s [. n "], size_t " n ); -.PP +.P .B #include <string.h> -.PP +.P .BI "void explicit_bzero(void " s [. n "], size_t " n ); .fi .SH DESCRIPTION @@ -27,7 +27,7 @@ function erases the data in the bytes of the memory starting at the location pointed to by .IR s , by writing zeros (bytes containing \[aq]\e0\[aq]) to that area. -.PP +.P The .BR explicit_bzero () function performs the same task as @@ -53,7 +53,6 @@ T{ .BR explicit_bzero () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -94,7 +93,7 @@ by an incorrect or compromised program. Calls to .BR explicit_bzero () are never optimized away by the compiler. -.PP +.P The .BR explicit_bzero () function does not solve all problems associated with erasing sensitive data: @@ -133,7 +132,7 @@ by a bug than data in a register, and thus the call creates a brief time window where the sensitive data is more vulnerable than it would otherwise have been if no attempt had been made to erase the data. -.PP +.P Note that declaring the sensitive variable with the .B volatile qualifier does @@ -143,7 +142,7 @@ Indeed, it will make them worse, since, for example, it may force a variable that would otherwise have been optimized into a register to instead be maintained in (more vulnerable) RAM for its entire lifetime. -.PP +.P Notwithstanding the above details, for security-conscious applications, using .BR explicit_bzero () is generally preferable to not using it. diff --git a/man3/cabs.3 b/man3/cabs.3 index f0c7569..d331ce7 100644 --- a/man3/cabs.3 +++ b/man3/cabs.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cabs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cabs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cabs, cabsf, cabsl \- absolute value of a complex number .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double cabs(double complex " z ); .BI "float cabsf(float complex " z ); .BI "long double cabsl(long double complex " z ); @@ -37,7 +37,6 @@ T{ .BR cabsl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/cacos.3 b/man3/cacos.3 index aebff0f..3c66ff8 100644 --- a/man3/cacos.3 +++ b/man3/cacos.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cacos 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cacos 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cacos, cacosf, cacosl \- complex arc cosine .SH LIBRARY @@ -13,7 +13,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cacos(double complex " z ); .BI "float complex cacosf(float complex " z ); .BI "long double complex cacosl(long double complex " z ); @@ -25,9 +25,9 @@ If \fIy\ =\ cacos(z)\fP, then \fIz\ =\ ccos(y)\fP. The real part of .I y is chosen in the interval [0,pi]. -.PP +.P One has: -.PP +.P .nf cacos(z) = \-i * clog(z + i * csqrt(1 \- z * z)) .fi @@ -47,7 +47,6 @@ T{ .BR cacosl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/cacosh.3 b/man3/cacosh.3 index 55d1d47..941b375 100644 --- a/man3/cacosh.3 +++ b/man3/cacosh.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cacosh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cacosh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine .SH LIBRARY @@ -13,7 +13,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cacosh(double complex " z ); .BI "float complex cacoshf(float complex " z ); .BI "long double complex cacoshl(long double complex " z ); @@ -28,9 +28,9 @@ is chosen in the interval [\-pi,pi]. The real part of .I y is chosen nonnegative. -.PP +.P One has: -.PP +.P .nf cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2)) .fi @@ -50,7 +50,6 @@ T{ .BR cacoshl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/canonicalize_file_name.3 b/man3/canonicalize_file_name.3 index 5d9e466..6304835 100644 --- a/man3/canonicalize_file_name.3 +++ b/man3/canonicalize_file_name.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH canonicalize_file_name 3 2023-07-20 "Linux man-pages 6.05.01" +.TH canonicalize_file_name 3 2023-10-31 "Linux man-pages 6.7" .SH NAME canonicalize_file_name \- return the canonicalized absolute pathname .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <stdlib.h> -.PP +.P .BI "char *canonicalize_file_name(const char *" path ");" .fi .SH DESCRIPTION @@ -31,17 +31,17 @@ pathname components. Consecutive slash .RI ( / ) characters are replaced by a single slash. -.PP +.P The returned string is dynamically allocated by .BR canonicalize_file_name () and the caller should deallocate it with .BR free (3) when it is no longer required. -.PP +.P The call .I canonicalize_file_name(path) is equivalent to the call: -.PP +.P .in +4n .EX realpath(path, NULL); @@ -73,7 +73,6 @@ T{ .BR canonicalize_file_name () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH SEE ALSO diff --git a/man3/carg.3 b/man3/carg.3 index a7e3daa..bf5003f 100644 --- a/man3/carg.3 +++ b/man3/carg.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH carg 3 2023-07-20 "Linux man-pages 6.05.01" +.TH carg 3 2023-10-31 "Linux man-pages 6.7" .SH NAME carg, cargf, cargl \- calculate the complex argument .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double carg(double complex " z ");" .BI "float cargf(float complex " z ");" .BI "long double cargl(long double complex " z ");" @@ -21,29 +21,29 @@ Math library These functions calculate the complex argument (also called phase angle) of .IR z , with a branch cut along the negative real axis. -.PP +.P A complex number can be described by two real coordinates. One may use rectangular coordinates and gets -.PP +.P .in +4n .EX z = x + I * y .EE .in -.PP +.P where .I x\~=\~creal(z) and .IR y\~=\~cimag(z) . -.PP +.P Or one may use polar coordinates and gets -.PP +.P .in +4n .EX z = r * cexp(I * a) .EE .in -.PP +.P where .I r\~=\~cabs(z) is the "radius", the "modulus", the absolute value of @@ -52,9 +52,9 @@ and .I a\~=\~carg(z) is the "phase angle", the argument of .IR z . -.PP +.P One has: -.PP +.P .in +4n .EX tan(carg(z)) = cimag(z) / creal(z) @@ -78,7 +78,6 @@ T{ .BR cargl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/casin.3 b/man3/casin.3 index 5cce6a4..edc0935 100644 --- a/man3/casin.3 +++ b/man3/casin.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH casin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH casin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME casin, casinf, casinl \- complex arc sine .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex casin(double complex " z ); .BI "float complex casinf(float complex " z ); .BI "long double complex casinl(long double complex " z ); @@ -24,9 +24,9 @@ If \fIy\ =\ casin(z)\fP, then \fIz\ =\ csin(y)\fP. The real part of .I y is chosen in the interval [\-pi/2,pi/2]. -.PP +.P One has: -.PP +.P .nf casin(z) = \-i clog(iz + csqrt(1 \- z * z)) .fi @@ -46,7 +46,6 @@ T{ .BR casinl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/casinh.3 b/man3/casinh.3 index 64cc89e..39afc1e 100644 --- a/man3/casinh.3 +++ b/man3/casinh.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH casinh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH casinh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME casinh, casinhf, casinhl \- complex arc sine hyperbolic .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex casinh(double complex " z ); .BI "float complex casinhf(float complex " z ); .BI "long double complex casinhl(long double complex " z ); @@ -24,9 +24,9 @@ If \fIy\~=\~casinh(z)\fP, then \fIz\~=\~csinh(y)\fP. The imaginary part of .I y is chosen in the interval [\-pi/2,pi/2]. -.PP +.P One has: -.PP +.P .in +4n .EX casinh(z) = clog(z + csqrt(z * z + 1)) @@ -48,7 +48,6 @@ T{ .BR casinhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/catan.3 b/man3/catan.3 index ea79b40..4bba036 100644 --- a/man3/catan.3 +++ b/man3/catan.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH catan 3 2023-07-20 "Linux man-pages 6.05.01" +.TH catan 3 2023-11-01 "Linux man-pages 6.7" .SH NAME catan, catanf, catanl \- complex arc tangents .SH LIBRARY @@ -13,7 +13,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex catan(double complex " z ); .BI "float complex catanf(float complex " z ); .BI "long double complex catanl(long double complex " z ); @@ -22,10 +22,12 @@ Math library These functions calculate the complex arc tangent of .IR z . If \fIy\~=\~catan(z)\fP, then \fIz\~=\~ctan(y)\fP. -The real part of y is chosen in the interval [\-pi/2,pi/2]. -.PP +The real part of +.I y +is chosen in the interval [\-pi/2, pi/2]. +.P One has: -.PP +.P .in +4n .EX catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i) @@ -47,7 +49,6 @@ T{ .BR catanl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/catanh.3 b/man3/catanh.3 index 0cd8c2b..48abbaa 100644 --- a/man3/catanh.3 +++ b/man3/catanh.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH catanh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH catanh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME catanh, catanhf, catanhl \- complex arc tangents hyperbolic .SH LIBRARY @@ -13,7 +13,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex catanh(double complex " z ); .BI "float complex catanhf(float complex " z ); .BI "long double complex catanhl(long double complex " z ); @@ -25,9 +25,9 @@ If \fIy\~=\~catanh(z)\fP, then \fIz\~=\~ctanh(y)\fP. The imaginary part of .I y is chosen in the interval [\-pi/2,pi/2]. -.PP +.P One has: -.PP +.P .in +4n .EX catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z)) @@ -49,7 +49,6 @@ T{ .BR catanhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/catgets.3 b/man3/catgets.3 index 2083bb3..2132dcc 100644 --- a/man3/catgets.3 +++ b/man3/catgets.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Updated, aeb, 980809 -.TH catgets 3 2023-07-20 "Linux man-pages 6.05.01" +.TH catgets 3 2023-10-31 "Linux man-pages 6.7" .SH NAME catgets \- get message from a message catalog .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <nl_types.h> -.PP +.P .BI "char *catgets(nl_catd " catalog ", int " set_number \ ", int " message_number , .BI " const char *" message ); @@ -63,16 +63,15 @@ T{ .BR catgets () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P The .BR catgets () function is available only in libc.so.4.4.4c and above. -.PP +.P The Jan 1987 X/Open Portability Guide specifies a more subtle error return: .I message diff --git a/man3/catopen.3 b/man3/catopen.3 index b65b1f3..03edefe 100644 --- a/man3/catopen.3 +++ b/man3/catopen.3 @@ -6,7 +6,7 @@ .\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org> .\" Modified 2001-12-14 aeb .\" -.TH catopen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH catopen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME catopen, catclose \- open/close a message catalog .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <nl_types.h> -.PP +.P .BI "nl_catd catopen(const char *" name ", int " flag ); .BI "int catclose(nl_catd " catalog ); .fi @@ -31,7 +31,7 @@ If a file descriptor is used to implement catalog descriptors, then the .B FD_CLOEXEC flag will be set. -.PP +.P The argument .I name specifies the name of the message catalog to be opened. @@ -73,7 +73,7 @@ Changing the .B LC_MESSAGES part of the locale may invalidate open catalog descriptors. -.PP +.P The .I flag argument to @@ -86,7 +86,7 @@ then it will use the current locale setting for Otherwise, it will use the .B LANG environment variable. -.PP +.P The function .BR catclose () closes the message catalog identified by @@ -109,7 +109,7 @@ The possible error values include all possible values for the .BR open (2) call. -.PP +.P The function .BR catclose () returns 0 on success, or \-1 on failure. @@ -147,7 +147,6 @@ T{ .BR catclose () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The above is the POSIX.1 description. The glibc value for diff --git a/man3/cbrt.3 b/man3/cbrt.3 index 106e951..373cd8f 100644 --- a/man3/cbrt.3 +++ b/man3/cbrt.3 @@ -8,7 +8,7 @@ .\" Modified 2002-07-27 Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH cbrt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cbrt 3 2024-03-12 "Linux man-pages 6.7" .SH NAME cbrt, cbrtf, cbrtl \- cube root function .SH LIBRARY @@ -17,17 +17,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double cbrt(double " x ); .BI "float cbrtf(float " x ); .BI "long double cbrtl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR cbrt (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR cbrtf (), .BR cbrtl (): .nf @@ -47,12 +47,15 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions return the (real) cube root of .IR x . -This function cannot fail; every representable real value has a -representable real cube root. +This function cannot fail; +every representable real value +has a real cube root, +and rounding it to a representable value +never causes overflow nor underflow. .SH RETURN VALUE These functions return the cube root of .IR x . -.PP +.P If .I x is +0, \-0, positive infinity, negative infinity, or NaN, @@ -76,7 +79,6 @@ T{ .BR cbrtl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/ccos.3 b/man3/ccos.3 index 2e6ceab..2d992e7 100644 --- a/man3/ccos.3 +++ b/man3/ccos.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH ccos 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ccos 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ccos, ccosf, ccosl \- complex cosine function .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex ccos(double complex " z ); .BI "float complex ccosf(float complex " z ); .BI "long double complex ccosl(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions calculate the complex cosine of .IR z . -.PP +.P The complex cosine function is defined as: -.PP +.P .in +4n .EX ccos(z) = (exp(i * z) + exp(\-i * z)) / 2 @@ -44,7 +44,6 @@ T{ .BR ccosl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/ccosh.3 b/man3/ccosh.3 index ee0c384..b61c5f3 100644 --- a/man3/ccosh.3 +++ b/man3/ccosh.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH ccosh 3 2023-03-30 "Linux man-pages 6.05.01" +.TH ccosh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ccosh, ccoshf, ccoshl \- complex hyperbolic cosine .SH LIBRARY @@ -11,7 +11,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex ccosh(double complex " z ); .BI "float complex ccoshf(float complex " z ); .BI "long double complex ccoshl(long double complex " z ); @@ -19,9 +19,9 @@ Math library .SH DESCRIPTION These functions calculate the complex hyperbolic cosine of .IR z . -.PP +.P The complex hyperbolic cosine function is defined as: -.PP +.P .in +4n .EX ccosh(z) = (exp(z)+exp(\-z))/2 diff --git a/man3/ceil.3 b/man3/ceil.3 index d72711f..60a86c0 100644 --- a/man3/ceil.3 +++ b/man3/ceil.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH ceil 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ceil 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ceil, ceilf, ceill \- ceiling function: smallest integral value not less than argument @@ -15,17 +15,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double ceil(double " x ); .BI "float ceilf(float " x ); .BI "long double ceill(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ceilf (), .BR ceill (): .nf @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions return the smallest integral value that is not less than .IR x . -.PP +.P For example, .I ceil(0.5) is 1.0, and @@ -45,7 +45,7 @@ is 0.0. .SH RETURN VALUE These functions return the ceiling of .IR x . -.PP +.P If .I x is integral, +0, \-0, NaN, or infinite, @@ -70,12 +70,11 @@ T{ .BR ceill () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to @@ -98,7 +97,7 @@ the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).) -.PP +.P The integral value returned by these functions may be too large to store in an integer type .RI ( int , diff --git a/man3/cexp.3 b/man3/cexp.3 index 30ba13f..5954913 100644 --- a/man3/cexp.3 +++ b/man3/cexp.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cexp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cexp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cexp, cexpf, cexpl \- complex exponential function .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cexp(double complex " z ); .BI "float complex cexpf(float complex " z ); .BI "long double complex cexpl(long double complex " z ); @@ -21,9 +21,9 @@ Math library These functions calculate e (2.71828..., the base of natural logarithms) raised to the power of .IR z . -.PP +.P One has: -.PP +.P .in +4n .EX cexp(I * z) = ccos(z) + I * csin(z) @@ -45,7 +45,6 @@ T{ .BR cexpl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/cexp2.3 b/man3/cexp2.3 index e19f1f6..b8d2504 100644 --- a/man3/cexp2.3 +++ b/man3/cexp2.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cexp2 3 2022-12-04 "Linux man-pages 6.05.01" +.TH cexp2 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cexp2, cexp2f, cexp2l \- base-2 exponent of a complex number .SH LIBRARY @@ -11,7 +11,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cexp2(double complex " z ); .BI "float complex cexp2f(float complex " z ); .BI "long double complex cexp2l(long double complex " z ); @@ -21,7 +21,7 @@ The function returns 2 raised to the power of .IR z . .SH STANDARDS These function names are reserved for future use in C99. -.PP +.P As at glibc 2.31, these functions are not provided in glibc. .\" But reserved in NAMESPACE. .SH SEE ALSO diff --git a/man3/cfree.3 b/man3/cfree.3 index ef97717..97d30b6 100644 --- a/man3/cfree.3 +++ b/man3/cfree.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH cfree 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cfree 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cfree \- free allocated memory .SH LIBRARY @@ -11,29 +11,29 @@ Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf -.PP +.P .B "#include <stdlib.h>" -.PP +.P /* In SunOS 4 */ .BI "int cfree(void *" ptr ); -.PP +.P /* In glibc or FreeBSD libcompat */ .BI "void cfree(void *" ptr ); -.PP +.P /* In SCO OpenServer */ .BI "void cfree(char " ptr [. size " * ." num "], unsigned int " num ", \ unsigned int " size ); -.PP +.P /* In Solaris watchmalloc.so.1 */ .BI "void cfree(void " ptr [. elsize " * ." nelem "], size_t " nelem ", \ size_t " elsize ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR cfree (): .nf Since glibc 2.19: @@ -53,7 +53,7 @@ In glibc, the function is a synonym for .BR free (3), "added for compatibility with SunOS". -.PP +.P Other systems have other functions with this name. The declaration is sometimes in .I <stdlib.h> @@ -64,17 +64,17 @@ Some SCO and Solaris versions have malloc libraries with a 3-argument .BR cfree (), apparently as an analog to .BR calloc (3). -.PP +.P If you need it while porting something, add -.PP +.P .in +4n .EX #define cfree(p, n, s) free((p)) .EE .in -.PP +.P to your file. -.PP +.P A frequently asked question is "Can I use .BR free (3) to free memory allocated with @@ -83,7 +83,7 @@ or do I need .BR cfree ()?" Answer: use .BR free (3). -.PP +.P An SCO manual writes: "The cfree routine is provided for compliance to the iBCSe2 standard and simply calls free. The num and size @@ -118,7 +118,6 @@ T{ .BR cfree () T} Thread safety MT-Safe /* In glibc */ .TE -.sp 1 .SH VERSIONS The 3-argument version of .BR cfree () diff --git a/man3/cimag.3 b/man3/cimag.3 index 4a9293e..d369cf8 100644 --- a/man3/cimag.3 +++ b/man3/cimag.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cimag 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cimag 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cimag, cimagf, cimagl \- get imaginary part of a complex number .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double cimag(double complex " z ); .BI "float cimagf(float complex " z ); .BI "long double cimagl(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions return the imaginary part of the complex number .IR z . -.PP +.P One has: -.PP +.P .in +4n .EX z = creal(z) + I * cimag(z) @@ -44,7 +44,6 @@ T{ .BR cimagl () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS GCC also supports __imag__. That is a GNU extension. diff --git a/man3/circleq.3 b/man3/circleq.3 index c03ab16..47b8213 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH CIRCLEQ 3 2023-05-03 "Linux man-pages 6.05.01" +.TH CIRCLEQ 3 2023-10-31 "Linux man-pages 6.7" .SH NAME CIRCLEQ_EMPTY, CIRCLEQ_ENTRY, @@ -32,15 +32,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/queue.h> -.PP +.P .B CIRCLEQ_ENTRY(TYPE); -.PP +.P .B CIRCLEQ_HEAD(HEADNAME, TYPE); .BI "CIRCLEQ_HEAD CIRCLEQ_HEAD_INITIALIZER(CIRCLEQ_HEAD " head ); .BI "void CIRCLEQ_INIT(CIRCLEQ_HEAD *" head ); -.PP +.P .BI "int CIRCLEQ_EMPTY(CIRCLEQ_HEAD *" head ); -.PP +.P .BI "void CIRCLEQ_INSERT_HEAD(CIRCLEQ_HEAD *" head , .BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); .BI "void CIRCLEQ_INSERT_TAIL(CIRCLEQ_HEAD *" head , @@ -49,7 +49,7 @@ Standard C library .BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); .BI "void CIRCLEQ_INSERT_AFTER(CIRCLEQ_HEAD *" head ", struct TYPE *" listelm , .BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *CIRCLEQ_FIRST(CIRCLEQ_HEAD *" head ); .BI "struct TYPE *CIRCLEQ_LAST(CIRCLEQ_HEAD *" head ); .BI "struct TYPE *CIRCLEQ_PREV(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); @@ -58,18 +58,18 @@ Standard C library .BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); .BI "struct TYPE *CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head , .BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); -.PP +.P .BI "CIRCLEQ_FOREACH(struct TYPE *" var ", CIRCLEQ_HEAD *" head , .BI " CIRCLEQ_ENTRY " NAME ); .BI "CIRCLEQ_FOREACH_REVERSE(struct TYPE *" var ", CIRCLEQ_HEAD *" head , .BI " CIRCLEQ_ENTRY " NAME ); -.PP +.P .BI "void CIRCLEQ_REMOVE(CIRCLEQ_HEAD *" head ", struct TYPE *" elm , .BI " CIRCLEQ_ENTRY " NAME ); .fi .SH DESCRIPTION These macros define and operate on doubly linked circular queues. -.PP +.P In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -99,43 +99,43 @@ or at the end of the queue. A .I CIRCLEQ_HEAD structure is declared as follows: -.PP +.P .in +4 .EX CIRCLEQ_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR CIRCLEQ_ENTRY () declares a structure that connects the elements in the queue. -.PP +.P .BR CIRCLEQ_HEAD_INITIALIZER () evaluates to an initializer for the queue .IR head . -.PP +.P .BR CIRCLEQ_INIT () initializes the queue referenced by .IR head . -.PP +.P .BR CIRCLEQ_EMPTY () evaluates to true if there are no items on the queue. .SS Insertion @@ -143,18 +143,18 @@ evaluates to true if there are no items on the queue. inserts the new element .I elm at the head of the queue. -.PP +.P .BR CIRCLEQ_INSERT_TAIL () inserts the new element .I elm at the end of the queue. -.PP +.P .BR CIRCLEQ_INSERT_BEFORE () inserts the new element .I elm before the element .IR listelm . -.PP +.P .BR CIRCLEQ_INSERT_AFTER () inserts the new element .I elm @@ -163,32 +163,32 @@ after the element .SS Traversal .BR CIRCLEQ_FIRST () returns the first item on the queue. -.PP +.P .BR CIRCLEQ_LAST () returns the last item on the queue. -.PP +.P .BR CIRCLEQ_PREV () returns the previous item on the queue, or .I &head if this item is the first one. -.PP +.P .BR CIRCLEQ_NEXT () returns the next item on the queue, or .I &head if this item is the last one. -.PP +.P .BR CIRCLEQ_LOOP_PREV () returns the previous item on the queue. If .I elm is the first element on the queue, the last element is returned. -.PP +.P .BR CIRCLEQ_LOOP_NEXT () returns the next item on the queue. If .I elm is the last element on the queue, the first element is returned. -.PP +.P .BR CIRCLEQ_FOREACH () traverses the queue referenced by .I head @@ -198,7 +198,7 @@ in the forward direction, assigning each element in turn to is set to .I &head if the loop completes normally, or if there were no elements. -.PP +.P .BR CIRCLEQ_FOREACH_REVERSE () traverses the queue referenced by .I head @@ -214,7 +214,7 @@ from the queue. .BR CIRCLEQ_EMPTY () returns nonzero if the queue is empty, and zero if the queue contains at least one entry. -.PP +.P .BR CIRCLEQ_FIRST (), .BR CIRCLEQ_LAST (), .BR CIRCLEQ_LOOP_PREV (), @@ -223,7 +223,7 @@ and return a pointer to the first, last, previous, or next .I TYPE structure, respectively. -.PP +.P .BR CIRCLEQ_PREV (), and .BR CIRCLEQ_NEXT () @@ -233,7 +233,7 @@ counterparts, except that if the argument is the first or last element, respectively, they return .IR &head . -.PP +.P .BR CIRCLEQ_HEAD_INITIALIZER () returns an initializer that can be assigned to the queue .IR head . diff --git a/man3/clearenv.3 b/man3/clearenv.3 index 1c91402..3ffd761 100644 --- a/man3/clearenv.3 +++ b/man3/clearenv.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Additions, aeb, 2001-10-17. -.TH clearenv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH clearenv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clearenv \- clear the environment .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B "int clearenv(void);" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR clearenv (): .nf /* glibc >= 2.19: */ _DEFAULT_SOURCE @@ -59,7 +59,6 @@ T{ .BR clearenv () T} Thread safety MT-Unsafe const:env .TE -.sp 1 .SH STANDARDS .TP .BR putenv () @@ -75,7 +74,7 @@ POSIX.1-2001. .TP .BR clearenv () glibc 2.0. -.PP +.P Various UNIX variants (DG/UX, HP-UX, QNX, ...). POSIX.9 (bindings for FORTRAN77). POSIX.1-1996 did not accept @@ -93,15 +92,15 @@ and rejected On systems where .BR clearenv () is unavailable, the assignment -.PP +.P .in +4n .EX environ = NULL; .EE .in -.PP +.P will probably do. -.PP +.P The .BR clearenv () function may be useful in security-conscious applications that want to @@ -110,14 +109,14 @@ executed using .BR exec (3). The application would do this by first clearing the environment and then adding select environment variables. -.PP +.P Note that the main effect of .BR clearenv () is to adjust the value of the pointer .BR environ (7); this function does not erase the contents of the buffers containing the environment definitions. -.PP +.P The DG/UX and Tru64 man pages write: If .I environ has been modified by anything other than the @@ -128,7 +127,7 @@ or functions, then .BR clearenv () will return an error and the process environment will remain unchanged. -.\" .LP +.\" .P .\" HP-UX has a ENOMEM error return. .SH SEE ALSO .BR getenv (3), diff --git a/man3/clock.3 b/man3/clock.3 index 588209b..53231aa 100644 --- a/man3/clock.3 +++ b/man3/clock.3 @@ -7,7 +7,7 @@ .\" Modified 14 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com> .\" Added notes on differences from other UNIX systems with respect to .\" waited-for children. -.TH clock 3 2023-07-20 "Linux man-pages 6.05.01" +.TH clock 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clock \- determine processor time .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .B clock_t clock(void); .fi .SH DESCRIPTION @@ -45,13 +45,12 @@ T{ .BR clock () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS XSI requires that .B CLOCKS_PER_SEC equals 1000000 independent of the actual resolution. -.PP +.P On several other implementations, the value returned by .BR clock () @@ -74,7 +73,7 @@ caller and its children, may be preferable. C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C89. -.PP +.P In glibc 2.17 and earlier, .BR clock () was implemented on top of @@ -90,7 +89,7 @@ The C standard allows for arbitrary values at the start of the program; subtract the value returned from a call to .BR clock () at the start of the program to get maximum portability. -.PP +.P Note that the time can wrap around. On a 32-bit system where .B CLOCKS_PER_SEC diff --git a/man3/clock_getcpuclockid.3 b/man3/clock_getcpuclockid.3 index 749fdbe..541c46a 100644 --- a/man3/clock_getcpuclockid.3 +++ b/man3/clock_getcpuclockid.3 @@ -4,30 +4,30 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH clock_getcpuclockid 3 2023-07-20 "Linux man-pages 6.05.01" +.TH clock_getcpuclockid 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clock_getcpuclockid \- obtain ID of a process CPU-time clock .SH LIBRARY Standard C library .RI ( libc ", " \-lc ), since glibc 2.17 -.PP +.P Before glibc 2.17, Real-time library .RI ( librt ", " \-lrt ) .SH SYNOPSIS .B #include <time.h> .nf -.PP +.P .BI "int clock_getcpuclockid(pid_t " pid ", clockid_t *" clockid ); .fi -.PP +.P .ad l .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR clock_getcpuclockid (): .nf _POSIX_C_SOURCE >= 200112L @@ -81,7 +81,6 @@ T{ .BR clock_getcpuclockid () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -104,7 +103,7 @@ and then uses .BR clock_gettime (2) to obtain the time on that clock. An example run is the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out 1" " # Show CPU clock of init process" diff --git a/man3/clog.3 b/man3/clog.3 index 5a75d36..9ada276 100644 --- a/man3/clog.3 +++ b/man3/clog.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH clog 3 2023-07-20 "Linux man-pages 6.05.01" +.TH clog 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clog, clogf, clogl \- natural logarithm of a complex number .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex clog(double complex " z ); .BI "float complex clogf(float complex " z ); .BI "long double complex clogl(long double complex " z ); @@ -21,7 +21,7 @@ Math library These functions calculate the complex natural logarithm of .IR z , with a branch cut along the negative real axis. -.PP +.P The logarithm .BR clog () is the inverse function of the exponential @@ -30,15 +30,15 @@ Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP. The imaginary part of .I y is chosen in the interval [\-pi,pi]. -.PP +.P One has: -.PP +.P .in +4n .EX clog(z) = log(cabs(z)) + I * carg(z) .EE .in -.PP +.P Note that .I z close to zero will cause an overflow. @@ -58,7 +58,6 @@ T{ .BR clogl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/clog10.3 b/man3/clog10.3 index 716d6e7..6ad20a4 100644 --- a/man3/clog10.3 +++ b/man3/clog10.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH clog10 3 2023-07-20 "Linux man-pages 6.05.01" +.TH clog10 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clog10, clog10f, clog10l \- base-10 logarithm of a complex number .SH LIBRARY @@ -13,7 +13,7 @@ Math library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <complex.h> -.PP +.P .BI "double complex clog10(double complex " z ); .BI "float complex clog10f(float complex " z ); .BI "long double complex clog10l(long double complex " z ); @@ -22,26 +22,26 @@ Math library The call .I clog10(z) is equivalent to: -.PP +.P .in +4n .EX clog(z)/log(10) .EE .in -.PP +.P or equally: -.PP +.P .in +4n .EX log10(cabs(c)) + I * carg(c) / log(10) .EE .in -.PP +.P The other functions perform the same task for .I float and .IR "long double" . -.PP +.P Note that .I z close to zero will cause an overflow. @@ -61,12 +61,11 @@ T{ .BR clog10l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY glibc 2.1. -.PP +.P The identifiers are reserved for future use in C99 and C11. .SH SEE ALSO .BR cabs (3), diff --git a/man3/clog2.3 b/man3/clog2.3 index 06a04a9..d1f3b4a 100644 --- a/man3/clog2.3 +++ b/man3/clog2.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH clog2 3 2023-03-30 "Linux man-pages 6.05.01" +.TH clog2 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clog2, clog2f, clog2l \- base-2 logarithm of a complex number .SH LIBRARY @@ -11,7 +11,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex clog2(double complex " z ); .BI "float complex clog2f(float complex " z ); .BI "long double complex clog2l(long double complex " z ); @@ -21,12 +21,12 @@ The call .I clog2(z) is equivalent to .IR clog(z)/log(2) . -.PP +.P The other functions perform the same task for .I float and .IR "long double" . -.PP +.P Note that .I z close to zero will cause an overflow. @@ -34,7 +34,7 @@ close to zero will cause an overflow. None. .SH HISTORY These function names are reserved for future use in C99. -.PP +.P Not yet in glibc, as at glibc 2.19. .\" But reserved in NAMESPACE. .SH SEE ALSO diff --git a/man3/closedir.3 b/man3/closedir.3 index e10ae9e..5fc9737 100644 --- a/man3/closedir.3 +++ b/man3/closedir.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 21:25:52 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) -.TH closedir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH closedir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME closedir \- close a directory .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .nf .B #include <sys/types.h> .B #include <dirent.h> -.PP +.P .BI "int closedir(DIR *" dirp ); .fi .SH DESCRIPTION @@ -61,7 +61,6 @@ T{ .BR closedir () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/cmsg.3 b/man3/cmsg.3 index 3ca7d1d..2d0a70e 100644 --- a/man3/cmsg.3 +++ b/man3/cmsg.3 @@ -3,7 +3,7 @@ .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>. .\" .\" $Id: cmsg.3,v 1.8 2000/12/20 18:10:31 ak Exp $ -.TH CMSG 3 2023-07-15 "Linux man-pages 6.05.01" +.TH CMSG 3 2023-10-31 "Linux man-pages 6.7" .SH NAME CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- access ancillary data .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/socket.h> -.PP +.P .BI "struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *" msgh ); .BI "struct cmsghdr *CMSG_NXTHDR(struct msghdr *" msgh , .BR " struct cmsghdr *" cmsg ); @@ -35,7 +35,7 @@ Ancillary data is sent by calling and received by calling .BR recvmsg (2). See their manual pages for more information. -.PP +.P Ancillary data is a sequence of .I cmsghdr structures with appended data. @@ -44,11 +44,11 @@ The maximum ancillary buffer size allowed per socket can be set using .IR /proc/sys/net/core/optmem_max ; see .BR socket (7). -.PP +.P The .I cmsghdr structure is defined as follows: -.PP +.P .in +4n .EX struct cmsghdr { @@ -61,7 +61,7 @@ struct cmsghdr { }; .EE .in -.PP +.P The sequence of .I cmsghdr structures should never be accessed directly. @@ -122,7 +122,7 @@ alignment. It takes the data length as an argument. This is a constant expression. -.PP +.P To create ancillary data, first initialize the .I msg_controllen member of the @@ -158,7 +158,7 @@ see .SH VERSIONS For portability, ancillary data should be accessed using only the macros described here. -.PP +.P In Linux, .BR CMSG_LEN (), .BR CMSG_DATA (), @@ -185,7 +185,7 @@ Linux. .SH HISTORY This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, the IPv6 advanced API described in RFC\ 2292 and SUSv2. -.PP +.P .BR CMSG_SPACE () and .BR CMSG_LEN () @@ -195,7 +195,7 @@ will be included in the next POSIX release (Issue 8). This code looks for the .B IP_TTL option in a received ancillary buffer: -.PP +.P .in +4n .EX struct msghdr msgh; @@ -218,11 +218,11 @@ if (cmsg == NULL) { } .EE .in -.PP +.P The code below passes an array of file descriptors over a UNIX domain socket using .BR SCM_RIGHTS : -.PP +.P .in +4n .EX struct msghdr msg = { 0 }; @@ -250,12 +250,12 @@ cmsg\->cmsg_len = CMSG_LEN(sizeof(myfds)); memcpy(CMSG_DATA(cmsg), myfds, sizeof(myfds)); .EE .in -.PP +.P For a complete code example that shows passing of file descriptors over a UNIX domain socket, see .BR seccomp_unotify (2). .SH SEE ALSO .BR recvmsg (2), .BR sendmsg (2) -.PP +.P RFC\ 2292 diff --git a/man3/confstr.3 b/man3/confstr.3 index 5efd862..4a04a25 100644 --- a/man3/confstr.3 +++ b/man3/confstr.3 @@ -11,7 +11,7 @@ .\" These should all be added to this page. .\" See also the POSIX.1-2001 specification of confstr() .\" -.TH confstr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH confstr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME confstr \- get configuration dependent string variables .SH LIBRARY @@ -20,15 +20,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "size_t confstr(int " "name" ", char " buf [. size "], size_t " size ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR confstr (): .nf _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION .BR confstr () gets the value of configuration-dependent string variables. -.PP +.P The .I name argument is the system variable to be queried. @@ -55,7 +55,7 @@ A value for the .B PATH variable which indicates where all the POSIX.2 standard utilities can be found. -.PP +.P If .I buf is not NULL and @@ -71,7 +71,7 @@ This can be detected by comparing the return value of .BR confstr () against .IR size . -.PP +.P If .I size is zero and @@ -91,7 +91,7 @@ This value may be greater than which means that the value in .I buf is truncated. -.PP +.P If .I name is a valid configuration variable, @@ -126,7 +126,6 @@ T{ .BR confstr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -134,7 +133,7 @@ POSIX.1-2001. .SH EXAMPLES The following code fragment determines the path where to find the POSIX.2 system utilities: -.PP +.P .in +4n .EX char *pathbuf; diff --git a/man3/conj.3 b/man3/conj.3 index 760f079..4f0bef3 100644 --- a/man3/conj.3 +++ b/man3/conj.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH conj 3 2023-07-20 "Linux man-pages 6.05.01" +.TH conj 3 2023-10-31 "Linux man-pages 6.7" .SH NAME conj, conjf, conjl \- calculate the complex conjugate .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex conj(double complex " z ); .BI "float complex conjf(float complex " z ); .BI "long double complex conjl(long double complex " z ); @@ -21,9 +21,9 @@ Math library These functions return the complex conjugate value of .IR z . That is the value obtained by changing the sign of the imaginary part. -.PP +.P One has: -.PP +.P .in +4n .EX cabs(z) = csqrt(z * conj(z)) @@ -45,7 +45,6 @@ T{ .BR conjl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/copysign.3 b/man3/copysign.3 index 9bd7932..8f7e7ab 100644 --- a/man3/copysign.3 +++ b/man3/copysign.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-08-10 by Walter Harms (walter.harms@informatik.uni-oldenburg.de) -.TH copysign 3 2023-07-20 "Linux man-pages 6.05.01" +.TH copysign 3 2023-10-31 "Linux man-pages 6.7" .SH NAME copysign, copysignf, copysignl \- copy sign of a number .SH LIBRARY @@ -18,17 +18,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double copysign(double " x ", double " y ); .BI "float copysignf(float " x ", float " y ); .BI "long double copysignl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR copysign (), .BR copysignf (), .BR copysignl (): @@ -42,7 +42,7 @@ These functions return a value whose absolute value matches that of .IR x , but whose sign bit matches that of .IR y . -.PP +.P For example, .I "copysign(42.0,\ \-1.0)" and @@ -53,7 +53,7 @@ On success, these functions return a value whose magnitude is taken from .I x and whose sign is taken from .IR y . -.PP +.P If .I x is a NaN, @@ -78,13 +78,12 @@ T{ .BR copysignl () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On architectures where the floating-point formats are not IEEE 754 compliant, these functions may treat a negative zero as positive. .SH STANDARDS C11, POSIX.1-2008. -.PP +.P This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854). .SH HISTORY @@ -12,7 +12,7 @@ .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH cos 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cos 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cos, cosf, cosl \- cosine function .SH LIBRARY @@ -21,17 +21,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double cos(double " x ); .BI "float cosf(float " x ); .BI "long double cosl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR cosf (), .BR cosl (): .nf @@ -49,11 +49,11 @@ given in radians. .SH RETURN VALUE On success, these functions return the cosine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity or negative infinity, @@ -64,7 +64,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity @@ -91,12 +91,11 @@ T{ .BR cosl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C89, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/cosh.3 b/man3/cosh.3 index 358cb1f..5177cce 100644 --- a/man3/cosh.3 +++ b/man3/cosh.3 @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH cosh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cosh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cosh, coshf, coshl \- hyperbolic cosine function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double cosh(double " x ); .BI "float coshf(float " x ); .BI "long double coshl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR coshf (), .BR coshl (): .nf @@ -45,7 +45,7 @@ Feature Test Macro Requirements for glibc (see These functions return the hyperbolic cosine of .IR x , which is defined mathematically as: -.PP +.P .in +4n .EX cosh(x) = (exp(x) + exp(\-x)) / 2 @@ -54,20 +54,20 @@ cosh(x) = (exp(x) + exp(\-x)) / 2 .SH RETURN VALUE On success, these functions return the hyperbolic cosine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 or \-0, 1 is returned. -.PP +.P If .I x is positive infinity or negative infinity, positive infinity is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -81,7 +81,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result overflow @@ -107,12 +107,11 @@ T{ .BR coshl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/cpow.3 b/man3/cpow.3 index 92dd971..788f5aa 100644 --- a/man3/cpow.3 +++ b/man3/cpow.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cpow 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cpow 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cpow, cpowf, cpowl \- complex power function .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cpow(double complex " x ", double complex " z ); .BI "float complex cpowf(float complex " x ", float complex " z ); .BI "long double complex cpowl(long double complex " x , @@ -42,7 +42,6 @@ T{ .BR cpowl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/cproj.3 b/man3/cproj.3 index 159998a..2d32c1e 100644 --- a/man3/cproj.3 +++ b/man3/cproj.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH cproj 3 2023-07-20 "Linux man-pages 6.05.01" +.TH cproj 3 2023-10-31 "Linux man-pages 6.7" .SH NAME cproj, cprojf, cprojl \- project into Riemann Sphere .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex cproj(double complex " z ");" .BI "float complex cprojf(float complex " z ");" .BI "long double complex cprojl(long double complex " z ");" @@ -43,13 +43,12 @@ T{ .BR cprojl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY glibc 2.1. C99, POSIX.1-2001. -.PP +.P In glibc 2.11 and earlier, the implementation does something different (a .I stereographic diff --git a/man3/creal.3 b/man3/creal.3 index 718dc5b..ded56e6 100644 --- a/man3/creal.3 +++ b/man3/creal.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH creal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH creal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME creal, crealf, creall \- get real part of a complex number .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double creal(double complex " z ); .BI "float crealf(float complex " z ); .BI "long double creall(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions return the real part of the complex number .IR z . -.PP +.P One has: -.PP +.P .nf z = creal(z) + I * cimag(z) .fi @@ -42,7 +42,6 @@ T{ .BR creall () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS GCC supports also __real__. That is a GNU extension. diff --git a/man3/crypt.3 b/man3/crypt.3 index c6873a5..d3531f0 100644 --- a/man3/crypt.3 +++ b/man3/crypt.3 @@ -15,7 +15,7 @@ .\" added _XOPEN_SOURCE, aeb, 970705 .\" added GNU MD5 stuff, aeb, 011223 .\" -.TH crypt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH crypt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME crypt, crypt_r \- password hashing .SH LIBRARY @@ -24,20 +24,20 @@ Password hashing library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "char *crypt(const char *" key ", const char *" salt ); -.PP +.P .B #include <crypt.h> -.PP +.P .BI "char *crypt_r(const char *" key ", const char *" salt , .BI " struct crypt_data *restrict " data ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR crypt (): .nf Since glibc 2.28: @@ -45,7 +45,7 @@ Feature Test Macro Requirements for glibc (see glibc 2.27 and earlier: _XOPEN_SOURCE .fi -.PP +.P .BR crypt_r (): .nf _GNU_SOURCE @@ -56,16 +56,16 @@ is the password hashing function. It is based on the Data Encryption Standard algorithm with variations intended (among other things) to discourage use of hardware implementations of a key search. -.PP +.P .I key is a user's typed password. -.PP +.P .I salt is a two-character string chosen from the set [\fBa\-zA\-Z0\-9./\fP]. This string is used to perturb the algorithm in one of 4096 different ways. -.PP +.P By taking the lowest 7 bits of each of the first eight characters of the .IR key , a 56-bit key is obtained. @@ -76,7 +76,7 @@ value points to the hashed password, a series of 13 printable ASCII characters (the first two characters represent the salt itself). The return value points to static data whose content is overwritten by each call. -.PP +.P Warning: the key space consists of .if t 2\s-2\u56\s0\d .if n 2**56 @@ -93,7 +93,7 @@ The use of a .BR passwd (1) program that checks for crackable passwords during the selection process is recommended. -.PP +.P The DES algorithm itself has a few quirks which make the use of the .BR crypt () interface a very poor choice for anything other than password @@ -102,7 +102,7 @@ If you are planning on using the .BR crypt () interface for a cryptography project, don't do it: get a good book on encryption and one of the widely available DES libraries. -.PP +.P .BR crypt_r () is a reentrant version of .BR crypt (). @@ -128,22 +128,22 @@ The .BR crypt () function was not implemented, probably because of U.S.A. export restrictions. .\" This level of detail is not necessary in this man page. . . -.\" .PP +.\" .P .\" When encrypting a plain text P using DES with the key K results in the .\" encrypted text C, then the complementary plain text P' being encrypted .\" using the complementary key K' will result in the complementary encrypted .\" text C'. -.\" .PP +.\" .P .\" Weak keys are keys which stay invariant under the DES key transformation. .\" The four known weak keys 0101010101010101, fefefefefefefefe, .\" 1f1f1f1f0e0e0e0e and e0e0e0e0f1f1f1f1 must be avoided. -.\" .PP +.\" .P .\" There are six known half weak key pairs, which keys lead to the same .\" encrypted data. Keys which are part of such key clusters should be .\" avoided. .\" Sorry, I could not find out what they are. .\"" -.\" .PP +.\" .P .\" Heavily redundant data causes trouble with DES encryption, when used in the .\" .I codebook .\" mode that @@ -152,13 +152,13 @@ function was not implemented, probably because of U.S.A. export restrictions. .\" .BR crypt () .\" interface should be used only for its intended purpose of password .\" verification, and should not be used as part of a data encryption tool. -.\" .PP +.\" .P .\" The first and last three output bits of the fourth S-box can be .\" represented as function of their input bits. Empiric studies have .\" shown that S-boxes partially compute the same output for similar input. .\" It is suspected that this may contain a back door which could allow the .\" NSA to decrypt DES encrypted data. -.\" .PP +.\" .P .\" Making encrypted data computed using crypt() publicly available has .\" to be considered insecure for the given reasons. .TP @@ -185,7 +185,6 @@ T{ .BR crypt_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR crypt () @@ -226,17 +225,17 @@ is an ABI-compatible drop-in replacement. .SS Features in glibc The glibc version of this function supports additional hashing algorithms. -.PP +.P If .I salt is a character string starting with the characters "$\fIid\fP$" followed by a string optionally terminated by "$", then the result has the form: .RS -.PP +.P $\fIid\fP$\fIsalt\fP$\fIhashed\fP .RE -.PP +.P .I id identifies the hashing method used instead of DES and this then determines how the rest of the password string is interpreted. @@ -264,11 +263,11 @@ T} 6 SHA-512 (since glibc 2.7) .TE .RE -.PP +.P Thus, $5$\fIsalt\fP$\fIhashed\fP and $6$\fIsalt\fP$\fIhashed\fP contain the password hashed with, respectively, functions based on SHA-256 and SHA-512. -.PP +.P "\fIsalt\fP" stands for the up to 16 characters following "$\fIid\fP$" in the salt. The "\fIhashed\fP" @@ -282,14 +281,14 @@ SHA-256 43 characters SHA-512 86 characters .TE .RE -.PP +.P The characters in "\fIsalt\fP" and "\fIhashed\fP" are drawn from the set [\fBa\-zA\-Z0\-9./\fP]. In the MD5 and SHA implementations the entire .I key is significant (instead of only the first 8 bytes in DES). -.PP +.P Since glibc 2.7, .\" glibc commit 9425cb9eea6a62fc21d99aafe8a60f752b934b05 the SHA-256 and SHA-512 implementations support a user-supplied number of @@ -298,10 +297,10 @@ If the "$\fIid\fP$" characters in the salt are followed by "rounds=\fIxxx\fP$", where \fIxxx\fP is an integer, then the result has the form .RS -.PP +.P $\fIid\fP$\fIrounds=yyy\fP$\fIsalt\fP$\fIhashed\fP .RE -.PP +.P where \fIyyy\fP is the number of hashing rounds actually used. The number of rounds actually used is 1000 if .I xxx diff --git a/man3/csin.3 b/man3/csin.3 index bc10951..1bf04a1 100644 --- a/man3/csin.3 +++ b/man3/csin.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH csin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH csin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME csin, csinf, csinl \- complex sine function .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex csin(double complex " z ); .BI "float complex csinf(float complex " z ); .BI "long double complex csinl(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions calculate the complex sine of .IR z . -.PP +.P The complex sine function is defined as: -.PP +.P .in +4n .EX csin(z) = (exp(i * z) \- exp(\-i * z)) / (2 * i) @@ -44,7 +44,6 @@ T{ .BR csinl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/csinh.3 b/man3/csinh.3 index b7a7350..263e2d0 100644 --- a/man3/csinh.3 +++ b/man3/csinh.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH csinh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH csinh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME csinh, csinhf, csinhl \- complex hyperbolic sine .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex csinh(double complex " z ); .BI "float complex csinhf(float complex " z ); .BI "long double complex csinhl(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions calculate the complex hyperbolic sine of .IR z . -.PP +.P The complex hyperbolic sine function is defined as: -.PP +.P .in +4n .EX csinh(z) = (exp(z)\-exp(\-z))/2 @@ -44,7 +44,6 @@ T{ .BR csinhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/csqrt.3 b/man3/csqrt.3 index 319bbd1..9fdf80b 100644 --- a/man3/csqrt.3 +++ b/man3/csqrt.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH csqrt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH csqrt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME csqrt, csqrtf, csqrtl \- complex square root .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex csqrt(double complex " z ); .BI "float complex csqrtf(float complex " z ); .BI "long double complex csqrtl(long double complex " z ); @@ -40,7 +40,6 @@ T{ .BR csqrtl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/ctan.3 b/man3/ctan.3 index e47f11d..3daf68b 100644 --- a/man3/ctan.3 +++ b/man3/ctan.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH ctan 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ctan 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ctan, ctanf, ctanl \- complex tangent function .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex ctan(double complex " z ); .BI "float complex ctanf(float complex " z ); .BI "long double complex ctanl(long double complex " z ); @@ -20,9 +20,9 @@ Math library .SH DESCRIPTION These functions calculate the complex tangent of .IR z . -.PP +.P The complex tangent function is defined as: -.PP +.P .in +4n .EX ctan(z) = csin(z) / ccos(z) @@ -44,7 +44,6 @@ T{ .BR ctanl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/ctanh.3 b/man3/ctanh.3 index a9b7b34..f2178b9 100644 --- a/man3/ctanh.3 +++ b/man3/ctanh.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH ctanh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ctanh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ctanh, ctanhf, ctanhl \- complex hyperbolic tangent .SH LIBRARY @@ -12,7 +12,7 @@ Math library .SH SYNOPSIS .nf .B #include <complex.h> -.PP +.P .BI "double complex ctanh(double complex " z ); .BI "float complex ctanhf(float complex " z ); .BI "long double complex ctanhl(long double complex " z ); @@ -20,10 +20,10 @@ Math library .SH DESCRIPTION These functions calculate the complex hyperbolic tangent of .IR z . -.PP +.P The complex hyperbolic tangent function is defined mathematically as: -.PP +.P .in +4n .EX ctanh(z) = csinh(z) / ccosh(z) @@ -45,7 +45,6 @@ T{ .BR ctanhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/ctermid.3 b/man3/ctermid.3 index 0a2ab66..987637f 100644 --- a/man3/ctermid.3 +++ b/man3/ctermid.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu) -.TH ctermid 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ctermid 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ctermid \- get controlling terminal name .SH LIBRARY @@ -15,15 +15,15 @@ Standard C library .B #include <stdio.h> .\" POSIX also requires this function to be declared in <unistd.h>, .\" and glibc does so if suitable feature test macros are defined. -.PP +.P .BI "char *ctermid(char *" "s" ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ctermid (): .nf _POSIX_C_SOURCE @@ -57,7 +57,6 @@ T{ .BR ctermid () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -66,7 +65,7 @@ POSIX.1-2001, Svr4. The returned pathname may not uniquely identify the controlling terminal; it may, for example, be .IR /dev/tty . -.PP +.P It is not assured that the program can open the terminal. .\" in glibc 2.3.x, x >= 4, the glibc headers threw an error .\" if ctermid() was given an argument; fixed in glibc 2.4. diff --git a/man3/ctime.3 b/man3/ctime.3 index 4dc72f2..817e964 100644 --- a/man3/ctime.3 +++ b/man3/ctime.3 @@ -13,7 +13,7 @@ .\" Modified 2001-12-13, joey, aeb .\" Modified 2004-11-16, mtk .\" -.TH ctime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ctime 3 2023-10-31 "Linux man-pages 6.7" .SH NAME asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r, localtime_r \- transform date and time to broken-down time or ASCII @@ -23,31 +23,31 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BI "char *asctime(const struct tm *" tm ); .BI "char *asctime_r(const struct tm *restrict " tm , .BI " char " buf "[restrict 26]);" -.PP +.P .BI "char *ctime(const time_t *" timep ); .BI "char *ctime_r(const time_t *restrict " timep , .BI " char " buf "[restrict 26]);" -.PP +.P .BI "struct tm *gmtime(const time_t *" timep ); .BI "struct tm *gmtime_r(const time_t *restrict " timep , .BI " struct tm *restrict " result ); -.PP +.P .BI "struct tm *localtime(const time_t *" timep ); .BI "struct tm *localtime_r(const time_t *restrict " timep , .BI " struct tm *restrict " result ); -.PP +.P .BI "time_t mktime(struct tm *" tm ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR asctime_r (), .BR ctime_r (), .BR gmtime_r (), @@ -66,7 +66,7 @@ functions all take an argument of data type \fItime_t\fP, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). -.PP +.P The .BR asctime () and @@ -74,25 +74,25 @@ and functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on. -.PP +.P Broken-down time is stored in the structure .IR tm , described in .BR tm (3type). -.PP +.P The call .BI ctime( t ) is equivalent to .BI asctime(localtime( t )) \fR. It converts the calendar time \fIt\fP into a null-terminated string of the form -.PP +.P .in +4n .EX "Wed Jun 30 21:49:08 1993\en" .EE .in -.PP +.P The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat". The abbreviations for the months are "Jan", @@ -112,7 +112,7 @@ string in a user-supplied buffer which should have room for at least 26 bytes. It need not set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP. -.PP +.P The .BR gmtime () function converts the calendar time \fItimep\fP to @@ -125,7 +125,7 @@ The .BR gmtime_r () function does the same, but stores the data in a user-supplied struct. -.PP +.P The .BR localtime () function converts the calendar time \fItimep\fP to @@ -145,7 +145,7 @@ The function does the same, but stores the data in a user-supplied struct. It need not set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP. -.PP +.P The .BR asctime () function converts the broken-down time value @@ -157,7 +157,7 @@ The .BR asctime_r () function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. -.PP +.P The .BR mktime () function converts a broken-down time structure, expressed @@ -182,7 +182,7 @@ and a negative value means that .BR mktime () should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time. -.PP +.P The .BR mktime () function modifies the fields of the @@ -202,7 +202,7 @@ Calling .BR mktime () also sets the external variable \fItzname\fP with information about the current timezone. -.PP +.P If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), .BR mktime () @@ -217,33 +217,33 @@ and .BR localtime () return a pointer to a .IR "struct\ tm" . -.PP +.P On success, .BR gmtime_r () and .BR localtime_r () return the address of the structure pointed to by .IR result . -.PP +.P On success, .BR asctime () and .BR ctime () return a pointer to a string. -.PP +.P On success, .BR asctime_r () and .BR ctime_r () return a pointer to the string pointed to by .IR buf . -.PP +.P On success, .BR mktime () returns the calendar time (seconds since the Epoch), expressed as a value of type .IR time_t . -.PP +.P On error, .BR mktime () returns the value @@ -315,18 +315,17 @@ T} Thread safety T{ MT-Unsafe race:tmbuf env locale T} .TE -.sp 1 .SH VERSIONS POSIX doesn't specify the parameters of .BR ctime_r () to be .IR restrict ; that is specific to glibc. -.PP +.P In many implementations, including glibc, a 0 in .I tm_mday is interpreted as meaning the last day of the preceding month. -.PP +.P According to POSIX.1-2001, .BR localtime () is required to behave as though @@ -402,7 +401,7 @@ The thread-safe versions, and .BR localtime_r (), are specified by SUSv2. -.PP +.P POSIX.1-2001 says: "The .BR asctime (), diff --git a/man3/daemon.3 b/man3/daemon.3 index a44263c..9ee1587 100644 --- a/man3/daemon.3 +++ b/man3/daemon.3 @@ -6,7 +6,7 @@ .\" .\" @(#)daemon.3 8.1 (Berkeley) 6/9/93 .\" Added mentioning of glibc weirdness wrt unistd.h. 5/11/98, Al Viro -.TH daemon 3 2023-07-20 "Linux man-pages 6.05.01" +.TH daemon 3 2023-10-31 "Linux man-pages 6.7" .SH NAME daemon \- run in the background .SH LIBRARY @@ -15,15 +15,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int daemon(int " nochdir ", int " noclose ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR daemon (): .nf Since glibc 2.21: @@ -39,7 +39,7 @@ The .BR daemon () function is for programs wishing to detach themselves from the controlling terminal and run in the background as system daemons. -.PP +.P If .I nochdir is zero, @@ -47,7 +47,7 @@ is zero, changes the process's current working directory to the root directory ("/"); otherwise, the current working directory is left unchanged. -.PP +.P If .I noclose is zero, @@ -88,10 +88,9 @@ T{ .BR daemon () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS A similar function appears on the BSDs. -.PP +.P The glibc implementation can also return \-1 when .I /dev/null exists but is not a character device with the expected diff --git a/man3/dbopen.3 b/man3/dbopen.3 index a6d418a..516768b 100644 --- a/man3/dbopen.3 +++ b/man3/dbopen.3 @@ -5,7 +5,7 @@ .\" .\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94 .\" -.TH dbopen 3 2022-12-04 "Linux man-pages 6.05.01" +.TH dbopen 3 2023-10-31 "Linux man-pages 6.7" .UC 7 .SH NAME dbopen \- database access methods @@ -18,7 +18,7 @@ Standard C library .B #include <limits.h> .B #include <db.h> .B #include <fcntl.h> -.PP +.P .BI "DB *dbopen(const char *" file ", int " flags ", int " mode \ ", DBTYPE " type , .BI " const void *" openinfo ); @@ -30,7 +30,7 @@ Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the .I libdb library instead. -.PP +.P .BR dbopen () is the library interface to database files. The supported file formats are btree, hashed, and UNIX file oriented. @@ -44,7 +44,7 @@ in their respective manual pages .BR hash (3), and .BR recno (3). -.PP +.P .BR dbopen () opens .I file @@ -53,7 +53,7 @@ Files never intended to be preserved on disk may be created by setting the .I file argument to NULL. -.PP +.P The .I flags and @@ -93,7 +93,7 @@ is not possible.) .\"DB_TXN .\"Support transactions in the database. .\"The DB_LOCK and DB_SHMEM flags must be set as well. -.PP +.P The .I type argument is of type @@ -106,7 +106,7 @@ may be set to .BR DB_HASH , or .BR DB_RECNO . -.PP +.P The .I openinfo argument is a pointer to an access-method-specific structure described @@ -115,7 +115,7 @@ If .I openinfo is NULL, each access method will use defaults appropriate for the system and the access method. -.PP +.P .BR dbopen () returns a pointer to a .I DB @@ -126,7 +126,7 @@ structure is defined in the .I <db.h> include file, and contains at least the following fields: -.PP +.P .in +4n .EX typedef struct { @@ -144,7 +144,7 @@ typedef struct { } DB; .EE .in -.PP +.P These elements describe a database type and a set of functions performing various actions. These functions take a pointer to a structure as returned by @@ -428,7 +428,7 @@ and 0 on success. .SS Key/data pairs Access to all file types is based on key/data pairs. Both keys and data are represented by the following data structure: -.PP +.P .in +4n .EX typedef struct { @@ -437,7 +437,7 @@ typedef struct { } DBT; .EE .in -.PP +.P The elements of the .I DBT structure are defined as follows: @@ -447,7 +447,7 @@ A pointer to a byte string. .TP .I size The length of the byte string. -.PP +.P Key and data byte strings may reference strings of essentially unlimited length although any two of them must fit into available memory at the same time. @@ -473,7 +473,7 @@ incompatible with the current file specification or which is not meaningful for the function (for example, use of the cursor without prior initialization) or there is a mismatch between the version number of file and the software. -.PP +.P The .I close routines may fail and set @@ -485,7 +485,7 @@ for any of the errors specified for the library routines .BR free (3), or .BR fsync (2). -.PP +.P The .IR del , .IR get , @@ -500,7 +500,7 @@ for any of the errors specified for the library routines .BR free (3), or .BR malloc (3). -.PP +.P The .I fd routines will fail and set @@ -508,7 +508,7 @@ routines will fail and set to .B ENOENT for in memory databases. -.PP +.P The .I sync routines may fail and set @@ -520,10 +520,10 @@ The typedef .I DBT is a mnemonic for "data base thang", and was used because no one could think of a reasonable name that wasn't already used. -.PP +.P The file descriptor interface is a kludge and will be deleted in a future version of the interface. -.PP +.P None of the access methods provide any form of concurrent access, locking, or transactions. .SH SEE ALSO @@ -531,6 +531,6 @@ locking, or transactions. .BR hash (3), .BR mpool (3), .BR recno (3) -.PP +.P .IR "LIBTP: Portable, Modular Transactions for UNIX" , Margo Seltzer, Michael Olson, USENIX proceedings, Winter 1992. diff --git a/man3/des_crypt.3 b/man3/des_crypt.3 index 41afe04..8a1228d 100644 --- a/man3/des_crypt.3 +++ b/man3/des_crypt.3 @@ -10,7 +10,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH des_crypt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH des_crypt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast DES encryption @@ -22,7 +22,7 @@ Standard C library .\" Sun version .\" .B #include <des_crypt.h> .B #include <rpc/des_crypt.h> -.PP +.P .BI "[[deprecated]] int ecb_crypt(char *" key ", char " data [. datalen ], .BI " unsigned int " datalen ", \ unsigned int " mode ); @@ -30,9 +30,9 @@ unsigned int " mode ); .BI " unsigned int " datalen ", \ unsigned int " mode , .BI " char *" ivec ); -.PP +.P .BI "[[deprecated]] void des_setparity(char *" key ); -.PP +.P .BI "[[deprecated]] int DES_FAILED(int " status ); .fi .SH DESCRIPTION @@ -64,7 +64,7 @@ mode protects against insertions, deletions, and substitutions of blocks. Also, regularities in the clear text will not appear in the cipher text. -.PP +.P Here is how to use these routines. The first argument, .IR key , @@ -120,7 +120,7 @@ An error occurred in the hardware or driver. .TP .B DESERR_BADPARAM Bad argument to routine. -.PP +.P Given a result status .IR stat , the macro @@ -146,14 +146,13 @@ T{ .BR des_setparity () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY 4.3BSD. glibc 2.1. Removed in glibc 2.28. -.PP +.P Because they employ the DES block cipher, which is no longer considered secure, these functions were removed. diff --git a/man3/difftime.3 b/man3/difftime.3 index e1cd34f..d1e392e 100644 --- a/man3/difftime.3 +++ b/man3/difftime.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:48:17 1993 by Rik Faith (faith@cs.unc.edu) -.TH difftime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH difftime 3 2023-11-11 "Linux man-pages 6.7" .SH NAME difftime \- calculate time difference .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BI "double difftime(time_t " time1 ", time_t " time0 ); .fi .SH DESCRIPTION @@ -26,9 +26,13 @@ The function returns the number of seconds elapsed between time \fItime1\fP and time \fItime0\fP, represented as a .IR double . -Each of the times is specified in calendar time, which means its -value is a measurement (in seconds) relative to the -Epoch, 1970-01-01 00:00:00 +0000 (UTC). +Each time is a count of seconds. +.P +.I difftime(b,\~a) +acts like +.I (b\-a) +except that the result does not overflow and is rounded to +.IR double . .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -43,24 +47,10 @@ T{ .BR difftime () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C89, SVr4, 4.3BSD. -.SH NOTES -On a POSIX system, -.I time_t -is an arithmetic type, and one could just -define -.PP -.in +4n -.EX -#define my_difftime(t1,t0) (double)(t1 \- t0) -.EE -.in -.PP -when the possible overflow in the subtraction is not a concern. .SH SEE ALSO .BR date (1), .BR gettimeofday (2), diff --git a/man3/dirfd.3 b/man3/dirfd.3 index 4fa622c..fa296ec 100644 --- a/man3/dirfd.3 +++ b/man3/dirfd.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH dirfd 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dirfd 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dirfd \- get directory stream file descriptor .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .nf .B #include <sys/types.h> .B #include <dirent.h> -.PP +.P .BI "int dirfd(DIR *" dirp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR dirfd (): .nf /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L @@ -32,7 +32,7 @@ The function .BR dirfd () returns the file descriptor associated with the directory stream .IR dirp . -.PP +.P This file descriptor is the one used internally by the directory stream. As a result, it is useful only for functions which do not depend on or alter the file position, such as @@ -76,7 +76,6 @@ T{ .BR dirfd () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -12,7 +12,7 @@ .\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu) .\" Modified 2002-08-10, 2003-11-01 Walter Harms, aeb .\" -.TH div 3 2023-07-20 "Linux man-pages 6.05.01" +.TH div 3 2023-10-31 "Linux man-pages 6.7" .SH NAME div, ldiv, lldiv, imaxdiv \- compute quotient and remainder of an integer division @@ -22,21 +22,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "div_t div(int " numerator ", int " denominator ); .BI "ldiv_t ldiv(long " numerator ", long " denominator ); .BI "lldiv_t lldiv(long long " numerator ", long long " denominator ); -.PP +.P .B #include <inttypes.h> -.PP +.P .BI "imaxdiv_t imaxdiv(intmax_t " numerator ", intmax_t " denominator ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR lldiv (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -51,7 +51,7 @@ named \fIdiv_t\fP that contains two integer members (in unspecified order) named \fIquot\fP and \fIrem\fP. The quotient is rounded toward zero. The result satisfies \fIquot\fP*\fIdenominator\fP+\fIrem\fP = \fInumerator\fP. -.PP +.P The .BR ldiv (), .BR lldiv (), @@ -81,25 +81,24 @@ T{ .BR imaxdiv () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C89, C99, SVr4, 4.3BSD. -.PP +.P .BR lldiv () and .BR imaxdiv () were added in C99. .SH EXAMPLES After -.PP +.P .in +4n .EX div_t q = div(\-5, 3); .EE .in -.PP +.P the values \fIq.quot\fP and \fIq.rem\fP are \-1 and \-2, respectively. .SH SEE ALSO .BR abs (3), diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3 index dc15758..b5cbb86 100644 --- a/man3/dl_iterate_phdr.3 +++ b/man3/dl_iterate_phdr.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH dl_iterate_phdr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dl_iterate_phdr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dl_iterate_phdr \- walk through list of shared objects .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <link.h> -.PP +.P .B int dl_iterate_phdr( .BI " int (*" callback ")(struct dl_phdr_info *" info , .BI " size_t " size ", void *" data ), @@ -25,7 +25,7 @@ The function allows an application to inquire at run time to find out which shared objects it has loaded, and the order in which they were loaded. -.PP +.P The .BR dl_iterate_phdr () function walks through the list of an @@ -35,7 +35,7 @@ once for each object, until either all shared objects have been processed or .I callback returns a nonzero value. -.PP +.P Each call to .I callback receives three arguments: @@ -52,11 +52,11 @@ program as the second argument (also named .IR data ) in the call to .BR dl_iterate_phdr (). -.PP +.P The .I info argument is a structure of the following type: -.PP +.P .in +4n .EX struct dl_phdr_info { @@ -90,7 +90,7 @@ struct dl_phdr_info { }; .EE .in -.PP +.P (The .IR ElfW () macro definition turns its argument into the name of an ELF data @@ -102,7 +102,7 @@ yields the data type name Further information on these types can be found in the .IR <elf.h> " and " <link.h> header files.) -.PP +.P The .I dlpi_addr field indicates the base address of the shared object @@ -113,7 +113,7 @@ The .I dlpi_name field is a null-terminated string giving the pathname from which the shared object was loaded. -.PP +.P To understand the meaning of the .I dlpi_phdr and @@ -128,9 +128,9 @@ shared object. The .I dlpi_phnum field indicates the size of this array. -.PP +.P These program headers are structures of the following form: -.PP +.P .in +4n .EX typedef struct { @@ -145,23 +145,23 @@ typedef struct { } Elf32_Phdr; .EE .in -.PP +.P Note that we can calculate the location of a particular program header, .IR x , in virtual memory using the formula: -.PP +.P .in +4n .EX addr == info\->dlpi_addr + info\->dlpi_phdr[x].p_vaddr; .EE .in -.PP +.P Possible values for .I p_type include the following (see .I <elf.h> for further details): -.PP +.P .in +4n .EX #define PT_LOAD 1 /* Loadable program segment */ @@ -196,7 +196,6 @@ T{ .BR dl_iterate_phdr () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Various other systems provide a version of this function, although details of the returned @@ -209,7 +208,7 @@ On the BSDs and Solaris, the structure includes the fields and .I dlpi_phnum in addition to other implementation-specific fields. -.PP +.P Future versions of the C library may add further fields to the .I dl_phdr_info structure; in that event, the @@ -233,13 +232,13 @@ shared objects it has loaded. For each shared object, the program lists some information (virtual address, size, flags, and type) for each of the objects ELF segments. -.PP +.P The following shell session demonstrates the output produced by the program on an x86-64 system. The first shared object for which output is displayed (where the name is an empty string) is the main program. -.PP +.P .in +4n .EX $ \fB./a.out\fP @@ -341,6 +340,6 @@ main(void) .BR dlopen (3), .BR elf (5), .BR ld.so (8) -.PP +.P .IR "Executable and Linking Format Specification" , available at various locations online. diff --git a/man3/dladdr.3 b/man3/dladdr.3 index 4571e67..6929b01 100644 --- a/man3/dladdr.3 +++ b/man3/dladdr.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH dladdr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dladdr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dladdr, dladdr1 \- translate address to symbolic information .SH LIBRARY @@ -14,7 +14,7 @@ Dynamic linking library .nf .B #define _GNU_SOURCE .B #include <dlfcn.h> -.PP +.P .BI "int dladdr(const void *" addr ", Dl_info *" info ); .BI "int dladdr1(const void *" addr ", Dl_info *" info ", void **" extra_info , .BI " int " flags ); @@ -32,7 +32,7 @@ returns information about the shared object and symbol that overlaps This information is returned in a .I Dl_info structure: -.PP +.P .in +4n .EX typedef struct { @@ -47,7 +47,7 @@ typedef struct { } Dl_info; .EE .in -.PP +.P If no symbol matching .I addr could be found, then @@ -55,7 +55,7 @@ could be found, then and .I dli_saddr are set to NULL. -.PP +.P The function .BR dladdr1 () is like @@ -203,7 +203,7 @@ but not to a symbol in the shared object, then the and .I info\->dli_saddr fields are set to NULL. -.PP +.P If the address specified in .I addr could not be matched to a shared object, then these functions return 0. @@ -228,7 +228,6 @@ T{ .BR dladdr1 () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -238,7 +237,7 @@ glibc 2.0. .TP .BR dladdr1 () glibc 2.3.3. -.PP +.P Solaris. .SH BUGS Sometimes, the function pointers you pass to @@ -252,7 +251,7 @@ may end up pointing back at the object from which you called .BR dladdr (), even if the function used as an argument should come from a dynamically linked library. -.PP +.P The problem is that the function pointer will still be resolved at compile time, but merely point to the .I plt diff --git a/man3/dlerror.3 b/man3/dlerror.3 index 14baeea..06718ee 100644 --- a/man3/dlerror.3 +++ b/man3/dlerror.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH dlerror 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dlerror 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dlerror \- obtain error diagnostic for functions in the dlopen API .SH LIBRARY @@ -13,7 +13,7 @@ Dynamic linking library .SH SYNOPSIS .nf .B #include <dlfcn.h> -.PP +.P .B "char *dlerror(void);" .fi .SH DESCRIPTION @@ -27,7 +27,7 @@ since the last call to The returned string does .I not include a trailing newline. -.PP +.P .BR dlerror () returns NULL if no errors have occurred since initialization or since it was last called. @@ -45,13 +45,12 @@ T{ .BR dlerror () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.0. POSIX.1-2001. -.PP +.P SunOS. .SH NOTES The message returned by @@ -60,7 +59,7 @@ may reside in a statically allocated buffer that is overwritten by subsequent .BR dlerror () calls. -.\" .LP +.\" .P .\" The string returned by .\" .BR dlerror () .\" should not be modified. diff --git a/man3/dlinfo.3 b/man3/dlinfo.3 index 586663d..8fd42fc 100644 --- a/man3/dlinfo.3 +++ b/man3/dlinfo.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH dlinfo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dlinfo 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dlinfo \- obtain information about a dynamically loaded object .SH LIBRARY @@ -14,7 +14,7 @@ Dynamic linking library .B #define _GNU_SOURCE .B #include <link.h> .B #include <dlfcn.h> -.PP +.P .BR "int dlinfo(void *restrict " handle ", int " request \ ", void *restrict " info ); .fi @@ -36,7 +36,7 @@ The argument is a pointer to a buffer used to store information returned by the call; the type of this argument depends on .IR request . -.PP +.P The following values are supported for .I request (with the corresponding type for @@ -214,7 +214,6 @@ T{ .BR dlinfo () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The sets of requests supported by the various implementations overlaps only partially. @@ -232,7 +231,7 @@ and .B RTLD_DI_SERINFO requests to obtain the library search path list for the library. Here is an example of what we might see when running the program: -.PP +.P .in +4n .EX $ \fB./a.out /lib64/libm.so.6\fP diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 3774e9e..9e31e0f 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -14,7 +14,7 @@ .\" Modified by Walter Harms: dladdr, dlvsym .\" Modified by Petr Baudis <pasky@suse.cz>, 2008-12-04: dladdr caveat .\" -.TH dlopen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dlopen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dlclose, dlopen, dlmopen \- open and close a shared object @@ -24,14 +24,14 @@ Dynamic linking library .SH SYNOPSIS .nf .B #include <dlfcn.h> -.PP +.P .BI "void *dlopen(const char *" filename ", int " flags ); .BI "int dlclose(void *" handle ); -.PP +.P .B #define _GNU_SOURCE .br .B #include <dlfcn.h> -.PP +.P .BI "void *dlmopen(Lmid_t " lmid ", const char *" filename ", int " flags ); .fi .SH DESCRIPTION @@ -49,7 +49,7 @@ This handle is employed with other functions in the dlopen API, such as .BR dlinfo (3), and .BR dlclose (). -.PP +.P If .I filename .\" FIXME On Solaris, when handle is NULL, we seem to get back @@ -99,7 +99,7 @@ The directories and .I /usr/lib are searched (in that order). -.PP +.P If the object specified by .I filename has dependencies on other shared objects, @@ -107,7 +107,7 @@ then these are also automatically loaded by the dynamic linker using the same rules. (This process may occur recursively, if those objects in turn have dependencies, and so on.) -.PP +.P One of the following two values must be included in .IR flags : .TP @@ -132,7 +132,7 @@ all undefined symbols in the shared object are resolved before .BR dlopen () returns. If this cannot be done, an error is returned. -.PP +.P Zero or more of the following values may also be ORed in .IR flags : .TP @@ -176,7 +176,7 @@ shared object ahead of the global scope. This means that a self-contained object will use its own symbols in preference to global symbols with the same name contained in objects that have already been loaded. -.PP +.P If .I filename is NULL, then the returned handle is for the main program. @@ -188,7 +188,7 @@ and then all shared objects loaded by .BR dlopen () with the flag .BR RTLD_GLOBAL . -.PP +.P Symbol references in the shared object are resolved using (in order): symbols in the link map of objects loaded for the main program and its dependencies; @@ -200,7 +200,7 @@ using the flag; and definitions in the shared object itself (and any dependencies that were loaded for that object). -.PP +.P Any global symbols in the executable that were placed into its dynamic symbol table by .BR ld (1) @@ -212,7 +212,7 @@ the executable's global symbols to be placed in the dynamic symbol table, or because .BR ld (1) noted a dependency on a symbol in another object during static linking. -.PP +.P If the same shared object is opened again with .BR dlopen (), the same object handle is returned. @@ -225,7 +225,7 @@ has been called on it as many times as has succeeded on it. Constructors (see below) are called only when the object is actually loaded into memory (i.e., when the reference count increases to 1). -.PP +.P A subsequent .BR dlopen () call that loads the same shared object with @@ -238,7 +238,7 @@ can be promoted to .B RTLD_GLOBAL in a subsequent .BR dlopen (). -.PP +.P If .BR dlopen () fails for any reason, it returns NULL. @@ -251,7 +251,7 @@ and .I flags arguments, as well as the return value, are the same, except for the differences noted below. -.PP +.P The .BR dlmopen () function differs from @@ -270,7 +270,7 @@ call is made.) The .I Lmid_t type is an opaque handle that refers to a namespace. -.PP +.P The .I lmid argument is either the ID of an existing namespace @@ -289,7 +289,7 @@ Create a new namespace and load the shared object in that namespace. The object must have been correctly linked to reference all of the other shared objects that it requires, since the new namespace is initially empty. -.PP +.P If .I filename is NULL, then the only permitted value for @@ -302,7 +302,7 @@ The function decrements the reference count on the dynamically loaded shared object referred to by .IR handle . -.PP +.P If the object's reference count drops to zero and no symbols in this object are required by other objects, then the object is unloaded @@ -311,13 +311,13 @@ after first calling any destructors defined for the object. because this object was opened with the .B RTLD_GLOBAL flag and one of its symbols satisfied a relocation in another object.) -.PP +.P All shared objects that were automatically loaded when .BR dlopen () was invoked on the object referred to by .I handle are recursively closed in the same manner. -.PP +.P A successful return from .BR dlclose () does not guarantee that the symbols associated with @@ -339,11 +339,11 @@ On error (file could not be found, was not readable, had the wrong format, or caused errors during loading), these functions return NULL. -.PP +.P On success, .BR dlclose () returns 0; on error, it returns a nonzero value. -.PP +.P Errors from these functions can be diagnosed using .BR dlerror (3). .SH ATTRIBUTES @@ -362,7 +362,6 @@ T{ .BR dlclose () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR dlopen () @@ -398,7 +397,7 @@ dependent shared objects are implicitly loaded according to the usual rules, and symbol references are likewise resolved according to the usual rules, but such resolution is confined to the definitions provided by the objects that have been (explicitly and implicitly) loaded into the namespace. -.PP +.P The .BR dlmopen () function permits object-load isolation\[em]the ability @@ -418,7 +417,7 @@ without exposing those symbols to the entire application. This can be achieved by using a separate namespace and the .B RTLD_GLOBAL flag. -.PP +.P The .BR dlmopen () function also can be used to provide better isolation than the @@ -434,7 +433,7 @@ Thus, .B RTLD_LOCAL is insufficient to isolate a loaded shared object except in the (uncommon) case where one has explicit control over all shared object dependencies. -.PP +.P Possible uses of .BR dlmopen () are plugins where the author of the plugin-loading framework @@ -449,7 +448,7 @@ Using .BR dlmopen (), this can be achieved by loading the same shared object file into different namespaces. -.PP +.P The glibc implementation supports a maximum of .\" DL_NNS 16 namespaces. @@ -473,7 +472,7 @@ See the info pages (under "Function attributes") .\" info gcc "C Extensions" "Function attributes" for further information. -.PP +.P An older method of (partially) achieving the same result is via the use of two special symbols recognized by the linker: .B _init @@ -493,7 +492,7 @@ this can be done by using the .BR gcc (1) .I \-nostartfiles command-line option. -.PP +.P Use of .B _init and @@ -514,7 +513,7 @@ permit multiple initialization and finalization functions to be defined. .\" .\" void _init(void) __attribute__((constructor)); .\" .\" void _fini(void) __attribute__((destructor)); .\" -.PP +.P Since glibc 2.2.3, .BR atexit (3) can be used to register an exit handler that is automatically @@ -543,7 +542,7 @@ looks up the address of the .BR cos (3) function, and prints the cosine of 2.0. The following is an example of building and running the program: -.PP +.P .in +4n .EX $ \fBcc dlopen_demo.c \-ldl\fP @@ -621,5 +620,5 @@ main(void) .BR rtld\-audit (7), .BR ld.so (8), .BR ldconfig (8) -.PP +.P gcc info pages, ld info pages diff --git a/man3/dlsym.3 b/man3/dlsym.3 index 499e29c..18ba953 100644 --- a/man3/dlsym.3 +++ b/man3/dlsym.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH dlsym 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dlsym 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dlsym, dlvsym \- obtain address of a symbol in a shared object or executable .SH LIBRARY @@ -13,12 +13,12 @@ Dynamic linking library .SH SYNOPSIS .nf .B #include <dlfcn.h> -.PP +.P .BI "void *dlsym(void *restrict " handle ", const char *restrict " symbol ); -.PP +.P .B #define _GNU_SOURCE .B #include <dlfcn.h> -.PP +.P .BI "void *dlvsym(void *restrict " handle ", const char *restrict " symbol , .BI " const char *restrict " version ); .fi @@ -39,7 +39,7 @@ returns NULL. (The search performed by .BR dlsym () is breadth first through the dependency tree of these shared objects.) -.PP +.P In unusual cases (see NOTES) the value of the symbol could actually be NULL. Therefore, a NULL return from .BR dlsym () @@ -53,7 +53,7 @@ and then call .BR dlerror (3) again, saving its return value into a variable, and check whether this saved value is not NULL. -.PP +.P There are two special pseudo-handles that may be specified in .IR handle : .TP @@ -79,7 +79,7 @@ in can find and invoke the "real" function provided in another shared object (or for that matter, the "next" definition of the function in cases where there are multiple layers of preloading). -.PP +.P The .B _GNU_SOURCE feature test macro must be defined in order to obtain the @@ -89,7 +89,7 @@ and .B RTLD_NEXT from .IR <dlfcn.h> . -.PP +.P The function .BR dlvsym () does the same as @@ -117,7 +117,6 @@ T{ .BR dlvsym () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR dlsym () diff --git a/man3/drand48.3 b/man3/drand48.3 index b768d0d..18123b0 100644 --- a/man3/drand48.3 +++ b/man3/drand48.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:46:03 1993 by Rik Faith (faith@cs.unc.edu) -.TH drand48 3 2023-07-20 "Linux man-pages 6.05.01" +.TH drand48 3 2023-10-31 "Linux man-pages 6.7" .SH NAME drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, lcong48 \- generate uniformly distributed pseudo-random numbers @@ -18,26 +18,26 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B double drand48(void); .BI "double erand48(unsigned short " xsubi [3]); -.PP +.P .B long lrand48(void); .BI "long nrand48(unsigned short " xsubi [3]); -.PP +.P .B long mrand48(void); .BI "long jrand48(unsigned short " xsubi [3]); -.PP +.P .BI "void srand48(long " seedval ); .BI "unsigned short *seed48(unsigned short " seed16v [3]); .BI "void lcong48(unsigned short " param [7]); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .\" .BR drand48 (), .\" .BR erand48 (), @@ -56,7 +56,7 @@ All functions shown above: .SH DESCRIPTION These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic. -.PP +.P The .BR drand48 () and @@ -64,21 +64,21 @@ and functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0,\ 1.0). -.PP +.P The .BR lrand48 () and .BR nrand48 () functions return nonnegative long integers uniformly distributed over the interval [0,\ 2\[ha]31). -.PP +.P The .BR mrand48 () and .BR jrand48 () functions return signed long integers uniformly distributed over the interval [\-2\[ha]31,\ 2\[ha]31). -.PP +.P The .BR srand48 (), .BR seed48 (), @@ -97,17 +97,17 @@ and .BR jrand48 () do not require an initialization function to be called first. -.PP +.P All the functions work by generating a sequence of 48-bit integers, .IR Xi , according to the linear congruential formula: -.PP +.P .in +4n .EX .B Xn+1 = (aXn + c) mod m, where n >= 0 .EE .in -.PP +.P The parameter .I m = 2\[ha]48, hence 48-bit integer arithmetic is performed. @@ -118,14 +118,14 @@ is called, and .I c are given by: -.PP +.P .in +4n .EX .B a = 0x5DEECE66D .B c = 0xB .EE .in -.PP +.P The value returned by any of the functions .BR drand48 (), .BR erand48 (), @@ -143,7 +143,7 @@ be returned, is copied from the high-order bits of .I Xi and transformed into the returned value. -.PP +.P The functions .BR drand48 (), .BR lrand48 (), @@ -169,7 +169,7 @@ value of .I Xi into the array before calling the function for the first time. -.PP +.P The initializer function .BR srand48 () sets the high order 32-bits of @@ -178,7 +178,7 @@ to the argument .IR seedval . The low order 16-bits are set to the arbitrary value 0x330E. -.PP +.P The initializer function .BR seed48 () sets the value of @@ -192,7 +192,7 @@ previous value of is copied into an internal buffer and a pointer to this buffer is returned by .BR seed48 (). -.PP +.P The initialization function .BR lcong48 () allows the user to specify @@ -249,8 +249,7 @@ T} Thread safety T{ MT-Unsafe race:drand48 T} .TE -.sp 1 -.PP +.P The above functions record global state information for the random number generator, so they are not thread-safe. diff --git a/man3/drand48_r.3 b/man3/drand48_r.3 index 146fed4..19618d7 100644 --- a/man3/drand48_r.3 +++ b/man3/drand48_r.3 @@ -5,7 +5,7 @@ .\" .\" Created 2004-10-31. Text taken from a page by Walter Harms, 2003-09-08 .\" -.TH drand48_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH drand48_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r, srand48_r, seed48_r, lcong48_r @@ -16,35 +16,35 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int drand48_r(struct drand48_data *restrict " buffer , .BI " double *restrict " result ); .BI "int erand48_r(unsigned short " xsubi [3] "," .BI " struct drand48_data *restrict "buffer , .BI " double *restrict " result ");" -.PP +.P .BI "int lrand48_r(struct drand48_data *restrict " buffer , .BI " long *restrict " result ); .BI "int nrand48_r(unsigned short " xsubi[3] "," .BI " struct drand48_data *restrict "buffer , .BI " long *restrict " result ");" -.PP +.P .BI "int mrand48_r(struct drand48_data *restrict " buffer , .BI " long *restrict " result ");" .BI "int jrand48_r(unsigned short " xsubi[3] "," .BI " struct drand48_data *restrict " buffer , .BI " long *restrict " result ");" -.PP +.P .BI "int srand48_r(long int " seedval ", struct drand48_data *" buffer ");" .BI "int seed48_r(unsigned short " seed16v[3] ", struct drand48_data *" buffer ); .BI "int lcong48_r(unsigned short " param[7] ", struct drand48_data *" buffer ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .\" .BR drand48_r (), .\" .BR erand48_r (), @@ -65,7 +65,7 @@ These functions are the reentrant analogs of the functions described in Instead of modifying the global random generator state, they use the supplied data .IR buffer . -.PP +.P Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions .BR srand48_r (), @@ -96,7 +96,6 @@ T{ .BR lcong48_r () T} Thread safety MT-Safe race:buffer .TE -.sp 1 .SH STANDARDS GNU. .SH SEE ALSO diff --git a/man3/duplocale.3 b/man3/duplocale.3 index 7b1bff8..0f75472 100644 --- a/man3/duplocale.3 +++ b/man3/duplocale.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH duplocale 3 2023-05-03 "Linux man-pages 6.05.01" +.TH duplocale 3 2023-10-31 "Linux man-pages 6.7" .SH NAME duplocale \- duplicate a locale object .SH LIBRARY @@ -11,15 +11,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <locale.h> -.PP +.P .BI "locale_t duplocale(locale_t " locobj ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR duplocale (): .nf Since glibc 2.10: @@ -32,7 +32,7 @@ The .BR duplocale () function creates a duplicate of the locale object referred to by .IR locobj . -.PP +.P If .I locobj is @@ -90,7 +90,7 @@ can be used to ensure that the .B LC_GLOBAL_LOCALE value is converted into a usable locale object. See EXAMPLES, below. -.PP +.P Each locale object created by .BR duplocale () should be deallocated using @@ -106,7 +106,7 @@ The program takes one command-line argument, a string of characters that is converted to uppercase and displayed on standard output. An example of its use is the following: -.PP +.P .in +4n .EX $ \fB./a.out abc\fP diff --git a/man3/dysize.3 b/man3/dysize.3 index 7e2d328..d345076 100644 --- a/man3/dysize.3 +++ b/man3/dysize.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" aeb: some corrections -.TH dysize 3 2023-07-20 "Linux man-pages 6.05.01" +.TH dysize 3 2023-10-31 "Linux man-pages 6.7" .SH NAME dysize \- get number of days for a given year .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .SH SYNOPSIS .nf .B "#include <time.h>" -.PP +.P .BI "int dysize(int " year ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR dysize (): .nf Since glibc 2.19: @@ -32,13 +32,13 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION The function returns 365 for a normal year and 366 for a leap year. The calculation for leap year is based on: -.PP +.P .in +4n .EX (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0) .EE .in -.PP +.P The formula is defined in the macro .I __isleap(year) also found in @@ -57,12 +57,11 @@ T{ .BR dysize () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY SunOS 4.x. -.PP +.P This is a compatibility function only. Don't use it in new programs. .\" The SCO version of this function had a year-2000 problem. diff --git a/man3/ecvt.3 b/man3/ecvt.3 index f207948..2e773f4 100644 --- a/man3/ecvt.3 +++ b/man3/ecvt.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 19:40:39 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Fri Jun 25 12:10:47 1999 by Andries Brouwer (aeb@cwi.nl) .\" -.TH ecvt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ecvt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ecvt, fcvt \- convert a floating-point number to a string .SH LIBRARY @@ -19,18 +19,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "[[deprecated]] char *ecvt(double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign ); .BI "[[deprecated]] char *fcvt(double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ecvt (), .BR fcvt (): .nf @@ -68,7 +68,7 @@ otherwise it is set to 0. If .I number is zero, it is unspecified whether \fI*decpt\fP is 0 or 1. -.PP +.P The .BR fcvt () function is identical to @@ -105,7 +105,6 @@ T{ .BR fcvt () T} Thread safety MT-Unsafe race:fcvt .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/ecvt_r.3 b/man3/ecvt_r.3 index 39eafa9..30c1fc6 100644 --- a/man3/ecvt_r.3 +++ b/man3/ecvt_r.3 @@ -8,7 +8,7 @@ .\" .\" Corrected return types; from Fabian; 2004-10-05 .\" -.TH ecvt_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ecvt_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string .SH LIBRARY @@ -17,14 +17,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "[[deprecated]] int ecvt_r(double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign , .BI " char *restrict " buf ", size_t " len ); .BI "[[deprecated]] int fcvt_r(double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign , .BI " char *restrict " buf ", size_t " len ); -.PP +.P .BI "[[deprecated]] int qecvt_r(long double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign , .BI " char *restrict " buf ", size_t " len ); @@ -32,12 +32,12 @@ Standard C library .BI " int *restrict " decpt ", int *restrict " sign , .BI " char *restrict " buf ", size_t " len ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ecvt_r (), .BR fcvt_r (), .BR qecvt_r (), @@ -87,7 +87,6 @@ T{ .BR qfcvt_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH NOTES diff --git a/man3/encrypt.3 b/man3/encrypt.3 index a3fae2f..58c61b3 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -9,7 +9,7 @@ .\" .\" Modified 2003-04-04, aeb .\" -.TH encrypt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH encrypt 3 2024-02-26 "Linux man-pages 6.7" .SH NAME encrypt, setkey, encrypt_r, setkey_r \- encrypt 64-bit messages .SH LIBRARY @@ -19,17 +19,17 @@ Password hashing library .nf .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <unistd.h> -.PP +.P .BI "[[deprecated]] void encrypt(char " block "[64], int " edflag ); -.PP +.P .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <stdlib.h> -.PP +.P .BI "[[deprecated]] void setkey(const char *" key ); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <crypt.h> -.PP +.P .BI "[[deprecated]] void setkey_r(const char *" key ", struct crypt_data *" data ); .BI "[[deprecated]] void encrypt_r(char *" block ", int " edflag , .BI " struct crypt_data *" data ); @@ -46,7 +46,7 @@ argument used here is an array of 64 bytes, each of which has numerical value 1 or 0. The bytes key[n] where n=8*i-1 are ignored, so that the effective key length is 56 bits. -.PP +.P The .BR encrypt () function modifies the passed buffer, encoding if @@ -58,7 +58,7 @@ argument, also .I block is a bit vector representation of the actual value that is encoded. The result is returned in that same vector. -.PP +.P These two functions are not reentrant, that is, the key data is kept in static storage. The functions @@ -68,7 +68,7 @@ and are the reentrant versions. They use the following structure to hold the key data: -.PP +.P .in +4n .EX struct crypt_data { @@ -85,7 +85,7 @@ struct crypt_data { }; .EE .in -.PP +.P Before calling .BR setkey_r () set @@ -125,7 +125,6 @@ T{ .BR setkey_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR encrypt () @@ -139,7 +138,7 @@ POSIX.1-2008. None. .SH HISTORY Removed in glibc 2.28. -.PP +.P Because they employ the DES block cipher, which is no longer considered secure, these functions were removed from glibc. @@ -156,7 +155,7 @@ See .SS Features in glibc In glibc 2.2, these functions use the DES algorithm. .SH EXAMPLES -.\" [[deprecated]] SRC BEGIN (encrypt.c) +.\" SRC BEGIN (encrypt.c) .EX #define _XOPEN_SOURCE #include <crypt.h> @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH end 3 2023-05-03 "Linux man-pages 6.05.01" +.TH end 3 2023-10-31 "Linux man-pages 6.7" .SH NAME etext, edata, end \- end of program segments .SH SYNOPSIS @@ -35,7 +35,7 @@ they are not standardized; use with caution. .SH NOTES The program must explicitly declare these symbols; they are not defined in any header file. -.PP +.P On some systems the names of these symbols are preceded by underscores, thus: .IR _etext , @@ -43,7 +43,7 @@ thus: and .IR _end . These symbols are also defined for programs compiled on Linux. -.PP +.P At the start of program execution, the program break will be somewhere near .I &end @@ -57,7 +57,7 @@ Use with an argument of zero to find the current value of the program break. .SH EXAMPLES When run, the program below produces output such as the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/endian.3 b/man3/endian.3 index fa7b9fd..8de4974 100644 --- a/man3/endian.3 +++ b/man3/endian.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH endian 3 2023-05-03 "Linux man-pages 6.05.01" +.TH endian 3 2023-10-31 "Linux man-pages 6.7" .SH NAME htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh \- @@ -16,29 +16,29 @@ Standard C library .SH SYNOPSIS .nf .B #include <endian.h> -.PP +.P .BI "uint16_t htobe16(uint16_t " host_16bits ); .BI "uint16_t htole16(uint16_t " host_16bits ); .BI "uint16_t be16toh(uint16_t " big_endian_16bits ); .BI "uint16_t le16toh(uint16_t " little_endian_16bits ); -.PP +.P .BI "uint32_t htobe32(uint32_t " host_32bits ); .BI "uint32_t htole32(uint32_t " host_32bits ); .BI "uint32_t be32toh(uint32_t " big_endian_32bits ); .BI "uint32_t le32toh(uint32_t " little_endian_32bits ); -.PP +.P .BI "uint64_t htobe64(uint64_t " host_64bits ); .BI "uint64_t htole64(uint64_t " host_64bits ); .BI "uint64_t be64toh(uint64_t " big_endian_64bits ); .BI "uint64_t le64toh(uint64_t " little_endian_64bits ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE .ad l -.PP +.P .BR htobe16 (), .BR htole16 (), .BR be16toh (), @@ -62,21 +62,21 @@ Feature Test Macro Requirements for glibc (see These functions convert the byte encoding of integer values from the byte order that the current CPU (the "host") uses, to and from little-endian and big-endian byte order. -.PP +.P The number, .IR nn , in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits. -.PP +.P The functions with names of the form "htobe\fInn\fP" convert from host byte order to big-endian order. -.PP +.P The functions with names of the form "htole\fInn\fP" convert from host byte order to little-endian order. -.PP +.P The functions with names of the form "be\fInn\fPtoh" convert from big-endian order to host byte order. -.PP +.P The functions with names of the form "le\fInn\fPtoh" convert from little-endian order to host byte order. .SH VERSIONS @@ -97,7 +97,7 @@ the equivalent of OpenBSDs "betoh32" is "be32toh"). None. .SH HISTORY glibc 2.9. -.PP +.P These functions are similar to the older .BR byteorder (3) family of functions. @@ -105,7 +105,7 @@ For example, .BR be32toh () is identical to .BR ntohl (). -.PP +.P The advantage of the .BR byteorder (3) functions is that they are standard functions available @@ -120,7 +120,7 @@ Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following: -.PP +.P .in +4n .EX $ \fB./a.out\fP diff --git a/man3/envz_add.3 b/man3/envz_add.3 index fcb5ca3..ec2f658 100644 --- a/man3/envz_add.3 +++ b/man3/envz_add.3 @@ -6,7 +6,7 @@ .\" based on the description in glibc source and infopages .\" .\" Corrections and additions, aeb -.TH envz_add 3 2023-07-20 "Linux man-pages 6.05.01" +.TH envz_add 3 2023-10-31 "Linux man-pages 6.7" .SH NAME envz_add, envz_entry, envz_get, envz_merge, envz_remove, envz_strip \- environment string support @@ -16,29 +16,29 @@ Standard C library .SH SYNOPSIS .nf .B #include <envz.h> -.PP +.P .BI "error_t envz_add(char **restrict " envz ", size_t *restrict " envz_len , .BI " const char *restrict " name \ ", const char *restrict " value ); -.PP +.P .BI "char *envz_entry(const char *restrict " envz ", size_t " envz_len , .BI " const char *restrict " name ); -.PP +.P .BI "char *envz_get(const char *restrict " envz ", size_t " envz_len , .BI " const char *restrict " name ); -.PP +.P .BI "error_t envz_merge(char **restrict " envz ", size_t *restrict " envz_len , .BI " const char *restrict " envz2 ", size_t " envz2_len , .BI " int " override ); -.PP +.P .BI "void envz_remove(char **restrict " envz ", size_t *restrict " envz_len , .BI " const char *restrict " name ); -.PP +.P .BI "void envz_strip(char **restrict " envz ", size_t *restrict " envz_len ); .fi .SH DESCRIPTION These functions are glibc-specific. -.PP +.P An argz vector is a pointer to a character buffer together with a length, see .BR argz_add (3). @@ -48,9 +48,9 @@ Everything after the first \[aq]=\[aq] is considered to be the value. If there is no \[aq]=\[aq], the value is taken to be NULL. (While the value in case of a trailing \[aq]=\[aq] is the empty string "".) -.PP +.P These functions are for handling envz vectors. -.PP +.P .BR envz_add () adds the string .RI \&" name = value \&" @@ -69,14 +69,14 @@ and If an entry with the same .I name existed, it is removed. -.PP +.P .BR envz_entry () looks for .I name in the envz vector .RI ( envz ,\ envz_len ) and returns the entry if found, or NULL if not. -.PP +.P .BR envz_get () looks for .I name @@ -87,7 +87,7 @@ and returns the value if found, or NULL if not. an entry for .I name without \[aq]=\[aq] sign.) -.PP +.P .BR envz_merge () adds each entry in .I envz2 @@ -102,14 +102,14 @@ is true, then values in will supersede those with the same name in .IR *envz , otherwise not. -.PP +.P .BR envz_remove () removes the entry for .I name from .RI ( *envz ,\ *envz_len ) if there was one. -.PP +.P .BR envz_strip () removes all entries with value NULL. .SH RETURN VALUE @@ -138,7 +138,6 @@ T{ .BR envz_strip () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH EXAMPLES @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH erf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH erf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME erf, erff, erfl \- error function .SH LIBRARY @@ -22,24 +22,24 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double erf(double " x ); .BI "float erff(float " x ); .BI "long double erfl(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR erf (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR erff (), .BR erfl (): .nf @@ -51,7 +51,7 @@ Feature Test Macro Requirements for glibc (see These functions return the error function of .IR x , defined as -.PP +.P .in +4n .EX erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(\-t*t) dt @@ -61,20 +61,20 @@ erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(\-t*t) dt On success, these functions return the value of the error function of .IR x , a value in the range [\-1,\ 1]. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity (negative infinity), +1 (\-1) is returned. -.PP +.P If .I x is subnormal, @@ -85,7 +85,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result underflow (\fIx\fP is subnormal) @@ -95,7 +95,7 @@ Range error: result underflow (\fIx\fP is subnormal) An underflow floating-point exception .RB ( FE_UNDERFLOW ) is raised. -.PP +.P These functions do not set .IR errno . .\" It is intentional that these functions do not set errno for this case @@ -116,12 +116,11 @@ T{ .BR erfl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/erfc.3 b/man3/erfc.3 index 92d6293..658e1bb 100644 --- a/man3/erfc.3 +++ b/man3/erfc.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH erfc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH erfc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME erfc, erfcf, erfcl \- complementary error function .SH LIBRARY @@ -13,24 +13,24 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double erfc(double " x ); .BI "float erfcf(float " x ); .BI "long double erfcl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR erfc (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR erfcf (), .BR erfcl (): .nf @@ -46,28 +46,28 @@ that is, 1.0 \- erf(x). On success, these functions return the complementary error function of .IR x , a value in the range [0,2]. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 or \-0, 1 is returned. -.PP +.P If .I x is positive infinity, +0 is returned. -.PP +.P If .I x is negative infinity, +2 is returned. -.PP +.P If the function result underflows and produces an unrepresentable value, the return value is 0.0. -.PP +.P If the function result underflows but produces a representable (i.e., subnormal) value, .\" e.g., erfc(27) on x86-32 @@ -78,7 +78,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result underflow (result is subnormal) @@ -88,7 +88,7 @@ Range error: result underflow (result is subnormal) An underflow floating-point exception .RB ( FE_UNDERFLOW ) is raised. -.PP +.P These functions do not set .IR errno . .\" It is intentional that these functions do not set errno for this case @@ -109,12 +109,11 @@ T{ .BR erfcl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to @@ -9,7 +9,7 @@ .\" .\" 2011-09-10, mtk, Converted from mdoc to man macros .\" -.TH err 3 2023-07-20 "Linux man-pages 6.05.01" +.TH err 3 2023-10-31 "Linux man-pages 6.7" .SH NAME err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- formatted error messages .SH LIBRARY @@ -18,18 +18,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <err.h> -.PP +.P .BI "[[noreturn]] void err(int " eval ", const char *" fmt ", ...);" .BI "[[noreturn]] void errx(int " eval ", const char *" fmt ", ...);" -.PP +.P .BI "void warn(const char *" fmt ", ...);" .BI "void warnx(const char *" fmt ", ...);" -.PP +.P .B #include <stdarg.h> -.PP +.P .BI "[[noreturn]] void verr(int " eval ", const char *" fmt ", va_list " args ); .BI "[[noreturn]] void verrx(int " eval ", const char *" fmt ", va_list " args ); -.PP +.P .BI "void vwarn(const char *" fmt ", va_list " args ); .BI "void vwarnx(const char *" fmt ", va_list " args ); .fi @@ -48,7 +48,7 @@ argument is not NULL, the .BR printf (3)-like formatted error message is output. The output is terminated by a newline character. -.PP +.P The .BR err (), .BR verr (), @@ -63,13 +63,13 @@ preceded by another colon and space unless the .I fmt argument is NULL. -.PP +.P The .BR errx () and .BR warnx () functions do not append an error message. -.PP +.P The .BR err (), .BR verr (), @@ -99,7 +99,6 @@ T{ .BR vwarnx () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY @@ -112,7 +111,7 @@ BSD. Display the current .I errno information string and exit: -.PP +.P .in +4n .EX p = malloc(size); @@ -123,9 +122,9 @@ if (fd == \-1) err(EXIT_FAILURE, "%s", file_name); .EE .in -.PP +.P Display an error message and exit: -.PP +.P .in +4n .EX if (tm.tm_hour < START_TIME) @@ -133,9 +132,9 @@ if (tm.tm_hour < START_TIME) start_time_string); .EE .in -.PP +.P Warn of an error: -.PP +.P .in +4n .EX fd = open(raw_device, O_RDONLY, 0); diff --git a/man3/errno.3 b/man3/errno.3 index f3ffee5..335bb9c 100644 --- a/man3/errno.3 +++ b/man3/errno.3 @@ -9,7 +9,7 @@ .\" 2006-02-09 Kurt Wall, mtk .\" Added non-POSIX errors .\" -.TH errno 3 2022-12-04 "Linux man-pages 6.05.01" +.TH errno 3 2023-10-31 "Linux man-pages 6.7" .SH NAME errno \- number of last error .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <errno.h> -.\".PP +.\".P .\".BI "extern int " errno ; .fi .SH DESCRIPTION @@ -43,7 +43,7 @@ allowed to change The value of .I errno is never set to zero by any system call or library function. -.PP +.P For some system calls and library functions (e.g., .BR getpriority (2)), \-1 is a valid return on success. @@ -55,7 +55,7 @@ if the call returns a status that indicates that an error may have occurred, checking to see if .I errno has a nonzero value. -.PP +.P .I errno is defined by the ISO C standard to be a modifiable lvalue of type @@ -74,7 +74,7 @@ The header file defines symbolic names for each of the possible error numbers that may appear in .IR errno . -.PP +.P All the error names specified by POSIX.1 must have distinct values, with the exception of .B EAGAIN @@ -82,7 +82,7 @@ and .BR EWOULDBLOCK , which may be the same. On Linux, these two have the same value on all architectures. -.PP +.P The error numbers that correspond to each symbolic name vary across UNIX systems, and even across different architectures on Linux. @@ -94,7 +94,7 @@ and .BR strerror (3) functions can be used to convert these names to corresponding textual error messages. -.PP +.P On any particular Linux system, one can obtain a list of all symbolic error names and the corresponding error numbers using the @@ -102,7 +102,7 @@ the corresponding error numbers using the command (part of the .I moreutils package): -.PP +.P .in +4n .EX $ \fBerrno \-l\fP @@ -114,13 +114,13 @@ EIO 5 Input/output error \&... .EE .in -.PP +.P The .BR errno (1) command can also be used to look up individual error numbers and names, and to search for errors using strings from the error description, as in the following examples: -.PP +.P .in +4n .EX $ \fBerrno 2\fP @@ -131,7 +131,7 @@ $ \fBerrno \-s permission\fP EACCES 13 Permission denied .EE .in -.\".PP +.\".P .\" POSIX.1 (2001 edition) lists the following symbolic error names. Of .\" these, \fBEDOM\fP and \fBERANGE\fP are in the ISO C standard. ISO C .\" Amendment 1 defines the additional error number \fBEILSEQ\fP for @@ -151,7 +151,7 @@ but was not present in earlier POSIX.1 standards. .TP .I C99 The name is defined by C99. -.PP +.P Below is a list of the symbolic error names that are defined on Linux: .TP 16 .B E2BIG @@ -595,7 +595,7 @@ Invalid cross-device link (POSIX.1-2001). Exchange full. .SH NOTES A common mistake is to do -.PP +.P .in +4n .EX if (somecall() == \-1) { @@ -604,7 +604,7 @@ if (somecall() == \-1) { } .EE .in -.PP +.P where .I errno no longer needs to have the value it had upon return from @@ -614,7 +614,7 @@ no longer needs to have the value it had upon return from If the value of .I errno should be preserved across a library call, it must be saved: -.PP +.P .in +4n .EX if (somecall() == \-1) { @@ -624,7 +624,7 @@ if (somecall() == \-1) { } .EE .in -.PP +.P Note that the POSIX threads APIs do .I not set @@ -634,7 +634,7 @@ Instead, on failure they return an error number as the function result. These error numbers have the same meanings as the error numbers returned in .I errno by other APIs. -.PP +.P On some ancient systems, .I <errno.h> was not present or did not declare diff --git a/man3/error.3 b/man3/error.3 index 1b12a60..fce50fa 100644 --- a/man3/error.3 +++ b/man3/error.3 @@ -25,7 +25,7 @@ .\" .\" References: .\" glibc manual and source -.TH error 3 2023-07-20 "Linux man-pages 6.05.01" +.TH error 3 2023-10-31 "Linux man-pages 6.7" .SH NAME error, error_at_line, error_message_count, error_one_per_line, error_print_progname \- glibc error reporting functions @@ -35,14 +35,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <error.h> -.PP +.P .BI "void error(int " status ", int " errnum ", const char *" format ", ...);" .BI "void error_at_line(int " status ", int " errnum ", const char *" filename , .BI " unsigned int " linenum ", const char *" format ", ...);" -.PP +.P .BI "extern unsigned int " error_message_count ; .BI "extern int " error_one_per_line ; -.PP +.P .BI "extern void (*" error_print_progname ")(void);" .fi .SH DESCRIPTION @@ -63,7 +63,7 @@ should follow .I format in the argument list. The output is terminated by a newline character. -.PP +.P The program name printed by .BR error () is the value of the global variable @@ -74,14 +74,14 @@ initially has the same value as .IR argv[0] . The value of this variable can be modified to change the output of .BR error (). -.PP +.P If \fIstatus\fP has a nonzero value, then .BR error () calls .BR exit (3) to terminate the program using the given value as the exit status; otherwise it returns after printing the error message. -.PP +.P The .BR error_at_line () function is exactly the same as @@ -101,20 +101,20 @@ The preprocessor values \fB__LINE__\fP and .BR error_at_line (), but other values can also be used. For example, these arguments could refer to a location in an input file. -.PP +.P If the global variable \fIerror_one_per_line\fP is set nonzero, a sequence of .BR error_at_line () calls with the same value of \fIfilename\fP and \fIlinenum\fP will result in only one message (the first) being output. -.PP +.P The global variable \fIerror_message_count\fP counts the number of messages that have been output by .BR error () and .BR error_at_line (). -.PP +.P If the global variable \fIerror_print_progname\fP is assigned the address of a function (i.e., is not NULL), then that function is called @@ -144,8 +144,7 @@ T} Thread safety T{ MT-Unsafe\ race: error_at_line/\:error_one_per_line locale T} .TE -.sp 1 -.PP +.P The internal .I error_one_per_line variable is accessed (without any form of synchronization, but since it's an diff --git a/man3/ether_aton.3 b/man3/ether_aton.3 index 973566b..8181dd5 100644 --- a/man3/ether_aton.3 +++ b/man3/ether_aton.3 @@ -9,7 +9,7 @@ .\" .\" Minor additions, aeb, 2013-06-21 .\" -.TH ether_aton 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ether_aton 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line, ether_ntoa_r, ether_aton_r \- Ethernet address manipulation routines @@ -19,19 +19,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <netinet/ether.h> -.PP +.P .BI "char *ether_ntoa(const struct ether_addr *" addr ); .BI "struct ether_addr *ether_aton(const char *" asc ); -.PP +.P .BI "int ether_ntohost(char *" hostname ", const struct ether_addr *" addr ); .BI "int ether_hostton(const char *" hostname ", struct ether_addr *" addr ); -.PP +.P .BI "int ether_line(const char *" line ", struct ether_addr *" addr , .BI " char *" hostname ); -.PP +.P /* GNU extensions */ .BI "char *ether_ntoa_r(const struct ether_addr *" addr ", char *" buf ); -.PP +.P .BI "struct ether_addr *ether_aton_r(const char *" asc , .BI " struct ether_addr *" addr ); .fi @@ -45,7 +45,7 @@ allocated buffer, which subsequent calls will overwrite. .BR ether_aton () returns NULL if the address is invalid. -.PP +.P The .BR ether_ntoa () function converts the Ethernet host address @@ -54,21 +54,21 @@ given in network byte order to a string in standard hex-digits-and-colons notation, omitting leading zeros. The string is returned in a statically allocated buffer, which subsequent calls will overwrite. -.PP +.P The .BR ether_ntohost () function maps an Ethernet address to the corresponding hostname in .I /etc/ethers and returns nonzero if it cannot be found. -.PP +.P The .BR ether_hostton () function maps a hostname to the corresponding Ethernet address in .I /etc/ethers and returns nonzero if it cannot be found. -.PP +.P The .BR ether_line () function parses a line in @@ -80,7 +80,7 @@ The buffer pointed to by .I hostname must be sufficiently long, for example, have the same length as .IR line . -.PP +.P The functions .BR ether_ntoa_r () and @@ -91,13 +91,13 @@ thread-safe versions of and .BR ether_aton () respectively, and do not use static buffers. -.PP +.P The structure .I ether_addr is defined in .I <net/ethernet.h> as: -.PP +.P .in +4n .EX struct ether_addr { @@ -129,7 +129,6 @@ T{ .BR ether_aton_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/euidaccess.3 b/man3/euidaccess.3 index a8d1218..c4fcc0e 100644 --- a/man3/euidaccess.3 +++ b/man3/euidaccess.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH euidaccess 3 2023-07-20 "Linux man-pages 6.05.01" +.TH euidaccess 3 2023-10-31 "Linux man-pages 6.7" .SH NAME euidaccess, eaccess \- check effective user's permissions for a file .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <unistd.h> -.PP +.P .BI "int euidaccess(const char *" pathname ", int " mode ); .BI "int eaccess(const char *" pathname ", int " mode ); .fi @@ -28,13 +28,13 @@ However, whereas performs checks using the real user and group identifiers of the process, .BR euidaccess () uses the effective identifiers. -.PP +.P .I mode is a mask consisting of one or more of .BR R_OK ", " W_OK ", " X_OK ", and " F_OK , with the same meanings as for .BR access (2). -.PP +.P .BR eaccess () is a synonym for .BR euidaccess (), @@ -65,7 +65,6 @@ T{ .BR eaccess () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Some other systems have an .\" e.g., FreeBSD 6.1. @@ -84,7 +83,7 @@ performing some operation based on that information leads to race conditions: the file permissions may change between the two steps. Generally, it is safer just to attempt the desired operation and handle any permission error that occurs. -.PP +.P This function always dereferences symbolic links. If you need to check the permissions on a symbolic link, use .BR faccessat (2) diff --git a/man3/exec.3 b/man3/exec.3 index 0f60f57..caf6d6a 100644 --- a/man3/exec.3 +++ b/man3/exec.3 @@ -11,7 +11,7 @@ .\" Modified, 24 Jun 2004, Michael Kerrisk <mtk.manpages@gmail.com> .\" Added note on casting NULL .\" -.TH exec 3 2023-07-20 "Linux man-pages 6.05.01" +.TH exec 3 2023-10-31 "Linux man-pages 6.7" .SH NAME execl, execlp, execle, execv, execvp, execvpe \- execute a file .SH LIBRARY @@ -20,9 +20,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .B extern char **environ; -.PP +.P .BI "int execl(const char *" pathname ", const char *" arg ", ..." .B " /*, (char *) NULL */);" .BI "int execlp(const char *" file ", const char *" arg ", ..." @@ -34,12 +34,12 @@ Standard C library .BI "int execvpe(const char *" file ", char *const " argv \ "[], char *const " envp "[]);" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR execvpe (): .nf _GNU_SOURCE @@ -54,10 +54,10 @@ The functions described in this manual page are layered on top of (See the manual page for .BR execve (2) for further details about the replacement of the current process image.) -.PP +.P The initial argument for these functions is the name of a file that is to be executed. -.PP +.P The functions can be grouped based on the letters following the "exec" prefix. .\" .SS l - execl(), execlp(), execle() @@ -77,7 +77,7 @@ The list of arguments be terminated by a null pointer, and, since these are variadic functions, this pointer must be cast .IR "(char\ *) NULL" . -.PP +.P By contrast with the 'l' functions, the 'v' functions (below) specify the command-line arguments of the executed program as a vector. .\" @@ -99,7 +99,7 @@ The argument is an array of pointers to null-terminated strings and .I must be terminated by a null pointer. -.PP +.P All other .BR exec () functions (which do not include 'e' in the suffix) @@ -121,20 +121,20 @@ a list that includes the directories returned by (which typically returns the value "/bin:/usr/bin") and possibly also the current working directory; see NOTES for further details. -.PP +.P .BR execvpe () searches for the program using the value of .B PATH from the caller's environment, not from the .I envp argument. -.PP +.P If the specified filename includes a slash character, then .B PATH is ignored, and the file at the specified pathname is executed. -.PP +.P In addition, certain errors are treated specially. -.PP +.P If permission is denied for a file (the attempted .BR execve (2) failed with the error @@ -145,7 +145,7 @@ they will return with .I errno set to .BR EACCES . -.PP +.P If the header of a file isn't recognized (the attempted .BR execve (2) failed with the error @@ -154,7 +154,7 @@ these functions will execute the shell .RI ( /bin/sh ) with the path of the file as its first argument. (If this attempt fails, no further searching is done.) -.PP +.P All other .BR exec () functions (which do not include 'p' in the suffix) @@ -195,7 +195,6 @@ T{ .BR execvpe () T} Thread safety MT-Safe env .TE -.sp 1 .SH VERSIONS The default search path (used when the environment does not contain the variable \fBPATH\fR) @@ -218,7 +217,7 @@ caused the current working directory to be dropped altogether from the default search path. This accidental behavior change is considered mildly beneficial, and won't be reverted. -.PP +.P The behavior of .BR execlp () and @@ -232,7 +231,7 @@ sleep and retry if is encountered. Linux treats it as a hard error and returns immediately. -.PP +.P Traditionally, the functions .BR execlp () and diff --git a/man3/exit.3 b/man3/exit.3 index f51c557..0b8bab2 100644 --- a/man3/exit.3 +++ b/man3/exit.3 @@ -7,7 +7,7 @@ .\" could be listed on this page. See, for example, the list in the .\" POSIX exit(3p) page. .\" -.TH exit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH exit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME exit \- cause normal process termination .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "[[noreturn]] void exit(int " status ); .fi .SH DESCRIPTION @@ -26,7 +26,7 @@ function causes normal process termination and the least significant byte of .I status (i.e., \fIstatus & 0xFF\fP) is returned to the parent (see .BR wait (2)). -.PP +.P All functions registered with .BR atexit (3) and @@ -53,14 +53,14 @@ If a function has been registered multiple times using or .BR on_exit (3), then it is called as many times as it was registered. -.PP +.P All open .BR stdio (3) streams are flushed and closed. Files created by .BR tmpfile (3) are removed. -.PP +.P The C standard specifies two constants, \fBEXIT_SUCCESS\fP and \fBEXIT_FAILURE\fP, that may be passed to @@ -85,8 +85,7 @@ T{ .BR exit () T} Thread safety MT-Unsafe race:exit .TE -.sp 1 -.PP +.P The .BR exit () function uses a global variable that is not protected, @@ -110,7 +109,7 @@ removes registrations created using .BR atexit (3) and .BR on_exit (3). -.PP +.P The use of .B EXIT_SUCCESS and @@ -119,12 +118,12 @@ is slightly more portable (to non-UNIX environments) than the use of 0 and some nonzero value like 1 or \-1. In particular, VMS uses a different convention. -.PP +.P BSD has attempted to standardize exit codes (which some C libraries such as the GNU C library have also adopted); see the file .IR <sysexits.h> . -.PP +.P After .BR exit (), the exit status must be transmitted to the @@ -151,7 +150,7 @@ This allows the parent to subsequently use .BR waitpid (2) (or similar) to learn the termination status of the child; at that point the zombie process slot is released. -.PP +.P If the implementation supports the .B SIGCHLD signal, this signal @@ -171,7 +170,7 @@ is sent a signal, and the terminal is disassociated from this session, allowing it to be acquired by a new controlling process. -.PP +.P If the exit of the process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, then a @@ -183,7 +182,7 @@ sent to each process in this process group. See .BR setpgid (2) for an explanation of orphaned process groups. -.PP +.P Except in the above cases, where the signalled processes may be children of the terminating process, termination of a process does @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH exp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH exp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME exp, expf, expl \- base-e exponential function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double exp(double " x ); .BI "float expf(float " x ); .BI "long double expl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR expf (), .BR expl (): .nf @@ -48,26 +48,26 @@ logarithms) raised to the power of .SH RETURN VALUE On success, these functions return the exponential value of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is negative infinity, +0 is returned. -.PP +.P If the result underflows, a range error occurs, and zero is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -81,7 +81,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error, overflow @@ -115,12 +115,11 @@ T{ .BR expl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/exp10.3 b/man3/exp10.3 index 88b0ea6..1d85871 100644 --- a/man3/exp10.3 +++ b/man3/exp10.3 @@ -13,7 +13,7 @@ .\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no> .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH exp10 3 2023-07-20 "Linux man-pages 6.05.01" +.TH exp10 3 2023-10-31 "Linux man-pages 6.7" .SH NAME exp10, exp10f, exp10l \- base-10 exponential function .SH LIBRARY @@ -23,7 +23,7 @@ Math library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <math.h> -.PP +.P .BI "double exp10(double " x ); .BI "float exp10f(float " x ); .BI "long double exp10l(long double " x ); @@ -35,7 +35,7 @@ raised to the power of .SH RETURN VALUE On success, these functions return the base-10 exponential value of .IR x . -.PP +.P For various special cases, including the handling of infinity and NaN, as well as overflows and underflows, see .BR exp (3). @@ -44,7 +44,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P For a discussion of the errors that can occur for these functions, see .BR exp (3). .SH ATTRIBUTES @@ -63,7 +63,6 @@ T{ .BR exp10l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY diff --git a/man3/exp2.3 b/man3/exp2.3 index 9b3d99c..1cf5ead 100644 --- a/man3/exp2.3 +++ b/man3/exp2.3 @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH exp2 3 2023-07-20 "Linux man-pages 6.05.01" +.TH exp2 3 2023-10-31 "Linux man-pages 6.7" .SH NAME exp2, exp2f, exp2l \- base-2 exponential function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double exp2(double " x ); .BI "float exp2f(float " x ); .BI "long double exp2l(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR exp2 (), .BR exp2f (), .BR exp2l (): @@ -46,7 +46,7 @@ These functions return the value of 2 raised to the power of .SH RETURN VALUE On success, these functions return the base-2 exponential value of .IR x . -.PP +.P For various special cases, including the handling of infinity and NaN, as well as overflows and underflows, see .BR exp (3). @@ -55,7 +55,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P For a discussion of the errors that can occur for these functions, see .BR exp (3). .SH ATTRIBUTES @@ -74,13 +74,12 @@ T{ .BR exp2l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY glibc 2.1. C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/expm1.3 b/man3/expm1.3 index dd99ac1..32b9767 100644 --- a/man3/expm1.3 +++ b/man3/expm1.3 @@ -8,7 +8,7 @@ .\" Modified 2002-07-27 Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH expm1 3 2023-07-20 "Linux man-pages 6.05.01" +.TH expm1 3 2023-10-31 "Linux man-pages 6.7" .SH NAME expm1, expm1f, expm1l \- exponential minus 1 .SH LIBRARY @@ -17,17 +17,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double expm1(double " x ); .BI "float expm1f(float " x ); .BI "long double expm1l(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR expm1 (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR expm1f (), .BR expm1l (): .nf @@ -46,11 +46,11 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION These functions return a value equivalent to -.PP +.P .nf exp(x) \- 1 .fi -.PP +.P The result is computed in a way that is accurate even if the value of .I x is near @@ -61,25 +61,25 @@ subtraction of two numbers that are nearly equal. .SH RETURN VALUE On success, these functions return .IR "exp(x)\ \-\ 1" . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is negative infinity, \-1 is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return .RB \- HUGE_VAL , @@ -92,7 +92,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error, overflow @@ -122,7 +122,6 @@ T{ .BR expm1l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -137,7 +136,7 @@ raised a bogus underflow floating-point exception for some large negative .I x values (where the function result approaches \-1). -.PP +.P Before approximately glibc 2.11, .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6814 .\" e.g., expm1(1e5) through expm1(1.00199970127e5), @@ -148,7 +147,7 @@ overflow exception, and returned a NaN instead of positive infinity, for some large positive .I x values. -.PP +.P Before glibc 2.11, .\" It looks like the fix was in glibc 2.11, or possibly glibc 2.12. .\" I have no test system for glibc 2.11, but glibc 2.12 passes. diff --git a/man3/fabs.3 b/man3/fabs.3 index 37097d1..ed1c83d 100644 --- a/man3/fabs.3 +++ b/man3/fabs.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 19:42:04 1993 by Rik Faith (faith@cs.unc.edu) .\" Added fabsl, fabsf, aeb, 2001-06-07 .\" -.TH fabs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fabs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fabs, fabsf, fabsl \- absolute value of floating-point number .SH LIBRARY @@ -19,17 +19,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fabs(double " x ); .BI "float fabsf(float " x ); .BI "long double fabsl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fabsf (), .BR fabsl (): .nf @@ -44,15 +44,15 @@ number .SH RETURN VALUE These functions return the absolute value of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is \-0, +0 is returned. -.PP +.P If .I x is negative infinity or positive infinity, positive infinity is returned. @@ -74,12 +74,11 @@ T{ .BR fabsl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/fclose.3 b/man3/fclose.3 index 3694d54..651850a 100644 --- a/man3/fclose.3 +++ b/man3/fclose.3 @@ -14,7 +14,7 @@ .\" .\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org> .\" -.TH fclose 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fclose 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fclose \- close a stream .SH LIBRARY @@ -23,7 +23,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fclose(FILE *" stream ); .fi .SH DESCRIPTION @@ -55,7 +55,7 @@ is not valid. .\" low-level file operations on the same stream. If you do get this error, .\" you must have closed the stream's low-level file descriptor using .\" something like close(fileno(stream)). -.PP +.P The .BR fclose () function may also fail and set @@ -79,7 +79,6 @@ T{ .BR fclose () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fcloseall.3 b/man3/fcloseall.3 index 7fc02c0..d56f4cb 100644 --- a/man3/fcloseall.3 +++ b/man3/fcloseall.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH fcloseall 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fcloseall 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fcloseall \- close all open streams .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <stdio.h> -.PP +.P .B int fcloseall(void); .fi .SH DESCRIPTION @@ -24,7 +24,7 @@ Buffered output for each stream is written before it is closed (as for .BR fflush (3)); buffered input is discarded. -.PP +.P The standard streams, .IR stdin , .IR stdout , @@ -50,8 +50,7 @@ T{ .BR fcloseall () T} Thread safety MT-Unsafe race:streams .TE -.sp 1 -.PP +.P The .BR fcloseall () function does not lock the streams, so it is not thread-safe. diff --git a/man3/fdim.3 b/man3/fdim.3 index 98c3961..37ad621 100644 --- a/man3/fdim.3 +++ b/man3/fdim.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH fdim 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fdim 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fdim, fdimf, fdiml \- positive difference .SH LIBRARY @@ -14,17 +14,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fdim(double " x ", double " y ); .BI "float fdimf(float " x ", float " y ); .BI "long double fdiml(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fdimf (), .BR fdiml (): .nf @@ -35,13 +35,13 @@ These functions return the positive difference, max(\fIx\fP-\fIy\fP,0), between their arguments. .SH RETURN VALUE On success, these functions return the positive difference. -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -55,7 +55,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result overflow @@ -81,7 +81,6 @@ T{ .BR fdiml () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fenv.3 b/man3/fenv.3 index 653ba03..6e2bf45 100644 --- a/man3/fenv.3 +++ b/man3/fenv.3 @@ -6,7 +6,7 @@ .\" 2000-08-14 added GNU additions from Andreas Jaeger .\" 2000-12-05 some changes inspired by acahalan's remarks .\" -.TH fenv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fenv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag, fetestexcept, fegetenv, fegetround, feholdexcept, fesetround, @@ -18,16 +18,16 @@ Math library .SH SYNOPSIS .nf .B #include <fenv.h> -.PP +.P .BI "int feclearexcept(int " excepts ); .BI "int fegetexceptflag(fexcept_t *" flagp ", int " excepts ); .BI "int feraiseexcept(int " excepts ); .BI "int fesetexceptflag(const fexcept_t *" flagp ", int " excepts ); .BI "int fetestexcept(int " excepts ); -.PP +.P .B "int fegetround(void);" .BI "int fesetround(int " rounding_mode ); -.PP +.P .BI "int fegetenv(fenv_t *" envp ); .BI "int feholdexcept(fenv_t *" envp ); .BI "int fesetenv(const fenv_t *" envp ); @@ -41,20 +41,20 @@ The .I divide-by-zero exception occurs when an operation on finite numbers produces infinity as exact answer. -.PP +.P The .I overflow exception occurs when a result has to be represented as a floating-point number, but has (much) larger absolute value than the largest (finite) floating-point number that is representable. -.PP +.P The .I underflow exception occurs when a result has to be represented as a floating-point number, but has smaller absolute value than the smallest positive normalized floating-point number (and would lose much accuracy when represented as a denormalized number). -.PP +.P The .I inexact exception occurs when the rounded result of an operation @@ -64,7 +64,7 @@ It may occur whenever or .I underflow occurs. -.PP +.P The .I invalid exception occurs when there is no well-defined result @@ -75,7 +75,7 @@ Exceptions are represented in two ways: as a single bit implementation-defined way with bit positions in an integer, and also as an opaque structure that may contain more information about the exception (perhaps the code address where it occurred). -.PP +.P Each of the macros .BR FE_DIVBYZERO , .BR FE_INEXACT , @@ -91,12 +91,12 @@ Other exceptions may be supported. The macro .B FE_ALL_EXCEPT is the bitwise OR of all bits corresponding to supported exceptions. -.PP +.P The .BR feclearexcept () function clears the supported exceptions represented by the bits in its argument. -.PP +.P The .BR fegetexceptflag () function stores a representation of the state of the exception flags @@ -104,12 +104,12 @@ represented by the argument .I excepts in the opaque object .IR *flagp . -.PP +.P The .BR feraiseexcept () function raises the supported exceptions represented by the bits in .IR excepts . -.PP +.P The .BR fesetexceptflag () function sets the complete status for the exceptions represented by @@ -120,7 +120,7 @@ This value must have been obtained by an earlier call of .BR fegetexceptflag () with a last argument that contained all bits in .IR excepts . -.PP +.P The .BR fetestexcept () function returns a word in which the bits are set that were @@ -135,7 +135,7 @@ round to nearest (the default), round up (toward positive infinity), round down (toward negative infinity), and round toward zero. -.PP +.P Each of the macros .BR FE_TONEAREST , .BR FE_UPWARD , @@ -144,17 +144,17 @@ and .B FE_TOWARDZERO is defined when the implementation supports getting and setting the corresponding rounding direction. -.PP +.P The .BR fegetround () function returns the macro corresponding to the current rounding mode. -.PP +.P The .BR fesetround () function sets the rounding mode as specified by its argument and returns zero when it was successful. -.PP +.P C99 and POSIX.1-2008 specify an identifier, .BR FLT_ROUNDS , defined in @@ -177,9 +177,9 @@ Rounding is toward positive infinity. .TP .B 3 Rounding is toward negative infinity. -.PP +.P Other values represent machine-dependent, nonstandard rounding modes. -.PP +.P The value of .B FLT_ROUNDS should reflect the current rounding mode as set by @@ -197,19 +197,19 @@ The default environment is denoted by This is the environment setup at program start and it is defined by ISO C to have round to nearest, all exceptions cleared and a nonstop (continue on exceptions) mode. -.PP +.P The .BR fegetenv () function saves the current floating-point environment in the object .IR *envp . -.PP +.P The .BR feholdexcept () function does the same, then clears all exception flags, and sets a nonstop (continue on exceptions) mode, if available. It returns zero when successful. -.PP +.P The .BR fesetenv () function restores the floating-point environment from @@ -222,7 +222,7 @@ or or equal to .BR FE_DFL_ENV . This call does not raise exceptions. -.PP +.P The .BR feupdateenv () function installs the floating-point environment represented by @@ -272,7 +272,6 @@ T} Thread safety T{ MT-Safe T} .TE -.sp 1 .hy .SH STANDARDS C11, POSIX.1-2008, IEC 60559 (IEC 559:1989), ANSI/IEEE 854. @@ -299,16 +298,16 @@ and to set individual floating-point traps, and .BR fegetexcept () to query the state. -.PP +.P .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B "#include <fenv.h>" -.PP +.P .BI "int feenableexcept(int " excepts ); .BI "int fedisableexcept(int " excepts ); .B "int fegetexcept(void);" .fi -.PP +.P The .BR feenableexcept () and diff --git a/man3/ferror.3 b/man3/ferror.3 index 68791f1..3bb3390 100644 --- a/man3/ferror.3 +++ b/man3/ferror.3 @@ -14,7 +14,7 @@ .\" .\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu .\" -.TH ferror 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ferror 3 2023-10-31 "Linux man-pages 6.7" .SH NAME clearerr, feof, ferror \- check and reset stream status .SH LIBRARY @@ -23,7 +23,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "void clearerr(FILE *" stream ); .BI "int feof(FILE *" stream ); .BI "int ferror(FILE *" stream ); @@ -33,7 +33,7 @@ The function .BR clearerr () clears the end-of-file and error indicators for the stream pointed to by .IR stream . -.PP +.P The function .BR feof () tests the end-of-file indicator for the stream pointed to by @@ -41,7 +41,7 @@ tests the end-of-file indicator for the stream pointed to by returning nonzero if it is set. The end-of-file indicator can be cleared only by the function .BR clearerr (). -.PP +.P The function .BR ferror () tests the error indicator for the stream pointed to by @@ -50,7 +50,7 @@ returning nonzero if it is set. The error indicator can be reset only by the .BR clearerr () function. -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -59,7 +59,7 @@ The function returns nonzero if the end-of-file indicator is set for .IR stream ; otherwise, it returns zero. -.PP +.P The .BR ferror () function returns nonzero if the error indicator is set for @@ -84,7 +84,6 @@ T{ .BR ferror () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fexecve.3 b/man3/fexecve.3 index 2ffe5c3..51d3d0f 100644 --- a/man3/fexecve.3 +++ b/man3/fexecve.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH fexecve 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fexecve 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fexecve \- execute program specified via file descriptor .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int fexecve(int " fd ", char *const " argv "[], char *const " envp []); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fexecve (): .nf Since glibc 2.10: @@ -92,12 +92,11 @@ T{ .BR fexecve () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.3.2. -.PP +.P On Linux with glibc versions 2.26 and earlier, .BR fexecve () is implemented using the @@ -131,7 +130,7 @@ of a file could be changed between the checksumming and the call to .BR fexecve (); for that, the solution is to ensure that the permissions on the file prevent it from being modified by malicious users. -.PP +.P The natural idiom when using .BR fexecve () is to set the close-on-exec flag on diff --git a/man3/fflush.3 b/man3/fflush.3 index a26c3e8..25aa47c 100644 --- a/man3/fflush.3 +++ b/man3/fflush.3 @@ -15,7 +15,7 @@ .\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org> .\" Modified 2001-10-16 by John Levon <moz@compsoc.man.ac.uk> .\" -.TH fflush 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fflush 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fflush \- flush a stream .SH LIBRARY @@ -24,7 +24,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fflush(FILE *_Nullable " stream ); .fi .SH DESCRIPTION @@ -33,15 +33,15 @@ For output streams, forces a write of all user-space buffered data for the given output or update .I stream via the stream's underlying write function. -.PP +.P For input streams associated with seekable files (e.g., disk files, but not pipes or terminals), .BR fflush () discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application. -.PP +.P The open status of the stream is unaffected. -.PP +.P If the .I stream argument is NULL, @@ -51,7 +51,7 @@ flushes open output streams. .\" mtk: POSIX specifies that only output streams are flushed for this case. .\" Also verified for glibc by experiment. -.PP +.P For a nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -66,7 +66,7 @@ is set to indicate the error. .B EBADF .I stream is not an open stream, or is not open for writing. -.PP +.P The function .BR fflush () may also fail and set @@ -87,12 +87,11 @@ T{ .BR fflush () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C89, POSIX.1-2001, POSIX.1-2008. -.PP +.P POSIX.1-2001 did not specify the behavior for flushing of input streams, but the behavior is specified in POSIX.1-2008. .SH NOTES @@ -11,7 +11,7 @@ .\" .\" Modified 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) .\" -.TH ffs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ffs 3 2023-11-19 "Linux man-pages 6.7" .SH NAME ffs, ffsl, ffsll \- find first bit set in a word .SH LIBRARY @@ -20,20 +20,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "int ffs(int " i ); -.PP -.B #include <string.h> -.PP .BI "int ffsl(long " i ); .BI "int ffsll(long long " i ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ffs (): .nf Since glibc 2.12: @@ -44,7 +41,7 @@ Feature Test Macro Requirements for glibc (see Before glibc 2.12: none .fi -.PP +.P .BR ffsl (), .BR ffsll (): .nf @@ -87,10 +84,6 @@ T{ .BR ffsll () T} Thread safety MT-Safe .TE -.sp 1 -.SH VERSIONS -BSD systems have a prototype in -.IR <string.h> . .SH STANDARDS .TP .BR ffs () diff --git a/man3/fgetc.3 b/man3/fgetc.3 index 1b13d61..1f820f8 100644 --- a/man3/fgetc.3 +++ b/man3/fgetc.3 @@ -5,7 +5,7 @@ .\" .\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl) -.TH fgetc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fgetc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetc, fgets, getc, getchar, ungetc \- input of characters and strings .SH LIBRARY @@ -14,14 +14,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fgetc(FILE *" stream ); .BI "int getc(FILE *" stream ); .B "int getchar(void);" -.PP +.P .BI "char *fgets(char " s "[restrict ." size "], int " size ", \ FILE *restrict " stream ); -.PP +.P .BI "int ungetc(int " c ", FILE *" stream ); .fi .SH DESCRIPTION @@ -35,18 +35,18 @@ cast to an or .B EOF on end of file or error. -.PP +.P .BR getc () is equivalent to .BR fgetc () except that it may be implemented as a macro which evaluates .I stream more than once. -.PP +.P .BR getchar () is equivalent to .BI "getc(" stdin ) \fR. -.PP +.P .BR fgets () reads in at most one less than .I size @@ -60,7 +60,7 @@ or a newline. If a newline is read, it is stored into the buffer. A terminating null byte (\[aq]\e0\[aq]) is stored after the last character in the buffer. -.PP +.P .BR ungetc () pushes .I c @@ -71,12 +71,12 @@ cast to where it is available for subsequent read operations. Pushed-back characters will be returned in reverse order; only one pushback is guaranteed. -.PP +.P Calls to the functions described here can be mixed with each other and with calls to other input functions from the .I stdio library for the same input stream. -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -91,13 +91,13 @@ cast to an or .B EOF on end of file or error. -.PP +.P .BR fgets () returns .I s on success, and NULL on error or when end of file occurs while no characters have been read. -.PP +.P .BR ungetc () returns .I c @@ -122,7 +122,6 @@ T{ .BR ungetc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fgetgrent.3 b/man3/fgetgrent.3 index 71926a1..cba26b2 100644 --- a/man3/fgetgrent.3 +++ b/man3/fgetgrent.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:38:44 1993 by Rik Faith (faith@cs.unc.edu) -.TH fgetgrent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fgetgrent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetgrent \- get group file entry .SH LIBRARY @@ -19,15 +19,15 @@ Standard C library .B #include <stdio.h> .B #include <sys/types.h> .B #include <grp.h> -.PP +.P .BI "struct group *fgetgrent(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fgetgrent (): .nf Since glibc 2.19: @@ -49,9 +49,9 @@ must have the same format as .I /etc/group (see .BR group (5)). -.PP +.P The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows: -.PP +.P .in +4n .EX struct group { @@ -93,7 +93,6 @@ T{ .BR fgetgrent () T} Thread safety MT-Unsafe race:fgetgrent .TE -.sp 1 .\" FIXME The marking is different from that in the glibc manual, .\" which has: .\" diff --git a/man3/fgetpwent.3 b/man3/fgetpwent.3 index 676fe26..b27f616 100644 --- a/man3/fgetpwent.3 +++ b/man3/fgetpwent.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 19:37:37 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon May 27 22:40:48 1996 by Martin Schulze (joey@linux.de) .\" -.TH fgetpwent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fgetpwent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetpwent \- get password file entry .SH LIBRARY @@ -22,15 +22,15 @@ Standard C library .B #include <stdio.h> .B #include <sys/types.h> .B #include <pwd.h> -.PP +.P .BI "struct passwd *fgetpwent(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fgetpwent (): .nf Since glibc 2.19: @@ -51,9 +51,9 @@ must have the same format as .I /etc/passwd (see .BR passwd (5)). -.PP +.P The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: -.PP +.P .in +4n .EX struct passwd { @@ -101,7 +101,6 @@ T{ .BR fgetpwent () T} Thread safety MT-Unsafe race:fgetpwent .TE -.sp 1 .\" FIXME: The marking is different from that in the glibc manual, .\" which has: .\" diff --git a/man3/fgetwc.3 b/man3/fgetwc.3 index b66b018..2873754 100644 --- a/man3/fgetwc.3 +++ b/man3/fgetwc.3 @@ -11,7 +11,7 @@ .\" ISO/IEC 9899:1999 .\" .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk> -.TH fgetwc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fgetwc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetwc, getwc \- read a wide character from a FILE stream .SH LIBRARY @@ -21,7 +21,7 @@ Standard C library .nf .B #include <stdio.h> .B #include <wchar.h> -.PP +.P .BI "wint_t fgetwc(FILE *" stream ); .BI "wint_t getwc(FILE *" stream ); .fi @@ -39,7 +39,7 @@ it returns If a wide-character conversion error occurs, it sets \fIerrno\fP to \fBEILSEQ\fP and returns .BR WEOF . -.PP +.P The .BR getwc () function or macro functions identically to @@ -47,7 +47,7 @@ function or macro functions identically to It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it. -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -80,7 +80,6 @@ T{ .BR getwc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -92,7 +91,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P In the absence of additional information passed to the .BR fopen (3) call, it is diff --git a/man3/fgetws.3 b/man3/fgetws.3 index fa2a208..a9fdfca 100644 --- a/man3/fgetws.3 +++ b/man3/fgetws.3 @@ -11,7 +11,7 @@ .\" ISO/IEC 9899:1999 .\" .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk> -.TH fgetws 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fgetws 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetws \- read a wide-character string from a FILE stream .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *fgetws(wchar_t " ws "[restrict ." n "], int " n \ ", FILE *restrict " stream ); .fi @@ -37,10 +37,10 @@ and adds a terminating null wide character (L\[aq]\e0\[aq]). It stops reading wide characters after it has encountered and stored a newline wide character. It also stops when end of stream is reached. -.PP +.P The programmer must ensure that there is room for at least \fIn\fP wide characters at \fIws\fP. -.PP +.P For a nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -63,7 +63,6 @@ T{ .BR fgetws () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -75,7 +74,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P In the absence of additional information passed to the .BR fopen (3) call, it is @@ -83,7 +82,7 @@ reasonable to expect that .BR fgetws () will actually read a multibyte string from the stream and then convert it to a wide-character string. -.PP +.P This function is unreliable, because it does not permit to deal properly with null wide characters that may be present in the input. diff --git a/man3/fileno.3 b/man3/fileno.3 index 642948b..5c5a717 100644 --- a/man3/fileno.3 +++ b/man3/fileno.3 @@ -12,7 +12,7 @@ .\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu .\" Added remark on EBADF for fileno, aeb, 2001-03-22 .\" -.TH fileno 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fileno 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fileno \- obtain file descriptor of a stdio stream .SH LIBRARY @@ -21,15 +21,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fileno(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fileno (): .nf _POSIX_C_SOURCE @@ -48,7 +48,7 @@ is called. Duplicate the file descriptor with .BR dup (2) before passing it to code that might close it. -.PP +.P For the nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -78,7 +78,6 @@ T{ .BR fileno () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/finite.3 b/man3/finite.3 index 11a1581..bad355f 100644 --- a/man3/finite.3 +++ b/man3/finite.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH finite 3 2023-07-20 "Linux man-pages 6.05.01" +.TH finite 3 2023-10-31 "Linux man-pages 6.7" .SH NAME finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \- BSD floating-point classification functions @@ -13,52 +13,52 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "int finite(double " x ); .BI "int finitef(float " x ); .BI "int finitel(long double " x ); -.PP +.P .BI "int isinf(double " x ); .BI "int isinff(float " x ); .BI "int isinfl(long double " x ); -.PP +.P .BI "int isnan(double " x ); .BI "int isnanf(float " x ); .BI "int isnanl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR finite (), .BR finitef (), .BR finitel (): .nf /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE -.PP +.P .BR isinf (): _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR isinff (), .BR isinfl (): .nf /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR isnan (): .nf _XOPEN_SOURCE || _ISOC99_SOURCE || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR isnanf (), .BR isnanl (): .nf @@ -76,7 +76,7 @@ functions return a nonzero value if .I x is neither infinite nor a "not-a-number" (NaN) value, and 0 otherwise. -.PP +.P The .BR isnan (), .BR isnanf (), @@ -86,7 +86,7 @@ functions return a nonzero value if .I x is a NaN value, and 0 otherwise. -.PP +.P The .BR isinf (), .BR isinff (), @@ -119,7 +119,6 @@ T{ .BR isnanl () T} Thread safety MT-Safe .TE -.sp 1 .SH NOTES Note that these functions are obsolete. C99 defines macros diff --git a/man3/flockfile.3 b/man3/flockfile.3 index c2a18a4..911f8de 100644 --- a/man3/flockfile.3 +++ b/man3/flockfile.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH flockfile 3 2023-07-20 "Linux man-pages 6.05.01" +.TH flockfile 3 2023-10-31 "Linux man-pages 6.7" .SH NAME flockfile, ftrylockfile, funlockfile \- lock FILE for stdio .SH LIBRARY @@ -12,17 +12,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "void flockfile(FILE *" filehandle ); .BI "int ftrylockfile(FILE *" filehandle ); .BI "void funlockfile(FILE *" filehandle ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L @@ -41,13 +41,13 @@ For each library call, these functions wait until the object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again. -.PP +.P (Note: this locking has nothing to do with the file locking done by functions like .BR flock (2) and .BR lockf (3).) -.PP +.P All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control. On the one hand, maybe @@ -55,7 +55,7 @@ a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread. On the other hand, maybe the locking overhead should be avoided for greater efficiency. -.PP +.P To this end, a thread can explicitly lock the .I FILE object, @@ -72,7 +72,7 @@ instead of .BR getc (3) and .BR putc (3). -.PP +.P The .BR flockfile () function waits for @@ -83,11 +83,11 @@ current thread owner of .IR *filehandle , and increments the lockcount. -.PP +.P The .BR funlockfile () function decrements the lock count. -.PP +.P The .BR ftrylockfile () function is a nonblocking version @@ -121,12 +121,11 @@ T{ .BR funlockfile () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P These functions are available when .B _POSIX_THREAD_SAFE_FUNCTIONS is defined. diff --git a/man3/floor.3 b/man3/floor.3 index 6040607..0f2731c 100644 --- a/man3/floor.3 +++ b/man3/floor.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH floor 3 2023-07-20 "Linux man-pages 6.05.01" +.TH floor 3 2023-10-31 "Linux man-pages 6.7" .SH NAME floor, floorf, floorl \- largest integral value not greater than argument .SH LIBRARY @@ -14,17 +14,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double floor(double " x ); .BI "float floorf(float " x ); .BI "long double floorl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR floorf (), .BR floorl (): .nf @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions return the largest integral value that is not greater than .IR x . -.PP +.P For example, .I floor(0.5) is 0.0, and @@ -44,7 +44,7 @@ is \-1.0. .SH RETURN VALUE These functions return the floor of .IR x . -.PP +.P If .I x is integral, +0, \-0, NaN, or an infinity, @@ -69,17 +69,16 @@ T{ .BR floorl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to SVr4, 4.3BSD, C89. -.PP +.P SUSv2 and POSIX.1-2001 contain text about overflow (which might set .I errno to @@ -8,7 +8,7 @@ .\" Modified 2004-11-15, Added further text on FLT_ROUNDS .\" as suggested by AEB and Fabian Kreutz .\" -.TH fma 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fma 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fma, fmaf, fmal \- floating-point multiply and add .SH LIBRARY @@ -17,17 +17,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fma(double " x ", double " y ", double " z ); .BI "float fmaf(float " x ", float " y ", float " z ); .BI "long double fmal(long double " x ", long double " y ", long double " z ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fma (), .BR fmaf (), .BR fmal (): @@ -44,13 +44,13 @@ current rounding mode (see These functions return the value of .IR x " * " y " + " z , rounded as one ternary operation. -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If .I x times @@ -60,7 +60,7 @@ is an exact infinity, and is an infinity with the opposite sign, a domain error occurs, and a NaN is returned. -.PP +.P .\" POSIX.1-2008 allows some possible differences for the following two .\" domain error cases, but on Linux they are treated the same (AFAICS). .\" Nevertheless, we'll mirror POSIX.1 and describe the two cases @@ -76,7 +76,7 @@ a domain error occurs, and a NaN is returned. .\" POSIX.1 says that a NaN or an implementation-defined value shall .\" be returned for this case. -.PP +.P If one of .I x or @@ -87,7 +87,7 @@ is a NaN, .\" POSIX.1 makes the domain error optional for this case. a domain error occurs, and a NaN is returned. -.PP +.P If .I x times @@ -96,11 +96,11 @@ is not an infinity times zero (or vice versa), and .I z is a NaN, a NaN is returned. -.PP +.P If the result overflows, a range error occurs, and an infinity with the correct sign is returned. -.PP +.P If the result underflows, a range error occurs, and a signed 0 is returned. @@ -109,7 +109,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP * \fIy\fP + \fIz\fP, \ @@ -136,7 +136,7 @@ Range error: result underflow An underflow floating-point exception .RB ( FE_UNDERFLOW ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -157,7 +157,6 @@ T{ .BR fmal () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fmax.3 b/man3/fmax.3 index 1133432..8f502dd 100644 --- a/man3/fmax.3 +++ b/man3/fmax.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH fmax 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fmax 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers .SH LIBRARY @@ -14,17 +14,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fmax(double " x ", double " y ); .BI "float fmaxf(float " x ", float " y ); .BI "long double fmaxl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fmax (), .BR fmaxf (), .BR fmaxl (): @@ -41,9 +41,9 @@ These functions return the maximum of .I x and .IR y . -.PP +.P If one argument is a NaN, the other argument is returned. -.PP +.P If both arguments are NaN, a NaN is returned. .SH ERRORS No errors occur. @@ -63,7 +63,6 @@ T{ .BR fmaxl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index 081a33f..93f3a12 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH fmemopen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fmemopen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fmemopen \- open memory as stream .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "FILE *fmemopen(void " buf [. size "], size_t " size ", \ const char *" mode ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fmemopen (): .nf Since glibc 2.10: @@ -37,7 +37,7 @@ function opens a stream that permits the access specified by The stream allows I/O to be performed on the string or memory buffer pointed to by .IR buf . -.PP +.P The .I mode argument specifies the semantics of I/O on the stream, @@ -64,7 +64,7 @@ The buffer contents are truncated .I a+ Append; open the stream for reading and writing, with the initial buffer position set to the first null byte. -.PP +.P The stream maintains the notion of a current position, the location where the next I/O operation will be performed. The current position is implicitly updated by I/O operations. @@ -77,7 +77,7 @@ the initial position is set to the start of the buffer. In append mode, if no null byte is found within the buffer, then the initial position is .IR size+1 . -.PP +.P If .I buf is specified as NULL, then @@ -92,13 +92,13 @@ The buffer is automatically freed when the stream is closed. Note that the caller has no way to obtain a pointer to the temporary buffer allocated by this call (but see .BR open_memstream (3)). -.PP +.P If .I buf is not NULL, then it should point to a buffer of at least .I size bytes allocated by the caller. -.PP +.P When a stream that has been opened for writing is flushed .RB ( fflush (3)) or closed @@ -110,7 +110,7 @@ buffer .I size counts that byte) to allow for this. -.PP +.P In a stream opened for reading, null bytes (\[aq]\e0\[aq]) in the buffer do not cause read operations to return an end-of-file indication. @@ -118,11 +118,11 @@ A read from the buffer will indicate end-of-file only when the current buffer position advances .I size bytes past the start of the buffer. -.PP +.P Write operations take place either at the current position (for modes other than append), or at the current size of the stream (for append modes). -.PP +.P Attempts to write more than .I size bytes to the buffer result in an error. @@ -132,7 +132,7 @@ By default, such errors will be visible buffer is flushed. Disabling buffering with the following call may be useful to detect errors at the time of an output operation: -.PP +.P .in +4n .EX setbuf(stream, NULL); @@ -161,13 +161,12 @@ T{ .BR fmemopen (), T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 1.0.x. POSIX.1-2008. -.PP +.P POSIX.1-2008 specifies that \[aq]b\[aq] in .I mode shall be ignored. @@ -175,7 +174,7 @@ However, Technical Corrigendum 1 .\" http://austingroupbugs.net/view.php?id=396 adjusts the standard to allow implementation-specific treatment for this case, thus permitting the glibc treatment of \[aq]b\[aq]. -.PP +.P With glibc 2.22, binary mode (see below) was removed, many longstanding bugs in the implementation of .BR fmemopen () @@ -194,7 +193,7 @@ writes don't implicitly add a terminating null byte, and is relative to the end of the buffer (i.e., the value specified by the .I size argument), rather than the current string length. -.PP +.P An API bug afflicted the implementation of binary mode: to specify binary mode, the \[aq]b\[aq] must be the .I second @@ -206,7 +205,7 @@ This is inconsistent with the treatment of .I mode by .BR fopen (3). -.PP +.P Binary mode was removed in glibc 2.22; a \[aq]b\[aq] specified in .I mode has no effect. @@ -227,7 +226,7 @@ fails with the error It would be more consistent if this case successfully created a stream that then returned end-of-file on the first attempt at reading; since glibc 2.22, the glibc implementation provides that behavior. -.PP +.P Before glibc 2.22, specifying append mode ("a" or "a+") for .BR fmemopen () @@ -237,7 +236,7 @@ sets the initial buffer position to the first null byte, but the end of the stream) does not force subsequent writes to append at the end of the stream. This bug is fixed in glibc 2.22. -.PP +.P Before glibc 2.22, if the .I mode argument to @@ -254,7 +253,7 @@ However, in this case the glibc .BR fmemopen () sets the buffer position to \-1. This bug is fixed in glibc 2.22. -.PP +.P Before glibc 2.22, .\" https://sourceware.org/bugzilla/show_bug.cgi?id=14292 when a call to @@ -271,7 +270,7 @@ was .I subtracted from the end-of-stream position, instead of being added. This bug is fixed in glibc 2.22. -.PP +.P The glibc 2.9 addition of "binary" mode for .BR fmemopen () .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6544 @@ -289,7 +288,7 @@ The program scans its input string (taken from the program's first command-line argument) reading integers, and writes the squares of these integers to the output buffer. An example of the output produced by this program is the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out \[aq]1 23 43\[aq]" diff --git a/man3/fmin.3 b/man3/fmin.3 index c6fbb9d..c601195 100644 --- a/man3/fmin.3 +++ b/man3/fmin.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH fmin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fmin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fmin, fminf, fminl \- determine minimum of two floating-point numbers .SH LIBRARY @@ -14,17 +14,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fmin(double " x ", double " y ); .BI "float fminf(float " x ", float " y ); .BI "long double fminl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fmin (), .BR fminf (), .BR fminl (): @@ -41,9 +41,9 @@ These functions return the minimum of .I x and .IR y . -.PP +.P If one argument is a NaN, the other argument is returned. -.PP +.P If both arguments are NaN, a NaN is returned. .SH ERRORS No errors occur. @@ -63,7 +63,6 @@ T{ .BR fminl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fmod.3 b/man3/fmod.3 index e524514..dfca42e 100644 --- a/man3/fmod.3 +++ b/man3/fmod.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH fmod 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fmod 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fmod, fmodf, fmodl \- floating-point remainder function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double fmod(double " x ", double " y ); .BI "float fmodf(float " x ", float " y ); .BI "long double fmodl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fmodf (), .BR fmodl (): .nf @@ -58,6 +58,23 @@ is the quotient of / .IR y , rounded toward zero to an integer. +.P +To obtain the modulus, more specifically, the Least Positive Residue, +you will need to adjust the result from fmod like so: +.P +.in +4n +.nf +z = fmod(x, y); +if (z < 0) + z += y; +.fi +.in +.P +An alternate way to express this is with +.IR "fmod(fmod(x, y) + y, y)" , +but the second +.BR fmod () +usually costs way more than the one branch. .SH RETURN VALUE On success, these functions return the value \fIx\fP\ \-\ \fIn\fP*\fIy\fP, @@ -67,25 +84,25 @@ such that the returned value has the same sign as .I x and a magnitude less than the magnitude of .IR y . -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If .I x is an infinity, a domain error occurs, and a NaN is returned. -.PP +.P If .I y is zero, a domain error occurs, and a NaN is returned. -.PP +.P If .I x is +0 (\-0), and @@ -96,7 +113,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity @@ -133,12 +150,11 @@ T{ .BR fmodl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to @@ -151,5 +167,17 @@ to .B EDOM when a domain error occurred for an infinite .IR x . +.SH EXAMPLES +The call +.I fmod(372, 360) +returns 348. +.P +The call +.I fmod(-372, 360) +returns -12. +.P +The call +.I fmod(-372, -360) +also returns -12. .SH SEE ALSO .BR remainder (3) diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index 1ed9824..ca21108 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -9,7 +9,7 @@ .\" The function is quite complex and deserves an example .\" .\" Polished, aeb, 2003-11-01 -.TH fmtmsg 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fmtmsg 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fmtmsg \- print formatted error messages .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <fmtmsg.h> -.PP +.P .BI "int fmtmsg(long " classification ", const char *" label , .BI " int " severity ", const char *" text , .BI " const char *" action ", const char *" tag ); @@ -33,23 +33,23 @@ For messages written to the format depends on the .B MSGVERB environment variable. -.PP +.P The .I label argument identifies the source of the message. The string must consist of two colon separated parts where the first part has not more than 10 and the second part not more than 14 characters. -.PP +.P The .I text argument describes the condition of the error. -.PP +.P The .I action argument describes possible steps to recover from the error. If it is printed, it is prefixed by "TO FIX: ". -.PP +.P The .I tag argument is a reference to the online documentation where more @@ -80,7 +80,7 @@ is a synonym for The .I classification argument is the sum of values describing 4 types of information. -.PP +.P The first value defines the output channel. .TP 12n .B MM_PRINT @@ -92,7 +92,7 @@ Output to the system console. .TP .B "MM_PRINT | MM_CONSOLE" Output to both. -.PP +.P The second value is the source of the error: .TP 12n .B MM_HARD @@ -103,7 +103,7 @@ A firmware error occurred. .TP .B MM_SOFT A software error occurred. -.PP +.P The third value encodes the detector of the problem: .TP 12n .B MM_APPL @@ -114,7 +114,7 @@ It is detected by a utility. .TP .B MM_OPSYS It is detected by the operating system. -.PP +.P The fourth value shows the severity of the incident: .TP 12n .B MM_RECOVER @@ -141,7 +141,7 @@ This value is printed as WARNING. .TP .B MM_INFO This value is printed as INFO. -.PP +.P The numeric values are between 0 and 4. Using .BR addseverity (3) @@ -174,7 +174,7 @@ When this variable is defined, is non-NULL, and is a colon-separated list of valid keywords, then only the parts of the message corresponding to these keywords is printed. Valid keywords are "label", "severity", "text", "action", and "tag". -.PP +.P The environment variable .B SEV_LEVEL can be used to introduce new severity levels. @@ -186,25 +186,25 @@ print nothing. If the user puts .B SEV_LEVEL with a format like -.PP +.P .RS SEV_LEVEL=[description[:description[:...]]] .RE -.PP +.P in the environment of the process before the first call to .BR fmtmsg (), where each description is of the form -.PP +.P .RS severity-keyword,level,printstring .RE -.PP +.P then .BR fmtmsg () will also accept the indicated values for the level (in addition to the standard levels 0\[en]4), and use the indicated printstring when such a level occurs. -.PP +.P The severity-keyword part is not used by .BR fmtmsg () but it has to be present. @@ -237,13 +237,12 @@ glibc\ >=\ 2.16: MT-Safe; glibc\ <\ 2.16: MT-Unsafe T} .TE -.sp 1 -.PP +.P Before glibc 2.16, the .BR fmtmsg () function uses a static variable that is not protected, so it is not thread-safe. -.PP +.P Since glibc 2.16, .\" Modified in commit 7724defcf8873116fe4efab256596861eef21a94 the @@ -268,7 +267,7 @@ POSIX.1-2001 and POSIX.1-2008. .TP .B SEV_LEVEL System V. -.PP +.P System V and UnixWare man pages tell us that these functions have been replaced by "pfmt() and addsev()" or by "pfmt(), vpfmt(), lfmt(), and vlfmt()", and will be removed later. @@ -307,26 +306,26 @@ main(void) } .EE .\" SRC END -.PP +.P The output should be: -.PP +.P .in +4n .EX util\-linux:mount: ERROR: unknown mount option TO FIX: See mount(8). util\-linux:mount:017 .EE .in -.PP +.P and after -.PP +.P .in +4n .EX MSGVERB=text:action; export MSGVERB .EE .in -.PP +.P the output becomes: -.PP +.P .in +4n .EX unknown mount option diff --git a/man3/fnmatch.3 b/man3/fnmatch.3 index 3de8117..c834ac9 100644 --- a/man3/fnmatch.3 +++ b/man3/fnmatch.3 @@ -6,7 +6,7 @@ .\" Modified Sat Jul 24 19:35:54 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon Oct 16 00:16:29 2000 following Joseph S. Myers .\" -.TH fnmatch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fnmatch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fnmatch \- match filename or pathname .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <fnmatch.h> -.PP +.P .BI "int fnmatch(const char *" "pattern" ", const char *" string ", int " flags ); .fi .SH DESCRIPTION @@ -27,7 +27,7 @@ argument matches the .I pattern argument, which is a shell wildcard pattern (see .BR glob (7)). -.PP +.P The .I flags argument modifies the behavior; it is the bitwise OR of zero or more @@ -118,7 +118,6 @@ T{ .BR fnmatch () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS .TP .BR fnmatch () diff --git a/man3/fopen.3 b/man3/fopen.3 index e96303c..654c697 100644 --- a/man3/fopen.3 +++ b/man3/fopen.3 @@ -14,7 +14,7 @@ .\" Modified, aeb, 960421, 970806 .\" Modified, joey, aeb, 2002-01-03 .\" -.TH fopen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fopen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fopen, fdopen, freopen \- stream open functions .SH LIBRARY @@ -23,7 +23,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "FILE *fopen(const char *restrict " pathname \ ", const char *restrict " mode ); .BI "FILE *fdopen(int " fd ", const char *" mode ); @@ -31,12 +31,12 @@ Standard C library ", const char *restrict " mode , .BI " FILE *restrict " stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fdopen (): .nf _POSIX_C_SOURCE @@ -47,7 +47,7 @@ The function opens the file whose name is the string pointed to by .I pathname and associates a stream with it. -.PP +.P The argument .I mode points to a string beginning with one of the following sequences @@ -84,7 +84,7 @@ POSIX is silent on what the initial read position is when using this mode. For glibc, the initial file position for reading is at the beginning of the file, but for Android/BSD/MacOS, the initial file position for reading is at the end of the file. -.PP +.P The .I mode string can also include the letter \[aq]b\[aq] either as a last character or as @@ -97,15 +97,15 @@ conforming systems, including Linux. and adding the \[aq]b\[aq] may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-UNIX environments.) -.PP +.P See NOTES below for details of glibc extensions for .IR mode . -.PP +.P Any created file will have the mode .BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH (0666), as modified by the process's umask value (see .BR umask (2)). -.PP +.P Reads and writes may be intermixed on read/write streams in any order. Note that ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file. @@ -120,18 +120,18 @@ operation between write and read operations on such a stream. This operation may be an apparent no-op (as in \fIfseek(..., 0L, SEEK_CUR)\fP called for its synchronizing side effect). -.PP +.P Opening a file in append mode (\fBa\fP as the first character of .IR mode ) causes all subsequent write operations to this stream to occur at end-of-file, as if preceded by the call: -.PP +.P .in +4n .EX fseek(stream, 0, SEEK_END); .EE .in -.PP +.P The file descriptor associated with the stream is opened as if by a call to .BR open (2) with the following flags: @@ -186,7 +186,7 @@ The argument is used just as in the .BR fopen () function. -.PP +.P If the .I pathname argument is a null pointer, @@ -197,7 +197,7 @@ that is, .BR freopen () reopens the pathname that is associated with the stream. The specification for this behavior was added in the C99 standard, which says: -.PP +.P .RS In this case, the file descriptor associated with the stream need not be closed @@ -207,7 +207,7 @@ succeeds. It is implementation-defined which changes of mode are permitted (if any), and under what circumstances. .RE -.PP +.P The primary use of the .BR freopen () function is to change the file associated with a standard text stream @@ -235,7 +235,7 @@ provided to or .BR freopen () was invalid. -.PP +.P The .BR fopen (), .BR fdopen (), @@ -245,21 +245,21 @@ functions may also fail and set .I errno for any of the errors specified for the routine .BR malloc (3). -.PP +.P The .BR fopen () function may also fail and set .I errno for any of the errors specified for the routine .BR open (2). -.PP +.P The .BR fdopen () function may also fail and set .I errno for any of the errors specified for the routine .BR fcntl (2). -.PP +.P The .BR freopen () function may also fail and set @@ -285,7 +285,6 @@ T{ .BR freopen () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR fopen () @@ -354,7 +353,7 @@ to .BR EEXIST . This flag is ignored for .BR fdopen (). -.PP +.P In addition to the above characters, .BR fopen () and @@ -362,9 +361,9 @@ and support the following syntax in .IR mode : -.PP +.P .BI " ,ccs=" string -.PP +.P The given .I string is taken as the name of a coded character set and diff --git a/man3/fopencookie.3 b/man3/fopencookie.3 index 61f77bc..5d5d1d3 100644 --- a/man3/fopencookie.3 +++ b/man3/fopencookie.3 @@ -4,9 +4,9 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH fopencookie 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fopencookie 3 2023-12-29 "Linux man-pages 6.7" .SH NAME -fopencookie \- opening a custom stream +fopencookie \- open a custom stream .SH LIBRARY Standard C library .RI ( libc ", " \-lc ) @@ -15,7 +15,7 @@ Standard C library .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #define _FILE_OFFSET_BITS 64 .B #include <stdio.h> -.PP +.P .BI "FILE *fopencookie(void *restrict " cookie ", const char *restrict " mode , .BI " cookie_io_functions_t " io_funcs ); .fi @@ -31,7 +31,7 @@ is used to implement .BR fmemopen (3), which provides a stream interface to data that is stored in a buffer in memory. -.PP +.P In order to create a custom stream the programmer must: .IP \[bu] 3 Implement four "hook" functions that are used internally by the @@ -52,7 +52,7 @@ Call .BR fopencookie () to open a new stream and associate the cookie and hook functions with that stream. -.PP +.P The .BR fopencookie () function serves a purpose similar to @@ -60,14 +60,14 @@ function serves a purpose similar to it opens a new stream and returns a pointer to a .I FILE object that is used to operate on that stream. -.PP +.P The .I cookie argument is a pointer to the caller's cookie structure that is to be associated with the new stream. This pointer is supplied as the first argument when the standard I/O library invokes any of the hook functions described below. -.PP +.P The .I mode argument serves the same purpose as for @@ -83,13 +83,13 @@ and See .BR fopen (3) for details. -.PP +.P The .I io_funcs argument is a structure that contains four fields pointing to the programmer-defined hook functions that are used to implement this stream. The structure is defined as follows -.PP +.P .in +4n .EX typedef struct { @@ -100,7 +100,7 @@ typedef struct { } cookie_io_functions_t; .EE .in -.PP +.P The four fields are as follows: .TP .I cookie_read_function_t *read @@ -257,7 +257,6 @@ T{ .BR fopencookie () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH EXAMPLES @@ -269,7 +268,7 @@ The program writes its command-line arguments to the stream, and then seeks through the stream reading two out of every five characters and writing them to standard output. The following shell session demonstrates the use of the program: -.PP +.P .in +4n .EX .RB "$" " ./a.out \[aq]hello world\[aq]" @@ -279,7 +278,7 @@ The following shell session demonstrates the use of the program: Reached end of file .EE .in -.PP +.P Note that a more general version of the program below could be improved to more robustly handle various error situations (e.g., opening a stream with a cookie that already has an open stream; diff --git a/man3/fpathconf.3 b/man3/fpathconf.3 index 6195197..af993ed 100644 --- a/man3/fpathconf.3 +++ b/man3/fpathconf.3 @@ -20,7 +20,7 @@ .\" _PC_SYMLINK_MAX, .\" _PC_2_SYMLINKS .\" -.TH fpathconf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fpathconf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fpathconf, pathconf \- get configuration values for files .SH LIBRARY @@ -29,7 +29,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "long fpathconf(int " fd ", int " name ); .BI "long pathconf(const char *" path ", int " name ); .fi @@ -39,13 +39,13 @@ gets a value for the configuration option .I name for the open file descriptor .IR fd . -.PP +.P .BR pathconf () gets a value for configuration option .I name for the filename .IR path . -.PP +.P The corresponding macros defined in .I <unistd.h> are minimum values; if an application wants to take advantage of values @@ -54,7 +54,7 @@ which may change, a call to or .BR pathconf () can be made, which may yield more liberal results. -.PP +.P Setting .I name equal to one of the following constants returns the following @@ -252,7 +252,6 @@ T{ .BR pathconf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -263,7 +262,7 @@ Files with name lengths longer than the value returned for equal to .B _PC_NAME_MAX may exist in the given directory. -.PP +.P Some returned values may be huge; they are not suitable for allocating memory. .SH SEE ALSO diff --git a/man3/fpclassify.3 b/man3/fpclassify.3 index cfb16be..8e72dd3 100644 --- a/man3/fpclassify.3 +++ b/man3/fpclassify.3 @@ -6,7 +6,7 @@ .\" This was done with the help of the glibc manual. .\" .\" 2004-10-31, aeb, corrected -.TH fpclassify 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fpclassify 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fpclassify, isfinite, isnormal, isnan, isinf \- floating-point classification macros @@ -16,19 +16,19 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "int fpclassify(" x ); .BI "int isfinite(" x ); .BI "int isnormal(" x ); .BI "int isnan(" x ); .BI "int isinf(" x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .\" I haven't fully grokked the source to determine the FTM requirements; .\" in part, the following has been tested by experiment. .BR fpclassify (), @@ -37,7 +37,7 @@ Feature Test Macro Requirements for glibc (see .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi -.PP +.P .BR isnan (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -45,7 +45,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR isinf (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -82,7 +82,7 @@ is too small to be represented in normalized format. .B FP_NORMAL if nothing of the above is correct then it must be a normal floating-point number. -.PP +.P The other macros provide a short answer to some standard questions. .TP 14 .BI isfinite( x ) @@ -122,12 +122,11 @@ T{ .BR isinf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C99. -.PP +.P In glibc 2.01 and earlier, .BR isinf () returns a nonzero value (actually: 1) if diff --git a/man3/fpurge.3 b/man3/fpurge.3 index 545af20..c3fbdb9 100644 --- a/man3/fpurge.3 +++ b/man3/fpurge.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH fpurge 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fpurge 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fpurge, __fpurge \- purge a stream .SH LIBRARY @@ -13,13 +13,13 @@ Standard C library .nf /* unsupported */ .B #include <stdio.h> -.PP +.P .BI "int fpurge(FILE *" stream ); -.PP +.P /* supported */ .B #include <stdio.h> .B #include <stdio_ext.h> -.PP +.P .BI "void __fpurge(FILE *" stream ); .fi .SH DESCRIPTION @@ -34,7 +34,7 @@ this includes any text pushed back via .BR ungetc (3). See also .BR fflush (3). -.PP +.P The function .BR __fpurge () does precisely the same, but without returning a value. @@ -64,7 +64,6 @@ T{ .BR __fpurge () T} Thread safety MT-Safe race:stream .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/fputwc.3 b/man3/fputwc.3 index ce5ad42..3fe0b2e 100644 --- a/man3/fputwc.3 +++ b/man3/fputwc.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH fputwc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fputwc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fputwc, putwc \- write a wide character to a FILE stream .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .nf .B #include <stdio.h> .B #include <wchar.h> -.PP +.P .BI "wint_t fputwc(wchar_t " wc ", FILE *" stream ); .BI "wint_t putwc(wchar_t " wc ", FILE *" stream ); .fi @@ -38,7 +38,7 @@ If a wide-character conversion error occurs, it sets \fIerrno\fP to \fBEILSEQ\fP and returns .BR WEOF . Otherwise, it returns \fIwc\fP. -.PP +.P The .BR putwc () function or macro functions identically to @@ -46,7 +46,7 @@ function or macro functions identically to It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it. -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -79,7 +79,6 @@ T{ .BR putwc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -91,7 +90,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P In the absence of additional information passed to the .BR fopen (3) call, it is diff --git a/man3/fputws.3 b/man3/fputws.3 index dd54932..431ab5d 100644 --- a/man3/fputws.3 +++ b/man3/fputws.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH fputws 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fputws 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fputws \- write a wide-character string to a FILE stream .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int fputws(const wchar_t *restrict " ws ", FILE *restrict " stream ); .fi .SH DESCRIPTION @@ -31,7 +31,7 @@ function. It writes the wide-character string starting at \fIws\fP, up to but not including the terminating null wide character (L\[aq]\e0\[aq]), to \fIstream\fP. -.PP +.P For a nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -54,7 +54,6 @@ T{ .BR fputws () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -66,7 +65,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P In the absence of additional information passed to the .BR fopen (3) call, it is diff --git a/man3/fread.3 b/man3/fread.3 index 2874d43..34b11b3 100644 --- a/man3/fread.3 +++ b/man3/fread.3 @@ -16,7 +16,7 @@ .\" Modified Thu Apr 20 20:43:53 1995 by Jim Van Zandt <jrv@vanzandt.mv.com> .\" Modified Fri May 17 10:21:51 1996 by Martin Schulze <joey@infodrom.north.de> .\" -.TH fread 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fread 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fread, fwrite \- binary stream input/output .SH LIBRARY @@ -25,7 +25,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "size_t fread(void " ptr "[restrict ." size " * ." nmemb ], .BI " size_t " size ", size_t " nmemb , .BI " FILE *restrict " stream ); @@ -44,7 +44,7 @@ bytes long, from the stream pointed to by .IR stream , storing them at the location given by .IR ptr . -.PP +.P The function .BR fwrite () writes @@ -55,7 +55,7 @@ bytes long, to the stream pointed to by .IR stream , obtaining them from the location given by .IR ptr . -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -69,10 +69,10 @@ This number equals the number of bytes transferred only when is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero). -.PP +.P The file position indicator for the stream is advanced by the number of bytes successfully read or written. -.PP +.P .BR fread () does not distinguish between end-of-file and error, and callers must use .BR feof (3) @@ -94,7 +94,6 @@ T{ .BR fwrite () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -104,7 +103,7 @@ The program below demonstrates the use of .BR fread () by parsing /bin/sh ELF executable in binary mode and printing its magic and class: -.PP +.P .in +4n .EX $ \fB./a.out\fP diff --git a/man3/frexp.3 b/man3/frexp.3 index c3c838a..9a5ab0d 100644 --- a/man3/frexp.3 +++ b/man3/frexp.3 @@ -11,7 +11,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH frexp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH frexp 3 2024-01-29 "Linux man-pages 6.7" .SH NAME frexp, frexpf, frexpl \- convert floating-point number to fractional and integral components @@ -21,17 +21,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double frexp(double " x ", int *" exp ); .BI "float frexpf(float " x ", int *" exp ); .BI "long double frexpl(long double " x ", int *" exp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR frexpf (), .BR frexpl (): .nf @@ -55,20 +55,20 @@ the normalized fraction is times a power of two, and its absolute value is always in the range 1/2 (inclusive) to 1 (exclusive), that is, [0.5,1). -.PP +.P If .I x is zero, then the normalized fraction is zero and zero is stored in .IR exp . -.PP +.P If .I x is a NaN, a NaN is returned, and the value of .I *exp is unspecified. -.PP +.P If .I x is positive infinity (negative infinity), @@ -93,19 +93,18 @@ T{ .BR frexpl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to SVr4, 4.3BSD, C89. .SH EXAMPLES The program below produces results such as the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out 2560" @@ -132,8 +131,7 @@ main(int argc, char *argv[]) x = strtod(argv[1], NULL); r = frexp(x, &exp); \& - printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en", - x, r, r, FLT_RADIX, exp, x); + printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en", x, r, r, 2, exp, x); exit(EXIT_SUCCESS); } .EE diff --git a/man3/fseek.3 b/man3/fseek.3 index 4b7a9af..c97c4d7 100644 --- a/man3/fseek.3 +++ b/man3/fseek.3 @@ -12,7 +12,7 @@ .\" .\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu .\" -.TH fseek 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fseek 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fgetpos, fseek, fsetpos, ftell, rewind \- reposition a stream .SH LIBRARY @@ -21,12 +21,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fseek(FILE *" stream ", long " offset ", int " whence ); .BI "long ftell(FILE *" stream ); -.PP +.P .BI "void rewind(FILE *" stream ); -.PP +.P .BI "int fgetpos(FILE *restrict " stream ", fpos_t *restrict " pos ); .BI "int fsetpos(FILE *" stream ", const fpos_t *" pos ); .fi @@ -54,27 +54,27 @@ function clears the end-of-file indicator for the stream and undoes any effects of the .BR ungetc (3) function on the same stream. -.PP +.P The .BR ftell () function obtains the current value of the file position indicator for the stream pointed to by .IR stream . -.PP +.P The .BR rewind () function sets the file position indicator for the stream pointed to by .I stream to the beginning of the file. It is equivalent to: -.PP +.P .RS (void) fseek(stream, 0L, SEEK_SET) .RE -.PP +.P except that the error indicator for the stream is also cleared (see .BR clearerr (3)). -.PP +.P The .BR fgetpos () and @@ -94,7 +94,7 @@ On some non-UNIX systems, an .I fpos_t object may be a complex object and these routines may be the only way to portably reposition a text stream. -.PP +.P If the stream refers to a regular file and the resulting stream offset is beyond the size of the file, subsequent writes will extend the file with a hole, up to the offset, @@ -135,7 +135,7 @@ Or: the resulting file offset would be negative. The file descriptor underlying .I stream is not seekable (e.g., it refers to a pipe, FIFO, or socket). -.PP +.P The functions .BR fgetpos (), .BR fseek (), @@ -168,7 +168,6 @@ T{ .BR fsetpos () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/fseeko.3 b/man3/fseeko.3 index 3625fe2..fe35c97 100644 --- a/man3/fseeko.3 +++ b/man3/fseeko.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH fseeko 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fseeko 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fseeko, ftello \- seek to or report file position .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fseeko(FILE *" stream ", off_t " offset ", int " whence ); .BI "off_t ftello(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fseeko (), .BR ftello (): .nf @@ -48,7 +48,7 @@ is of type .I off_t instead of .IR long . -.PP +.P On some architectures, both .I off_t and @@ -88,7 +88,6 @@ T{ .BR ftello () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/ftime.3 b/man3/ftime.3 index cfa6ad9..a810b36 100644 --- a/man3/ftime.3 +++ b/man3/ftime.3 @@ -9,7 +9,7 @@ .\" Modified Sun Oct 18 17:31:43 1998 by Andries Brouwer (aeb@cwi.nl) .\" 2008-06-23, mtk, minor rewrites, added some details .\" -.TH ftime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ftime 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ftime \- return date and time .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <sys/timeb.h>" -.PP +.P .BI "int ftime(struct timeb *" tp ); .fi .SH DESCRIPTION @@ -27,13 +27,13 @@ This function is no longer provided by the GNU C library. Use .BR clock_gettime (2) instead. -.PP +.P This function returns the current time as seconds and milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The time is returned in .IR tp , which is declared as follows: -.PP +.P .in +4n .EX struct timeb { @@ -44,7 +44,7 @@ struct timeb { }; .EE .in -.PP +.P Here \fItime\fP is the number of seconds since the Epoch, and \fImillitm\fP is the number of milliseconds since \fItime\fP seconds since the Epoch. @@ -54,7 +54,7 @@ east of Greenwich). The \fIdstflag\fP field is a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year. -.PP +.P POSIX.1-2001 says that the contents of the \fItimezone\fP and \fIdstflag\fP fields are unspecified; avoid relying on them. .SH RETURN VALUE @@ -74,14 +74,13 @@ T{ .BR ftime () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY Removed in glibc 2.33. 4.2BSD, POSIX.1-2001. Removed in POSIX.1-2008. -.PP +.P This function is obsolete. Don't use it. If the time in seconds diff --git a/man3/ftok.3 b/man3/ftok.3 index 3b7d8ec..258276c 100644 --- a/man3/ftok.3 +++ b/man3/ftok.3 @@ -7,7 +7,7 @@ .\" Changed data type of proj_id; minor fixes .\" aeb: further fixes; added notes. .\" -.TH ftok 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ftok 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ftok \- convert a pathname and a project identifier to a System V IPC key .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .nf .B #include <sys/ipc.h> .fi -.PP +.P .BI "key_t ftok(const char *" pathname ", int " proj_id ); .SH DESCRIPTION The @@ -34,7 +34,7 @@ type System V IPC key, suitable for use with .BR semget (2), or .BR shmget (2). -.PP +.P The resulting value is the same for all pathnames that name the same file, when the same value of .I proj_id @@ -64,20 +64,19 @@ T{ .BR ftok () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. .SH NOTES On some ancient systems, the prototype was: -.PP +.P .in +4n .EX .BI "key_t ftok(char *" pathname ", char " proj_id ); .EE .in -.PP +.P Today, .I proj_id is an @@ -88,7 +87,7 @@ Typical usage has an ASCII character that is why the behavior is said to be undefined when .I proj_id is zero. -.PP +.P Of course, no guarantee can be given that the resulting .I key_t is unique. @@ -10,7 +10,7 @@ .\" .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" -.TH fts 3 2023-07-20 "Linux man-pages 6.05.01" +.TH fts 3 2024-01-16 "Linux man-pages 6.7" .SH NAME fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \ traverse a file hierarchy @@ -22,16 +22,16 @@ Standard C library .B #include <sys/types.h> .B #include <sys/stat.h> .B #include <fts.h> -.PP +.P .BI "FTS *fts_open(char *const *" path_argv ", int " options , .BI " int (*_Nullable " compar ")(const FTSENT **, const FTSENT **));" -.PP +.P .BI "FTSENT *fts_read(FTS *" ftsp ); -.PP +.P .BI "FTSENT *fts_children(FTS *" ftsp ", int " instr ); -.PP +.P .BI "int fts_set(FTS *" ftsp ", FTSENT *" f ", int " instr ); -.PP +.P .BI "int fts_close(FTS *" ftsp ); .fi .SH DESCRIPTION @@ -53,7 +53,7 @@ The function .BR fts_children () returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy. -.PP +.P In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). @@ -63,7 +63,7 @@ symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy. -.PP +.P Two structures (and associated types) are defined in the include file .IR <fts.h> . The first type is @@ -80,14 +80,14 @@ hierarchy. In this manual page, "file" and "FTSENT structure" are generally interchangeable. -.PP +.P The .I FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation): -.PP +.P .in +4n .EX typedef struct _ftsent { @@ -115,7 +115,7 @@ typedef struct _ftsent { } FTSENT; .EE .in -.PP +.P These fields are defined as follows: .\" .Bl -tag -width "fts_namelen" .TP @@ -187,7 +187,8 @@ A regular file. .TP .B FTS_NS A file for which no -.RB [ l ] stat (2) +.RB [ l ]\c +.BR stat (2) information was available. The contents of the .I fts_statp @@ -198,7 +199,8 @@ field will be set to indicate what caused the error. .TP .B FTS_NSOK A file for which no -.RB [ l ] stat (2) +.RB [ l ]\c +.BR stat (2) information was requested. The contents of the .I fts_statp @@ -329,10 +331,11 @@ field are undefined. .TP .I fts_statp A pointer to -.RB [ l ] stat (2) +.RB [ l ]\c +.BR stat (2) information for the file. .\" .El -.PP +.P A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the @@ -366,7 +369,7 @@ function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer. -.PP +.P There are a number of options, at least one of which (either .B FTS_LOGICAL @@ -464,7 +467,7 @@ This option prevents fts from descending into directories that have a different device number than the file from which the descent began. .\" .El -.PP +.P The argument .BR compar () specifies a user-defined function which may be used to order the traversal @@ -516,7 +519,7 @@ All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.) -.PP +.P If all the members of the hierarchy have been returned, .BR fts_read () returns NULL and sets @@ -535,7 +538,7 @@ structure is returned, and .I errno may or may not have been set (see .IR fts_info ). -.PP +.P The .I FTSENT structures returned by @@ -570,7 +573,7 @@ structure, and is ordered by the user-specified comparison function, if any. Repeated calls to .BR fts_children () will re-create this linked list. -.PP +.P As a special case, if .BR fts_read () has not yet been called for a hierarchy, @@ -598,7 +601,7 @@ NULL and sets .I errno to indicate the error. -.PP +.P The .I FTSENT structures returned by @@ -609,7 +612,7 @@ may be overwritten after a call to or .BR fts_read () on the same file hierarchy stream. -.PP +.P The .I instr argument is either zero or the following value: @@ -636,7 +639,7 @@ The .BR fts_set () function returns 0 on success, and \-1 if an error occurs. -.PP +.P The .I instr argument is either 0 (meaning "do nothing") or one of the following values: @@ -721,7 +724,7 @@ for any of the errors specified for .BR open (2) and .BR malloc (3). -.PP +.P In addition, .BR fts_open () may fail and set @@ -732,7 +735,7 @@ as follows: Any element of .I path_argv was an empty string. -.PP +.P The function .BR fts_close () may fail and set @@ -741,7 +744,7 @@ for any of the errors specified for .BR chdir (2) and .BR close (2). -.PP +.P The functions .BR fts_read () and @@ -754,8 +757,9 @@ for any of the errors specified for .BR opendir (3), .BR readdir (3), and -.RB [ l ] stat (2). -.PP +.RB [ l ]\c +.BR stat (2). +.P In addition, .BR fts_children (), .BR fts_open (), @@ -792,7 +796,6 @@ T{ .BR fts_children () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -15,7 +15,7 @@ .\" 2006-05-24, Michael Kerrisk <mtk.manpages@gmail.com> .\" Added an example program. .\" -.TH ftw 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ftw 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ftw, nftw \- file tree walk .SH LIBRARY @@ -24,24 +24,24 @@ Standard C library .SH SYNOPSIS .nf .B #include <ftw.h> -.PP +.P .BI "int nftw(const char *" dirpath , .BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb , .BI " int " typeflag ", struct FTW *" ftwbuf ), .BI " int " nopenfd ", int " flags ); -.PP +.P .B [[deprecated]] .BI "int ftw(const char *" dirpath , .BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb , .BI " int " typeflag ), .BI " int " nopenfd ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR nftw (): .nf _XOPEN_SOURCE >= 500 @@ -53,7 +53,7 @@ located under the directory \fIdirpath\fP, and calls \fIfn\fP() once for each entry in the tree. By default, directories are handled before the files and subdirectories they contain (preorder traversal). -.PP +.P To avoid using up all of the calling process's file descriptors, \fInopenfd\fP specifies the maximum number of directories that .BR nftw () @@ -66,7 +66,7 @@ directories have to be closed and reopened. .BR nftw () uses at most one file descriptor for each level in the directory tree. -.PP +.P For each entry found in the tree, .BR nftw () calls @@ -94,7 +94,7 @@ structure returned by a call to .BR stat (2) for .IR fpath . -.PP +.P The .I typeflag argument passed to @@ -167,7 +167,7 @@ contains information returned by performing .BR lstat (2) on the "dangling" symbolic link. (But see BUGS.) -.PP +.P The fourth argument .RI ( ftwbuf ) that @@ -175,7 +175,7 @@ that supplies when calling \fIfn\fP() is a pointer to a structure of type \fIFTW\fP: -.PP +.P .in +4n .EX struct FTW { @@ -184,7 +184,7 @@ struct FTW { }; .EE .in -.PP +.P .I base is the offset of the filename (i.e., basename component) in the pathname given in @@ -195,7 +195,7 @@ is the depth of in the directory tree, relative to the root of the tree .RI ( dirpath , which has depth 0). -.PP +.P To stop the tree walk, \fIfn\fP() returns a nonzero value; this value will become the return value of .BR nftw (). @@ -206,7 +206,7 @@ in which case it will return zero, or until it encounters an error (such as a .BR malloc (3) failure), in which case it will return \-1. -.PP +.P Because .BR nftw () uses dynamic data structures, the only safe way to @@ -216,7 +216,7 @@ have the handler set a global flag that is checked by \fIfn\fP(). \fIDon't\fP use .BR longjmp (3) unless the program is going to terminate. -.PP +.P The \fIflags\fP argument of .BR nftw () is formed by ORing zero or more of the @@ -258,10 +258,10 @@ Causes .BR nftw () to return immediately with the return value \fBFTW_STOP\fP. -.PP +.P Other return values could be associated with new actions in the future; \fIfn\fP() should not return values other than those listed above. -.PP +.P The feature test macro .B _GNU_SOURCE must be defined @@ -335,14 +335,14 @@ and (possibly) .BR FTW_SL . .SH RETURN VALUE These functions return 0 on success, and \-1 if an error occurs. -.PP +.P If \fIfn\fP() returns nonzero, then the tree walk is terminated and the value returned by \fIfn\fP() is returned as the result of .BR ftw () or .BR nftw (). -.PP +.P If .BR nftw () is called with the \fBFTW_ACTIONRETVAL\fP flag, @@ -369,7 +369,6 @@ T{ .BR ftw () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS In some implementations (e.g., glibc), .BR ftw () diff --git a/man3/futimes.3 b/man3/futimes.3 index 0f57891..f008526 100644 --- a/man3/futimes.3 +++ b/man3/futimes.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH futimes 3 2023-07-20 "Linux man-pages 6.05.01" +.TH futimes 3 2023-10-31 "Linux man-pages 6.7" .SH NAME futimes, lutimes \- change file timestamps .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/time.h> -.PP +.P .BI "int futimes(int " fd ", const struct timeval " tv [2]); .BI "int lutimes(const char *" filename ", const struct timeval " tv [2]); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR futimes (), .BR lutimes (): .nf @@ -38,7 +38,7 @@ with the difference that the file whose timestamps are to be changed is specified via a file descriptor, .IR fd , rather than via a pathname. -.PP +.P .BR lutimes () changes the access and modification times of a file in the same way as .BR utimes (2), @@ -65,7 +65,7 @@ is not a valid file descriptor. The .I /proc filesystem could not be accessed. -.PP +.P The following additional error may occur for .BR lutimes (): .TP @@ -86,7 +86,6 @@ T{ .BR lutimes () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS Linux, BSD. .SH HISTORY diff --git a/man3/fwide.3 b/man3/fwide.3 index 6b33de0..b833b57 100644 --- a/man3/fwide.3 +++ b/man3/fwide.3 @@ -8,7 +8,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH fwide 3 2023-03-30 "Linux man-pages 6.05.01" +.TH fwide 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fwide \- set and determine the orientation of a FILE stream .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int fwide(FILE *" stream ", int " mode ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fwide (): .nf _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE @@ -46,10 +46,10 @@ returns zero if \fIstream\fP has no orientation yet; in this case the next I/O operation might change the orientation (to byte oriented if it is a char I/O operation, or to wide-character oriented if it is a wide-character I/O operation). -.PP +.P Once a stream has an orientation, it cannot be changed and persists until the stream is closed. -.PP +.P When \fImode\fP is nonzero, the .BR fwide () function first attempts to set @@ -78,7 +78,7 @@ function with the and .B %ls directives. -.PP +.P Char oriented output to a wide-character oriented stream can be performed through the .BR fwprintf (3) diff --git a/man3/gamma.3 b/man3/gamma.3 index 2dc9075..3080624 100644 --- a/man3/gamma.3 +++ b/man3/gamma.3 @@ -5,7 +5,7 @@ .\" .\" Modified 2003-11-18, aeb: historical remarks .\" -.TH gamma 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gamma 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gamma, gammaf, gammal \- (logarithm of the) gamma function .SH LIBRARY @@ -14,24 +14,24 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "[[deprecated]] double gamma(double " x ");" .BI "[[deprecated]] float gammaf(float " x ");" .BI "[[deprecated]] long double gammal(long double " x ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR gamma (): .nf _XOPEN_SOURCE || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR gammaf (), .BR gammal (): .nf @@ -45,7 +45,7 @@ These functions are deprecated: instead, use either the or the .BR lgamma (3) functions, as appropriate. -.PP +.P For the definition of the Gamma function, see .BR tgamma (3). .SS *BSD version @@ -80,15 +80,14 @@ T{ .BR gammal () T} Thread safety MT-Unsafe race:signgam .TE -.sp 1 .SH STANDARDS None. .SH HISTORY SVID 2. -.PP +.P Because of historical variations in behavior across systems, this function is not specified in any recent standard. -.PP +.P 4.2BSD had a .BR gamma () that computed @@ -100,12 +99,12 @@ in the external integer In 4.3BSD the name was changed to .BR lgamma (3), and the man page promises -.PP +.P .in +4n "At some time in the future the name gamma will be rehabilitated and used for the Gamma function" .in -.PP +.P This did indeed happen in 4.4BSD, where .BR gamma () computes the Gamma function (with no effect on diff --git a/man3/gcvt.3 b/man3/gcvt.3 index a43ade7..54d4943 100644 --- a/man3/gcvt.3 +++ b/man3/gcvt.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:32:25 1993 by Rik Faith (faith@cs.unc.edu) -.TH gcvt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gcvt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gcvt \- convert a floating-point number to a string .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "char *gcvt(double " number ", int " ndigit ", char *" buf ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR gcvt (): .nf Since glibc 2.17 @@ -66,7 +66,6 @@ T{ .BR gcvt () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/get_nprocs.3 b/man3/get_nprocs.3 index 583054d..b07bed3 100644 --- a/man3/get_nprocs.3 +++ b/man3/get_nprocs.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH get_nprocs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH get_nprocs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME get_nprocs, get_nprocs_conf \- get number of processors .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/sysinfo.h> -.PP +.P .B int get_nprocs(void); .B int get_nprocs_conf(void); .fi @@ -21,7 +21,7 @@ Standard C library The function .BR get_nprocs_conf () returns the number of processors configured by the operating system. -.PP +.P The function .BR get_nprocs () returns the number of processors currently available in the system. @@ -45,7 +45,6 @@ T{ .BR get_nprocs_conf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH NOTES @@ -55,12 +54,12 @@ implementation of these functions is rather expensive, since they open and parse files in the .I /sys filesystem each time they are called. -.PP +.P The following .BR sysconf (3) calls make use of the functions documented on this page to return the same information. -.PP +.P .in +4n .EX np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */ @@ -73,7 +72,7 @@ The following example shows how and .BR get_nprocs_conf () can be used. -.PP +.P .\" SRC BEGIN (get_nprocs_conf.c) .EX #include <stdio.h> diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3 index 71cd4c9..714e397 100644 --- a/man3/get_phys_pages.3 +++ b/man3/get_phys_pages.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH get_phys_pages 3 2023-05-03 "Linux man-pages 6.05.01" +.TH get_phys_pages 3 2023-10-31 "Linux man-pages 6.7" .SH NAME get_phys_pages, get_avphys_pages \- get total and available physical page counts @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <sys/sysinfo.h>" -.PP +.P .B long get_phys_pages(void); .B long get_avphys_pages(void); .fi @@ -20,7 +20,7 @@ Standard C library The function .BR get_phys_pages () returns the total number of physical pages of memory available on the system. -.PP +.P The function .BR get_avphys_pages () returns the number of currently available physical pages of memory on the @@ -56,7 +56,7 @@ The following .BR sysconf (3) calls provide a portable means of obtaining the same information as the functions described on this page. -.PP +.P .in +4n .EX total_pages = sysconf(_SC_PHYS_PAGES); /* total pages */ @@ -69,7 +69,7 @@ The following example shows how and .BR get_avphys_pages () can be used. -.PP +.P .\" SRC BEGIN (get_phys_pages.c) .EX #include <stdio.h> diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3 index 1bbbb23..e036e94 100644 --- a/man3/getaddrinfo.3 +++ b/man3/getaddrinfo.3 @@ -22,7 +22,7 @@ .\" FIXME . glibc's 2.9 NEWS file documents DCCP and UDP-lite support .\" and is SCTP support now also there? .\" -.TH getaddrinfo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getaddrinfo 3 2024-02-18 "Linux man-pages 6.7" .SH NAME getaddrinfo, freeaddrinfo, gai_strerror \- network address and service translation @@ -34,22 +34,22 @@ Standard C library .B #include <sys/types.h> .B #include <sys/socket.h> .B #include <netdb.h> -.PP +.P .BI "int getaddrinfo(const char *restrict " node , .BI " const char *restrict " service , .BI " const struct addrinfo *restrict " hints , .BI " struct addrinfo **restrict " res ); -.PP +.P .BI "void freeaddrinfo(struct addrinfo *" res ); -.PP +.P .BI "const char *gai_strerror(int " errcode ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getaddrinfo (), .BR freeaddrinfo (), .BR gai_strerror (): @@ -84,13 +84,13 @@ and functions into a single interface, but unlike the latter functions, .BR getaddrinfo () is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. -.PP +.P The .I addrinfo structure used by .BR getaddrinfo () contains the following fields: -.PP +.P .in +4n .EX struct addrinfo { @@ -105,7 +105,7 @@ struct addrinfo { }; .EE .in -.PP +.P The .I hints argument points to an @@ -160,11 +160,11 @@ any protocol can be returned by .I ai_flags This field specifies additional options, described below. Multiple flags are specified by bitwise OR-ing them together. -.PP +.P All the other fields in the structure pointed to by .I hints must contain either 0 or a null pointer, as appropriate. -.PP +.P Specifying .I hints as NULL is equivalent to setting @@ -199,7 +199,7 @@ must be a numerical network address. The .B AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups. -.PP +.P If the .B AI_PASSIVE flag is specified in @@ -224,7 +224,7 @@ If is not NULL, then the .B AI_PASSIVE flag is ignored. -.PP +.P If the .B AI_PASSIVE flag is not set in @@ -244,7 +244,7 @@ for IPv4 addresses, for IPv6 address); this is used by applications that intend to communicate with peers running on the same host. -.PP +.P .I service sets the port in each returned address structure. If this argument is a service name (see @@ -267,13 +267,13 @@ is not NULL, then must point to a string containing a numeric port number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known not to be required. -.PP +.P Either .I node or .IR service , but not both, may be NULL. -.PP +.P The .BR getaddrinfo () function allocates and initializes a linked list of @@ -289,7 +289,7 @@ and returns a pointer to the start of the list in The items in the linked list are linked by the .I ai_next field. -.PP +.P There are several reasons why the linked list may have more than one .I addrinfo @@ -311,7 +311,7 @@ is defined in RFC\ 3484; the order can be tweaked for a particular system by editing .I /etc/gai.conf (available since glibc 2.5). -.PP +.P If .I hints.ai_flags includes the @@ -326,7 +326,7 @@ official name of the host. .\" structure was set pointing to the canonical name; that was .\" more than POSIX.1-2001 specified, or other implementations provided. .\" MTK, Aug 05 -.PP +.P The remaining fields of each returned .I addrinfo structure are initialized as follows: @@ -360,7 +360,7 @@ field, and the length of the socket address, in bytes, is placed in the .I ai_addrlen field. -.PP +.P If .I hints.ai_flags includes the @@ -379,7 +379,7 @@ does not return IPv6 socket addresses that would always fail in .BR connect (2) or .BR bind (2). -.PP +.P If .I hints.ai_flags specifies the @@ -404,7 +404,7 @@ in the list pointed to by is ignored if .B AI_V4MAPPED is not also specified. -.PP +.P The .BR freeaddrinfo () function frees the memory that was allocated @@ -462,7 +462,9 @@ The resulting string is encoded using the current locale's encoding. .\"If no component of the returned name starts with xn\-\- the IDN .\"step can be skipped, therefore avoiding unnecessary slowdowns. .TP -.BR AI_IDN_ALLOW_UNASSIGNED ", " AI_IDN_USE_STD3_ASCII_RULES +.B AI_IDN_ALLOW_UNASSIGNED +.TQ +.B AI_IDN_USE_STD3_ASCII_RULES Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 @@ -499,7 +501,7 @@ contains invalid flags; or, included .B AI_CANONNAME and -.I name +.I node was NULL. .TP .B EAI_FAIL @@ -570,7 +572,7 @@ respectively). Other system error; .I errno is set to indicate the error. -.PP +.P The .BR gai_strerror () function translates these error codes to a human readable string, @@ -597,7 +599,6 @@ T{ .BR gai_strerror () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS According to POSIX.1, specifying .\" POSIX.1-2001, POSIX.1-2008 diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3 index 4b891ab..fe27b6c 100644 --- a/man3/getaddrinfo_a.3 +++ b/man3/getaddrinfo_a.3 @@ -8,7 +8,7 @@ .\" References: http://people.redhat.com/drepper/asynchnl.pdf, .\" http://www.imperialviolet.org/2005/06/01/asynchronous-dns-lookups-with-glibc.html .\" -.TH getaddrinfo_a 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getaddrinfo_a 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getaddrinfo_a, gai_suspend, gai_error, gai_cancel \- asynchronous network address and service translation @@ -19,12 +19,12 @@ Asynchronous name lookup library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <netdb.h> -.PP +.P .BI "int getaddrinfo_a(int " mode ", struct gaicb *" list [restrict], .BI " int " nitems ", struct sigevent *restrict " sevp ); .BI "int gai_suspend(const struct gaicb *const " list "[], int " nitems , .BI " const struct timespec *" timeout ); -.PP +.P .BI "int gai_error(struct gaicb *" req ); .BI "int gai_cancel(struct gaicb *" req ); .fi @@ -35,7 +35,7 @@ function performs the same task as .BR getaddrinfo (3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations. -.PP +.P The .I mode argument has one of the following values: @@ -51,7 +51,7 @@ and the requests are resolved in the background. See the discussion of the .I sevp argument below. -.PP +.P The array .I list specifies the look-up requests to process. @@ -66,7 +66,7 @@ are ignored. Each request is described by a .I gaicb structure, defined as follows: -.PP +.P .in +4n .EX struct gaicb { @@ -77,7 +77,7 @@ struct gaicb { }; .EE .in -.PP +.P The elements of this structure correspond to the arguments of .BR getaddrinfo (3). Thus, @@ -106,7 +106,7 @@ The .I addrinfo structure referenced by the last two elements is described in .BR getaddrinfo (3). -.PP +.P When .I mode is specified as @@ -118,7 +118,7 @@ structure pointed to by the .I sevp argument. For the definition and general details of this structure, see -.BR sigevent (7). +.BR sigevent (3type). The .I sevp\->sigev_notify field can have the following values: @@ -131,7 +131,7 @@ When a look-up completes, generate the signal .I sigev_signo for the process. See -.BR sigevent (7) +.BR sigevent (3type) for general details. The .I si_code @@ -147,9 +147,9 @@ When a look-up completes, invoke .I sigev_notify_function as if it were the start function of a new thread. See -.BR sigevent (7) +.BR sigevent (3type) for details. -.PP +.P For .B SIGEV_SIGNAL and @@ -158,7 +158,7 @@ it may be useful to point .I sevp\->sigev_value.sival_ptr to .IR list . -.PP +.P The .BR gai_suspend () function suspends execution of the calling thread, @@ -188,12 +188,12 @@ If .I timeout is NULL, then the call blocks indefinitely (until one of the events above occurs). -.PP +.P No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with .BR gai_error () over the list of requests. -.PP +.P The .BR gai_error () function returns the status of the request @@ -203,7 +203,7 @@ either if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved. -.PP +.P The .BR gai_cancel () function cancels the request @@ -237,7 +237,7 @@ Out of memory. .B EAI_SYSTEM .I mode is invalid. -.PP +.P The .BR gai_suspend () function returns 0 if at least one of the listed requests has been completed. @@ -253,7 +253,7 @@ There were no actual requests given to the function. A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request. -.PP +.P The .BR gai_error () function can return @@ -265,7 +265,7 @@ for an unfinished look-up request, or the error code .B EAI_CANCELED if the request has been canceled explicitly before it could be finished. -.PP +.P The .BR gai_cancel () function can return one of these values: @@ -278,7 +278,7 @@ The request has not been canceled. .TP .B EAI_ALLDONE The request has already completed. -.PP +.P The .BR gai_strerror (3) function translates these error codes to a human readable string, @@ -300,12 +300,11 @@ T{ .BR gai_cancel () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY glibc 2.2.3. -.PP +.P The interface of .BR getaddrinfo_a () was modeled after the @@ -320,7 +319,7 @@ The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using .BR getaddrinfo (3). The program might be used like this: -.PP +.P .in +4n .EX $ \fB./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org\fP @@ -329,17 +328,20 @@ enoent.linuxfoundation.org: Name or service not known gnu.org: 209.51.188.116 .EE .in -.PP +.P Here is the program source code -.PP +.P .\" SRC BEGIN (sync.c) .EX #define _GNU_SOURCE +#include <err.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <string.h> \& +#define MALLOC(n, type) ((type *) reallocarray(NULL, n, sizeof(type))) +\& int main(int argc, char *argv[]) { @@ -354,11 +356,10 @@ main(int argc, char *argv[]) } \& for (size_t i = 0; i < argc \- 1; i++) { - reqs[i] = malloc(sizeof(*reqs[0])); - if (reqs[i] == NULL) { - perror("malloc"); - exit(EXIT_FAILURE); - } + reqs[i] = MALLOC(1, struct gaicb); + if (reqs[i] == NULL) + err(EXIT_FAILURE, "malloc"); +\& memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]\->ar_name = argv[i + 1]; } @@ -399,9 +400,9 @@ This example shows a simple interactive .BR getaddrinfo_a () front-end. The notification facility is not demonstrated. -.PP +.P An example session might look like this: -.PP +.P .in +4n .EX $ \fB./a.out\fP @@ -420,20 +421,42 @@ $ \fB./a.out\fP [02] gnu.org: 209.51.188.116 .EE .in -.PP +.P The program source is as follows: -.PP +.P .\" SRC BEGIN (async.c) .EX #define _GNU_SOURCE +#include <assert.h> +#include <err.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <string.h> \& +#define CALLOC(n, type) ((type *) calloc(n, sizeof(type))) +\& +#define REALLOCF(ptr, n, type) \e +({ \e + static_assert(__builtin_types_compatible_p(typeof(ptr), type *)); \e + \e + (type *) reallocarrayf(ptr, n, sizeof(type)); \e +}) +\& static struct gaicb **reqs = NULL; static size_t nreqs = 0; \& +static inline void * +reallocarrayf(void *p, size_t nmemb, size_t size) +{ + void *q; +\& + q = reallocarray(p, nmemb, size); + if (q == NULL && nmemb != 0 && size != 0) + free(p); + return q; +} +\& static char * getcmd(void) { @@ -459,9 +482,14 @@ add_requests(void) \& while ((host = strtok(NULL, " "))) { nreqs++; - reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); + reqs = REALLOCF(reqs, nreqs, struct gaicb *); + if (reqs == NULL) + err(EXIT_FAILURE, "reallocf"); +\& + reqs[nreqs \- 1] = CALLOC(1, struct gaicb); + if (reqs[nreqs \- 1] == NULL) + err(EXIT_FAILURE, "calloc"); \& - reqs[nreqs \- 1] = calloc(1, sizeof(*reqs[0])); reqs[nreqs \- 1]\->ar_name = strdup(host); } \& @@ -483,7 +511,12 @@ wait_requests(void) char *id; int ret; size_t n; - struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); + struct gaicb const **wait_reqs; +\& + wait_reqs = CALLOC(nreqs, const struct gaicb *); + if (wait_reqs == NULL) + err(EXIT_FAILURE, "calloc"); +\& /* NULL elements are ignored by gai_suspend(). */ \& while ((id = strtok(NULL, " ")) != NULL) { @@ -609,4 +642,4 @@ main(void) .BR lio_listio (3), .BR hostname (7), .BR ip (7), -.BR sigevent (7) +.BR sigevent (3type) diff --git a/man3/getauxval.3 b/man3/getauxval.3 index 8e7d5e4..c41cce0 100644 --- a/man3/getauxval.3 +++ b/man3/getauxval.3 @@ -5,7 +5,7 @@ .\" .\" See also https://lwn.net/Articles/519085/ .\" -.TH getauxval 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getauxval 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getauxval \- retrieve a value from the auxiliary vector .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/auxv.h> -.PP +.P .BI "unsigned long getauxval(unsigned long " type ); .fi .SH DESCRIPTION @@ -24,7 +24,7 @@ function retrieves values from the auxiliary vector, a mechanism that the kernel's ELF binary loader uses to pass certain information to user space when a program is executed. -.PP +.P Each entry in the auxiliary vector consists of a pair of values: a type that identifies what this entry represents, and a value for that type. @@ -32,7 +32,7 @@ Given the argument .IR type , .BR getauxval () returns the corresponding value. -.PP +.P The value returned for each .I type is given in the following list. @@ -224,7 +224,6 @@ T{ .BR getauxval () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -238,19 +237,19 @@ that allows the kernel to communicate a certain set of standard information that the dynamic linker usually or always needs. In some cases, the same information could be obtained by system calls, but using the auxiliary vector is cheaper. -.PP +.P The auxiliary vector resides just above the argument list and environment in the process address space. The auxiliary vector supplied to a program can be viewed by setting the .B LD_SHOW_AUXV environment variable when running a program: -.PP +.P .in +4n .EX $ LD_SHOW_AUXV=1 sleep 1 .EE .in -.PP +.P The auxiliary vector of any process can (subject to file permissions) be obtained via .IR /proc/ pid /auxv ; diff --git a/man3/getcontext.3 b/man3/getcontext.3 index 4cd604c..6515075 100644 --- a/man3/getcontext.3 +++ b/man3/getcontext.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getcontext 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getcontext 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getcontext, setcontext \- get or set the user context .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <ucontext.h> -.PP +.P .BI "int getcontext(ucontext_t *" ucp ); .BI "int setcontext(const ucontext_t *" ucp ); .fi @@ -31,7 +31,7 @@ and .BR swapcontext (3) that allow user-level context switching between multiple threads of control within a process. -.PP +.P The .I mcontext_t type is machine-dependent and opaque. @@ -39,7 +39,7 @@ The .I ucontext_t type is a structure that has at least the following fields: -.PP +.P .in +4n .EX typedef struct ucontext_t { @@ -51,7 +51,7 @@ typedef struct ucontext_t { } ucontext_t; .EE .in -.PP +.P with .I sigset_t and @@ -76,14 +76,14 @@ and is the machine-specific representation of the saved context, that includes the calling thread's machine registers. -.PP +.P The function .BR getcontext () initializes the structure pointed to by .I ucp to the currently active context. -.PP +.P The function .BR setcontext () restores the user context @@ -99,11 +99,11 @@ handler (see the discussion of the .B SA_SIGINFO flag in .BR sigaction (2)). -.PP +.P If the context was obtained by a call of .BR getcontext (), program execution continues as if this call just returned. -.PP +.P If the context was obtained by a call of .BR makecontext (3), program execution continues by a call to the function @@ -120,7 +120,7 @@ specified as the first argument of that call to .BR makecontext (3). When this member is NULL, the thread exits. -.PP +.P If the context was obtained by a call to a signal handler, then old standard text says that "program execution continues with the program instruction following the instruction interrupted @@ -153,12 +153,11 @@ T{ .BR setcontext () T} Thread safety MT-Safe race:ucp .TE -.sp 1 .SH STANDARDS None. .SH HISTORY SUSv2, POSIX.1-2001. -.PP +.P POSIX.1-2008 removes these functions, citing portability issues, and recommending that applications be rewritten to use POSIX threads instead. @@ -181,7 +180,7 @@ is from the first call, or via a call. The user has to invent their own bookkeeping device, and a register variable won't do since registers are restored. -.PP +.P When a signal occurs, the current user context is saved and a new context is created by the kernel for the signal handler. Do not leave the handler using diff --git a/man3/getcwd.3 b/man3/getcwd.3 index 7149581..1004458 100644 --- a/man3/getcwd.3 +++ b/man3/getcwd.3 @@ -10,7 +10,7 @@ .\" Modified Mon Dec 11 13:32:51 MET 2000 by aeb .\" Modified Thu Apr 22 03:49:15 CEST 2002 by Roger Luethi <rl@hellgate.ch> .\" -.TH getcwd 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getcwd 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getcwd, getwd, get_current_dir_name \- get current working directory .SH LIBRARY @@ -19,23 +19,23 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "char *getcwd(char " buf [. size "], size_t " size ); .B "char *get_current_dir_name(void);" -.PP +.P .BI "[[deprecated]] char *getwd(char " buf [PATH_MAX]); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR get_current_dir_name (): .nf _GNU_SOURCE .fi -.PP +.P .BR getwd (): .nf Since glibc 2.12: @@ -53,7 +53,7 @@ the calling process. The pathname is returned as the function result and via the argument .IR buf , if present. -.PP +.P The .BR getcwd () function copies an absolute pathname of the current working directory @@ -61,7 +61,7 @@ to the array pointed to by .IR buf , which is of length .IR size . -.PP +.P If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds .I size @@ -71,7 +71,7 @@ is set to .BR ERANGE ; an application should check for this error, and allocate a larger buffer if necessary. -.PP +.P As an extension to the POSIX.1-2001 standard, glibc's .BR getcwd () allocates the buffer dynamically using @@ -89,7 +89,7 @@ is allocated as big as necessary. The caller should .BR free (3) the returned buffer. -.PP +.P .BR get_current_dir_name () will .BR malloc (3) @@ -102,7 +102,7 @@ is set, and its value is correct, then that value will be returned. The caller should .BR free (3) the returned buffer. -.PP +.P .BR getwd () does not .BR malloc (3) @@ -136,7 +136,7 @@ and .BR getwd () this is the same value as .IR buf . -.PP +.P On failure, these functions return NULL, and .I errno is set to indicate the error. @@ -202,14 +202,13 @@ T{ .BR get_current_dir_name () T} Thread safety MT-Safe env .TE -.sp 1 .SH VERSIONS POSIX.1-2001 leaves the behavior of .BR getcwd () unspecified if .I buf is NULL. -.PP +.P POSIX.1-2001 does not define any errors for .BR getwd (). @@ -234,7 +233,7 @@ exceeds this limit, then the system call fails with the error .BR ENAMETOOLONG . In this case, the library functions fall back to a (slower) alternative implementation that returns the full pathname. -.PP +.P Following a change in Linux 2.6.36, .\" commit 8df9d1a4142311c084ffeeacb67cd34d190eff74 the pathname returned by the @@ -272,7 +271,7 @@ Removed in POSIX.1-2008. Use .BR getcwd () instead. -.PP +.P Under Linux, these functions make use of the .BR getcwd () system call (available since Linux 2.1.92). diff --git a/man3/getdate.3 b/man3/getdate.3 index fefc370..fe15e6b 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -8,7 +8,7 @@ .\" Modified, 2001-12-26, aeb .\" 2008-09-07, mtk, Various rewrites; added an example program. .\" -.TH getdate 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getdate 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getdate, getdate_r \- convert a date-plus-time string to broken-down time .SH LIBRARY @@ -17,25 +17,25 @@ Standard C library .SH SYNOPSIS .nf .B "#include <time.h>" -.PP +.P .BI "struct tm *getdate(const char *" string ); -.PP +.P .B "extern int getdate_err;" -.PP +.P .BI "int getdate_r(const char *restrict " string ", struct tm *restrict " res ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getdate (): .nf _XOPEN_SOURCE >= 500 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED .fi -.PP +.P .BR getdate_r (): .nf _GNU_SOURCE @@ -56,7 +56,7 @@ This structure is allocated in static storage, and consequently it will be overwritten by further calls to .BR getdate (). -.PP +.P In contrast to .BR strptime (3), (which has a @@ -68,11 +68,11 @@ whose full pathname is given in the environment variable .BR DATEMSK . The first line in the file that matches the given input string is used for the conversion. -.PP +.P The matching is done case insensitively. Superfluous whitespace, either in the pattern or in the string to be converted, is ignored. -.PP +.P The conversion specifications that a pattern can contain are those given for .BR strptime (3). One more conversion specification is specified in POSIX.1-2001: @@ -83,7 +83,7 @@ Timezone name. .\" Looking at the glibc 2.21 source code, where the implementation uses .\" strptime(), suggests that it might be supported. This is not implemented in glibc. -.PP +.P When .B %Z is given, the structure containing the broken-down time @@ -92,21 +92,21 @@ time in the given timezone. Otherwise, the structure is initialized to the broken-down time corresponding to the current local time (as by a call to .BR localtime (3)). -.PP +.P When only the day of the week is given, the day is taken to be the first such day on or after today. -.PP +.P When only the month is given (and no year), the month is taken to be the first such month equal to or after the current month. If no day is given, it is the first day of the month. -.PP +.P When no hour, minute, and second are given, the current hour, minute, and second are taken. -.PP +.P If no date is given, but we know the hour, then that hour is taken to be the first such hour equal to or after the current hour. -.PP +.P .BR getdate_r () is a GNU extension that provides a reentrant version of .BR getdate (). @@ -127,7 +127,7 @@ to one of the error numbers shown below. Changes to .I errno are unspecified. -.PP +.P On success .BR getdate_r () returns 0; @@ -174,7 +174,9 @@ Invalid input specification. .B DATEMSK File containing format patterns. .TP -.BR TZ ", " LC_TIME +.B TZ +.TQ +.B LC_TIME Variables used by .BR strptime (3). .SH ATTRIBUTES @@ -204,7 +206,6 @@ T} Thread safety T{ MT-Safe env locale T} .TE -.sp 1 .SH VERSIONS The POSIX.1 specification for .BR strptime (3) @@ -231,7 +232,7 @@ and for each call displays the values in the fields of the returned .I tm structure. The following shell session demonstrates the operation of the program: -.PP +.P .in +4n .EX .RB "$" " TFILE=$PWD/tfile" diff --git a/man3/getdirentries.3 b/man3/getdirentries.3 index 67d6da1..78fcf25 100644 --- a/man3/getdirentries.3 +++ b/man3/getdirentries.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getdirentries 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getdirentries 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getdirentries \- get directory entries in a filesystem-independent format .SH LIBRARY @@ -14,17 +14,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "ssize_t getdirentries(int " fd ", char " buf "[restrict ." nbytes "], \ size_t " nbytes , .BI " off_t *restrict " basep ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getdirentries (): .nf Since glibc 2.19: @@ -67,7 +67,6 @@ T{ .BR getdirentries () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS BSD. .SH NOTES diff --git a/man3/getdtablesize.3 b/man3/getdtablesize.3 index 40b940f..b792ea9 100644 --- a/man3/getdtablesize.3 +++ b/man3/getdtablesize.3 @@ -5,7 +5,7 @@ .\" .\" Modified 2002-04-15 by Roger Luethi <rl@hellgate.ch> and aeb .\" -.TH getdtablesize 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getdtablesize 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getdtablesize \- get file descriptor table size .SH LIBRARY @@ -14,15 +14,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .B int getdtablesize(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getdtablesize (): .nf Since glibc 2.20: @@ -59,7 +59,6 @@ T{ .BR getdtablesize () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The glibc version of .BR getdtablesize () @@ -73,7 +72,7 @@ when that fails. .\" The libc4 and libc5 versions return .\" .B OPEN_MAX .\" (set to 256 since Linux 0.98.4). -.PP +.P Portable applications should employ .I sysconf(_SC_OPEN_MAX) instead of this call. diff --git a/man3/getentropy.3 b/man3/getentropy.3 index f09a209..7c70623 100644 --- a/man3/getentropy.3 +++ b/man3/getentropy.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getentropy 3 2023-03-30 "Linux man-pages 6.05.01" +.TH getentropy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getentropy \- fill a buffer with random bytes .SH LIBRARY @@ -11,15 +11,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int getentropy(void " buffer [. length "], size_t " length ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getentropy (): .nf _DEFAULT_SOURCE @@ -35,7 +35,7 @@ at the location pointed to by The maximum permitted value for the .I length argument is 256. -.PP +.P A successful call to .BR getentropy () always provides the requested number of bytes of entropy. @@ -76,19 +76,19 @@ The .BR getentropy () function is implemented using .BR getrandom (2). -.PP +.P Whereas the glibc wrapper makes .BR getrandom (2) a cancelation point, .BR getentropy () is not a cancelation point. -.PP +.P .BR getentropy () is also declared in .BR <sys/random.h> . (No feature test macro need be defined to obtain the declaration from that header file.) -.PP +.P A call to .BR getentropy () may block if the system has just booted and the kernel has diff --git a/man3/getenv.3 b/man3/getenv.3 index 705eb43..50b17cf 100644 --- a/man3/getenv.3 +++ b/man3/getenv.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 19:30:29 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl) .\" -.TH getenv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getenv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getenv, secure_getenv \- get an environment variable .SH LIBRARY @@ -20,16 +20,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "char *getenv(const char *" name ); .BI "char *secure_getenv(const char *" name ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR secure_getenv (): .nf _GNU_SOURCE @@ -43,7 +43,7 @@ environment variable and returns a pointer to the corresponding .I value string. -.PP +.P The GNU-specific .BR secure_getenv () function is just like @@ -60,10 +60,10 @@ set-group-ID program); the effective capability bit was set on the executable file; or .IP \[bu] the process has a nonempty permitted capability set. -.PP +.P Secure execution may also be required if triggered by some Linux security modules. -.PP +.P The .BR secure_getenv () function is intended for use in general-purpose libraries @@ -90,7 +90,6 @@ T{ .BR secure_getenv () T} Thread safety MT-Safe env .TE -.sp 1 .SH STANDARDS .TP .BR getenv () @@ -107,13 +106,13 @@ POSIX.1-2001, C89, C99, SVr4, 4.3BSD. glibc 2.17. .SH NOTES The strings in the environment list are of the form \fIname=value\fP. -.PP +.P As typically implemented, .BR getenv () returns a pointer to a string within the environment list. The caller must take care not to modify this string, since that would change the environment of the process. -.PP +.P The implementation of .BR getenv () is not required to be reentrant. @@ -126,7 +125,7 @@ and can be modified by a subsequent call to .BR setenv (3), or .BR unsetenv (3). -.PP +.P The "secure execution" mode of .BR secure_getenv () is controlled by the diff --git a/man3/getfsent.3 b/man3/getfsent.3 index 5a03bd9..2bcb958 100644 --- a/man3/getfsent.3 +++ b/man3/getfsent.3 @@ -5,7 +5,7 @@ .\" .\" Inspired by a page written by Walter Harms. .\" -.TH getfsent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getfsent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getfsent, getfsspec, getfsfile, setfsent, endfsent \- handle fstab entries .SH LIBRARY @@ -14,11 +14,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <fstab.h> -.PP +.P .B "int setfsent(void);" .B "struct fstab *getfsent(void);" .B "void endfsent(void);" -.PP +.P .BI "struct fstab *getfsfile(const char *" mount_point ); .BI "struct fstab *getfsspec(const char *" special_file ); .fi @@ -28,7 +28,7 @@ These functions read from the file The .I struct fstab is defined by: -.PP +.P .in +4n .EX struct fstab { @@ -42,26 +42,26 @@ struct fstab { }; .EE .in -.PP +.P Here the field .I fs_type contains (on a *BSD system) one of the five strings "rw", "rq", "ro", "sw", "xx" (read-write, read-write with quota, read-only, swap, ignore). -.PP +.P The function .BR setfsent () opens the file when required and positions it at the first line. -.PP +.P The function .BR getfsent () parses the next line from the file. (After opening it when required.) -.PP +.P The function .BR endfsent () closes the file when required. -.PP +.P The function .BR getfsspec () searches the file from the start and returns the first entry found @@ -70,7 +70,7 @@ for which the field matches the .I special_file argument. -.PP +.P The function .BR getfsfile () searches the file from the start and returns the first entry found @@ -121,7 +121,6 @@ T} Thread safety T{ MT-Unsafe race:fsent locale T} .TE -.sp 1 .SH VERSIONS Several operating systems have these functions, for example, *BSD, SunOS, Digital UNIX, AIX (which also has a @@ -141,7 +140,7 @@ The function appeared in 4.0BSD; the other four functions appeared in 4.3BSD. .SH NOTES These functions are not thread-safe. -.PP +.P Since Linux allows mounting a block special device in several places, and since several devices can have the same mount point, where the last device with a given mount point is the interesting one, diff --git a/man3/getgrent.3 b/man3/getgrent.3 index cd5beda..66c478a 100644 --- a/man3/getgrent.3 +++ b/man3/getgrent.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu) -.TH getgrent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getgrent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getgrent, setgrent, endgrent \- get group file entry .SH LIBRARY @@ -18,18 +18,18 @@ Standard C library .nf .B #include <sys/types.h> .B #include <grp.h> -.PP +.P .B struct group *getgrent(void); -.PP +.P .B void setgrent(void); .B void endgrent(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR setgrent (): .nf _XOPEN_SOURCE >= 500 @@ -37,7 +37,7 @@ Feature Test Macro Requirements for glibc (see || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR getgrent (), .BR endgrent (): .nf @@ -62,19 +62,19 @@ The first time .BR getgrent () is called, it returns the first entry; thereafter, it returns successive entries. -.PP +.P The .BR setgrent () function rewinds to the beginning of the group database, to allow repeated scans. -.PP +.P The .BR endgrent () function is used to close the group database after all processing has been performed. -.PP +.P The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows: -.PP +.P .in +4n .EX struct group { @@ -86,7 +86,7 @@ struct group { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR group (5). .SH RETURN VALUE @@ -96,14 +96,14 @@ function returns a pointer to a .I group structure, or NULL if there are no more entries or an error occurs. -.PP +.P Upon error, .I errno may be set. If one wants to check .I errno after the call, it should be set to zero before the call. -.PP +.P The return value may point to a static area, and may be overwritten by subsequent calls to .BR getgrent (), @@ -180,8 +180,7 @@ T} Thread safety T{ MT-Unsafe race:grent locale T} .TE -.sp 1 -.PP +.P In the above table, .I grent in diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index b70c36e..f4a2b5b 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH getgrent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getgrent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getgrent_r, fgetgrent_r \- get group file entry reentrantly .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <grp.h> -.PP +.P .BI "int getgrent_r(struct group *restrict " gbuf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct group **restrict " gbufp ); @@ -20,18 +20,18 @@ Standard C library .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct group **restrict " gbufp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getgrent_r (): .nf _GNU_SOURCE .fi .\" FIXME . The FTM requirements seem inconsistent here. File a glibc bug? -.PP +.P .BR fgetgrent_r (): .nf Since glibc 2.19: @@ -52,11 +52,11 @@ The former reads the next group entry from the stream initialized by .BR setgrent (3). The latter reads the next group entry from .IR stream . -.PP +.P The \fIgroup\fP structure is defined in .I <grp.h> as follows: -.PP +.P .in +4n .EX struct group { @@ -68,10 +68,10 @@ struct group { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR group (5). -.PP +.P The nonreentrant functions return a pointer to static storage, where this static storage contains further pointers to group name, password, and members. @@ -132,7 +132,7 @@ T} Thread safety T{ MT-Safe T} .TE -.sp 1 +.P In the above table, .I grent in @@ -147,16 +147,16 @@ are used in parallel in different threads of a program, then data races could occur. .SH VERSIONS Other systems use the prototype -.PP +.P .in +4n .EX struct group *getgrent_r(struct group *grp, char *buf, int buflen); .EE .in -.PP +.P or, better, -.PP +.P .in +4n .EX int getgrent_r(struct group *grp, char *buf, int buflen, diff --git a/man3/getgrnam.3 b/man3/getgrnam.3 index b79e15f..fb53c6e 100644 --- a/man3/getgrnam.3 +++ b/man3/getgrnam.3 @@ -11,7 +11,7 @@ .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2003-11-15 by aeb .\" -.TH getgrnam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getgrnam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry .SH LIBRARY @@ -21,10 +21,10 @@ Standard C library .nf .B #include <sys/types.h> .B #include <grp.h> -.PP +.P .BI "struct group *getgrnam(const char *" name ); .BI "struct group *getgrgid(gid_t " gid ); -.PP +.P .BI "int getgrnam_r(const char *restrict " name \ ", struct group *restrict " grp , .BI " char " buf "[restrict ." buflen "], size_t " buflen , @@ -33,12 +33,12 @@ Standard C library .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct group **restrict " result ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getgrnam_r (), .BR getgrgid_r (): .nf @@ -55,16 +55,16 @@ the broken-out fields of the record in the group database NIS, and LDAP) that matches the group name .IR name . -.PP +.P The .BR getgrgid () function returns a pointer to a structure containing the broken-out fields of the record in the group database that matches the group ID .IR gid . -.PP +.P The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows: -.PP +.P .in +4n .EX struct group { @@ -76,10 +76,10 @@ struct group { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR group (5). -.PP +.P The .BR getgrnam_r () and @@ -102,15 +102,15 @@ of size A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in .IR *result . -.PP +.P The call -.PP +.P .in +4n .EX sysconf(_SC_GETGR_R_SIZE_MAX) .EE .in -.PP +.P returns either \-1, without changing .IR errno , or an initial suggested size for @@ -134,7 +134,7 @@ is set to indicate the error. If one wants to check .I errno after the call, it should be set to zero before the call. -.PP +.P The return value may point to a static area, and may be overwritten by subsequent calls to .BR getgrent (3), @@ -143,7 +143,7 @@ or .BR getgrnam (). (Do not pass the returned pointer to .BR free (3).) -.PP +.P On success, .BR getgrnam_r () and @@ -225,7 +225,6 @@ T{ .BR getgrgid_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS The formulation given above under "RETURN VALUE" is from POSIX.1. .\" POSIX.1-2001, POSIX.1-2008 diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 0fe3690..33e344d 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -7,7 +7,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getgrouplist 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getgrouplist 3 2024-03-16 "Linux man-pages 6.7" .SH NAME getgrouplist \- get list of groups to which a user belongs .SH LIBRARY @@ -16,16 +16,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <grp.h> -.PP +.P .BI "int getgrouplist(const char *" user ", gid_t " group , .BI " gid_t *" groups ", int *" ngroups ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getgrouplist (): .nf Since glibc 2.19: @@ -45,7 +45,7 @@ Up to .I *ngroups of these groups are returned in the array .IR groups . -.PP +.P If it was not among the groups defined for .I user in the group database, then @@ -55,7 +55,7 @@ is included in the list of groups returned by typically this argument is specified as the group ID from the password record for .IR user . -.PP +.P The .I ngroups argument is a value-result argument: @@ -73,7 +73,7 @@ is a member is less than or equal to then the value .I *ngroups is returned. -.PP +.P If the user is a member of more than .I *ngroups groups, then @@ -97,7 +97,6 @@ T{ .BR getgrouplist () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -119,7 +118,7 @@ The second command-line argument specifies the value to be supplied to .BR getgrouplist (). The following shell session shows examples of the use of this program: -.PP +.P .in +4n .EX .RB "$" " ./a.out cecilia 0" @@ -143,10 +142,10 @@ ngroups = 3 int main(int argc, char *argv[]) { - int ngroups; - struct passwd *pw; - struct group *gr; - gid_t *groups; + int ngroups; + gid_t *groups; + struct group *gr; + struct passwd *pw; \& if (argc != 3) { fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]); @@ -180,7 +179,7 @@ main(int argc, char *argv[]) /* Display list of retrieved groups, along with group names. */ \& fprintf(stderr, "ngroups = %d\en", ngroups); - for (size_t j = 0; j < ngroups; j++) { + for (int j = 0; j < ngroups; j++) { printf("%d", groups[j]); gr = getgrgid(groups[j]); if (gr != NULL) diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3 index 620d492..01cc0f7 100644 --- a/man3/gethostbyname.3 +++ b/man3/gethostbyname.3 @@ -16,7 +16,7 @@ .\" Modified 2002-08-05, Michael Kerrisk .\" Modified 2004-10-31, Andries Brouwer .\" -.TH gethostbyname 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gethostbyname 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno, @@ -30,31 +30,31 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "void sethostent(int " stayopen ); .B void endhostent(void); -.PP +.P .B [[deprecated]] extern int h_errno; -.PP +.P .BI "[[deprecated]] struct hostent *gethostbyname(const char *" name ); .BI "[[deprecated]] struct hostent *gethostbyaddr(const void " addr [. len ], .BI " socklen_t " len ", int " type ); -.PP +.P .BI "[[deprecated]] void herror(const char *" s ); .BI "[[deprecated]] const char *hstrerror(int " err ); -.PP +.P /* System V/POSIX extension */ .B struct hostent *gethostent(void); -.PP +.P /* GNU extensions */ .B [[deprecated]] .BI "struct hostent *gethostbyname2(const char *" name ", int " af ); -.PP +.P .BI "int gethostent_r(struct hostent *restrict " ret , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct hostent **restrict " result , .BI " int *restrict " h_errnop ); -.PP +.P .B [[deprecated]] .BI "int gethostbyaddr_r(const void " addr "[restrict ." len "], socklen_t " len , .BI " int " type , @@ -75,12 +75,12 @@ Standard C library .BI " struct hostent **restrict " result , .BI " int *restrict " h_errnop ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR gethostbyname2 (), .BR gethostent_r (), .BR gethostbyaddr_r (), @@ -92,7 +92,7 @@ Feature Test Macro Requirements for glibc (see glibc up to and including 2.19: _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR herror (), .BR hstrerror (): .nf @@ -103,7 +103,7 @@ Feature Test Macro Requirements for glibc (see Before glibc 2.8: none .fi -.PP +.P .BR h_errno : .nf Since glibc 2.19 @@ -127,19 +127,19 @@ Applications should use and .BR gai_strerror (3) instead. -.PP +.P The .BR sethostent () function specifies, if \fIstayopen\fP is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams. -.PP +.P The .BR endhostent () function ends the use of a TCP connection for name server queries. -.PP +.P The .BR gethostbyname () function returns a structure of type @@ -178,7 +178,7 @@ will first be searched for for the file format). The current domain and its parents are searched unless \fIname\fP ends in a dot. -.PP +.P The .BR gethostbyaddr () function returns a structure of type \fIhostent\fP @@ -196,17 +196,17 @@ obtained via a call to .BR inet_addr (3)) for address type .BR AF_INET . -.PP +.P The (obsolete) .BR herror () function prints the error message associated with the current value of \fIh_errno\fP on \fIstderr\fP. -.PP +.P The (obsolete) .BR hstrerror () function takes an error number (typically \fIh_errno\fP) and returns the corresponding message string. -.PP +.P The domain name queries carried out by .BR gethostbyname () and @@ -224,15 +224,15 @@ configured sources, failing that, a local name server The .BR nsswitch.conf (5) file is the modern way of controlling the order of host lookups. -.PP +.P In glibc 2.4 and earlier, the .I order keyword was used to control the order of host lookups as defined in .I /etc/host.conf .RB ( host.conf (5)). -.PP +.P The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows: -.PP +.P .in +4n .EX struct hostent { @@ -245,7 +245,7 @@ struct hostent { #define h_addr h_addr_list[0] /* for backward compatibility */ .EE .in -.PP +.P The members of the \fIhostent\fP structure are: .TP .I h_name @@ -387,7 +387,7 @@ T{ .BR gethostbyname2_r () T} Thread safety MT-Safe env locale .TE -.sp 1 +.P In the above table, .I hostent in @@ -445,7 +445,7 @@ later calls. Copying the .I struct hostent does not suffice, since it contains pointers; a deep copy is required. -.PP +.P In the original BSD implementation the .I len argument @@ -469,7 +469,7 @@ POSIX.1-2001 makes it which is OK.) See also .BR accept (2). -.PP +.P The BSD prototype for .BR gethostbyaddr () uses @@ -498,7 +498,7 @@ glibc2 also has a that works like .BR gethostbyname (), but permits to specify the address family to which the address must belong. -.PP +.P glibc2 also has reentrant versions .BR gethostent_r (), .BR gethostbyaddr_r (), diff --git a/man3/gethostid.3 b/man3/gethostid.3 index 02a97d7..7930497 100644 --- a/man3/gethostid.3 +++ b/man3/gethostid.3 @@ -7,7 +7,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com> -.TH gethostid 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gethostid 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gethostid, sethostid \- get or set the unique identifier of the current host .SH LIBRARY @@ -16,16 +16,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .B long gethostid(void); .BI "int sethostid(long " hostid ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR gethostid (): .nf Since glibc 2.20: @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see _BSD_SOURCE || _XOPEN_SOURCE >= 500 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED .fi -.PP +.P .BR sethostid (): .nf Since glibc 2.21: @@ -57,7 +57,7 @@ This normally resembles the Internet address for the local machine, as returned by .BR gethostbyname (3), and thus usually never needs to be set. -.PP +.P The .BR sethostid () call is restricted to the superuser. @@ -65,7 +65,7 @@ call is restricted to the superuser. .BR gethostid () returns the 32-bit identifier for the current host as set by .BR sethostid (). -.PP +.P On success, .BR sethostid () returns 0; on error, \-1 is returned, and @@ -109,7 +109,6 @@ T} Thread safety T{ MT-Unsafe const:hostid T} .TE -.sp 1 .SH VERSIONS In the glibc implementation, the .I hostid @@ -119,7 +118,7 @@ is stored in the file .I /var/adm/hostid was used.) .\" libc5 used /etc/hostid; libc4 didn't have these functions -.PP +.P In the glibc implementation, if .BR gethostid () cannot open the file containing the host ID, diff --git a/man3/getifaddrs.3 b/man3/getifaddrs.3 index 3f82c93..e8c2bde 100644 --- a/man3/getifaddrs.3 +++ b/man3/getifaddrs.3 @@ -14,7 +14,7 @@ .\" for glibc specificities, provide an example. .\" 2009-01-14 mtk, many edits and changes, rewrote example program. .\" -.TH getifaddrs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getifaddrs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getifaddrs, freeifaddrs \- get interface addresses .SH LIBRARY @@ -24,7 +24,7 @@ Standard C library .nf .B #include <sys/types.h> .B #include <ifaddrs.h> -.PP +.P .BI "int getifaddrs(struct ifaddrs **" "ifap" ); .BI "void freeifaddrs(struct ifaddrs *" "ifa" ); .fi @@ -38,7 +38,7 @@ and stores the address of the first item of the list in The list consists of .I ifaddrs structures, defined as follows: -.PP +.P .in +4n .EX struct ifaddrs { @@ -59,19 +59,19 @@ struct ifaddrs { }; .EE .in -.PP +.P The .I ifa_next field contains a pointer to the next structure on the list, or NULL if this is the last item of the list. -.PP +.P The .I ifa_name points to the null-terminated interface name. .\" The constant .\" .B IF NAMESIZE .\" indicates the maximum length of this field. -.PP +.P The .I ifa_flags field contains the interface flags, as returned by the @@ -80,7 +80,7 @@ field contains the interface flags, as returned by the operation (see .BR netdevice (7) for a list of these flags). -.PP +.P The .I ifa_addr field points to a structure containing the interface address. @@ -89,14 +89,14 @@ field points to a structure containing the interface address. subfield should be consulted to determine the format of the address structure.) This field may contain a null pointer. -.PP +.P The .I ifa_netmask field points to a structure containing the netmask associated with .IR ifa_addr , if applicable for the address family. This field may contain a null pointer. -.PP +.P Depending on whether the bit .B IFF_BROADCAST or @@ -111,12 +111,12 @@ will contain the broadcast address associated with (if applicable for the address family) or .I ifa_dstaddr will contain the destination address of the point-to-point interface. -.PP +.P The .I ifa_data field points to a buffer containing address-family-specific data; this field may be NULL if there is no such data for this interface. -.PP +.P The data returned by .BR getifaddrs () is dynamically allocated and should be freed using @@ -157,7 +157,6 @@ T{ .BR freeifaddrs () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -179,7 +178,7 @@ differs on various systems. .\" appears to be confused and obsolete on this point. .\" i.e., commonly it still says one of them will be NULL, even if .\" the ifa_ifu union is already present -.PP +.P .BR getifaddrs () first appeared in glibc 2.3, but before glibc 2.3.3, the implementation supported only IPv4 addresses; @@ -210,7 +209,7 @@ The program below demonstrates the use of and .BR getnameinfo (3). Here is what we see when running this program on one system: -.PP +.P .in +4n .EX $ \fB./a.out\fP diff --git a/man3/getipnodebyname.3 b/man3/getipnodebyname.3 index 5babfeb..23bb958 100644 --- a/man3/getipnodebyname.3 +++ b/man3/getipnodebyname.3 @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References: RFC 2553 -.TH getipnodebyname 3 2023-03-30 "Linux man-pages 6.05.01" +.TH getipnodebyname 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getipnodebyname, getipnodebyaddr, freehostent \- get network hostnames and addresses @@ -15,7 +15,7 @@ Standard C library .B #include <sys/types.h> .B #include <sys/socket.h> .B #include <netdb.h> -.PP +.P .BI "[[deprecated]] struct hostent *getipnodebyname(const char *" name ", int " af , .BI " int " flags ", int *" error_num ); .BI "[[deprecated]] struct hostent *getipnodebyaddr(const void " addr [. len ], @@ -30,7 +30,7 @@ Use and .BR getnameinfo (3) instead. -.PP +.P The .BR getipnodebyname () and @@ -38,7 +38,7 @@ and functions return the names and addresses of a network host. These functions return a pointer to the following structure: -.PP +.P .in +4n .EX struct hostent { @@ -50,7 +50,7 @@ struct hostent { }; .EE .in -.PP +.P These functions replace the .BR gethostbyname (3) and @@ -61,7 +61,7 @@ The and .BR getipnodebyaddr () functions can access multiple network address families. -.PP +.P Unlike the .B gethostby functions, @@ -95,7 +95,7 @@ The .I name argument points to a hexadecimal IPv6 address or a name of an IPv6 network host. -.PP +.P The .I flags argument specifies additional options. @@ -185,7 +185,7 @@ The domain name server returned a permanent failure response. .B TRY_AGAIN The domain name server returned a temporary failure response. You might have better luck next time. -.PP +.P A successful query returns a pointer to a .I hostent structure that contains the following fields: @@ -242,7 +242,7 @@ None. .SH HISTORY .\" Not in POSIX.1-2001. RFC\ 2553. -.PP +.P Present in glibc 2.1.91-95, but removed again. Several UNIX-like systems support them, but all call them deprecated. diff --git a/man3/getline.3 b/man3/getline.3 index 2b9d74a..991993e 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getline 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getline 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getline, getdelim \- delimited string input .SH LIBRARY @@ -13,18 +13,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "ssize_t getline(char **restrict " lineptr ", size_t *restrict " n , .BI " FILE *restrict " stream ); .BI "ssize_t getdelim(char **restrict " lineptr ", size_t *restrict " n , .BI " int " delim ", FILE *restrict " stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getline (), .BR getdelim (): .nf @@ -40,7 +40,7 @@ storing the address of the buffer containing the text into .IR *lineptr . The buffer is null-terminated and includes the newline character, if one was found. -.PP +.P If .I *lineptr is set to NULL before the call, then @@ -50,7 +50,7 @@ This buffer should be freed by the user program even if .BR getline () failed. -.PP +.P Alternatively, before calling .BR getline (), .I *lineptr @@ -68,13 +68,13 @@ updating and .I *n as necessary. -.PP +.P In either case, on a successful call, .I *lineptr and .I *n will be updated to reflect the buffer address and allocated size respectively. -.PP +.P .BR getdelim () works like .BR getline (), @@ -94,13 +94,13 @@ return the number of characters read, including the delimiter character, but not including the terminating null byte (\[aq]\e0\[aq]). This value can be used to handle embedded null bytes in the line read. -.PP +.P Both functions return \-1 on failure to read a line (including end-of-file condition). In the event of a failure, .I errno is set to indicate the error. -.PP +.P If .I *lineptr was set to NULL before the call, then the buffer should be freed by the @@ -133,7 +133,6 @@ T{ .BR getdelim () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/getloadavg.3 b/man3/getloadavg.3 index 5be1ab9..e328282 100644 --- a/man3/getloadavg.3 +++ b/man3/getloadavg.3 @@ -8,7 +8,7 @@ .\" .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" -.TH getloadavg 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getloadavg 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getloadavg \- get system load averages .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int getloadavg(double " loadavg[] ", int " nelem ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getloadavg (): .nf Since glibc 2.19: @@ -61,7 +61,6 @@ T{ .BR getloadavg () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY diff --git a/man3/getlogin.3 b/man3/getlogin.3 index 5b88d77..bdf8376 100644 --- a/man3/getlogin.3 +++ b/man3/getlogin.3 @@ -6,7 +6,7 @@ .\" Changed Tue Sep 19 01:49:29 1995, aeb: moved from man2 to man3 .\" added ref to /etc/utmp, added BUGS section, etc. .\" modified 2003 Walter Harms, aeb - added getlogin_r, note on stdin use -.TH getlogin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getlogin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getlogin, getlogin_r, cuserid \- get username .SH LIBRARY @@ -15,26 +15,26 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .B "char *getlogin(void);" .BI "int getlogin_r(char " buf [. bufsize "], size_t " bufsize ); -.PP +.P .B #include <stdio.h> -.PP +.P .BI "char *cuserid(char *" string ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getlogin_r (): .nf .\" Deprecated: _REENTRANT || _POSIX_C_SOURCE >= 199506L .fi -.PP +.P .BR cuserid (): .nf Since glibc 2.24: @@ -52,13 +52,13 @@ The string is statically allocated and might be overwritten on subsequent calls to this function or to .BR cuserid (). -.PP +.P .BR getlogin_r () returns this same username in the array .I buf of size .IR bufsize . -.PP +.P .BR cuserid () returns a pointer to a string containing a username associated with the effective user ID of the process. @@ -70,18 +70,18 @@ This string is statically allocated and might be overwritten on subsequent calls to this function or to .BR getlogin (). -.PP +.P The macro \fBL_cuserid\fP is an integer constant that indicates how long an array you might need to store a username. \fBL_cuserid\fP is declared in \fI<stdio.h>\fP. -.PP +.P These functions let your program identify positively the user who is running .RB ( cuserid ()) or the user who logged in this session .RB ( getlogin ()). (These can differ when set-user-ID programs are involved.) -.PP +.P For most purposes, it is more useful to use the environment variable \fBLOGNAME\fP to find out who the user is. This is more flexible @@ -111,7 +111,7 @@ The calling process has no controlling terminal. The length of the username, including the terminating null byte (\[aq]\e0\[aq]), is larger than .IR bufsize . -.PP +.P Linux/glibc also has: .TP .B ENOENT @@ -169,7 +169,7 @@ T} Thread safety T{ MT-Unsafe race:cuserid/!string locale T} .TE -.sp 1 +.P In the above table, .I utent in @@ -232,7 +232,7 @@ of our program need not be the user who started it. Avoid .BR getlogin () for security-related purposes. -.PP +.P Note that glibc does not follow the POSIX specification and uses .I stdin instead of @@ -242,7 +242,7 @@ A bug. all return the login name also when .I stdin is redirected.) -.PP +.P Nobody knows precisely what .BR cuserid () does; avoid it in portable programs. diff --git a/man3/getmntent.3 b/man3/getmntent.3 index 9bfa296..cf90b17 100644 --- a/man3/getmntent.3 +++ b/man3/getmntent.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 21:46:57 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 961109, 031115, aeb .\" -.TH getmntent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getmntent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r \- get filesystem descriptor file entry @@ -21,31 +21,31 @@ Standard C library .nf .B #include <stdio.h> .B #include <mntent.h> -.PP +.P .BI "FILE *setmntent(const char *" filename ", const char *" type ); -.PP +.P .BI "struct mntent *getmntent(FILE *" stream ); -.PP +.P .BI "int addmntent(FILE *restrict " stream , .BI " const struct mntent *restrict " mnt ); -.PP +.P .BI "int endmntent(FILE *" streamp ); -.PP +.P .BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt ); -.PP +.P /* GNU extension */ .B #include <mntent.h> -.PP +.P .BI "struct mntent *getmntent_r(FILE *restrict " streamp , .BI " struct mntent *restrict " mntbuf , .BI " char " buf "[restrict ." buflen "], int " buflen ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getmntent_r (): .nf Since glibc 2.19: @@ -58,7 +58,7 @@ These routines are used to access the filesystem description file .I /etc/fstab and the mounted filesystem description file .IR /etc/mtab . -.PP +.P The .BR setmntent () function opens the filesystem description file @@ -76,7 +76,7 @@ The returned stream should be closed using .BR endmntent () rather than .BR fclose (3). -.PP +.P The .BR getmntent () function reads the next line of the filesystem @@ -88,7 +88,7 @@ The pointer points to a static area of memory which is overwritten by subsequent calls to .BR getmntent (). -.PP +.P The .BR addmntent () function adds the @@ -98,13 +98,13 @@ structure to the end of the open .IR stream . -.PP +.P The .BR endmntent () function closes the .I stream associated with the filesystem description file. -.PP +.P The .BR hasmntopt () function scans the @@ -121,7 +121,7 @@ See and .BR mount (8) for valid mount options. -.PP +.P The reentrant .BR getmntent_r () function is similar to @@ -136,13 +136,13 @@ in the provided array .I buf of size .IR buflen . -.PP +.P The .I mntent structure is defined in .I <mntent.h> as follows: -.PP +.P .in +4n .EX struct mntent { @@ -155,7 +155,7 @@ struct mntent { }; .EE .in -.PP +.P Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space (\e040), tab (\e011), newline (\e012), and backslash (\e\e) in those files @@ -179,15 +179,15 @@ functions return a pointer to the .I mntent structure or NULL on failure. -.PP +.P The .BR addmntent () function returns 0 on success and 1 on failure. -.PP +.P The .BR endmntent () function always returns 1. -.PP +.P The .BR hasmntopt () function returns the address of the substring if @@ -238,7 +238,6 @@ T{ .BR getmntent_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -248,7 +247,7 @@ A routine was introduced in HP-UX 10, but it returns an .IR int . The prototype shown above is glibc-only. -.PP +.P System V also has a .BR getmntent () function but the calling sequence diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3 index 580a265..c1453ba 100644 --- a/man3/getnameinfo.3 +++ b/man3/getnameinfo.3 @@ -8,7 +8,7 @@ .\" 2004-12-14, mtk, Added EAI_OVERFLOW error .\" 2004-12-14 Fixed description of error return .\" -.TH getnameinfo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getnameinfo 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getnameinfo \- address-to-name translation in protocol-independent manner .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .B #include <sys/socket.h> .B #include <netdb.h> -.PP +.P .BI "int getnameinfo(const struct sockaddr *restrict " addr \ ", socklen_t " addrlen , .BI " char " host "[_Nullable restrict ." hostlen ], @@ -27,12 +27,12 @@ Standard C library .BI " socklen_t " servlen , .BI " int " flags ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getnameinfo (): .nf Since glibc 2.22: @@ -55,7 +55,7 @@ but unlike those functions, .BR getnameinfo () is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. -.PP +.P The .I addr argument is a pointer to a generic socket address structure @@ -78,7 +78,7 @@ respectively) into which .BR getnameinfo () places null-terminated strings containing the host and service names respectively. -.PP +.P The caller can specify that no hostname (or no service name) is required by providing a NULL .I host @@ -91,7 +91,7 @@ argument or a zero argument. However, at least one of hostname or service name must be requested. -.PP +.P The .I flags argument modifies the behavior of @@ -140,7 +140,9 @@ converted from IDN format to the locale's encoding if necessary. ASCII-only names are not affected by the conversion, which makes this flag usable in existing programs and environments. .TP -.BR NI_IDN_ALLOW_UNASSIGNED ", " NI_IDN_USE_STD3_ASCII_RULES +.B NI_IDN_ALLOW_UNASSIGNED +.TQ +.B NI_IDN_USE_STD3_ASCII_RULES Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 @@ -200,7 +202,7 @@ was too small. A system error occurred. The error code can be found in .IR errno . -.PP +.P The .BR gai_strerror (3) function translates these error codes to a human readable string, @@ -225,14 +227,13 @@ T{ .BR getnameinfo () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. RFC\ 2553. .SH HISTORY glibc 2.1. POSIX.1-2001. -.PP +.P Before glibc 2.2, the .I hostlen and @@ -244,14 +245,14 @@ In order to assist the programmer in choosing reasonable sizes for the supplied buffers, .I <netdb.h> defines the constants -.PP +.P .in +4n .EX #define NI_MAXHOST 1025 #define NI_MAXSERV 32 .EE .in -.PP +.P Since glibc 2.8, these definitions are exposed only if suitable feature test macros are defined, namely: @@ -262,7 +263,7 @@ or (in glibc versions up to and including 2.19) .B _BSD_SOURCE or .BR _SVID_SOURCE . -.PP +.P The former is the constant .B MAXDNAME in recent versions of BIND's @@ -275,7 +276,7 @@ The following code tries to get the numeric hostname and service name, for a given socket address. Note that there is no hardcoded reference to a particular address family. -.PP +.P .in +4n .EX struct sockaddr *addr; /* input */ @@ -287,10 +288,10 @@ if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), sbuf, printf("host=%s, serv=%s\en", hbuf, sbuf); .EE .in -.PP +.P The following version checks if the socket address has a reverse address mapping. -.PP +.P .in +4n .EX struct sockaddr *addr; /* input */ @@ -304,7 +305,7 @@ else printf("host=%s\en", hbuf); .EE .in -.PP +.P An example program using .BR getnameinfo () can be found in @@ -324,17 +325,17 @@ can be found in .BR services (5), .BR hostname (7), .BR named (8) -.PP +.P R.\& Gilligan, S.\& Thomson, J.\& Bound and W.\& Stevens, .IR "Basic Socket Interface Extensions for IPv6" , RFC\ 2553, March 1999. -.PP +.P Tatsuya Jinmei and Atsushi Onoe, .IR "An Extension of Format for IPv6 Scoped Addresses" , internet draft, work in progress .UR ftp://ftp.ietf.org\:/internet\-drafts\:/draft\-ietf\-ipngwg\-scopedaddr\-format\-02.txt .UE . -.PP +.P Craig Metz, .IR "Protocol Independence Using the Sockets API" , Proceedings of the freenix track: diff --git a/man3/getnetent.3 b/man3/getnetent.3 index 9a58458..4ec28e1 100644 --- a/man3/getnetent.3 +++ b/man3/getnetent.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 21:48:06 1993 by Rik Faith (faith@cs.unc.edu) -.TH getnetent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getnetent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \- get network entry @@ -18,12 +18,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .B struct netent *getnetent(void); -.PP +.P .BI "struct netent *getnetbyname(const char *" name ); .BI "struct netent *getnetbyaddr(uint32_t " net ", int " type ); -.PP +.P .BI "void setnetent(int " stayopen ); .B void endnetent(void); .fi @@ -36,7 +36,7 @@ and returns a structure containing the broken-out fields from the entry. A connection is opened to the database if necessary. -.PP +.P The .BR getnetbyname () function returns a @@ -45,7 +45,7 @@ structure for the entry from the database that matches the network .IR name . -.PP +.P The .BR getnetbyaddr () function returns a @@ -59,7 +59,7 @@ of type The .I net argument must be in host byte order. -.PP +.P The .BR setnetent () function opens a connection to the database, @@ -71,17 +71,17 @@ then the connection to the database will not be closed between calls to one of the .BR getnet* () functions. -.PP +.P The .BR endnetent () function closes the connection to the database. -.PP +.P The .I netent structure is defined in .I <netdb.h> as follows: -.PP +.P .in +4n .EX struct netent { @@ -92,7 +92,7 @@ struct netent { } .EE .in -.PP +.P The members of the .I netent structure are: @@ -174,7 +174,7 @@ MT-Unsafe race:netent env locale T} .TE -.sp 1 +.P In the above table, .I netent in @@ -190,7 +190,7 @@ then data races could occur. POSIX.1-2008. .SH HISTORY POSIX.1-2001, 4.3BSD. -.PP +.P Before glibc 2.2, the .I net argument of diff --git a/man3/getnetent_r.3 b/man3/getnetent_r.3 index eda9652..fabb4c5 100644 --- a/man3/getnetent_r.3 +++ b/man3/getnetent_r.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getnetent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getnetent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getnetent_r, getnetbyname_r, getnetbyaddr_r \- get network entry (reentrant) @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "int getnetent_r(struct netent *restrict " result_buf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct netent **restrict " result , @@ -29,13 +29,13 @@ Standard C library .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct netent **restrict " result , .BI " int *restrict " h_errnop ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getnetent_r (), .BR getnetbyname_r (), .BR getnetbyaddr_r (): @@ -62,13 +62,13 @@ structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions. -.PP +.P Instead of returning a pointer to a statically allocated .I netent structure as the function result, these functions copy the structure into the location pointed to by .IR result_buf . -.PP +.P The .I buf array is used to store the string fields pointed to by the returned @@ -85,7 +85,7 @@ and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.) .\" I can find no information on the required/recommended buffer size; .\" the nonreentrant functions use a 1024 byte buffer -- mtk. -.PP +.P If the function call successfully obtains a network record, then .I *result is set pointing to @@ -93,7 +93,7 @@ is set pointing to otherwise, .I *result is set to NULL. -.PP +.P The buffer pointed to by .I h_errnop is used to return the value that would be stored in the global variable @@ -104,7 +104,7 @@ by the nonreentrant versions of these functions. .SH RETURN VALUE On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS. -.PP +.P On error, record not found .RB ( getnetbyname_r (), .BR getnetbyaddr_r ()), @@ -140,7 +140,6 @@ T{ .BR getnetbyaddr_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS Functions with similar names exist on some other systems, though typically with different calling signatures. diff --git a/man3/getopt.3 b/man3/getopt.3 index 88fd167..71c3675 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -20,7 +20,7 @@ .\" the start of optstring .\" Modified 2006-12-15, mtk, Added getopt() example program. .\" -.TH getopt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getopt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt \- Parse command-line options @@ -30,15 +30,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int getopt(int " argc ", char *" argv [], .BI " const char *" optstring ); -.PP +.P .BI "extern char *" optarg ; .BI "extern int " optind ", " opterr ", " optopt ; -.PP +.P .B #include <getopt.h> -.PP +.P .BI "int getopt_long(int " argc ", char *" argv [], .BI " const char *" optstring , .BI " const struct option *" longopts ", int *" longindex ); @@ -46,17 +46,17 @@ Standard C library .BI " const char *" optstring , .BI " const struct option *" longopts ", int *" longindex ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getopt (): .nf _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE .fi -.PP +.P .BR getopt_long (), .BR getopt_long_only (): .nf @@ -82,7 +82,7 @@ If .BR getopt () is called repeatedly, it returns successively each of the option characters from each of the option elements. -.PP +.P The variable .I optind is the index of the next element to be processed in @@ -91,7 +91,7 @@ The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same .IR argv , or when scanning a new argument vector. -.PP +.P If .BR getopt () finds another option character, it returns that @@ -101,13 +101,13 @@ variable \fInextchar\fP so that the next call to can resume the scan with the following option character or \fIargv\fP-element. -.PP +.P If there are no more option characters, .BR getopt () returns \-1. Then \fIoptind\fP is the index in \fIargv\fP of the first \fIargv\fP-element that is not an option. -.PP +.P .I optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte @@ -139,7 +139,7 @@ is treated as the long option option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2. -.PP +.P By default, .BR getopt () permutes the contents of \fIargv\fP as it @@ -166,7 +166,7 @@ written to expect options and other \fIargv\fP-elements in any order and that care about the ordering of the two.) The special argument "\-\-" forces an end of option-scanning regardless of the scanning mode. -.PP +.P While processing the option list, .BR getopt () can detect two kinds of errors: @@ -220,14 +220,14 @@ may take a parameter, of the form .B \-\-arg=param or .BR "\-\-arg param" . -.PP +.P .I longopts is a pointer to the first element of an array of .I struct option declared in .I <getopt.h> as -.PP +.P .in +4n .EX struct option { @@ -238,7 +238,7 @@ struct option { }; .EE .in -.PP +.P The meanings of the different fields are: .TP .I name @@ -267,13 +267,13 @@ option is found, but left unchanged if the option is not found. \fIval\fP is the value to return, or to load into the variable pointed to by \fIflag\fP. -.PP +.P The last element of the array has to be filled with zeros. -.PP +.P If \fIlongindex\fP is not NULL, it points to a variable which is set to the index of the long option relative to .IR longopts . -.PP +.P .BR getopt_long_only () is like .BR getopt_long (), @@ -301,7 +301,7 @@ then the return value depends on the first character in .IR optstring : if it is \[aq]:\[aq], then \[aq]:\[aq] is returned; otherwise \[aq]?\[aq] is returned. -.PP +.P .BR getopt_long () and .BR getopt_long_only () @@ -347,7 +347,6 @@ T} Thread safety T{ MT-Unsafe race:getopt env T} .TE -.sp 1 .SH VERSIONS POSIX specifies that the .I argv @@ -378,7 +377,7 @@ is a GNU extension. .TP .BR getopt () POSIX.1-2001, and POSIX.2. -.PP +.P On some older implementations, .BR getopt () was declared in @@ -411,7 +410,7 @@ routine that rechecks .B POSIXLY_CORRECT and checks for GNU extensions in .IR optstring .) -.PP +.P Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument @@ -438,7 +437,7 @@ to handle two program options: with no associated value; and .IR "\-t val" , which expects an associated value. -.PP +.P .\" SRC BEGIN (getopt.c) .EX #include <stdio.h> @@ -490,7 +489,7 @@ main(int argc, char *argv[]) The following example program illustrates the use of .BR getopt_long () with most of its features. -.PP +.P .\" SRC BEGIN (getopt_long.c) .EX #include <getopt.h> diff --git a/man3/getpass.3 b/man3/getpass.3 index 359ebd4..40420c9 100644 --- a/man3/getpass.3 +++ b/man3/getpass.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH getpass 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpass 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpass \- get a password .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "[[deprecated]] char *getpass(const char *" prompt ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getpass (): .nf Since glibc 2.2.2: @@ -39,7 +39,7 @@ see the description of the .I ECHO flag in .BR termios (3). -.PP +.P The .BR getpass () function opens @@ -81,7 +81,6 @@ T{ .BR getpass () T} Thread safety MT-Unsafe term .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -113,7 +112,7 @@ You should use instead .BR readpassphrase (3bsd), provided by .IR libbsd . -.PP +.P In the GNU C library implementation, if .I /dev/tty cannot be opened, the prompt is written to @@ -122,7 +121,7 @@ and the password is read from .IR stdin . There is no limit on the length of the password. Line editing is not disabled. -.PP +.P According to SUSv2, the value of .B PASS_MAX must be defined in diff --git a/man3/getprotoent.3 b/man3/getprotoent.3 index 8aad2d3..1eb9773 100644 --- a/man3/getprotoent.3 +++ b/man3/getprotoent.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:26:03 1993 by Rik Faith (faith@cs.unc.edu) -.TH getprotoent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getprotoent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent \- get protocol entry @@ -18,12 +18,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .B struct protoent *getprotoent(void); -.PP +.P .BI "struct protoent *getprotobyname(const char *" name ); .BI "struct protoent *getprotobynumber(int " proto ); -.PP +.P .BI "void setprotoent(int " stayopen ); .B void endprotoent(void); .fi @@ -37,7 +37,7 @@ and returns a structure containing the broken-out fields from the entry. A connection is opened to the database if necessary. -.PP +.P The .BR getprotobyname () function returns a @@ -47,7 +47,7 @@ for the entry from the database that matches the protocol name .IR name . A connection is opened to the database if necessary. -.PP +.P The .BR getprotobynumber () function returns a @@ -57,7 +57,7 @@ for the entry from the database that matches the protocol number .IR number . A connection is opened to the database if necessary. -.PP +.P The .BR setprotoent () function opens a connection to the database, @@ -69,17 +69,17 @@ then the connection to the database will not be closed between calls to one of the .BR getproto* () functions. -.PP +.P The .BR endprotoent () function closes the connection to the database. -.PP +.P The .I protoent structure is defined in .I <netdb.h> as follows: -.PP +.P .in +4n .EX struct protoent { @@ -89,7 +89,7 @@ struct protoent { } .EE .in -.PP +.P The members of the .I protoent structure are: @@ -169,7 +169,7 @@ MT-Unsafe race:protoent locale T} .TE -.sp 1 +.P In the above table, .I protoent in diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3 index 5028e4f..d802b4c 100644 --- a/man3/getprotoent_r.3 +++ b/man3/getprotoent_r.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getprotoent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getprotoent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getprotoent_r, getprotobyname_r, getprotobynumber_r \- get protocol entry (reentrant) @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "int getprotoent_r(struct protoent *restrict " result_buf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct protoent **restrict " result ); @@ -26,13 +26,13 @@ Standard C library .BI " struct protoent *restrict " result_buf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct protoent **restrict " result ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getprotoent_r (), .BR getprotobyname_r (), .BR getprotobynumber_r (): @@ -59,13 +59,13 @@ structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions. -.PP +.P Instead of returning a pointer to a statically allocated .I protoent structure as the function result, these functions copy the structure into the location pointed to by .IR result_buf . -.PP +.P The .I buf array is used to store the string fields pointed to by the returned @@ -83,7 +83,7 @@ and the caller must try again with a larger buffer. .\" I can find no information on the required/recommended buffer size; .\" the nonreentrant functions use a 1024 byte buffer. .\" The 1024 byte value is also what the Solaris man page suggests. -- mtk -.PP +.P If the function call successfully obtains a protocol record, then .I *result is set pointing to @@ -94,7 +94,7 @@ is set to NULL. .SH RETURN VALUE On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS. -.PP +.P On error, record not found .RB ( getprotobyname_r (), .BR getprotobynumber_r ()), @@ -130,7 +130,6 @@ T{ .BR getprotobynumber_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS Functions with similar names exist on some other systems, though typically with different calling signatures. @@ -150,7 +149,7 @@ fails with the error .BR ERANGE , the program retries with larger buffer sizes. The following shell session shows a couple of sample runs: -.PP +.P .in +4n .EX .RB "$" " ./a.out tcp 1" diff --git a/man3/getpt.3 b/man3/getpt.3 index 6434f90..fa6cd1c 100644 --- a/man3/getpt.3 +++ b/man3/getpt.3 @@ -5,7 +5,7 @@ .\" Redistribute and modify at will. .\" %%%LICENSE_END .\" -.TH getpt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpt \- open a new pseudoterminal master .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <stdlib.h> -.PP +.P .B "int getpt(void);" .fi .SH DESCRIPTION @@ -23,13 +23,13 @@ Standard C library opens a new pseudoterminal device and returns a file descriptor that refers to that device. It is equivalent to opening the pseudoterminal multiplexor device -.PP +.P .in +4n .EX open("/dev/ptmx", O_RDWR); .EE .in -.PP +.P on Linux systems, though the pseudoterminal multiplexor device is located elsewhere on some systems that use the GNU C library. .SH RETURN VALUE @@ -57,7 +57,6 @@ T{ .BR getpt () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Use .BR posix_openpt (3) diff --git a/man3/getpw.3 b/man3/getpw.3 index b94e117..70b53ec 100644 --- a/man3/getpw.3 +++ b/man3/getpw.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 19:23:25 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de) .\" -.TH getpw 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpw 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpw \- reconstruct password line entry .SH LIBRARY @@ -21,7 +21,7 @@ Standard C library .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <sys/types.h> .B #include <pwd.h> -.PP +.P .BI "[[deprecated]] int getpw(uid_t " uid ", char *" buf ); .fi .SH DESCRIPTION @@ -30,15 +30,15 @@ The function reconstructs the password line entry for the given user ID \fIuid\fP in the buffer \fIbuf\fP. The returned buffer contains a line of format -.PP +.P .in +4n .EX .B name:passwd:uid:gid:gecos:dir:shell .EE .in -.PP +.P The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: -.PP +.P .in +4n .EX struct passwd { @@ -52,7 +52,7 @@ struct passwd { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR passwd (5). .SH RETURN VALUE @@ -61,7 +61,7 @@ The function returns 0 on success; on error, it returns \-1, and .I errno is set to indicate the error. -.PP +.P If .I uid is not found in the password database, @@ -103,7 +103,6 @@ T{ .BR getpw () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/getpwent.3 b/man3/getpwent.3 index c46af20..cd8ba99 100644 --- a/man3/getpwent.3 +++ b/man3/getpwent.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 19:22:14 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de) .\" -.TH getpwent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpwent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpwent, setpwent, endpwent \- get password file entry .SH LIBRARY @@ -21,17 +21,17 @@ Standard C library .nf .B #include <sys/types.h> .B #include <pwd.h> -.PP +.P .B struct passwd *getpwent(void); .B void setpwent(void); .B void endpwent(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getpwent (), .BR setpwent (), .BR endpwent (): @@ -53,19 +53,19 @@ The first time .BR getpwent () is called, it returns the first entry; thereafter, it returns successive entries. -.PP +.P The .BR setpwent () function rewinds to the beginning of the password database. -.PP +.P The .BR endpwent () function is used to close the password database after all processing has been performed. -.PP +.P The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: -.PP +.P .in +4n .EX struct passwd { @@ -79,7 +79,7 @@ struct passwd { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR passwd (5). .SH RETURN VALUE @@ -95,7 +95,7 @@ is set to indicate the error. If one wants to check .I errno after the call, it should be set to zero before the call. -.PP +.P The return value may point to a static area, and may be overwritten by subsequent calls to .BR getpwent (), @@ -161,7 +161,7 @@ T} Thread safety T{ MT-Unsafe race:pwent locale T} .TE -.sp 1 +.P In the above table, .I pwent in diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 1cefc57..6b4b34a 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH getpwent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpwent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpwent_r, fgetpwent_r \- get passwd file entry reentrantly .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <pwd.h> -.PP +.P .BI "int getpwent_r(struct passwd *restrict " pwbuf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct passwd **restrict " pwbufp ); @@ -21,12 +21,12 @@ Standard C library .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct passwd **restrict " pwbufp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getpwent_r (), .nf Since glibc 2.19: @@ -34,7 +34,7 @@ Feature Test Macro Requirements for glibc (see glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR fgetpwent_r (): .nf Since glibc 2.19: @@ -55,11 +55,11 @@ The former reads the next passwd entry from the stream initialized by .BR setpwent (3). The latter reads the next passwd entry from .IR stream . -.PP +.P The \fIpasswd\fP structure is defined in .I <pwd.h> as follows: -.PP +.P .in +4n .EX struct passwd { @@ -73,10 +73,10 @@ struct passwd { }; .EE .in -.PP +.P For more information about the fields of this structure, see .BR passwd (5). -.PP +.P The nonreentrant functions return a pointer to static storage, where this static storage contains further pointers to user name, password, gecos field, home directory and shell. @@ -133,7 +133,7 @@ T{ .BR fgetpwent_r () T} Thread safety MT-Safe .TE -.sp 1 +.P In the above table, .I pwent in @@ -148,16 +148,16 @@ are used in parallel in different threads of a program, then data races could occur. .SH VERSIONS Other systems use the prototype -.PP +.P .in +4n .EX struct passwd * getpwent_r(struct passwd *pwd, char *buf, int buflen); .EE .in -.PP +.P or, better, -.PP +.P .in +4n .EX int diff --git a/man3/getpwnam.3 b/man3/getpwnam.3 index 3e6af83..424ee55 100644 --- a/man3/getpwnam.3 +++ b/man3/getpwnam.3 @@ -15,7 +15,7 @@ .\" Modified 2003-11-15 by aeb .\" 2008-11-07, mtk, Added an example program for getpwnam_r(). .\" -.TH getpwnam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getpwnam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getpwnam, getpwnam_r, getpwuid, getpwuid_r \- get password file entry .SH LIBRARY @@ -25,10 +25,10 @@ Standard C library .nf .B #include <sys/types.h> .B #include <pwd.h> -.PP +.P .BI "struct passwd *getpwnam(const char *" name ); .BI "struct passwd *getpwuid(uid_t " uid ); -.PP +.P .BI "int getpwnam_r(const char *restrict " name ", \ struct passwd *restrict " pwd , .BI " char " buf "[restrict ." buflen "], size_t " buflen , @@ -37,12 +37,12 @@ struct passwd *restrict " pwd , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct passwd **restrict " result ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getpwnam_r (), .BR getpwuid_r (): .nf @@ -59,16 +59,16 @@ the broken-out fields of the record in the password database NIS, and LDAP) that matches the username .IR name . -.PP +.P The .BR getpwuid () function returns a pointer to a structure containing the broken-out fields of the record in the password database that matches the user ID .IR uid . -.PP +.P The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: -.PP +.P .in +4n .EX struct passwd { @@ -82,11 +82,11 @@ struct passwd { }; .EE .in -.PP +.P See .BR passwd (5) for more information about these fields. -.PP +.P The .BR getpwnam_r () and @@ -108,15 +108,15 @@ of size A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in .IR *result . -.PP +.P The call -.PP +.P .in +4n .EX sysconf(_SC_GETPW_R_SIZE_MAX) .EE .in -.PP +.P returns either \-1, without changing .IR errno , or an initial suggested size for @@ -140,7 +140,7 @@ is set to indicate the error. If one wants to check .I errno after the call, it should be set to zero before the call. -.PP +.P The return value may point to a static area, and may be overwritten by subsequent calls to .BR getpwent (3), @@ -149,7 +149,7 @@ or .BR getpwuid (). (Do not pass the returned pointer to .BR free (3).) -.PP +.P On success, .BR getpwnam_r () and @@ -235,7 +235,6 @@ T} Thread safety T{ MT-Safe locale T} .TE -.sp 1 .SH VERSIONS The .I pw_gecos @@ -265,7 +264,7 @@ situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others. .\" FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM .\" SunOS 5.8 - gives EBADF .\" Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0 -.PP +.P The .I pw_dir field contains the name of the initial working directory of the user. @@ -288,7 +287,7 @@ The program below demonstrates the use of .BR getpwnam_r () to find the full username and user ID for the username supplied as a command-line argument. -.PP +.P .\" SRC BEGIN (getpwnam.c) .EX #include <errno.h> diff --git a/man3/getrpcent.3 b/man3/getrpcent.3 index be94a0e..253b7ca 100644 --- a/man3/getrpcent.3 +++ b/man3/getrpcent.3 @@ -6,7 +6,7 @@ .\" %%%LICENSE_END .\" .\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI -.TH getrpcent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getrpcent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- get RPC entry @@ -16,12 +16,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .B struct rpcent *getrpcent(void); -.PP +.P .BI "struct rpcent *getrpcbyname(const char *" name ); .BI "struct rpcent *getrpcbynumber(int " number ); -.PP +.P .BI "void setrpcent(int " stayopen ); .B void endrpcent(void); .fi @@ -34,7 +34,7 @@ and functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program number data base. -.PP +.P .in +4n .EX struct rpcent { @@ -44,7 +44,7 @@ struct rpcent { }; .EE .in -.PP +.P The members of this structure are: .TP .I r_name @@ -55,12 +55,12 @@ A NULL-terminated list of alternate names for the RPC program. .TP .I r_number The RPC program number for this service. -.PP +.P The .BR getrpcent () function reads the next entry from the database. A connection is opened to the database if necessary. -.PP +.P The .BR setrpcent () function opens a connection to the database, @@ -72,11 +72,11 @@ then the connection to the database will not be closed between calls to one of the .BR getrpc* () functions. -.PP +.P The .BR endrpcent () function closes the connection to the database. -.PP +.P The .BR getrpcbyname () and @@ -120,7 +120,6 @@ T{ .BR endrpcent () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY diff --git a/man3/getrpcent_r.3 b/man3/getrpcent_r.3 index fd58a9f..c33f3b6 100644 --- a/man3/getrpcent_r.3 +++ b/man3/getrpcent_r.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getrpcent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getrpcent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- get RPC entry (reentrant) @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "int getrpcent_r(struct rpcent *" result_buf ", char " buf [. buflen ], .BI " size_t " buflen ", struct rpcent **" result ); .BI "int getrpcbyname_r(const char *" name , @@ -23,13 +23,13 @@ Standard C library .BI "int getrpcbynumber_r(int " number , .BI " struct rpcent *" result_buf ", char " buf [. buflen ], .BI " size_t " buflen ", struct rpcent **" result ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getrpcent_r (), .BR getrpcbyname_r (), .BR getrpcbynumber_r (): @@ -56,13 +56,13 @@ structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions. -.PP +.P Instead of returning a pointer to a statically allocated .I rpcent structure as the function result, these functions copy the structure into the location pointed to by .IR result_buf . -.PP +.P The .I buf array is used to store the string fields pointed to by the returned @@ -79,7 +79,7 @@ and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.) .\" I can find no information on the required/recommended buffer size; .\" the nonreentrant functions use a 1024 byte buffer -- mtk. -.PP +.P If the function call successfully obtains an RPC record, then .I *result is set pointing to @@ -90,7 +90,7 @@ is set to NULL. .SH RETURN VALUE On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS. -.PP +.P On error, record not found .RB ( getrpcbyname_r (), .BR getrpcbynumber_r ()), @@ -126,7 +126,6 @@ T{ .BR getrpcbynumber_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS Functions with similar names exist on some other systems, though typically with different calling signatures. diff --git a/man3/getrpcport.3 b/man3/getrpcport.3 index 56b6188..aa7623c 100644 --- a/man3/getrpcport.3 +++ b/man3/getrpcport.3 @@ -6,7 +6,7 @@ .\" %%%LICENSE_END .\" .\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI -.TH getrpcport 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getrpcport 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getrpcport \- get RPC port number .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <rpc/rpc.h>" -.PP +.P .BI "int getrpcport(const char *" host ", unsigned long " prognum , .BI " unsigned long " versnum ", unsigned int " proto ); .fi @@ -53,7 +53,6 @@ T{ .BR getrpcport () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY diff --git a/man3/gets.3 b/man3/gets.3 index 9bf383a..e0cb43b 100644 --- a/man3/gets.3 +++ b/man3/gets.3 @@ -7,7 +7,7 @@ .\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl) .\" Modified 2013-12-31, David Malcolm <dmalcolm@redhat.com> .\" Split gets(3) into its own page; fgetc() et al. move to fgetc(3) -.TH gets 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gets 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gets \- get a string from standard input (DEPRECATED) .SH LIBRARY @@ -16,12 +16,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "[[deprecated]] char *gets(char *" "s" ); .fi .SH DESCRIPTION .IR "Never use this function" . -.PP +.P .BR gets () reads a line from .I stdin @@ -53,12 +53,11 @@ T{ .BR gets () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY C89, POSIX.1-2001. -.PP +.P LSB deprecates .BR gets (). POSIX.1-2008 marks @@ -84,7 +83,7 @@ It has been used to break computer security. Use .BR fgets () instead. -.PP +.P For more information, see CWE-242 (aka "Use of Inherently Dangerous Function") at http://cwe.mitre.org/data/definitions/242.html diff --git a/man3/getservent.3 b/man3/getservent.3 index fdd5d91..ce650aa 100644 --- a/man3/getservent.3 +++ b/man3/getservent.3 @@ -12,7 +12,7 @@ .\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze <joey@infodrom.north.de> .\" 2001-07-25 added a clause about NULL proto (Martin Michlmayr or David N. Welton) .\" -.TH getservent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getservent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getservent, getservbyname, getservbyport, setservent, endservent \- get service entry @@ -22,12 +22,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .B struct servent *getservent(void); -.PP +.P .BI "struct servent *getservbyname(const char *" name ", const char *" proto ); .BI "struct servent *getservbyport(int " port ", const char *" proto ); -.PP +.P .BI "void setservent(int " stayopen ); .B void endservent(void); .fi @@ -41,7 +41,7 @@ and returns a structure containing the broken-out fields from the entry. A connection is opened to the database if necessary. -.PP +.P The .BR getservbyname () function returns a @@ -56,7 +56,7 @@ If .I proto is NULL, any protocol will be matched. A connection is opened to the database if necessary. -.PP +.P The .BR getservbyport () function returns a @@ -72,7 +72,7 @@ If .I proto is NULL, any protocol will be matched. A connection is opened to the database if necessary. -.PP +.P The .BR setservent () function opens a connection to the database, @@ -84,17 +84,17 @@ then the connection to the database will not be closed between calls to one of the .BR getserv* () functions. -.PP +.P The .BR endservent () function closes the connection to the database. -.PP +.P The .I servent structure is defined in .I <netdb.h> as follows: -.PP +.P .in +4n .EX struct servent { @@ -105,7 +105,7 @@ struct servent { } .EE .in -.PP +.P The members of the .I servent structure are: @@ -186,7 +186,7 @@ MT-Unsafe race:servent locale T} .TE -.sp 1 +.P In the above table, .I servent in diff --git a/man3/getservent_r.3 b/man3/getservent_r.3 index 04397ee..76c42f3 100644 --- a/man3/getservent_r.3 +++ b/man3/getservent_r.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getservent_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getservent_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getservent_r, getservbyname_r, getservbyport_r \- get service entry (reentrant) @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "int getservent_r(struct servent *restrict " result_buf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct servent **restrict " result ); @@ -28,13 +28,13 @@ Standard C library .BI " struct servent *restrict " result_buf , .BI " char " buf "[restrict ." buflen "], size_t " buflen , .BI " struct servent **restrict " result ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getservent_r (), .BR getservbyname_r (), .BR getservbyport_r (): @@ -61,13 +61,13 @@ structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions. -.PP +.P Instead of returning a pointer to a statically allocated .I servent structure as the function result, these functions copy the structure into the location pointed to by .IR result_buf . -.PP +.P The .I buf array is used to store the string fields pointed to by the returned @@ -84,7 +84,7 @@ and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.) .\" I can find no information on the required/recommended buffer size; .\" the nonreentrant functions use a 1024 byte buffer -- mtk. -.PP +.P If the function call successfully obtains a service record, then .I *result is set pointing to @@ -95,7 +95,7 @@ is set to NULL. .SH RETURN VALUE On success, these functions return 0. On error, they return one of the positive error numbers listed in errors. -.PP +.P On error, record not found .RB ( getservbyname_r (), .BR getservbyport_r ()), @@ -131,7 +131,6 @@ T{ .BR getservbyport_r () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS Functions with similar names exist on some other systems, though typically with different calling signatures. @@ -151,7 +150,7 @@ fails with the error .BR ERANGE , the program retries with larger buffer sizes. The following shell session shows a couple of sample runs: -.PP +.P .in +4n .EX .RB "$" " ./a.out 7 tcp 1" diff --git a/man3/getspnam.3 b/man3/getspnam.3 index f0752cb..d3f9626 100644 --- a/man3/getspnam.3 +++ b/man3/getspnam.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH getspnam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getspnam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent, @@ -16,31 +16,31 @@ Standard C library .nf /* General shadow password file API */ .B #include <shadow.h> -.PP +.P .BI "struct spwd *getspnam(const char *" name ); .B struct spwd *getspent(void); -.PP +.P .B void setspent(void); .B void endspent(void); -.PP +.P .BI "struct spwd *fgetspent(FILE *" stream ); .BI "struct spwd *sgetspent(const char *" s ); -.PP +.P .BI "int putspent(const struct spwd *" p ", FILE *" stream ); -.PP +.P .B int lckpwdf(void); .B int ulckpwdf(void); -.PP +.P /* GNU extension */ .B #include <shadow.h> -.PP +.P .BI "int getspent_r(struct spwd *" spbuf , .BI " char " buf [. buflen "], size_t " buflen ", \ struct spwd **" spbufp ); .BI "int getspnam_r(const char *" name ", struct spwd *" spbuf , .BI " char " buf [. buflen "], size_t " buflen ", \ struct spwd **" spbufp ); -.PP +.P .BI "int fgetspent_r(FILE *" stream ", struct spwd *" spbuf , .BI " char " buf [. buflen "], size_t " buflen ", \ struct spwd **" spbufp ); @@ -48,12 +48,12 @@ struct spwd **" spbufp ); .BI " char " buf [. buflen "], size_t " buflen ", \ struct spwd **" spbufp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getspent_r (), .BR getspnam_r (), .BR fgetspent_r (), @@ -76,7 +76,7 @@ the shadow password database .IR /etc/shadow , NIS, and LDAP), readable only by root. -.PP +.P The functions described below resemble those for the traditional password database (e.g., see @@ -93,14 +93,14 @@ and .\" (pluggable authentication modules), and the file .\" .I /etc/nsswitch.conf .\" now describes the sources to be used. -.PP +.P The .BR getspnam () function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username .IR name . -.PP +.P The .BR getspent () function returns a pointer to the next entry in the shadow password @@ -112,21 +112,21 @@ When done reading, the program may call so that resources can be deallocated. .\" some systems require a call of setspent() before the first getspent() .\" glibc does not -.PP +.P The .BR fgetspent () function is similar to .BR getspent () but uses the supplied stream instead of the one implicitly opened by .BR setspent (). -.PP +.P The .BR sgetspent () function parses the supplied string .I s into a struct .IR spwd . -.PP +.P The .BR putspent () function writes the contents of the supplied struct @@ -136,7 +136,7 @@ as a text line in the shadow password file format to .IR stream . String entries with value NULL and numerical entries with value \-1 are written as an empty string. -.PP +.P The .BR lckpwdf () function is intended to protect against multiple simultaneous accesses @@ -151,7 +151,7 @@ password file. Only programs that use .BR lckpwdf () will notice the lock. -.PP +.P These were the functions that formed the original shadow API. They are widely available. .\" Also in libc5 @@ -173,20 +173,20 @@ of size A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in .IR *spbufp . -.PP +.P The functions .BR getspent_r (), .BR fgetspent_r (), and .BR sgetspent_r () are similarly analogous to their nonreentrant counterparts. -.PP +.P Some non-glibc systems also have functions with these names, often with different prototypes. .\" SUN doesn't have sgetspent_r() .SS Structure The shadow password structure is defined in \fI<shadow.h>\fP as follows: -.PP +.P .in +4n .EX struct spwd { @@ -215,10 +215,10 @@ The functions which have \fIint\fP as the return value return 0 for success and \-1 for failure, with .I errno set to indicate the error. -.PP +.P For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions. -.PP +.P The reentrant functions return zero on success. In case of error, an error number is returned. .SH ERRORS @@ -235,7 +235,7 @@ local shadow password database file .TP .I /etc/.pwd.lock lock file -.PP +.P The include file .I <paths.h> defines the constant @@ -320,7 +320,7 @@ T} Thread safety T{ MT-Safe T} .TE -.sp 1 +.P In the above table, .I getspent in diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index 8cbccb0..caf03a2 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -23,7 +23,7 @@ .\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" %%%LICENSE_END .\" -.TH getsubopt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getsubopt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getsubopt \- parse suboption arguments from a string .SH LIBRARY @@ -32,16 +32,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int getsubopt(char **restrict " optionp ", char *const *restrict " tokens , .BI " char **restrict " valuep ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getsubopt (): .nf _XOPEN_SOURCE >= 500 @@ -62,13 +62,13 @@ which is separated from the suboption name by an equal sign. The following is an example of the kind of string that might be passed in .IR optionp : -.PP +.P .in +4n .EX .B ro,name=xyz .EE .in -.PP +.P The .I tokens argument is a pointer to a NULL-terminated array of pointers to the tokens that @@ -77,7 +77,7 @@ will look for in .IR optionp . The tokens should be distinct, null-terminated strings containing at least one character, with no embedded equal signs or commas. -.PP +.P Each call to .BR getsubopt () returns information about the next unprocessed suboption in @@ -98,11 +98,11 @@ The first comma in is overwritten with a null byte, so .I *valuep is precisely the "value string" for that suboption. -.PP +.P If the suboption is recognized, but no value string was found, .I *valuep is set to NULL. -.PP +.P When .BR getsubopt () returns, @@ -122,7 +122,7 @@ Otherwise, \-1 is returned and is the entire .IB name [= value ] string. -.PP +.P Since .I *optionp is changed, the first suboption before the call to @@ -143,7 +143,6 @@ T{ .BR getsubopt () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -156,7 +155,7 @@ overwrites any commas it finds in the string that string must be writable; it cannot be a string constant. .SH EXAMPLES The following program expects suboptions following a "\-o" option. -.PP +.P .\" SRC BEGIN (getsubopt.c) .EX #define _XOPEN_SOURCE 500 diff --git a/man3/getttyent.3 b/man3/getttyent.3 index 81c4c4c..aeb87ac 100644 --- a/man3/getttyent.3 +++ b/man3/getttyent.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH getttyent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getttyent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getttyent, getttynam, setttyent, endttyent \- get ttys file entry .SH LIBRARY @@ -12,10 +12,10 @@ Standard C library .SH SYNOPSIS .nf .B "#include <ttyent.h>" -.PP +.P .B "struct ttyent *getttyent(void);" .BI "struct ttyent *getttynam(const char *" name ); -.PP +.P .B "int setttyent(void);" .B "int endttyent(void);" .fi @@ -24,22 +24,22 @@ These functions provide an interface to the file .B _PATH_TTYS (e.g., .IR /etc/ttys ). -.PP +.P The function .BR setttyent () opens the file or rewinds it if already open. -.PP +.P The function .BR endttyent () closes the file. -.PP +.P The function .BR getttynam () searches for a given terminal name in the file. It returns a pointer to a .I ttyent structure (description below). -.PP +.P The function .BR getttyent () opens the file @@ -49,7 +49,7 @@ If the file is already open, the next entry. The .I ttyent structure has the form: -.PP +.P .in +4n .EX struct ttyent { @@ -62,10 +62,10 @@ struct ttyent { }; .EE .in -.PP +.P .I ty_status can be: -.PP +.P .in +4n .EX #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ @@ -89,7 +89,6 @@ T{ .BR getttynam () T} Thread safety MT-Unsafe race:ttyent .TE -.sp 1 .SH STANDARDS BSD. .SH NOTES diff --git a/man3/getusershell.3 b/man3/getusershell.3 index cbd1d1a..41c5a68 100644 --- a/man3/getusershell.3 +++ b/man3/getusershell.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu) -.TH getusershell 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getusershell 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getusershell, setusershell, endusershell \- get permitted user shells .SH LIBRARY @@ -17,17 +17,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .B char *getusershell(void); .B void setusershell(void); .B void endusershell(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getusershell (), .BR setusershell (), .BR endusershell (): @@ -58,12 +58,12 @@ behaves as if and .I /bin/csh were listed in the file. -.PP +.P The .BR setusershell () function rewinds .IR /etc/shells . -.PP +.P The .BR endusershell () function closes @@ -90,7 +90,6 @@ T{ .BR endusershell () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/getutent.3 b/man3/getutent.3 index d2aefcf..f55286f 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -10,7 +10,7 @@ .\" Modified Thu Jul 25 14:43:46 MET DST 1996 by Michael Haardt .\" <michael@cantor.informatik.rwth-aachen.de> .\" -.TH getutent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getutent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getutent, getutid, getutline, pututline, setutent, endutent, utmpname \- access utmp file entries @@ -20,22 +20,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <utmp.h> -.PP +.P .B struct utmp *getutent(void); .BI "struct utmp *getutid(const struct utmp *" ut ); .BI "struct utmp *getutline(const struct utmp *" ut ); -.PP +.P .BI "struct utmp *pututline(const struct utmp *" ut ); -.PP +.P .B void setutent(void); .B void endutent(void); -.PP +.P .BI "int utmpname(const char *" file ); .fi .SH DESCRIPTION New applications should use the POSIX.1-specified "utmpx" versions of these functions; see STANDARDS. -.PP +.P .BR utmpname () sets the name of the utmp-format file for the other utmp functions to access. @@ -44,24 +44,24 @@ If is not used to set the filename before the other functions are used, they assume \fB_PATH_UTMP\fP, as defined in \fI<paths.h>\fP. -.PP +.P .BR setutent () rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions. -.PP +.P .BR endutent () closes the utmp file. It should be called when the user code is done accessing the file with the other functions. -.PP +.P .BR getutent () reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in .BR utmp (5). -.PP +.P .BR getutid () searches forward from the current file position in the utmp file based upon \fIut\fP. @@ -77,7 +77,7 @@ will find the first entry whose .I ut_id field matches \fIut\->ut_id\fP. -.PP +.P .BR getutline () searches forward from the current file position in the utmp file. It scans entries whose @@ -87,7 +87,7 @@ or \fBLOGIN_PROCESS\fP and returns the first one whose .I ut_line field matches \fIut\->ut_line\fP. -.PP +.P .BR pututline () writes the .I utmp @@ -108,16 +108,16 @@ return a pointer to a \fIstruct utmp\fP on success, and NULL on failure (which includes the "record not found" case). This \fIstruct utmp\fP is allocated in static storage, and may be overwritten by subsequent calls. -.PP +.P On success .BR pututline () returns .IR ut ; on failure, it returns NULL. -.PP +.P .BR utmpname () returns 0 if the new name was successfully stored, or \-1 on failure. -.PP +.P On failure, these functions .I errno set to indicate the error. @@ -128,7 +128,7 @@ Out of memory. .TP .B ESRCH Record not found. -.PP +.P .BR setutent (), .BR pututline (), and the @@ -189,7 +189,7 @@ T{ .BR utmpname () T} Thread safety MT-Unsafe race:utent .TE -.sp 1 +.P In the above table, .I utent in @@ -209,7 +209,7 @@ then data races could occur. None. .SH HISTORY XPG2, SVr4. -.PP +.P In XPG2 and SVID 2 the function .BR pututline () is documented to return void, and that is what it does on many systems @@ -218,15 +218,15 @@ HP-UX introduces a new function .BR _pututline () with the prototype given above for .BR pututline (). -.PP +.P All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses -.PP +.P .RS 4 .EX .B #include <utmpx.h> -.PP +.P .B struct utmpx *getutxent(void); .B struct utmpx *getutxid(const struct utmpx *); .B struct utmpx *getutxline(const struct utmpx *); @@ -235,7 +235,7 @@ does not have any of these functions, but instead uses .B void endutxent(void); .EE .RE -.PP +.P These functions are provided by glibc, and perform the same task as their equivalents without the "x", but use .IR "struct utmpx" , @@ -244,7 +244,7 @@ defined on Linux to be the same as For completeness, glibc also provides .BR utmpxname (), although this function is not specified by POSIX.1. -.PP +.P On some other systems, the \fIutmpx\fP structure is a superset of the \fIutmp\fP structure, with additional fields, and larger versions of the existing fields, @@ -252,7 +252,7 @@ and parallel files are maintained, often .I /var/*/utmpx and .IR /var/*/wtmpx . -.PP +.P Linux glibc on the other hand does not use a parallel \fIutmpx\fP file since its \fIutmp\fP structure is already large enough. The "x" functions listed above are just aliases for @@ -264,20 +264,20 @@ is an alias for .SS glibc notes The above functions are not thread-safe. glibc adds reentrant versions -.PP +.P .nf .B #include <utmp.h> -.PP +.P .BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp ); .BI "int getutid_r(struct utmp *" ut , .BI " struct utmp *" ubuf ", struct utmp **" ubufp ); .BI "int getutline_r(struct utmp *" ut , .BI " struct utmp *" ubuf ", struct utmp **" ubufp ); .fi -.PP +.P Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): -.PP +.P .BR getutent_r (), .BR getutid_r (), .BR getutline_r (): @@ -286,7 +286,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The @@ -305,7 +305,7 @@ should check the return values of .BR getpwuid (3) and .BR ttyname (3). -.PP +.P .\" SRC BEGIN (getutent.c) .EX #include <pwd.h> @@ -327,7 +327,7 @@ main(void) strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/")); /* only correct for ptys named /dev/tty[pqr][0\-9a\-z] */ strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty")); - time(&entry.ut_time); + entry.ut_time = time(NULL); strcpy(entry.ut_user, getpwuid(getuid())\->pw_name); memset(entry.ut_host, 0, UT_HOSTSIZE); entry.ut_addr = 0; diff --git a/man3/getutmp.3 b/man3/getutmp.3 index 04cf0ad..6694c1a 100644 --- a/man3/getutmp.3 +++ b/man3/getutmp.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getutmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getutmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <utmpx.h> -.PP +.P .BI "void getutmp(const struct utmpx *" ux ", struct utmp *" u ); .BI "void getutmpx(const struct utmp *" u ", struct utmpx *" ux ); .fi @@ -49,7 +49,6 @@ T{ .BR getutmpx () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/getw.3 b/man3/getw.3 index f96512f..a19bace 100644 --- a/man3/getw.3 +++ b/man3/getw.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getw 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getw 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getw, putw \- input and output of words (ints) .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int getw(FILE *" stream ); .BI "int putw(int " w ", FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getw (), .BR putw (): .nf @@ -39,7 +39,7 @@ It's provided for compatibility with SVr4. We recommend you use .BR fread (3) instead. -.PP +.P .BR putw () writes the word \fIw\fP (that is, an \fIint\fP) to \fIstream\fP. @@ -68,7 +68,6 @@ T{ .BR putw () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/getwchar.3 b/man3/getwchar.3 index 0ce51ce..d846804 100644 --- a/man3/getwchar.3 +++ b/man3/getwchar.3 @@ -10,7 +10,7 @@ .\" http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH getwchar 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getwchar 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getwchar \- read a wide character from standard input .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .B "wint_t getwchar(void);" .fi .SH DESCRIPTION @@ -42,7 +42,7 @@ to .B EILSEQ and returns .BR WEOF . -.PP +.P For a nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -65,7 +65,6 @@ T{ .BR getwchar () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -77,7 +76,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P It is reasonable to expect that .BR getwchar () will actually diff --git a/man3/glob.3 b/man3/glob.3 index 34a2745..9457de6 100644 --- a/man3/glob.3 +++ b/man3/glob.3 @@ -12,7 +12,7 @@ .\" Expanded the description of various flags .\" Various wording fixes. .\" -.TH glob 3 2023-07-20 "Linux man-pages 6.05.01" +.TH glob 3 2023-10-31 "Linux man-pages 6.7" .SH NAME glob, globfree \- find pathnames matching a pattern, free memory from glob() .SH LIBRARY @@ -21,7 +21,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <glob.h> -.PP +.P .BI "int glob(const char *restrict " pattern ", int " flags , .BI " int (*" errfunc ")(const char *" epath ", int " eerrno ), .BI " glob_t *restrict " pglob ); @@ -37,13 +37,13 @@ according to the rules used by the shell (see No tilde expansion or parameter substitution is done; if you want these, use .BR wordexp (3). -.PP +.P The .BR globfree () function frees the dynamically allocated storage from an earlier call to .BR glob (). -.PP +.P The results of a .BR glob () call are stored in the structure pointed to by @@ -54,7 +54,7 @@ This structure is of type .IR <glob.h> ) and includes the following elements defined by POSIX.2 (more may be present as an extension): -.PP +.P .in +4n .EX typedef struct { @@ -64,9 +64,9 @@ typedef struct { } glob_t; .EE .in -.PP +.P Results are stored in dynamically allocated storage. -.PP +.P The argument .I flags is made up of the bitwise OR of zero or more the following symbolic @@ -117,7 +117,7 @@ character. Normally, a backslash can be used to quote the following character, providing a mechanism to turn off the special meaning metacharacters. -.PP +.P .I flags may also include any of the following, which are GNU extensions and not defined by POSIX.2: @@ -193,7 +193,7 @@ However, the caller must still check that returned files are directories. (The purpose of this flag is merely to optimize performance when the caller is interested only in directories.) -.PP +.P If .I errfunc is not NULL, @@ -216,14 +216,14 @@ is set, .BR glob () will terminate after the call to .IR errfunc . -.PP +.P Upon successful return, .I pglob\->gl_pathc contains the number of matched pathnames and .I pglob\->gl_pathv contains a pointer to the list of pointers to matched pathnames. The list of pointers is terminated by a null pointer. -.PP +.P It is possible to call .BR glob () several times. @@ -232,7 +232,7 @@ In that case, the flag has to be set in .I flags on the second and later invocations. -.PP +.P As a GNU extension, .I pglob\->gl_flags is set to the flags specified, @@ -278,7 +278,7 @@ T{ .BR globfree () T} Thread safety MT-Safe .TE -.sp 1 +.P In the above table, .I utent in @@ -319,15 +319,15 @@ These will store their error code in .IR errno . .SH EXAMPLES One example of use is the following code, which simulates typing -.PP +.P .in +4n .EX ls \-l *.c ../*.c .EE .in -.PP +.P in the shell: -.PP +.P .in +4n .EX glob_t globbuf; diff --git a/man3/gnu_get_libc_version.3 b/man3/gnu_get_libc_version.3 index a1af9d1..e02390e 100644 --- a/man3/gnu_get_libc_version.3 +++ b/man3/gnu_get_libc_version.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH gnu_get_libc_version 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gnu_get_libc_version 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gnu_get_libc_version, gnu_get_libc_release \- get glibc version and release .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <gnu/libc\-version.h> -.PP +.P .B const char *gnu_get_libc_version(void); .B const char *gnu_get_libc_release(void); .fi @@ -21,7 +21,7 @@ Standard C library The function .BR gnu_get_libc_version () returns a string that identifies the glibc version available on the system. -.PP +.P The function .BR gnu_get_libc_release () returns a string indicates the release status of the glibc version @@ -43,14 +43,13 @@ T{ .BR gnu_get_libc_release () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY glibc 2.1. .SH EXAMPLES When run, the program below will produce output such as the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/grantpt.3 b/man3/grantpt.3 index 174c5c9..8f1aca0 100644 --- a/man3/grantpt.3 +++ b/man3/grantpt.3 @@ -3,7 +3,7 @@ .\" This page is in the public domain. - aeb .\" %%%LICENSE_END .\" -.TH grantpt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH grantpt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME grantpt \- grant access to the slave pseudoterminal .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int grantpt(int " fd ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR grantpt (): .nf Since glibc 2.24: @@ -39,7 +39,7 @@ The user ID of the slave is set to the real UID of the calling process. The group ID is set to an unspecified value (e.g., .IR tty ). The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-). -.PP +.P The behavior of .BR grantpt () is unspecified if a signal handler is installed to catch @@ -80,16 +80,15 @@ T{ .BR grantpt () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.1. POSIX.1-2001. -.PP +.P This is part of the UNIX 98 pseudoterminal support, see .BR pts (4). -.PP +.P Historical systems implemented this function via a set-user-ID helper binary called "pt_chown". glibc on Linux before glibc 2.33 could do so as well, diff --git a/man3/group_member.3 b/man3/group_member.3 index 620b59f..688b9cb 100644 --- a/man3/group_member.3 +++ b/man3/group_member.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH group_member 3 2023-03-30 "Linux man-pages 6.05.01" +.TH group_member 3 2023-10-31 "Linux man-pages 6.7" .SH NAME group_member \- test whether a process is in a group .SH LIBRARY @@ -11,15 +11,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int group_member(gid_t " gid ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR group_member (): .nf _GNU_SOURCE diff --git a/man3/gsignal.3 b/man3/gsignal.3 index 4587650..4c41dbd 100644 --- a/man3/gsignal.3 +++ b/man3/gsignal.3 @@ -5,7 +5,7 @@ .\" .\" This replaces an earlier man page written by Walter Harms .\" <walter.harms@informatik.uni-oldenburg.de>. -.TH gsignal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH gsignal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME gsignal, ssignal \- software signal facility .SH LIBRARY @@ -14,19 +14,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .B typedef void (*sighandler_t)(int); -.PP +.P .BI "[[deprecated]] int gsignal(int " signum ); -.PP +.P .BI "[[deprecated]] sighandler_t ssignal(int " signum ", sighandler_t " action ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR gsignal (), .BR ssignal (): .nf @@ -43,7 +43,7 @@ aliases for and .BR signal (2), respectively. -.PP +.P Elsewhere, on System V-like systems, these functions implement software signaling, entirely independent of the classical .BR signal (2) @@ -100,7 +100,6 @@ T{ .BR ssignal () T} Thread safety MT-Safe sigintr .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/hash.3 b/man3/hash.3 index ed99fe1..6ab717f 100644 --- a/man3/hash.3 +++ b/man3/hash.3 @@ -5,7 +5,7 @@ .\" .\" @(#)hash.3 8.6 (Berkeley) 8/18/94 .\" -.TH hash 3 2022-12-04 "Linux man-pages 6.05.01" +.TH hash 3 2023-10-31 "Linux man-pages 6.7" .UC 7 .SH NAME hash \- hash database access method @@ -26,7 +26,7 @@ Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the .I libdb library instead. -.PP +.P The routine .BR dbopen (3) is the library interface to database files. @@ -34,15 +34,15 @@ One of the supported file formats is hash files. The general description of the database access methods is in .BR dbopen (3), this manual page describes only the hash-specific information. -.PP +.P The hash data structure is an extensible, dynamic hashing scheme. -.PP +.P The access-method-specific data structure provided to .BR dbopen (3) is defined in the .I <db.h> include file as follows: -.PP +.P .in +4n .EX typedef struct { @@ -55,7 +55,7 @@ typedef struct { } HASHINFO; .EE .in -.PP +.P The elements of this structure are as follows: .TP 10 .I bsize @@ -99,7 +99,7 @@ If is 0 (no order is specified), the current host order is used. If the file already exists, the specified value is ignored and the value specified when the tree was created is used. -.PP +.P If the file already exists (and the .B O_TRUNC flag is not specified), the @@ -111,12 +111,12 @@ and .I nelem are ignored and the values specified when the tree was created are used. -.PP +.P If a hash function is specified, .I hash_open attempts to determine if the hash function specified is the same as the one with which the database was created, and fails if it is not. -.PP +.P Backward-compatible interfaces to the routines described in .BR dbm (3), and @@ -137,9 +137,9 @@ Only big and little endian byte order are supported. .BR dbopen (3), .BR mpool (3), .BR recno (3) -.PP +.P .IR "Dynamic Hash Tables" , Per-Ake Larson, Communications of the ACM, April 1988. -.PP +.P .IR "A New Hash Package for UNIX" , Margo Seltzer, USENIX Proceedings, Winter 1991. diff --git a/man3/hsearch.3 b/man3/hsearch.3 index dd801df..93e6794 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -14,7 +14,7 @@ .\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from .\" Timothy S. Nelson <wayland@wayland.id.au> .\" -.TH hsearch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH hsearch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- hash table management @@ -24,18 +24,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <search.h> -.PP +.P .BI "int hcreate(size_t " nel ); .B "void hdestroy(void);" -.PP +.P .BI "ENTRY *hsearch(ENTRY " item ", ACTION " action ); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <search.h> -.PP +.P .BI "int hcreate_r(size_t " nel ", struct hsearch_data *" htab ); .BI "void hdestroy_r(struct hsearch_data *" htab ); -.PP +.P .BI "int hsearch_r(ENTRY " item ", ACTION " action ", ENTRY **" retval , .BI " struct hsearch_data *" htab ); .fi @@ -48,7 +48,7 @@ and allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time. -.PP +.P The three functions .BR hcreate_r (), .BR hsearch_r (), @@ -62,7 +62,7 @@ on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure). -.PP +.P First a hash table must be created using .BR hcreate (). The argument \fInel\fP specifies the maximum number of entries @@ -71,7 +71,7 @@ in the table. The implementation may adjust this value upward to improve the performance of the resulting hash table. .\" e.g., in glibc it is raised to the next higher prime number -.PP +.P The .BR hcreate_r () function performs the same task as @@ -82,7 +82,7 @@ The structure pointed to by .I htab must be zeroed before the first call to .BR hcreate_r (). -.PP +.P The function .BR hdestroy () frees the memory occupied by the hash table that was created by @@ -97,17 +97,17 @@ function performs the analogous task for a hash table described by .IR *htab , which was previously created using .BR hcreate_r (). -.PP +.P The .BR hsearch () function searches the hash table for an item with the same key as \fIitem\fP (where "the same" is determined using .BR strcmp (3)), and if successful returns a pointer to it. -.PP +.P The argument \fIitem\fP is of type \fIENTRY\fP, which is defined in \fI<search.h>\fP as follows: -.PP +.P .in +4n .EX typedef struct entry { @@ -116,11 +116,11 @@ typedef struct entry { } ENTRY; .EE .in -.PP +.P The field \fIkey\fP points to a null-terminated string which is the search key. The field \fIdata\fP points to data that is associated with that key. -.PP +.P The argument \fIaction\fP determines what .BR hsearch () does after an unsuccessful search. @@ -139,7 +139,7 @@ is then .I data is ignored.) -.PP +.P The .BR hsearch_r () function is like @@ -161,7 +161,7 @@ return nonzero on success. They return 0 on error, with .I errno set to indicate the error. -.PP +.P On success, .BR hsearch () returns a pointer to an entry in the hash table. @@ -184,7 +184,7 @@ can fail for the following reasons: .B EINVAL .I htab is NULL. -.PP +.P .BR hsearch () and .BR hsearch_r () @@ -205,7 +205,7 @@ was and .I key was not found in the table. -.PP +.P POSIX.1 specifies only the .\" PROX.1-2001, POSIX.1-2008 .B ENOMEM @@ -233,7 +233,6 @@ T{ .BR hdestroy_r () T} Thread safety MT-Safe race:htab .TE -.sp 1 .SH STANDARDS .TP .BR hcreate () @@ -271,7 +270,7 @@ Typically, this means that .I nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table. -.PP +.P The .BR hdestroy () and @@ -296,12 +295,12 @@ should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the \fIdata\fP for the given \fIkey\fP in this case. -.PP +.P Individual hash table entries can be added, but not deleted. .SH EXAMPLES The following program inserts 24 items into a hash table, then prints some of them. -.PP +.P .\" SRC BEGIN (hsearch.c) .EX #include <search.h> diff --git a/man3/hypot.3 b/man3/hypot.3 index 5f106c6..a7d4563 100644 --- a/man3/hypot.3 +++ b/man3/hypot.3 @@ -11,7 +11,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH hypot 3 2023-07-20 "Linux man-pages 6.05.01" +.TH hypot 3 2023-10-31 "Linux man-pages 6.7" .SH NAME hypot, hypotf, hypotl \- Euclidean distance function .SH LIBRARY @@ -20,17 +20,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double hypot(double " x ", double " y ); .BI "float hypotf(float " x ", float " y ); .BI "long double hypotl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR hypot (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -38,7 +38,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR hypotf (), .BR hypotl (): .nf @@ -57,7 +57,7 @@ and or the distance of the point .RI ( x , y ) from the origin. -.PP +.P The calculation is performed without undue overflow or underflow during the intermediate steps of the calculation. .\" e.g., hypot(DBL_MIN, DBL_MIN) does the right thing, as does, say @@ -69,14 +69,14 @@ with sides of length .I x and .IR y . -.PP +.P If .I x or .I y is an infinity, positive infinity is returned. -.PP +.P If .I x or @@ -84,7 +84,7 @@ or is a NaN, and the other argument is not an infinity, a NaN is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -93,7 +93,7 @@ and the functions return or .BR HUGE_VALL , respectively. -.PP +.P If both arguments are subnormal, and the result is subnormal, .\" Actually, could the result not be subnormal if both arguments .\" are subnormal? I think not -- mtk, Jul 2008 @@ -104,7 +104,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result overflow @@ -141,12 +141,11 @@ T{ .BR hypotl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/iconv.3 b/man3/iconv.3 index 6e4a091..1f9f96f 100644 --- a/man3/iconv.3 +++ b/man3/iconv.3 @@ -11,7 +11,7 @@ .\" 2000-06-30 correction by Yuichi SATO <sato@complex.eng.hokudai.ac.jp> .\" 2000-11-15 aeb, fixed prototype .\" -.TH iconv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iconv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iconv \- perform character set conversion .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <iconv.h> -.PP +.P .BI "size_t iconv(iconv_t " cd , .BI " char **restrict " inbuf ", size_t *restrict " inbytesleft , .BI " char **restrict " outbuf ", size_t *restrict " outbytesleft ); @@ -50,7 +50,7 @@ argument is the address of a variable that points to the first byte available in the output buffer; .I outbytesleft indicates the number of bytes available in the output buffer. -.PP +.P The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL. In this case, the .BR iconv () @@ -58,7 +58,7 @@ function converts the multibyte sequence starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP. At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read. At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written. -.PP +.P The .BR iconv () function converts one multibyte character at a time, and for @@ -134,7 +134,7 @@ beginning of the incomplete multibyte sequence. The output buffer has no more room for the next converted character. In this case, it sets \fIerrno\fP to \fBE2BIG\fP and returns .IR (size_t)\ \-1 . -.PP +.P A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but \fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL. In this case, the @@ -148,7 +148,7 @@ If the output buffer has no more room for this reset sequence, it sets Otherwise, it increments \fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes written. -.PP +.P A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and \fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL. In this case, the @@ -191,8 +191,7 @@ T{ .BR iconv () T} Thread safety MT-Safe race:cd .TE -.sp 1 -.PP +.P The .BR iconv () function is MT-Safe, as long as callers arrange for @@ -209,7 +208,7 @@ In each series of calls to .BR iconv (), the last should be one with \fIinbuf\fP or \fI*inbuf\fP equal to NULL, in order to flush out any partially converted input. -.PP +.P Although .I inbuf and @@ -221,7 +220,7 @@ as C strings or as arrays of characters: the interpretation of character byte sequences is handled internally by the conversion functions. In some encodings, a zero byte may be a valid part of a multibyte character. -.PP +.P The caller of .BR iconv () must ensure that the pointers passed to the function are suitable diff --git a/man3/iconv_close.3 b/man3/iconv_close.3 index 089843c..85ba846 100644 --- a/man3/iconv_close.3 +++ b/man3/iconv_close.3 @@ -7,7 +7,7 @@ .\" GNU glibc-2 source code and manual .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH iconv_close 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iconv_close 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iconv_close \- deallocate descriptor for character set conversion .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <iconv.h> -.PP +.P .BI "int iconv_close(iconv_t " cd ); .fi .SH DESCRIPTION @@ -46,7 +46,6 @@ T{ .BR iconv_close () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/iconv_open.3 b/man3/iconv_open.3 index 13ae778..f6a64b9 100644 --- a/man3/iconv_open.3 +++ b/man3/iconv_open.3 @@ -11,7 +11,7 @@ .\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT .\" and //IGNORE extensions for 'tocode'. .\" -.TH iconv_open 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iconv_open 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iconv_open \- allocate descriptor for character set conversion .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <iconv.h> -.PP +.P .BI "iconv_t iconv_open(const char *" tocode ", const char *" fromcode ); .fi .SH DESCRIPTION @@ -32,7 +32,7 @@ for converting byte sequences from character encoding to character encoding .IR tocode . -.PP +.P The values permitted for .I fromcode and @@ -61,13 +61,13 @@ When the string "//IGNORE" is appended to .IR tocode , characters that cannot be represented in the target character set will be silently discarded. -.PP +.P The resulting conversion descriptor can be used with .BR iconv (3) any number of times. It remains valid until deallocated using .BR iconv_close (3). -.PP +.P A conversion descriptor contains a conversion state. After creation using .BR iconv_open (), @@ -114,7 +114,6 @@ T{ .BR iconv_open () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index 39b72a0..7f4c42e 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH if_nameindex 3 2023-07-20 "Linux man-pages 6.05.01" +.TH if_nameindex 3 2023-10-31 "Linux man-pages 6.7" .SH NAME if_nameindex, if_freenameindex \- get network interface names and indexes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <net/if.h> -.PP +.P .BI "struct if_nameindex *if_nameindex(" void ); .BI "void if_freenameindex(struct if_nameindex *" "ptr" ); .fi @@ -27,14 +27,14 @@ about one of the network interfaces on the local system. The .I if_nameindex structure contains at least the following entries: -.PP +.P .in +4n .EX unsigned int if_index; /* Index of interface (1, 2, ...) */ char *if_name; /* Null\-terminated name ("eth0", etc.) */ .EE .in -.PP +.P The .I if_index field contains the interface index. @@ -46,7 +46,7 @@ The end of the array is indicated by entry with set to zero and .I if_name set to NULL. -.PP +.P The data structure returned by .BR if_nameindex () is dynamically allocated and should be freed using @@ -67,7 +67,7 @@ if: .TP .B ENOBUFS Insufficient resources available. -.PP +.P .BR if_nameindex () may also fail for any of the errors specified for .BR socket (2), @@ -93,14 +93,13 @@ T{ .BR if_freenameindex () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008, RFC\ 3493. .SH HISTORY glibc 2.1. POSIX.1-2001. BSDi. -.PP +.P Before glibc 2.3.4, the implementation supported only interfaces with IPv4 addresses. Support of interfaces that don't have IPv4 addresses is available only @@ -109,7 +108,7 @@ on kernels that support netlink. The program below demonstrates the use of the functions described on this page. An example of the output this program might produce is the following: -.PP +.P .in +4n .EX $ \fB./a.out\fI diff --git a/man3/if_nametoindex.3 b/man3/if_nametoindex.3 index ebbd257..e4e183e 100644 --- a/man3/if_nametoindex.3 +++ b/man3/if_nametoindex.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH if_nametoindex 3 2023-07-20 "Linux man-pages 6.05.01" +.TH if_nametoindex 3 2023-10-31 "Linux man-pages 6.7" .SH NAME if_nametoindex, if_indextoname \- mappings between network interface names and indexes @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <net/if.h> -.PP +.P .BI "unsigned int if_nametoindex(const char *" "ifname" ); .BI "char *if_indextoname(unsigned int ifindex, char *" ifname ); .fi @@ -23,7 +23,7 @@ The function returns the index of the network interface corresponding to the name .IR ifname . -.PP +.P The .BR if_indextoname () function returns the name of the network interface @@ -41,7 +41,7 @@ returns the index number of the network interface; on error, 0 is returned and .I errno is set to indicate the error. -.PP +.P On success, .BR if_indextoname () returns @@ -57,7 +57,7 @@ if: .TP .B ENODEV No interface found with given name. -.PP +.P .BR if_indextoname () may fail and set .I errno @@ -65,7 +65,7 @@ if: .TP .B ENXIO No interface found for the index. -.PP +.P .BR if_nametoindex () and .BR if_indextoname () @@ -88,7 +88,6 @@ T{ .BR if_indextoname () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008, RFC\ 3493. .SH HISTORY diff --git a/man3/ilogb.3 b/man3/ilogb.3 index 100b0c8..69ce0a4 100644 --- a/man3/ilogb.3 +++ b/man3/ilogb.3 @@ -7,7 +7,7 @@ .\" .\" Inspired by a page by Walter Harms created 2002-08-10 .\" -.TH ilogb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ilogb 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value .SH LIBRARY @@ -16,17 +16,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "int ilogb(double " x ); .BI "int ilogbf(float " x ); .BI "int ilogbl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ilogb (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR ilogbf (), .BR ilogbl (): .nf @@ -55,7 +55,7 @@ functions, cast to On success, these functions return the exponent of .IR x , as a signed integer. -.PP +.P If .I x is zero, then a domain error occurs, and the functions return @@ -63,14 +63,14 @@ is zero, then a domain error occurs, and the functions return .\" case, but for ilogb() it says domain error. .BR FP_ILOGB0 . .\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'. -.PP +.P If .I x is a NaN, then a domain error occurs, and the functions return .BR FP_ILOGBNAN . .\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'. .\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value. -.PP +.P If .I x is negative infinity or positive infinity, then @@ -88,7 +88,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is 0 or a NaN @@ -124,7 +124,6 @@ T{ .BR ilogbl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/index.3 b/man3/index.3 index 56c2bb3..ebccd46 100644 --- a/man3/index.3 +++ b/man3/index.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH index 3 2023-03-30 "Linux man-pages 6.05.01" +.TH index 3 2023-10-31 "Linux man-pages 6.7" .SH NAME index, rindex \- locate character in string .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "[[deprecated]] char *index(const char *" s ", int " c ); .BI "[[deprecated]] char *rindex(const char *" s ", int " c ); .fi @@ -19,11 +19,11 @@ Standard C library .BR index () is identical to .BR strchr (3). -.PP +.P .BR rindex () is identical to .BR strrchr (3). -.PP +.P Use .BR strchr (3) and diff --git a/man3/inet.3 b/man3/inet.3 index 557bb2d..554fd11 100644 --- a/man3/inet.3 +++ b/man3/inet.3 @@ -20,7 +20,7 @@ .\" Add discussion of Classful Addressing, noting that it is obsolete. .\" Added an EXAMPLE program. .\" -.TH inet 3 2023-07-20 "Linux man-pages 6.05.01" +.TH inet 3 2023-10-31 "Linux man-pages 6.7" .SH NAME inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, inet_netof \- Internet address manipulation routines @@ -32,26 +32,26 @@ Standard C library .B #include <sys/socket.h> .B #include <netinet/in.h> .B #include <arpa/inet.h> -.PP +.P .BI "int inet_aton(const char *" cp ", struct in_addr *" inp ); -.PP +.P .BI "in_addr_t inet_addr(const char *" cp ); .BI "in_addr_t inet_network(const char *" cp ); -.PP +.P .BI "[[deprecated]] char *inet_ntoa(struct in_addr " in ); -.PP +.P .BI "[[deprecated]] struct in_addr inet_makeaddr(in_addr_t " net , .BI " in_addr_t " host ); -.PP +.P .BI "[[deprecated]] in_addr_t inet_lnaof(struct in_addr " in ); .BI "[[deprecated]] in_addr_t inet_netof(struct in_addr " in ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR inet_aton (), .BR inet_ntoa (): .nf @@ -104,7 +104,7 @@ The value .I a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement. -.PP +.P In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading @@ -117,7 +117,7 @@ The form that uses exactly four decimal numbers is referred to as .I IPv4 dotted-decimal notation (or sometimes: .IR "IPv4 dotted-quad notation" ). -.PP +.P .BR inet_aton () returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid @@ -125,7 +125,7 @@ or 0 if the string is invalid is .I not set on error). -.PP +.P The .BR inet_addr () function converts the Internet host address @@ -142,7 +142,7 @@ Avoid its use in favor of or .BR getaddrinfo (3), which provide a cleaner way to indicate error return. -.PP +.P The .BR inet_network () function converts @@ -152,7 +152,7 @@ into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, \-1 is returned. -.PP +.P The .BR inet_ntoa () function converts the Internet host address @@ -160,19 +160,19 @@ function converts the Internet host address dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite. -.PP +.P The .BR inet_lnaof () function returns the local network address part of the Internet address \fIin\fP. The returned value is in host byte order. -.PP +.P The .BR inet_netof () function returns the network number part of the Internet address \fIin\fP. The returned value is in host byte order. -.PP +.P The .BR inet_makeaddr () function is the converse of @@ -183,7 +183,7 @@ It returns an Internet host address in network byte order, created by combining the network number \fInet\fP with the local address \fIhost\fP, both in host byte order. -.PP +.P The structure \fIin_addr\fP as used in .BR inet_ntoa (), .BR inet_makeaddr (), @@ -193,7 +193,7 @@ and is defined in .I <netinet/in.h> as: -.PP +.P .in +4n .EX typedef uint32_t in_addr_t; @@ -227,7 +227,6 @@ T{ .BR inet_netof () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR inet_addr () @@ -243,7 +242,7 @@ None. .TQ .BR inet_ntoa () POSIX.1-2001, 4.3BSD. -.PP +.P .BR inet_lnaof (), .BR inet_netof (), and @@ -270,7 +269,7 @@ This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte. -.PP +.P Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at @@ -286,7 +285,7 @@ and .BR inet_ntoa () is shown below. Here are some example runs: -.PP +.P .in +4n .EX .RB "$" " ./a.out 226.000.000.037" " # Last byte is in octal" diff --git a/man3/inet_net_pton.3 b/man3/inet_net_pton.3 index 2a74441..e8264e8 100644 --- a/man3/inet_net_pton.3 +++ b/man3/inet_net_pton.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH inet_net_pton 3 2023-05-03 "Linux man-pages 6.05.01" +.TH inet_net_pton 3 2023-10-31 "Linux man-pages 6.7" .SH NAME inet_net_pton, inet_net_ntop \- Internet network number conversion .SH LIBRARY @@ -11,7 +11,7 @@ Resolver library .SH SYNOPSIS .nf .B #include <arpa/inet.h> -.PP +.P .BI "int inet_net_pton(int " af ", const char *" pres , .BI " void " netp [. nsize "], size_t " nsize ); .BI "char *inet_net_ntop(int " af , @@ -19,12 +19,12 @@ Resolver library .BI " int " bits , .BI " char " pres [. psize "], size_t " psize ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR inet_net_pton (), .BR inet_net_ntop (): .nf @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions convert network numbers between presentation (i.e., printable) format and network (i.e., binary) format. -.PP +.P For both functions, .I af specifies the address family for the conversion; @@ -61,7 +61,7 @@ The .I nsize argument specifies the number of bytes available in .IR netp . -.PP +.P On success, .BR inet_net_pton () returns the number of bits in the network number field @@ -69,7 +69,7 @@ of the result placed in .IR netp . For a discussion of the input presentation format and the return value, see NOTES. -.PP +.P .IR Note : the buffer pointed to by .I netp @@ -91,7 +91,7 @@ The .I bits argument specifies the number of bits in the network number in .IR *netp . -.PP +.P The null-terminated presentation-format string is placed in the buffer pointed to by .IR pres . @@ -109,7 +109,7 @@ returns the number of bits in the network number. On error, it returns \-1, and .I errno is set to indicate the error. -.PP +.P On success, .BR inet_net_ntop () returns @@ -138,16 +138,16 @@ None. The network number may be specified either as a hexadecimal value or in dotted-decimal notation. -.PP +.P Hexadecimal values are indicated by an initial "0x" or "0X". The hexadecimal digits populate the nibbles (half octets) of the network number from left to right in network byte order. .\" If the hexadecimal string is short, the remaining nibbles are zeroed. -.PP +.P In dotted-decimal notation, up to four octets are specified, as decimal numbers separated by dots. Thus, any of the following forms are accepted: -.PP +.P .in +4n .EX a.b.c.d @@ -156,7 +156,7 @@ a.b a .EE .in -.PP +.P Each part is a number in the range 0 to 255 that populates one byte of the resulting network number, going from left to right, in network-byte (big endian) order. @@ -164,7 +164,7 @@ Where a part is omitted, the resulting byte in the network number is zero. .\" Reading other man pages, some other implementations treat .\" 'c' in a.b.c as a 16-bit number that populates right-most two bytes .\" 'b' in a.b as a 24-bit number that populates right-most three bytes -.PP +.P For either hexadecimal or dotted-decimal format, the network number can optionally be followed by a slash and a number in the range 0 to 32, @@ -210,7 +210,7 @@ is 16. Otherwise, .I bits is 8. -.PP +.P If the resulting .I bits value from the above steps is greater than or equal to 8, @@ -233,7 +233,7 @@ It then uses .BR inet_net_ntop () to convert the binary form back to presentation format, and displays the resulting string. -.PP +.P In order to demonstrate that .BR inet_net_pton () may not write to all bytes of its @@ -247,11 +247,11 @@ the program displays all of the bytes of the buffer returned by .BR inet_net_pton () allowing the user to see which bytes have not been touched by .BR inet_net_pton (). -.PP +.P An example run, showing that .BR inet_net_pton () infers the number of bits in the network number: -.PP +.P .in +4n .EX $ \fB./a.out 193.168\fP @@ -260,11 +260,11 @@ inet_net_ntop() yielded: 193.168.0/24 Raw address: c1a80000 .EE .in -.PP +.P Demonstrate that .BR inet_net_pton () does not zero out unused bytes in its result buffer: -.PP +.P .in +4n .EX $ \fB./a.out 193.168 0xffffffff\fP @@ -273,13 +273,13 @@ inet_net_ntop() yielded: 193.168.0/24 Raw address: c1a800ff .EE .in -.PP +.P Demonstrate that .BR inet_net_pton () will widen the inferred size of the network number, if the supplied number of bytes in the presentation string exceeds the inferred value: -.PP +.P .in +4n .EX $ \fB./a.out 193.168.1.128\fP @@ -288,13 +288,13 @@ inet_net_ntop() yielded: 193.168.1.128/32 Raw address: c1a80180 .EE .in -.PP +.P Explicitly specifying the size of the network number overrides any inference about its size (but any extra bytes that are explicitly specified will still be used by .BR inet_net_pton (): to populate the result buffer): -.PP +.P .in +4n .EX $ \fB./a.out 193.168.1.128/24\fP diff --git a/man3/inet_ntop.3 b/man3/inet_ntop.3 index 6f6d853..3d2d78b 100644 --- a/man3/inet_ntop.3 +++ b/man3/inet_ntop.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References: RFC 2553 -.TH inet_ntop 3 2023-07-20 "Linux man-pages 6.05.01" +.TH inet_ntop 3 2023-10-31 "Linux man-pages 6.7" .SH NAME inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <arpa/inet.h> -.PP +.P .BI "const char *inet_ntop(int " af ", const void *restrict " src , .BI " char " dst "[restrict ." size "], socklen_t " size ); .fi @@ -29,7 +29,7 @@ which must be a non-null pointer. The caller specifies the number of bytes available in this buffer in the argument .IR size . -.PP +.P .BR inet_ntop () extends the .BR inet_ntoa (3) @@ -95,12 +95,11 @@ T{ .BR inet_ntop () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Note that RFC\ 2553 defines a prototype where the last argument .I size is of type diff --git a/man3/inet_pton.3 b/man3/inet_pton.3 index 420a642..37eb97c 100644 --- a/man3/inet_pton.3 +++ b/man3/inet_pton.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References: RFC 2553 -.TH inet_pton 3 2023-07-20 "Linux man-pages 6.05.01" +.TH inet_pton 3 2023-10-31 "Linux man-pages 6.7" .SH NAME inet_pton \- convert IPv4 and IPv6 addresses from text to binary form .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <arpa/inet.h> -.PP +.P .BI "int inet_pton(int " af ", const char *restrict " src \ ", void *restrict " dst ); .fi @@ -35,7 +35,7 @@ or .BR AF_INET6 . .I dst is written in network byte order. -.PP +.P The following address families are currently supported: .TP .B AF_INET @@ -127,7 +127,6 @@ T{ .BR inet_pton () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS Unlike .BR inet_aton (3) @@ -163,7 +162,7 @@ The program below demonstrates the use of and .BR inet_ntop (3). Here are some example runs: -.PP +.P .in +4n .EX .RB "$" " ./a.out i6 0:0:0:0:0:0:0:0" diff --git a/man3/initgroups.3 b/man3/initgroups.3 index 81505cb..b389f2b 100644 --- a/man3/initgroups.3 +++ b/man3/initgroups.3 @@ -10,7 +10,7 @@ .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu> .\" Modified 2004-10-10 by aeb .\" -.TH initgroups 3 2023-07-20 "Linux man-pages 6.05.01" +.TH initgroups 3 2023-10-31 "Linux man-pages 6.7" .SH NAME initgroups \- initialize the supplementary group access list .SH LIBRARY @@ -20,15 +20,15 @@ Standard C library .nf .B #include <sys/types.h> .B #include <grp.h> -.PP +.P .BI "int initgroups(const char *" user ", gid_t " group ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR initgroups (): .nf Since glibc 2.19: @@ -50,7 +50,7 @@ The additional group .I group is also added to the list. -.PP +.P The .I user argument must be non-NULL. @@ -88,7 +88,6 @@ T{ .BR initgroups () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/insque.3 b/man3/insque.3 index d3444ce..dba8dfb 100644 --- a/man3/insque.3 +++ b/man3/insque.3 @@ -14,7 +14,7 @@ .\" mtk, 2010-09-09: Noted glibc 2.4 bug, added info on circular .\" lists, added example program .\" -.TH insque 3 2023-07-20 "Linux man-pages 6.05.01" +.TH insque 3 2023-10-31 "Linux man-pages 6.7" .SH NAME insque, remque \- insert/remove an item from a queue .SH LIBRARY @@ -23,16 +23,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <search.h> -.PP +.P .BI "void insque(void *" elem ", void *" prev ); .BI "void remque(void *" elem ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR insque (), .BR remque (): .nf @@ -53,19 +53,19 @@ backward pointer. The linked list may be linear (i.e., NULL forward pointer at the end of the list and NULL backward pointer at the start of the list) or circular. -.PP +.P The .BR insque () function inserts the element pointed to by \fIelem\fP immediately after the element pointed to by \fIprev\fP. -.PP +.P If the list is linear, then the call .I "insque(elem, NULL)" can be used to insert the initial list element, and the call sets the forward and backward pointers of .I elem to NULL. -.PP +.P If the list is circular, the caller should ensure that the forward and backward pointers of the first element are initialized to point to that element, @@ -74,7 +74,7 @@ and the argument of the .BR insque () call should also point to the element. -.PP +.P The .BR remque () function removes the element pointed to by \fIelem\fP from the @@ -94,13 +94,12 @@ T{ .BR remque () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On ancient systems, .\" e.g., SunOS, Linux libc4 and libc5 the arguments of these functions were of type \fIstruct qelem *\fP, defined as: -.PP +.P .in +4n .EX struct qelem { @@ -110,12 +109,12 @@ struct qelem { }; .EE .in -.PP +.P This is still what you will get if .B _GNU_SOURCE is defined before including \fI<search.h>\fP. -.PP +.P The location of the prototypes for these functions differs among several versions of UNIX. The above is the POSIX version. @@ -137,7 +136,7 @@ with the forward and backward pointers in each element suitably initialized. The program below demonstrates the use of .BR insque (). Here is an example run of the program: -.PP +.P .in +4n .EX .RB "$ " "./a.out \-c a b c" diff --git a/man3/intro.3 b/man3/intro.3 index 7f72ae6..f714614 100644 --- a/man3/intro.3 +++ b/man3/intro.3 @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" 2007-10-23 mtk, Nearly a complete rewrite of the earlier page. -.TH intro 3 2023-02-05 "Linux man-pages 6.05.01" +.TH intro 3 2023-10-31 "Linux man-pages 6.7" .SH NAME intro \- introduction to library functions .SH DESCRIPTION @@ -12,7 +12,7 @@ excluding the library functions (system call wrappers) described in Section 2, which implement system calls. -.PP +.P Many of the functions described in the section are part of the Standard C Library .RI ( libc ). @@ -30,7 +30,7 @@ and .IR \-lrt , respectively, for the aforementioned libraries). -.PP +.P In some cases, the programmer must define a feature test macro in order to obtain the declaration of a function from the header file specified @@ -86,12 +86,12 @@ and its many implementations: 3head .IP \[bu] 3type -.PP +.P This difficult history frequently makes it a poor example to follow in design, implementation, and presentation. -.PP +.P Ideally, a library for the C language is designed such that each header file diff --git a/man3/isalpha.3 b/man3/isalpha.3 index cf0d54a..68afb7a 100644 --- a/man3/isalpha.3 +++ b/man3/isalpha.3 @@ -8,7 +8,7 @@ .\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com> .\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de) .\" -.TH isalpha 3 2023-07-30 "Linux man-pages 6.05.01" +.TH isalpha 3 2024-02-25 "Linux man-pages 6.7" .SH NAME isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, @@ -22,7 +22,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <ctype.h> -.PP +.P .BI "int isalnum(int " c ); .BI "int isalpha(int " c ); .BI "int iscntrl(int " c ); @@ -34,10 +34,10 @@ Standard C library .BI "int isspace(int " c ); .BI "int isupper(int " c ); .BI "int isxdigit(int " c ); -.PP +.P .BI "int isascii(int " c ); .BI "int isblank(int " c ); -.PP +.P .BI "int isalnum_l(int " c ", locale_t " locale ); .BI "int isalpha_l(int " c ", locale_t " locale ); .BI "int isblank_l(int " c ", locale_t " locale ); @@ -50,28 +50,28 @@ Standard C library .BI "int isspace_l(int " c ", locale_t " locale ); .BI "int isupper_l(int " c ", locale_t " locale ); .BI "int isxdigit_l(int " c ", locale_t " locale ); -.PP +.P .BI "int isascii_l(int " c ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE .ad l -.PP +.P .BR isascii (): .nf _XOPEN_SOURCE || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE .fi -.PP +.P .BR isblank (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi -.PP +.P .BR \%salnum_l (), .BR \%salpha_l (), .BR \%sblank_l (), @@ -90,7 +90,7 @@ Feature Test Macro Requirements for glibc (see Before glibc 2.10: _GNU_SOURCE .fi -.PP +.P .BR isascii_l (): .nf Since glibc 2.10: @@ -109,7 +109,7 @@ or falls into a certain character class according to the specified locale. The functions without the "_l" suffix perform the check based on the current locale. -.PP +.P The functions with the "_l" suffix perform the check based on the locale specified by the locale object .IR locale . @@ -120,7 +120,7 @@ is the special locale object (see .BR duplocale (3)) or is not a valid locale object handle. -.PP +.P The list below explains the operation of the functions without the "_l" suffix; the functions with the "_l" suffix differ only in using the locale object @@ -170,9 +170,9 @@ alphanumeric character. .BR isspace () checks for white-space characters. In the -.B """C""" +.B \[dq]C\[dq] and -.B """POSIX""" +.B \[dq]POSIX\[dq] locales, these are: space, form-feed .RB ( \[aq]\ef\[aq] ), newline @@ -221,7 +221,6 @@ T{ .BR isxdigit () T} Thread safety MT-Safe .TE -.sp 1 .\" FIXME: need a thread-safety statement about the *_l functions .SH STANDARDS .TP @@ -357,7 +356,7 @@ is of type it must be cast to .IR "unsigned char" , as in the following example: -.PP +.P .in +4n .EX char c; @@ -365,7 +364,7 @@ char c; res = toupper((unsigned char) c); .EE .in -.PP +.P This is necessary because .I char may be the equivalent of @@ -375,7 +374,7 @@ converting to .IR int , yielding a value that is outside the range of .IR "unsigned char" . -.PP +.P The details of what characters belong to which class depend on the locale. For example, diff --git a/man3/isatty.3 b/man3/isatty.3 index fe44c88..2276550 100644 --- a/man3/isatty.3 +++ b/man3/isatty.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH isatty 3 2023-07-20 "Linux man-pages 6.05.01" +.TH isatty 3 2023-10-31 "Linux man-pages 6.7" .SH NAME isatty \- test whether a file descriptor refers to a terminal .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int isatty(int " fd ); .fi .SH DESCRIPTION @@ -59,7 +59,6 @@ T{ .BR isatty () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/isfdtype.3 b/man3/isfdtype.3 index e8eb1f4..1717a1c 100644 --- a/man3/isfdtype.3 +++ b/man3/isfdtype.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH isfdtype 3 2023-03-30 "Linux man-pages 6.05.01" +.TH isfdtype 3 2023-10-31 "Linux man-pages 6.7" .SH NAME isfdtype \- test file type of a file descriptor .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .nf .B #include <sys/stat.h> .B #include <sys/socket.h> -.PP +.P .BI "int isfdtype(int " fd ", int " fdtype ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR isfdtype (): .nf Since glibc 2.20: diff --git a/man3/isgreater.3 b/man3/isgreater.3 index b5c30d5..e097523 100644 --- a/man3/isgreater.3 +++ b/man3/isgreater.3 @@ -6,7 +6,7 @@ .\" 2002-07-27 Walter Harms .\" this was done with the help of the glibc manual .\" -.TH isgreater 3 2023-07-20 "Linux man-pages 6.05.01" +.TH isgreater 3 2023-10-31 "Linux man-pages 6.7" .SH NAME isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered \- floating-point relational tests without exception for NaN @@ -16,7 +16,7 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "int isgreater(" x ", " y ); .BI "int isgreaterequal(" x ", " y ); .BI "int isless(" x ", " y ); @@ -24,12 +24,12 @@ Math library .BI "int islessgreater(" x ", " y ); .BI "int isunordered(" x ", " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .nf All functions described here: _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -41,7 +41,7 @@ The normal relational operations (like fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below. -.PP +.P These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will @@ -102,7 +102,7 @@ The macros other than .BR isunordered () return the result of the relational comparison; these macros return 0 if either argument is a NaN. -.PP +.P .BR isunordered () returns 1 if .I x @@ -130,7 +130,6 @@ T{ .BR isunordered () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Not all hardware supports these functions, and where hardware support isn't provided, they will be emulated by macros. diff --git a/man3/iswalnum.3 b/man3/iswalnum.3 index 9d5bb24..2010987 100644 --- a/man3/iswalnum.3 +++ b/man3/iswalnum.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswalnum 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswalnum 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswalnum \- test for alphanumeric wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswalnum(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,26 +31,26 @@ It tests whether .I wc is a wide character belonging to the wide-character class "alnum". -.PP +.P The wide-character class "alnum" is a subclass of the wide-character class "graph", and therefore also a subclass of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "alnum" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "alnum" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P The wide-character class "alnum" is disjoint from the wide-character class "punct". -.PP +.P The wide-character class "alnum" is the union of the wide-character classes "alpha" and "digit". As such, it also contains the wide-character class "xdigit". -.PP +.P The wide-character class "alnum" always contains at least the letters \[aq]A\[aq] to \[aq]Z\[aq], @@ -79,7 +79,6 @@ T{ .BR iswalnum () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswalpha.3 b/man3/iswalpha.3 index a05dfe9..612a8d8 100644 --- a/man3/iswalpha.3 +++ b/man3/iswalpha.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswalpha 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswalpha 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswalpha \- test for alphabetic wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswalpha(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,30 +31,30 @@ It tests whether .I wc is a wide character belonging to the wide-character class "alpha". -.PP +.P The wide-character class "alpha" is a subclass of the wide-character class "alnum", and therefore also a subclass of the wide-character class "graph" and of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "alpha" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "alpha" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P Being a subclass of the wide-character class "alnum", the wide-character class "alpha" is disjoint from the wide-character class "punct". -.PP +.P The wide-character class "alpha" is disjoint from the wide-character class "digit". -.PP +.P The wide-character class "alpha" contains the wide-character classes "upper" and "lower". -.PP +.P The wide-character class "alpha" always contains at least the letters \[aq]A\[aq] to \[aq]Z\[aq] and \[aq]a\[aq] to \[aq]z\[aq]. .SH RETURN VALUE @@ -80,7 +80,6 @@ T{ .BR iswalpha () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswblank.3 b/man3/iswblank.3 index 84599ab..d50034c 100644 --- a/man3/iswblank.3 +++ b/man3/iswblank.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswblank 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswblank 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswblank \- test for whitespace wide character .SH LIBRARY @@ -18,15 +18,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswblank(wint_t " wc ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR iswblank (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -39,16 +39,16 @@ function is the wide-character equivalent of the function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "blank". -.PP +.P The wide-character class "blank" is a subclass of the wide-character class "space". -.PP +.P Being a subclass of the wide-character class "space", the wide-character class "blank" is disjoint from the wide-character class "graph" and therefore also disjoint from its subclasses "alnum", "alpha", "upper", "lower", "digit", "xdigit", "punct". -.PP +.P The wide-character class "blank" always contains at least the space character and the control character \[aq]\et\[aq]. @@ -73,7 +73,6 @@ T{ .BR iswblank () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/iswcntrl.3 b/man3/iswcntrl.3 index 40d78e8..bd1a3df 100644 --- a/man3/iswcntrl.3 +++ b/man3/iswcntrl.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswcntrl 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswcntrl 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswcntrl \- test for control wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswcntrl(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,11 +31,11 @@ It tests whether .I wc is a wide character belonging to the wide-character class "cntrl". -.PP +.P The wide-character class "cntrl" is disjoint from the wide-character class "print" and therefore also disjoint from its subclasses "graph", "alpha", "upper", "lower", "digit", "xdigit", "punct". -.PP +.P For an unsigned char .IR c , .I iscntrl(c) @@ -64,7 +64,6 @@ T{ .BR iswcntrl () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswctype.3 b/man3/iswctype.3 index 6326345..78e9686 100644 --- a/man3/iswctype.3 +++ b/man3/iswctype.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswctype 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswctype 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswctype \- wide-character classification .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswctype(wint_t " wc ", wctype_t " desc ); .fi .SH DESCRIPTION @@ -38,7 +38,7 @@ If is .BR WEOF , zero is returned. -.PP +.P .I desc must be a character property descriptor returned by the @@ -67,7 +67,6 @@ T{ .BR iswctype () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswdigit.3 b/man3/iswdigit.3 index b4d187d..c055919 100644 --- a/man3/iswdigit.3 +++ b/man3/iswdigit.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswdigit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswdigit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswdigit \- test for decimal digit wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswdigit(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,29 +31,29 @@ It tests whether .I wc is a wide character belonging to the wide-character class "digit". -.PP +.P The wide-character class "digit" is a subclass of the wide-character class "xdigit", and therefore also a subclass of the wide-character class "alnum", of the wide-character class "graph" and of the wide-character class "print". -.PP +.P Being a subclass of the wide character class "print", the wide-character class "digit" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "digit" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P Being a subclass of the wide-character class "alnum", the wide-character class "digit" is disjoint from the wide-character class "punct". -.PP +.P The wide-character class "digit" is disjoint from the wide-character class "alpha" and therefore also disjoint from its subclasses "lower", "upper". -.PP +.P The wide-character class "digit" always contains exactly the digits \[aq]0\[aq] to \[aq]9\[aq]. .SH RETURN VALUE @@ -79,7 +79,6 @@ T{ .BR iswdigit () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswgraph.3 b/man3/iswgraph.3 index 3af1b76..35ee1a3 100644 --- a/man3/iswgraph.3 +++ b/man3/iswgraph.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswgraph 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswgraph 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswgraph \- test for graphic wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswgraph(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,20 +31,20 @@ It tests whether .I wc is a wide character belonging to the wide-character class "graph". -.PP +.P The wide-character class "graph" is a subclass of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "graph" is disjoint from the wide-character class "cntrl". -.PP +.P The wide-character class "graph" is disjoint from the wide-character class "space" and therefore also disjoint from its subclass "blank". .\" Note: UNIX98 (susv2/xbd/locale.html) says that "graph" and "space" may .\" have characters in common, except U+0020. But C99 (ISO/IEC 9899:1999 .\" section 7.25.2.1.10) says that "space" and "graph" are disjoint. -.PP +.P The wide-character class "graph" contains all the wide characters from the wide-character class "print" except the space character. It therefore contains @@ -72,7 +72,6 @@ T{ .BR iswgraph () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswlower.3 b/man3/iswlower.3 index 1115275..8aa7742 100644 --- a/man3/iswlower.3 +++ b/man3/iswlower.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswlower 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswlower 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswlower \- test for lowercase wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswlower(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,28 +31,28 @@ It tests whether .I wc is a wide character belonging to the wide-character class "lower". -.PP +.P The wide-character class "lower" is a subclass of the wide-character class "alpha", and therefore also a subclass of the wide-character class "alnum", of the wide-character class "graph" and of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "lower" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "lower" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P Being a subclass of the wide-character class "alnum", the wide-character class "lower" is disjoint from the wide-character class "punct". -.PP +.P Being a subclass of the wide-character class "alpha", the wide-character class "lower" is disjoint from the wide-character class "digit". -.PP +.P The wide-character class "lower" contains at least those characters .I wc @@ -60,7 +60,7 @@ which are equal to .I towlower(wc) and different from .IR towupper(wc) . -.PP +.P The wide-character class "lower" always contains at least the letters \[aq]a\[aq] to \[aq]z\[aq]. .SH RETURN VALUE @@ -86,7 +86,6 @@ T{ .BR iswlower () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -98,7 +97,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. .SH SEE ALSO diff --git a/man3/iswprint.3 b/man3/iswprint.3 index cfd1e94..bc58b25 100644 --- a/man3/iswprint.3 +++ b/man3/iswprint.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswprint 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswprint 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswprint \- test for printing wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswprint(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,10 +31,10 @@ It tests whether .I wc is a wide character belonging to the wide-character class "print". -.PP +.P The wide-character class "print" is disjoint from the wide-character class "cntrl". -.PP +.P The wide-character class "print" contains the wide-character class "graph". .SH RETURN VALUE The @@ -58,7 +58,6 @@ T{ .BR iswprint () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswpunct.3 b/man3/iswpunct.3 index b3b9f57..6e74b60 100644 --- a/man3/iswpunct.3 +++ b/man3/iswpunct.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswpunct 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswpunct 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswpunct \- test for punctuation or symbolic wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswpunct(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,18 +31,18 @@ It tests whether .I wc is a wide character belonging to the wide-character class "punct". -.PP +.P The wide-character class "punct" is a subclass of the wide-character class "graph", and therefore also a subclass of the wide-character class "print". -.PP +.P The wide-character class "punct" is disjoint from the wide-character class "alnum" and therefore also disjoint from its subclasses "alpha", "upper", "lower", "digit", "xdigit". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "punct" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "punct" is disjoint from the wide-character class "space" and its subclass @@ -70,7 +70,6 @@ T{ .BR iswpunct () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -82,7 +81,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P This function's name is a misnomer when dealing with Unicode characters, because the wide-character class "punct" contains both punctuation characters and symbol (math, currency, etc.) characters. diff --git a/man3/iswspace.3 b/man3/iswspace.3 index fce481d..e87b80a 100644 --- a/man3/iswspace.3 +++ b/man3/iswspace.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswspace 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswspace 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswspace \- test for whitespace wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswspace(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,16 +31,16 @@ It tests whether .I wc is a wide character belonging to the wide-character class "space". -.PP +.P The wide-character class "space" is disjoint from the wide-character class "graph" and therefore also disjoint from its subclasses "alnum", "alpha", "upper", "lower", "digit", "xdigit", "punct". .\" Note: UNIX98 (susv2/xbd/locale.html) says that "space" and "graph" may .\" have characters in common, except U+0020. But C99 (ISO/IEC 9899:1999 .\" section 7.25.2.1.10) says that "space" and "graph" are disjoint. -.PP +.P The wide-character class "space" contains the wide-character class "blank". -.PP +.P The wide-character class "space" always contains at least the space character and the control characters @@ -67,7 +67,6 @@ T{ .BR iswspace () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/iswupper.3 b/man3/iswupper.3 index 64bc4f0..82ec81b 100644 --- a/man3/iswupper.3 +++ b/man3/iswupper.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswupper 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswupper 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswupper \- test for uppercase wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswupper(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,31 +31,31 @@ It tests whether .I wc is a wide character belonging to the wide-character class "upper". -.PP +.P The wide-character class "upper" is a subclass of the wide-character class "alpha", and therefore also a subclass of the wide-character class "alnum", of the wide-character class "graph" and of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "upper" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "upper" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P Being a subclass of the wide-character class "alnum", the wide-character class "upper" is disjoint from the wide-character class "punct". -.PP +.P Being a subclass of the wide-character class "alpha", the wide-character class "upper" is disjoint from the wide-character class "digit". -.PP +.P The wide-character class "upper" contains at least those characters .I wc which are equal to .I towupper(wc) and different from .IR towlower(wc) . -.PP +.P The wide-character class "upper" always contains at least the letters \[aq]A\[aq] to \[aq]Z\[aq]. .SH RETURN VALUE @@ -80,7 +80,6 @@ T{ .BR iswupper () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -92,7 +91,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. .SH SEE ALSO diff --git a/man3/iswxdigit.3 b/man3/iswxdigit.3 index 7be65b5..5eb226b 100644 --- a/man3/iswxdigit.3 +++ b/man3/iswxdigit.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH iswxdigit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH iswxdigit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME iswxdigit \- test for hexadecimal digit wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "int iswxdigit(wint_t " wc ); .fi .SH DESCRIPTION @@ -31,21 +31,21 @@ It tests whether .I wc is a wide character belonging to the wide-character class "xdigit". -.PP +.P The wide-character class "xdigit" is a subclass of the wide-character class "alnum", and therefore also a subclass of the wide-character class "graph" and of the wide-character class "print". -.PP +.P Being a subclass of the wide-character class "print", the wide-character class "xdigit" is disjoint from the wide-character class "cntrl". -.PP +.P Being a subclass of the wide-character class "graph", the wide-character class "xdigit" is disjoint from the wide-character class "space" and its subclass "blank". -.PP +.P Being a subclass of the wide-character class "alnum", the wide-character class "xdigit" is disjoint from the wide-character class "punct". -.PP +.P The wide-character class "xdigit" always contains at least the letters \[aq]A\[aq] to \[aq]F\[aq], \[aq]a\[aq] to \[aq]f\[aq] and the digits \[aq]0\[aq] to \[aq]9\[aq]. @@ -71,7 +71,6 @@ T{ .BR iswxdigit () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -14,7 +14,7 @@ .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB .\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page .\" -.TH j0 3 2023-07-20 "Linux man-pages 6.05.01" +.TH j0 3 2023-10-31 "Linux man-pages 6.7" .SH NAME j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \- Bessel functions of the first kind @@ -24,25 +24,25 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double j0(double " x ); .BI "double j1(double " x ); .BI "double jn(int " n ", double " x ); -.PP +.P .BI "float j0f(float " x ); .BI "float j1f(float " x ); .BI "float jnf(int " n ", float " x ); -.PP +.P .BI "long double j0l(long double " x ); .BI "long double j1l(long double " x ); .BI "long double jnl(int " n ", long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR j0 (), .BR j1 (), .BR jn (): @@ -51,7 +51,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR j0f (), .BR j0l (), .BR j1f (), @@ -79,7 +79,7 @@ returns the Bessel function of .I x of the first kind of order .IR n . -.PP +.P The .BR j0f (), .BR j1f (), @@ -100,11 +100,11 @@ values. On success, these functions return the appropriate Bessel value of the first kind for .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is too large in magnitude, @@ -116,14 +116,14 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result underflow, or \fIx\fP is too large in magnitude .I errno is set to .BR ERANGE . -.PP +.P These functions do not raise exceptions for .BR fetestexcept (3). .\" e.g., j0(1.5e16) @@ -159,7 +159,6 @@ T{ .BR jnl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR j0 () diff --git a/man3/key_setsecret.3 b/man3/key_setsecret.3 index 13e8051..a8c4470 100644 --- a/man3/key_setsecret.3 +++ b/man3/key_setsecret.3 @@ -5,7 +5,7 @@ .\" .\" I had no way the check the functions out .\" be careful -.TH key_setsecret 3 2023-07-20 "Linux man-pages 6.05.01" +.TH key_setsecret 3 2023-10-31 "Linux man-pages 6.7" .SH NAME key_decryptsession, key_encryptsession, key_setsecret, key_gendes, key_secretkey_is_set \- interfaces to rpc keyserver daemon @@ -15,12 +15,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <rpc/rpc.h> -.PP +.P .BI "int key_decryptsession(char *" remotename ", des_block *" deskey ); .BI "int key_encryptsession(char *" remotename ", des_block *" deskey ); -.PP +.P .BI "int key_gendes(des_block *" deskey ); -.PP +.P .BI "int key_setsecret(char *" key ); .B int key_secretkey_is_set(void); .fi @@ -29,29 +29,29 @@ The functions here are used within the RPC's secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions. -.PP +.P The function .BR key_decryptsession () uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process. -.PP +.P The function .BR key_encryptsession () is the inverse of .BR key_decryptsession (). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process. -.PP +.P The function .BR key_gendes () is used to ask the keyserver for a secure conversation key. -.PP +.P The function .BR key_setsecret () is used to set the key for the effective UID of the calling process. -.PP +.P The function .BR key_secretkey_is_set () can be used to determine whether a key has been @@ -76,13 +76,12 @@ T{ .BR key_secretkey_is_set () T} Thread safety MT-Safe .TE -.sp 1 .SH NOTES Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES. -.PP +.P These routines were part of the Linux/Doors-project, abandoned by now. .SH SEE ALSO .BR crypt (3) diff --git a/man3/killpg.3 b/man3/killpg.3 index a146316..14533ef 100644 --- a/man3/killpg.3 +++ b/man3/killpg.3 @@ -11,7 +11,7 @@ .\" Added notes on CAP_KILL .\" Modified 2004-06-21 by aeb .\" -.TH killpg 3 2023-03-30 "Linux man-pages 6.05.01" +.TH killpg 3 2023-10-31 "Linux man-pages 6.7" .SH NAME killpg \- send signal to a process group .SH LIBRARY @@ -20,15 +20,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int killpg(int " pgrp ", int " sig ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR killpg (): .nf _XOPEN_SOURCE >= 500 @@ -45,7 +45,7 @@ to the process group See .BR signal (7) for a list of signals. -.PP +.P If .I pgrp is 0, @@ -54,7 +54,7 @@ sends the signal to the calling process's process group. (POSIX says: if .I pgrp is less than or equal to 1, the behavior is undefined.) -.PP +.P For the permissions required to send a signal to another process, see .BR kill (2). .SH RETURN VALUE diff --git a/man3/ldexp.3 b/man3/ldexp.3 index e1fb88c..926aa47 100644 --- a/man3/ldexp.3 +++ b/man3/ldexp.3 @@ -12,7 +12,7 @@ .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2004-10-31 by aeb .\" -.TH ldexp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ldexp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2 .SH LIBRARY @@ -21,17 +21,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double ldexp(double " x ", int " exp ); .BI "float ldexpf(float " x ", int " exp ); .BI "long double ldexpl(long double " x ", int " exp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ldexpf (), .BR ldexpl (): .nf @@ -47,27 +47,27 @@ by 2 raised to the power .SH RETURN VALUE On success, these functions return .IR "x * (2\[ha]exp)" . -.PP +.P If .I exp is zero, then .I x is returned. -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity (negative infinity), positive infinity (negative infinity) is returned. -.PP +.P If the result underflows, a range error occurs, and zero is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -82,7 +82,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error, overflow @@ -116,12 +116,11 @@ T{ .BR ldexpl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/lgamma.3 b/man3/lgamma.3 index cbcf363..cd4d57a 100644 --- a/man3/lgamma.3 +++ b/man3/lgamma.3 @@ -6,7 +6,7 @@ .\" .\" based on glibc infopages .\" -.TH lgamma 3 2023-03-30 "Linux man-pages 6.05.01" +.TH lgamma 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \- log gamma function @@ -16,30 +16,30 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double lgamma(double " x ); .BI "float lgammaf(float " x ); .BI "long double lgammal(long double " x ); -.PP +.P .BI "double lgamma_r(double " x ", int *" signp ); .BI "float lgammaf_r(float " x ", int *" signp ); .BI "long double lgammal_r(long double " x ", int *" signp ); -.PP +.P .BI "extern int " signgam ; .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .nf .BR lgamma (): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR lgammaf (), .BR lgammal (): .nf @@ -47,7 +47,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR lgamma_r (), .BR lgammaf_r (), .BR lgammal_r (): @@ -55,7 +55,7 @@ Feature Test Macro Requirements for glibc (see /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .IR signgam : .nf _XOPEN_SOURCE @@ -65,7 +65,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION For the definition of the Gamma function, see .BR tgamma (3). -.PP +.P The .BR lgamma (), .BR lgammaf (), @@ -80,7 +80,7 @@ declared in .IR <math.h> . It is 1 when the Gamma function is positive or zero, \-1 when it is negative. -.PP +.P Since using a constant location .I signgam is not thread-safe, the functions @@ -92,20 +92,20 @@ have been introduced; they return the sign via the argument .IR signp . .SH RETURN VALUE On success, these functions return the natural logarithm of Gamma(x). -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is 1 or 2, +0 is returned. -.PP +.P If .I x is positive infinity or negative infinity, positive infinity is returned. -.PP +.P If .I x is a nonpositive integer, @@ -116,7 +116,7 @@ and the functions return or .RB + HUGE_VALL , respectively. -.PP +.P If the result overflows, a range error occurs, .\" e.g., lgamma(DBL_MAX) @@ -131,7 +131,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Pole error: \fIx\fP is a nonpositive integer diff --git a/man3/lio_listio.3 b/man3/lio_listio.3 index 0cca6e4..1829358 100644 --- a/man3/lio_listio.3 +++ b/man3/lio_listio.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH lio_listio 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lio_listio 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lio_listio \- initiate a list of I/O requests .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B "#include <aio.h>" -.PP +.P .BI "int lio_listio(int " mode , .BI " struct aiocb *restrict const " aiocb_list [restrict], .BI " int " nitems ", struct sigevent *restrict " sevp ); @@ -22,7 +22,7 @@ The .BR lio_listio () function initiates the list of I/O operations described by the array .IR aiocb_list . -.PP +.P The .I mode operation has one of the following values: @@ -39,12 +39,12 @@ When all of the I/O operations complete, asynchronous notification occurs, as specified by the .I sevp argument; see -.BR sigevent (7) +.BR sigevent (3type) for details. If .I sevp is NULL, no asynchronous notification occurs. -.PP +.P The .I aiocb_list argument is an array of pointers to @@ -58,7 +58,7 @@ argument specifies the size of the array Null pointers in .I aiocb_list are ignored. -.PP +.P In each control block in .IR aiocb_list , the @@ -79,7 +79,7 @@ specifying this control block. .TP .B LIO_NOP Ignore this control block. -.PP +.P The remaining fields in each control block have the same meanings as for .BR aio_read (3) and @@ -99,7 +99,7 @@ returns 0 if all I/O operations are successfully queued. Otherwise, \-1 is returned, and .I errno is set to indicate the error. -.PP +.P If .I mode is @@ -109,7 +109,7 @@ returns 0 when all of the I/O operations have completed successfully. Otherwise, \-1 is returned, and .I errno is set to indicate the error. -.PP +.P The return status from .BR lio_listio () provides information only about the call itself, @@ -168,7 +168,7 @@ failed. .\" e.g., ioa_reqprio or aio_lio_opcode was invalid The application can check the status of each operation using .BR aio_return (3). -.PP +.P If .BR lio_listio () fails with the error @@ -197,7 +197,6 @@ T{ .BR lio_listio () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -211,7 +210,7 @@ The buffer areas being read into or written from .\" or the control block of the operation must not be accessed during the operations or undefined results may occur. The memory areas involved must remain valid. -.PP +.P Simultaneous I/O operations specifying the same .I aiocb structure produce undefined results. diff --git a/man3/list.3 b/man3/list.3 index 270d5e6..cc77bde 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH LIST 3 2023-05-03 "Linux man-pages 6.05.01" +.TH LIST 3 2023-10-31 "Linux man-pages 6.7" .SH NAME LIST_EMPTY, LIST_ENTRY, @@ -31,43 +31,43 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/queue.h> -.PP +.P .B LIST_ENTRY(TYPE); -.PP +.P .B LIST_HEAD(HEADNAME, TYPE); .BI "LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD " head ); .BI "void LIST_INIT(LIST_HEAD *" head ); -.PP +.P .BI "int LIST_EMPTY(LIST_HEAD *" head ); -.PP +.P .BI "void LIST_INSERT_HEAD(LIST_HEAD *" head , .BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); .BI "void LIST_INSERT_BEFORE(struct TYPE *" listelm , .BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); .BI "void LIST_INSERT_AFTER(struct TYPE *" listelm , .BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *LIST_FIRST(LIST_HEAD *" head ); .\" .BI "struct TYPE *LIST_PREV(struct TYPE *" elm ", LIST_HEAD *" head , .\" .BI " struct TYPE, LIST_ENTRY " NAME ); .BI "struct TYPE *LIST_NEXT(struct TYPE *" elm ", LIST_ENTRY " NAME ); -.PP +.P .BI "LIST_FOREACH(struct TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ); .\" .BI "LIST_FOREACH_FROM(struct TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "LIST_FOREACH_SAFE(struct TYPE *" var ", LIST_HEAD *" head , .\" .BI " LIST_ENTRY " NAME ", struct TYPE *" temp_var ); .\" .BI "LIST_FOREACH_FROM_SAFE(struct TYPE *" var ", LIST_HEAD *" head , .\" .BI " LIST_ENTRY " NAME ", struct TYPE *" temp_var ); -.PP +.P .BI "void LIST_REMOVE(struct TYPE *" elm ", LIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "void LIST_SWAP(LIST_HEAD *" head1 ", LIST_HEAD *" head2 , .\" .BI " struct TYPE, LIST_ENTRY " NAME ); .fi .SH DESCRIPTION These macros define and operate on doubly linked lists. -.PP +.P In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -94,43 +94,43 @@ or at the head of the list. A .I LIST_HEAD structure is declared as follows: -.PP +.P .in +4 .EX LIST_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR LIST_ENTRY () declares a structure that connects the elements in the list. -.PP +.P .BR LIST_HEAD_INITIALIZER () evaluates to an initializer for the list .IR head . -.PP +.P .BR LIST_INIT () initializes the list referenced by .IR head . -.PP +.P .BR LIST_EMPTY () evaluates to true if there are no elements in the list. .SS Insertion @@ -138,13 +138,13 @@ evaluates to true if there are no elements in the list. inserts the new element .I elm at the head of the list. -.PP +.P .BR LIST_INSERT_BEFORE () inserts the new element .I elm before the element .IR listelm . -.PP +.P .BR LIST_INSERT_AFTER () inserts the new element .I elm @@ -153,24 +153,24 @@ after the element .SS Traversal .BR LIST_FIRST () returns the first element in the list, or NULL if the list is empty. -.\" .PP +.\" .P .\" .BR LIST_PREV () .\" returns the previous element in the list, or NULL if this is the first. .\" List .\" .I head .\" must contain element .\" .IR elm . -.PP +.P .BR LIST_NEXT () returns the next element in the list, or NULL if this is the last. -.PP +.P .BR LIST_FOREACH () traverses the list referenced by .I head in the forward direction, assigning each element in turn to .IR var . -.\" .PP +.\" .P .\" .BR LIST_FOREACH_FROM () .\" behaves identically to .\" .BR LIST_FOREACH () @@ -182,7 +182,7 @@ assigning each element in turn to .\" .I var .\" instead of the first element in the LIST referenced by .\" .IR head . -.\" .PP +.\" .P .\" .BR LIST_FOREACH_SAFE () .\" traverses the list referenced by .\" .I head @@ -194,7 +194,7 @@ assigning each element in turn to .\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .PP +.\" .P .\" .BR LIST_FOREACH_FROM_SAFE () .\" behaves identically to .\" .BR LIST_FOREACH_SAFE () @@ -221,14 +221,14 @@ from the list. .BR LIST_EMPTY () returns nonzero if the list is empty, and zero if the list contains at least one entry. -.PP +.P .BR LIST_FIRST (), and .BR LIST_NEXT () return a pointer to the first or next .I TYPE structure, respectively. -.PP +.P .BR LIST_HEAD_INITIALIZER () returns an initializer that can be assigned to the list .IR head . diff --git a/man3/localeconv.3 b/man3/localeconv.3 index 063fe11..a4b17a9 100644 --- a/man3/localeconv.3 +++ b/man3/localeconv.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 19:01:20 1993 by Rik Faith (faith@cs.unc.edu) -.TH localeconv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH localeconv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME localeconv \- get numeric formatting information .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <locale.h> -.PP +.P .B struct lconv *localeconv(void); .fi .SH DESCRIPTION @@ -64,7 +64,6 @@ T} Thread safety T{ MT-Unsafe race:localeconv locale T} .TE -.sp 1 .SH STANDARDS C11. .SH HISTORY diff --git a/man3/lockf.3 b/man3/lockf.3 index a4043ba..f8b005f 100644 --- a/man3/lockf.3 +++ b/man3/lockf.3 @@ -7,7 +7,7 @@ .\" Added section stuff, aeb, 2002-04-22. .\" Corrected include file, drepper, 2003-06-15. .\" -.TH lockf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lockf 3 2024-03-03 "Linux man-pages 6.7" .SH NAME lockf \- apply, test or remove a POSIX lock on an open file .SH LIBRARY @@ -16,15 +16,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP -.BI "int lockf(int " fd ", int " cmd ", off_t " len ); +.P +.BI "int lockf(int " fd ", int " op ", off_t " len ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR lockf (): .nf _XOPEN_SOURCE >= 500 @@ -37,7 +37,7 @@ Apply, test, or remove a POSIX lock on a section of an open file. The file is specified by .IR fd , a file descriptor open for writing, the action by -.IR cmd , +.IR op , and the section consists of byte positions .IR pos .. pos + len \-1 if @@ -53,7 +53,7 @@ is the current file position, and if is zero, the section extends from the current file position to infinity, encompassing the present and future end-of-file positions. In all cases, the section may extend past current end-of-file. -.PP +.P On Linux, .BR lockf () is just an interface on top of @@ -68,7 +68,7 @@ and locks unspecified. A portable application should probably avoid mixing calls to these interfaces. -.PP +.P Valid operations are given below: .TP .B F_LOCK @@ -118,7 +118,7 @@ been memory-mapped by another process. .B EBADF .I fd is not an open file descriptor; or -.I cmd +.I op is .B F_LOCK or @@ -128,7 +128,8 @@ and is not a writable file descriptor. .TP .B EDEADLK -The command was +.I op +was .B F_LOCK and this lock operation would cause a deadlock. .TP @@ -139,7 +140,7 @@ delivery of a signal caught by a handler; see .TP .B EINVAL An invalid operation was specified in -.IR cmd . +.IR op . .TP .B ENOLCK Too many segment locks open, lock table is full. @@ -157,7 +158,6 @@ T{ .BR lockf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -165,7 +165,7 @@ POSIX.1-2001, SVr4. .SH SEE ALSO .BR fcntl (2), .BR flock (2) -.PP +.P .I locks.txt and .I mandatory\-locking.txt @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH log 3 2023-07-20 "Linux man-pages 6.05.01" +.TH log 3 2023-10-31 "Linux man-pages 6.7" .SH NAME log, logf, logl \- natural logarithmic function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double log(double " x ); .BI "float logf(float " x ); .BI "long double logl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR logf (), .BR logl (): .nf @@ -47,21 +47,21 @@ These functions return the natural logarithm of .SH RETURN VALUE On success, these functions return the natural logarithm of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is 1, the result is +0. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is zero, @@ -71,7 +71,7 @@ then a pole error occurs, and the functions return or .RB \- HUGE_VALL , respectively. -.PP +.P If .I x is negative (including negative infinity), then @@ -81,7 +81,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is negative @@ -115,12 +115,11 @@ T{ .BR logl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/log10.3 b/man3/log10.3 index 9d3a0bb..3090864 100644 --- a/man3/log10.3 +++ b/man3/log10.3 @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH log10 3 2023-07-20 "Linux man-pages 6.05.01" +.TH log10 3 2024-03-12 "Linux man-pages 6.7" .SH NAME log10, log10f, log10l \- base-10 logarithmic function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double log10(double " x ); .BI "float log10f(float " x ); .BI "long double log10l(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR log10f (), .BR log10l (): .nf @@ -42,12 +42,12 @@ Feature Test Macro Requirements for glibc (see || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi .SH DESCRIPTION -These functions return the base 10 logarithm of +These functions return the base-10 logarithm of .IR x . .SH RETURN VALUE -On success, these functions return the base 10 logarithm of +On success, these functions return the base-10 logarithm of .IR x . -.PP +.P For special cases, including where .I x is 0, 1, negative, infinity, or NaN, see @@ -57,7 +57,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P For a discussion of the errors that can occur for these functions, see .BR log (3). .SH ATTRIBUTES @@ -76,12 +76,11 @@ T{ .BR log10l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/log1p.3 b/man3/log1p.3 index c3285a9..dff3b5b 100644 --- a/man3/log1p.3 +++ b/man3/log1p.3 @@ -7,7 +7,7 @@ .\" .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH log1p 3 2023-07-20 "Linux man-pages 6.05.01" +.TH log1p 3 2023-10-31 "Linux man-pages 6.7" .SH NAME log1p, log1pf, log1pl \- logarithm of 1 plus argument .SH LIBRARY @@ -16,17 +16,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double log1p(double " x ); .BI "float log1pf(float " x ); .BI "long double log1pl(long double " x ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .nf .BR log1p (): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR log1pf (), .BR log1pl (): .nf @@ -45,11 +45,11 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION These functions return a value equivalent to -.PP +.P .nf log (1 + \fIx\fP) .fi -.PP +.P The result is computed in a way that is accurate even if the value of .I x @@ -57,16 +57,16 @@ is near zero. .SH RETURN VALUE On success, these functions return the natural logarithm of .IR "(1\ +\ x)" . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is \-1, a pole error occurs, @@ -76,7 +76,7 @@ and the functions return or .RB \- HUGE_VALL , respectively. -.PP +.P If .I x is less than \-1 (including negative infinity), @@ -89,7 +89,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is less than \-1 @@ -125,7 +125,6 @@ T{ .BR log1pl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -138,7 +137,7 @@ Before glibc 2.22, the glibc implementation did not set to .B EDOM when a domain error occurred. -.PP +.P Before glibc 2.22, the glibc implementation did not set .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792 .I errno diff --git a/man3/log2.3 b/man3/log2.3 index 223ac99..29cc1ef 100644 --- a/man3/log2.3 +++ b/man3/log2.3 @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH log2 3 2023-07-20 "Linux man-pages 6.05.01" +.TH log2 3 2024-03-12 "Linux man-pages 6.7" .SH NAME log2, log2f, log2l \- base-2 logarithmic function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double log2(double " x ); .BI "float log2f(float " x ); .BI "long double log2l(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR log2 (), .BR log2f (), .BR log2l (): @@ -41,12 +41,12 @@ Feature Test Macro Requirements for glibc (see _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi .SH DESCRIPTION -These functions return the base 2 logarithm of +These functions return the base-2 logarithm of .IR x . .SH RETURN VALUE -On success, these functions return the base 2 logarithm of +On success, these functions return the base-2 logarithm of .IR x . -.PP +.P For special cases, including where .I x is 0, 1, negative, infinity, or NaN, see @@ -56,7 +56,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P For a discussion of the errors that can occur for these functions, see .BR log (3). .SH ATTRIBUTES @@ -75,13 +75,12 @@ T{ .BR log2l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY glibc 2.1. C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/logb.3 b/man3/logb.3 index 1bde61b..1319d94 100644 --- a/man3/logb.3 +++ b/man3/logb.3 @@ -7,7 +7,7 @@ .\" .\" Inspired by a page by Walter Harms created 2002-08-10 .\" -.TH logb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH logb 3 2024-03-12 "Linux man-pages 6.7" .SH NAME logb, logbf, logbl \- get exponent of a floating-point value .SH LIBRARY @@ -16,17 +16,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double logb(double " x ); .BI "float logbf(float " x ); .BI "long double logbl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR logb (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -35,7 +35,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR logbf (), .BR logbl (): .nf @@ -57,10 +57,11 @@ If .B FLT_RADIX is 2, .BI logb( x ) -is equal to -.BI floor(log2( x ))\fR, -except that it is probably faster. -.PP +is similar to +.BI floor(log2(fabs( x )))\f[R],\f[] +except that the latter may give an incorrect integer +due to intermediate rounding. +.P If .I x is subnormal, @@ -71,12 +72,12 @@ would have if it were normalized. .SH RETURN VALUE On success, these functions return the exponent of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is zero, then a pole error occurs, and the functions return @@ -85,7 +86,7 @@ is zero, then a pole error occurs, and the functions return or .RB \- HUGE_VALL , respectively. -.PP +.P If .I x is negative infinity or positive infinity, then @@ -95,7 +96,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Pole error: \fIx\fP is 0 @@ -105,7 +106,7 @@ Pole error: \fIx\fP is 0 A divide-by-zero floating-point exception .RB ( FE_DIVBYZERO ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -128,7 +129,6 @@ T{ .BR logbl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/login.3 b/man3/login.3 index b6fa4ae..a77a728 100644 --- a/man3/login.3 +++ b/man3/login.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH login 3 2023-07-20 "Linux man-pages 6.05.01" +.TH login 3 2023-10-31 "Linux man-pages 6.7" .SH NAME login, logout \- write utmp and wtmp entries .SH LIBRARY @@ -13,7 +13,7 @@ System utilities library .SH SYNOPSIS .nf .B #include <utmp.h> -.PP +.P .BI "void login(const struct utmp *" ut ); .BI "int logout(const char *" ut_line ); .fi @@ -22,14 +22,14 @@ The utmp file records who is currently using the system. The wtmp file records all logins and logouts. See .BR utmp (5). -.PP +.P The function .BR login () takes the supplied .IR "struct utmp" , .IR ut , and writes it to both the utmp and the wtmp file. -.PP +.P The function .BR logout () clears the entry in the utmp file again. @@ -59,7 +59,7 @@ On the other hand, if no terminal name was found, this field is filled with "???" and the struct is not written to the utmp file. After this, the struct is written to the wtmp file. -.PP +.P The .BR logout () function searches the utmp file for an entry matching the @@ -113,7 +113,7 @@ MT-Unsafe race:utent sig:ALRM timer T} .TE -.sp 1 +.P In the above table, .I utent in diff --git a/man3/lrint.3 b/man3/lrint.3 index 66f8598..af42930 100644 --- a/man3/lrint.3 +++ b/man3/lrint.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH lrint 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lrint 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lrint, lrintf, lrintl, llrint, llrintf, llrintl \- round to nearest integer .SH LIBRARY @@ -14,21 +14,21 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "long lrint(double " x ); .BI "long lrintf(float " x ); .BI "long lrintl(long double " x ); -.PP +.P .BI "long long llrint(double " x ); .BI "long long llrintf(float " x ); .BI "long long llrintl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -37,7 +37,7 @@ All functions shown above: These functions round their argument to the nearest integer value, using the current rounding direction (see .BR fesetround (3)). -.PP +.P Note that unlike the .BR rint (3) family of functions, @@ -45,7 +45,7 @@ the return type of these functions differs from that of their arguments. .SH RETURN VALUE These functions return the rounded integer value. -.PP +.P If .I x is a NaN or an infinity, @@ -62,7 +62,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large @@ -72,7 +72,7 @@ Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large An invalid floating-point exception .RB ( FE_INVALID ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -96,7 +96,6 @@ T{ .BR llrintl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/lround.3 b/man3/lround.3 index e48f71a..1e947ff 100644 --- a/man3/lround.3 +++ b/man3/lround.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH lround 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lround 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lround, lroundf, lroundl, llround, llroundf, llroundl \- round to nearest integer @@ -15,21 +15,21 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "long lround(double " x ); .BI "long lroundf(float " x ); .BI "long lroundl(long double " x ); -.PP +.P .BI "long long llround(double " x ); .BI "long long llroundf(float " x ); .BI "long long llroundl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -39,7 +39,7 @@ These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see .BR fenv (3)). -.PP +.P Note that unlike the .BR round (3) and @@ -48,7 +48,7 @@ functions, the return type of these functions differs from that of their arguments. .SH RETURN VALUE These functions return the rounded integer value. -.PP +.P If .I x is a NaN or an infinity, @@ -65,7 +65,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large @@ -75,7 +75,7 @@ Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large An invalid floating-point exception .RB ( FE_INVALID ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -99,7 +99,6 @@ T{ .BR llroundl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/lsearch.3 b/man3/lsearch.3 index a419435..211f41c 100644 --- a/man3/lsearch.3 +++ b/man3/lsearch.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Corrected prototype and include, aeb, 990927 -.TH lsearch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lsearch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lfind, lsearch \- linear search of an array .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <search.h> -.PP +.P .BI "void *lfind(const void " key [. size "], \ const void " base [. size " * ." nmemb ], .BI " size_t *" nmemb ", size_t " size , @@ -47,7 +47,7 @@ returns zero if the .I key object matches the array member, and nonzero otherwise. -.PP +.P If .BR lsearch () does not find a matching element, then the @@ -81,7 +81,6 @@ T{ .BR lsearch () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/lseek64.3 b/man3/lseek64.3 index aee84ed..9e2801f 100644 --- a/man3/lseek64.3 +++ b/man3/lseek64.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH lseek64 3 2023-07-20 "Linux man-pages 6.05.01" +.TH lseek64 3 2023-10-31 "Linux man-pages 6.7" .SH NAME lseek64 \- reposition 64-bit read/write file offset .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .BR "#define _LARGEFILE64_SOURCE" " /* See feature_test_macros(7) */" .B #include <sys/types.h> .B #include <unistd.h> -.PP +.P .BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence ); .fi .SH DESCRIPTION @@ -35,10 +35,10 @@ has the value or .BR SEEK_END , respectively. -.PP +.P For more details, return value, and errors, see .BR lseek (2). -.PP +.P Four interfaces are available: .BR lseek (), .BR lseek64 (), @@ -51,36 +51,36 @@ and .\" .SS lseek() Prototype: -.PP +.P .in +4n .EX .BI "off_t lseek(int " fd ", off_t " offset ", int " whence ); .EE .in -.PP +.P The C library's .BR lseek () wrapper function uses the type .IR off_t . This is a 32-bit signed type on 32-bit architectures, unless one compiles with -.PP +.P .in +4n .EX #define _FILE_OFFSET_BITS 64 .EE .in -.PP +.P in which case it is a 64-bit signed type. .SS lseek64() Prototype: -.PP +.P .in +4n .EX .BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence ); .EE .in -.PP +.P The .BR lseek64 () library function uses a 64-bit type even when @@ -89,13 +89,13 @@ is a 32-bit type. Its prototype (and the type .IR off64_t ) is available only when one compiles with -.PP +.P .in +4n .EX #define _LARGEFILE64_SOURCE .EE .in -.PP +.P The function .BR lseek64 () .\" in glibc 2.0.94, not in glibc 2.0.6 @@ -103,13 +103,13 @@ is available since glibc 2.1. .\" .SS llseek() Prototype: -.PP +.P .in +4n .EX .BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence ); .EE .in -.PP +.P The type .I loff_t is a 64-bit signed type. @@ -122,14 +122,14 @@ the above prototype, or something equivalent, to their own source. When users complained about data loss caused by a miscompilation of .BR e2fsck (8), glibc 2.1.3 added the link-time warning -.PP +.P .in +4n "the \`llseek\' function may be dangerous; use \`lseek64\' instead." .in -.PP +.P This makes this function unusable if one desires a warning-free compilation. -.PP +.P Since glibc 2.28, .\" glibc commit 5c5c0dd747070db624c8e2c43691cec854f114ef this function symbol is no longer available to newly linked applications. @@ -139,17 +139,17 @@ On 32-bit architectures, this is the system call that is used (by the C library wrapper functions) to implement all of the above functions. The prototype is: -.PP +.P .in +4n .EX .BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo , .BI " loff_t *" result ", int " whence ); .EE .in -.PP +.P For more details, see .BR llseek (2). -.PP +.P 64-bit systems don't need an .BR _llseek () system call. @@ -182,7 +182,6 @@ T{ .BR lseek64 () T} Thread safety MT-Safe .TE -.sp 1 .SH NOTES .BR lseek64 () is one of the functions that was specified in the Large File Summit (LFS) diff --git a/man3/makecontext.3 b/man3/makecontext.3 index c4e2378..5fc342f 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -6,7 +6,7 @@ .\" .\" 2006-08-02, mtk, Added example program .\" -.TH makecontext 3 2023-07-20 "Linux man-pages 6.05.01" +.TH makecontext 3 2023-10-31 "Linux man-pages 6.7" .SH NAME makecontext, swapcontext \- manipulate user context .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <ucontext.h> -.PP +.P .BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc \ ", ...);" .BI "int swapcontext(ucontext_t *restrict " oucp , @@ -36,7 +36,7 @@ and .BR swapcontext () that allow user-level context switching between multiple threads of control within a process. -.PP +.P The .BR makecontext () function modifies the context pointed to @@ -48,7 +48,7 @@ the caller must allocate a new stack for this context and assign its address to \fIucp\->uc_stack\fP, and define a successor context and assign its address to \fIucp\->uc_link\fP. -.PP +.P When this context is later activated (using .BR setcontext (3) or @@ -62,7 +62,7 @@ the caller must specify the number of these arguments in .IR argc . When this function returns, the successor context is activated. If the successor context pointer is NULL, the thread exits. -.PP +.P The .BR swapcontext () function saves the current context in @@ -112,7 +112,6 @@ T} Thread safety T{ MT-Safe race:oucp race:ucp T} .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -129,7 +128,7 @@ to be used as the stack, regardless of the direction of growth of the stack. Thus, it is not necessary for the user program to worry about this direction. -.PP +.P On architectures where .I int and pointer types are the same size @@ -152,7 +151,7 @@ The example program below demonstrates the use of and .BR swapcontext (). Running the program produces the following output: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/makedev.3 b/man3/makedev.3 index af44a79..dbf851a 100644 --- a/man3/makedev.3 +++ b/man3/makedev.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH makedev 3 2023-07-20 "Linux man-pages 6.05.01" +.TH makedev 3 2023-10-31 "Linux man-pages 6.7" .SH NAME makedev, major, minor \- manage a device number .SH LIBRARY @@ -13,9 +13,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/sysmacros.h> -.PP +.P .BI "dev_t makedev(unsigned int " maj ", unsigned int " min ); -.PP +.P .BI "unsigned int major(dev_t " dev ); .BI "unsigned int minor(dev_t " dev ); .fi @@ -25,14 +25,14 @@ a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type .IR dev_t . -.PP +.P Given major and minor device IDs, .BR makedev () combines these to produce a device ID, returned as the function result. This device ID can be given to .BR mknod (2), for example. -.PP +.P The .BR major () and @@ -58,7 +58,6 @@ T{ .BR minor () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The BSDs expose the definitions for these macros via .IR <sys/types.h> . @@ -68,7 +67,7 @@ None. BSD, HP-UX, Solaris, AIX, Irix. .\" The header location is inconsistent: .\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h. -.PP +.P These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: @@ -77,7 +76,7 @@ they have been aliases for three GNU-specific functions: and .BR gnu_dev_minor (). The latter names are exported, but the traditional names are more portable. -.PP +.P Depending on the version, glibc also exposes definitions for these macros from .I <sys/types.h> diff --git a/man3/mallinfo.3 b/man3/mallinfo.3 index af08137..dcac910 100644 --- a/man3/mallinfo.3 +++ b/man3/mallinfo.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mallinfo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mallinfo 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mallinfo, mallinfo2 \- obtain memory allocation information .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .B struct mallinfo mallinfo(void); .B struct mallinfo2 mallinfo2(void); .fi @@ -25,18 +25,18 @@ The structure returned by each function contains the same fields. However, the older function, .BR mallinfo (), is deprecated since the type used for the fields is too small (see BUGS). -.PP +.P Note that not all allocations are visible to these functions; see BUGS and consider using .BR malloc_info (3) instead. -.PP +.P The .I mallinfo2 structure returned by .BR mallinfo2 () is defined as follows: -.PP +.P .in +4n .EX struct mallinfo2 { @@ -54,14 +54,14 @@ struct mallinfo2 { }; .EE .in -.PP +.P The .I mallinfo structure returned by the deprecated .BR mallinfo () function is exactly the same, except that the fields are typed as .IR int . -.PP +.P The structure fields contain the following information: .TP 10 .I arena @@ -134,7 +134,7 @@ T} Thread safety T{ MT-Unsafe init const:mallopt T} .TE -.sp 1 +.P .BR mallinfo ()/ .BR mallinfo2 () would access some global internal objects. @@ -173,7 +173,7 @@ See and .BR malloc_info (3) for alternatives that include information about other arenas. -.PP +.P The fields of the .I mallinfo structure that is returned by the older @@ -189,11 +189,11 @@ The program below employs to retrieve memory allocation statistics before and after allocating and freeing some blocks of memory. The statistics are displayed on standard output. -.PP +.P The first two command-line arguments specify the number and size of blocks to be allocated with .BR malloc (3). -.PP +.P The remaining three arguments specify which of the allocated blocks should be freed with .BR free (3). @@ -207,11 +207,11 @@ of the last block to be freed (default is one greater than the maximum block number). If these three arguments are omitted, then the defaults cause all allocated blocks to be freed. -.PP +.P In the following example run of the program, 1000 allocations of 100 bytes are performed, and then every second allocated block is freed: -.PP +.P .in +4n .EX $ \fB./a.out 1000 100 2\fP diff --git a/man3/malloc.3 b/man3/malloc.3 index eee0b30..0ef2cc9 100644 --- a/man3/malloc.3 +++ b/man3/malloc.3 @@ -12,7 +12,7 @@ .\" FIXME . Review http://austingroupbugs.net/view.php?id=374 .\" to see what changes are required on this page. .\" -.TH malloc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME malloc, free, calloc, realloc, reallocarray \- allocate and free dynamic memory .SH LIBRARY @@ -21,19 +21,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "void *malloc(size_t " size ); .BI "void free(void *_Nullable " ptr ); .BI "void *calloc(size_t " nmemb ", size_t " size ); .BI "void *realloc(void *_Nullable " ptr ", size_t " size ); .BI "void *reallocarray(void *_Nullable " ptr ", size_t " nmemb ", size_t " size ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR reallocarray (): .nf Since glibc 2.29: @@ -87,7 +87,7 @@ is 0, then .BR calloc () returns a unique pointer value that can later be successfully passed to .BR free (). -.PP +.P If the multiplication of .I nmemb and @@ -99,7 +99,7 @@ By contrast, an integer overflow would not be detected in the following call to .BR malloc (), with the result that an incorrectly sized block of memory would be allocated: -.PP +.P .in +4n .EX malloc(nmemb * size); @@ -119,14 +119,14 @@ up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will .I not be initialized. -.PP +.P If .I ptr is NULL, then the call is equivalent to .IR malloc(size) , for all values of .IR size . -.PP +.P If .I size is equal to zero, @@ -135,7 +135,7 @@ and is not NULL, then the call is equivalent to .I free(ptr) (but see "Nonportable behavior" for portability issues). -.PP +.P Unless .I ptr is NULL, it must have been returned by an earlier call to @@ -156,13 +156,13 @@ elements, each of which is .I size bytes. It is equivalent to the call -.PP +.P .in +4n .EX realloc(ptr, nmemb * size); .EE .in -.PP +.P However, unlike that .BR realloc () call, @@ -187,12 +187,12 @@ Attempting to allocate more than .B PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow. -.PP +.P The .BR free () function returns no value, and preserves .IR errno . -.PP +.P The .BR realloc () and @@ -247,7 +247,6 @@ T{ .BR realloc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR malloc () @@ -275,12 +274,12 @@ POSIX.1-2001, C89. .BR reallocarray () glibc 2.26. OpenBSD 5.6, FreeBSD 11.0. -.PP +.P .BR malloc () and related functions rejected sizes greater than .B PTRDIFF_MAX starting in glibc 2.30. -.PP +.P .BR free () preserved .I errno @@ -301,7 +300,7 @@ in .BR proc (5), and the Linux kernel source file .IR Documentation/vm/overcommit\-accounting.rst . -.PP +.P Normally, .BR malloc () allocates memory from the heap, and adjusts the size of the heap @@ -324,7 +323,7 @@ were unaffected by the resource limit; since Linux 4.7, this limit is also enforced for allocations performed using .BR mmap (2). -.PP +.P To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. @@ -342,7 +341,7 @@ by the system or .BR mmap (2)), and managed with its own mutexes. -.PP +.P If your program uses a private memory allocator, it should do so by replacing .BR malloc (), @@ -364,11 +363,11 @@ fail without having a valid reason in .IR errno . Private memory allocators may also need to replace other glibc functions; see "Replacing malloc" in the glibc manual for details. -.PP +.P Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice. -.PP +.P The .BR malloc () implementation is tunable via environment variables; see @@ -383,14 +382,14 @@ other implementations may return NULL without setting and portable POSIX programs should tolerate such behavior. See .BR realloc (3p). -.PP +.P POSIX requires memory allocators to set .I errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this. -.PP +.P Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of .BR malloc (), @@ -455,7 +454,7 @@ my_mallocarray(size_t nmemb, size_t size) .BR mcheck (3), .BR mtrace (3), .BR posix_memalign (3) -.PP +.P For details of the GNU C library implementation, see .UR https://sourceware.org/glibc/wiki/MallocInternals .UE . diff --git a/man3/malloc_get_state.3 b/man3/malloc_get_state.3 index 1577735..bf6fe5e 100644 --- a/man3/malloc_get_state.3 +++ b/man3/malloc_get_state.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_get_state 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_get_state 3 2023-11-01 "Linux man-pages 6.7" .SH NAME malloc_get_state, malloc_set_state \- record and restore state of malloc implementation @@ -13,14 +13,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .B void *malloc_get_state(void); .BI "int malloc_set_state(void *" state ); .fi .SH DESCRIPTION .IR Note : -these function are removed in glibc 2.25. -.PP +these functions are removed in glibc 2.25. +.P The .BR malloc_get_state () function records the current state of all @@ -37,7 +37,7 @@ and a pointer to that data structure is returned as the function result. (It is the caller's responsibility to .BR free (3) this memory.) -.PP +.P The .BR malloc_set_state () function restores the state of all @@ -52,7 +52,7 @@ returns a pointer to a newly allocated opaque data structure. On error (for example, memory could not be allocated for the data structure), .BR malloc_get_state () returns NULL. -.PP +.P On success, .BR malloc_set_state () returns 0. @@ -85,7 +85,6 @@ T{ .BR malloc_set_state () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH NOTES @@ -94,7 +93,7 @@ These functions are useful when using this implementation as part of a shared library, and the heap contents are saved/restored via some other method. This technique is used by GNU Emacs to implement its "dumping" function. -.PP +.P Hook function pointers are never saved or restored by these functions, with two exceptions: if malloc checking (see diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index 8ade1b1..bb1aa69 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -5,7 +5,7 @@ .\" Heavily based on glibc documentation .\" Polished, added docs, removed glibc doc bug, 2002-07-20, aeb .\" -.TH __malloc_hook 3 2023-05-03 "Linux man-pages 6.05.01" +.TH __malloc_hook 3 2023-10-31 "Linux man-pages 6.7" .SH NAME __malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, __realloc_hook, @@ -16,19 +16,19 @@ Standard C library .SH SYNOPSIS .nf .B "#include <malloc.h>" -.PP +.P .BI "void *(*volatile __malloc_hook)(size_t " size ", const void *" caller ); -.PP +.P .BI "void *(*volatile __realloc_hook)(void *" ptr ", size_t " size , .BI " const void *" caller ); -.PP +.P .BI "void *(*volatile __memalign_hook)(size_t " alignment ", size_t " size , .BI " const void *" caller ); -.PP +.P .BI "void (*volatile __free_hook)(void *" ptr ", const void *" caller ); -.PP +.P .B "void (*__malloc_initialize_hook)(void);" -.PP +.P .B "void (*volatile __after_morecore_hook)(void);" .fi .SH DESCRIPTION @@ -41,24 +41,24 @@ by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example. -.PP +.P The variable .B __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following: -.PP +.P .in +4n .EX void (*__malloc_initialize_hook)(void) = my_init_hook; .EE .in -.PP +.P Now the function .IR my_init_hook () can do the initialization of all hooks. -.PP +.P The four functions pointed to by .BR __malloc_hook , .BR __realloc_hook , @@ -74,7 +74,7 @@ respectively, except that they have a final argument that gives the address of the caller of .BR malloc (3), etc. -.PP +.P The variable .B __after_morecore_hook points at a function that is called each time after @@ -101,7 +101,7 @@ and .BR calloc (). .SH EXAMPLES Here is a short example of how to use these variables. -.PP +.P .EX #include <stdio.h> #include <malloc.h> diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 index 045430b..9df31cf 100644 --- a/man3/malloc_info.3 +++ b/man3/malloc_info.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_info 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_info 3 2024-02-26 "Linux man-pages 6.7" .SH NAME malloc_info \- export malloc state to a stream .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .BI "int malloc_info(int " options ", FILE *" stream ); .fi .SH DESCRIPTION @@ -25,7 +25,7 @@ The string is printed on the file stream .IR stream . The exported string includes information about all arenas (see .BR malloc (3)). -.PP +.P As currently implemented, .I options must be zero. @@ -55,7 +55,6 @@ T{ .BR malloc_info () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -66,13 +65,13 @@ The memory-allocation information is provided as an XML string because the information may change over time (according to changes in the underlying implementation). The output XML string includes a version field. -.PP +.P The .BR open_memstream (3) function can be used to send the output of .BR malloc_info () directly into a buffer in memory, rather than to a file. -.PP +.P The .BR malloc_info () function is designed to address deficiencies in @@ -90,14 +89,14 @@ The third argument controls the size of the blocks to be allocated. The main thread creates blocks of this size, the second thread created by the program allocates blocks of twice this size, the third thread allocates blocks of three times this size, and so on. -.PP +.P The program calls .BR malloc_info () twice to display the memory-allocation state. The first call takes place before any threads are created or memory allocated. The second call is performed after all threads have allocated memory. -.PP +.P In the following example, the command-line arguments specify the creation of one additional thread, and both the main thread and the additional thread @@ -105,7 +104,7 @@ allocate 10000 blocks of memory. After the blocks of memory have been allocated, .BR malloc_info () shows the state of two allocation arenas. -.PP +.P .in +4n .EX .RB "$ " "getconf GNU_LIBC_VERSION" diff --git a/man3/malloc_stats.3 b/man3/malloc_stats.3 index 7c17d2c..95980e5 100644 --- a/man3/malloc_stats.3 +++ b/man3/malloc_stats.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_stats 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_stats 3 2023-10-31 "Linux man-pages 6.7" .SH NAME malloc_stats \- print memory allocation statistics .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .B void malloc_stats(void); .fi .SH DESCRIPTION @@ -49,7 +49,6 @@ T{ .BR malloc_stats () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY diff --git a/man3/malloc_trim.3 b/man3/malloc_trim.3 index f57de44..02dba1e 100644 --- a/man3/malloc_trim.3 +++ b/man3/malloc_trim.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_trim 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_trim 3 2023-10-31 "Linux man-pages 6.7" .SH NAME malloc_trim \- release free memory from the heap .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .BI "int malloc_trim(size_t " pad ); .fi .SH DESCRIPTION @@ -24,7 +24,7 @@ function attempts to release free memory from the heap or .BR madvise (2) with suitable arguments). -.PP +.P The .I pad argument specifies the amount of free space to leave untrimmed @@ -56,7 +56,6 @@ T{ .BR malloc_trim () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH VERSIONS @@ -67,13 +66,13 @@ Only the main heap (using honors the .I pad argument; thread heaps do not. -.PP +.P Since glibc 2.8 this function frees memory in all arenas and in all chunks with whole free pages. .\" See commit 68631c8eb92ff38d9da1ae34f6aa048539b199cc .\" (dated 2007-12-16) which adds iteration over all .\" arenas and frees all pages in chunks which are free. -.PP +.P Before glibc 2.8 this function only freed memory at the top of the heap in the main arena. .SH SEE ALSO diff --git a/man3/malloc_usable_size.3 b/man3/malloc_usable_size.3 index 91d22d8..3c30aae 100644 --- a/man3/malloc_usable_size.3 +++ b/man3/malloc_usable_size.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_usable_size 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_usable_size 3 2023-10-31 "Linux man-pages 6.7" .SH NAME malloc_usable_size \- obtain size of block of memory allocated from heap .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .BI "size_t malloc_usable_size(void *_Nullable " ptr ); .fi .SH DESCRIPTION @@ -42,7 +42,6 @@ T{ .BR malloc_usable_size () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH CAVEATS diff --git a/man3/mallopt.3 b/man3/mallopt.3 index 5fdda5c..6922b0f 100644 --- a/man3/mallopt.3 +++ b/man3/mallopt.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mallopt 3 2023-05-03 "Linux man-pages 6.05.01" +.TH mallopt 3 2024-02-26 "Linux man-pages 6.7" .SH NAME mallopt \- set memory allocation parameters .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <malloc.h> -.PP +.P .BI "int mallopt(int " param ", int " value ); .fi .SH DESCRIPTION @@ -25,7 +25,7 @@ The argument specifies the parameter to be modified, and .I value specifies the new value for that parameter. -.PP +.P The following values can be specified for .IR param : .TP @@ -355,7 +355,7 @@ then the settings take precedence.) For security reasons, these variables are ignored in set-user-ID and set-group-ID programs. -.PP +.P The environment variables are as follows (note the trailing underscore at the end of the name of some variables): .TP @@ -455,7 +455,7 @@ glibc 2.0. Specifying an invalid value for .I param does not generate an error. -.PP +.P A calculation error within the glibc implementation means that a call of the form: .\" FIXME . This looks buggy: @@ -463,13 +463,13 @@ a call of the form: .\" malloc requests are rounded up: .\" (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12129 -.PP +.P .in +4n .EX mallopt(M_MXFAST, n) .EE .in -.PP +.P does not result in fastbins being employed for all allocations of size up to .IR n . To ensure desired results, @@ -480,7 +480,7 @@ where .I k is an integer. .\" Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t) -.PP +.P If .BR mallopt () is used to set @@ -510,11 +510,11 @@ then that argument is used to set the parameter. The program then allocates a block of memory, and frees it twice (an error). -.PP +.P The following shell session shows what happens when we run this program under glibc, with the default value for .BR M_CHECK_ACTION : -.PP +.P .in +4n .EX $ \fB./a.out\fP @@ -536,10 +536,10 @@ bff53000\-bff74000 rw\-p 00000000 00:00 0 [stack] Aborted (core dumped) .EE .in -.PP +.P The following runs show the results when employing other values for .BR M_CHECK_ACTION : -.PP +.P .in +4n .EX $ \fB./a.out 1\fP # Diagnose error and continue @@ -554,11 +554,11 @@ main(): returned from first free() call main(): returned from second free() call .EE .in -.PP +.P The next run shows how to set the same parameter using the .B MALLOC_CHECK_ environment variable: -.PP +.P .in +4n .EX $ \fBMALLOC_CHECK_=1 ./a.out\fP diff --git a/man3/matherr.3 b/man3/matherr.3 index 8e9a973..351baf5 100644 --- a/man3/matherr.3 +++ b/man3/matherr.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH matherr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH matherr 3 2024-02-26 "Linux man-pages 6.7" .SH NAME matherr \- SVID math library exception handling .SH LIBRARY @@ -13,9 +13,9 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "[[deprecated]] int matherr(struct exception *" exc ); -.PP +.P .B [[deprecated]] extern _LIB_VERSION_TYPE _LIB_VERSION; .fi .SH DESCRIPTION @@ -32,7 +32,7 @@ and This page documents the .BR matherr () mechanism as an aid for maintaining and porting older applications. -.PP +.P The System V Interface Definition (SVID) specifies that various math functions should invoke a function called .BR matherr () @@ -42,7 +42,7 @@ after .BR matherr () returns, the system then returns to the math function, which in turn returns to the caller. -.PP +.P To employ .BR matherr (), the programmer must define the @@ -55,7 +55,7 @@ and assign the value .B _SVID_ to the external variable .BR _LIB_VERSION . -.PP +.P The system provides a default version of .BR matherr (). This version does nothing, and returns zero @@ -67,7 +67,7 @@ version, which will be invoked when an exception occurs. The function is invoked with one argument, a pointer to an .I exception structure, defined as follows: -.PP +.P .in +4n .EX struct exception { @@ -79,7 +79,7 @@ struct exception { } .EE .in -.PP +.P The .I type field has one of the following values: @@ -130,7 +130,7 @@ is set to Partial loss of significance. This value is unused on glibc (and many other systems). -.PP +.P The .I arg1 and @@ -138,7 +138,7 @@ and fields are the arguments supplied to the function .RI ( arg2 is undefined for functions that take only one argument). -.PP +.P The .I retval field specifies the return value that the math @@ -146,14 +146,14 @@ function will return to its caller. The programmer-defined .BR matherr () can modify this field to change the return value of the math function. -.PP +.P If the .BR matherr () function returns zero, then the system sets .I errno as described above, and may print an error message on standard error (see below). -.PP +.P If the .BR matherr () function returns a nonzero value, then the system does not set @@ -169,15 +169,15 @@ when calling .BR matherr (). The "Result" column is the default return value assigned to .IR exc\->retval . -.PP +.P The "Msg?" and "errno" columns describe the default behavior if .BR matherr () returns zero. If the "Msg?" columns contains "y", then the system prints an error message on standard error. -.PP +.P The table uses the following notations and abbreviations: -.PP +.P .RS .TS l l. @@ -270,7 +270,6 @@ T{ .BR matherr () T} Thread safety MT-Safe .TE -.sp 1 .SH EXAMPLES The example program demonstrates the use of .BR matherr () @@ -292,12 +291,12 @@ If the optional third command-line argument is supplied, then it specifies an alternative return value that .BR matherr () should assign as the return value of the math function. -.PP +.P The following example run, where .BR log (3) is given an argument of 0.0, does not use .BR matherr (): -.PP +.P .in +4n .EX .RB "$" " ./a.out 0.0" @@ -305,11 +304,11 @@ errno: Numerical result out of range x=\-inf .EE .in -.PP +.P In the following run, .BR matherr () is called, and returns 0: -.PP +.P .in +4n .EX .RB "$" " ./a.out 0.0 0" @@ -321,13 +320,13 @@ errno: Numerical argument out of domain x=\-340282346638528859811704183484516925440.000000 .EE .in -.PP +.P The message "log: SING error" was printed by the C library. -.PP +.P In the following run, .BR matherr () is called, and returns a nonzero value: -.PP +.P .in +4n .EX .RB "$" " ./a.out 0.0 1" @@ -337,16 +336,16 @@ matherr SING exception in log() function x=\-340282346638528859811704183484516925440.000000 .EE .in -.PP +.P In this case, the C library did not print a message, and .I errno was not set. -.PP +.P In the following run, .BR matherr () is called, changes the return value of the math function, and returns a nonzero value: -.PP +.P .in +4n .EX .RB "$" " ./a.out 0.0 1 12345.0" @@ -358,7 +357,7 @@ x=12345.000000 .in .SS Program source \& -.\" [[deprecated]] SRC BEGIN (matherr.c) +.\" SRC BEGIN (matherr.c) .EX #define _SVID_SOURCE #include <errno.h> diff --git a/man3/mblen.3 b/man3/mblen.3 index 0a8bbde..6946b00 100644 --- a/man3/mblen.3 +++ b/man3/mblen.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mblen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mblen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mblen \- determine number of bytes in next multibyte character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int mblen(const char " s [. n "], size_t " n ); .fi .SH DESCRIPTION @@ -39,7 +39,7 @@ If the multibyte character is not the null wide character, it returns the number of bytes that were consumed from .IR s . If the multibyte character is the null wide character, it returns 0. -.PP +.P If the .I n bytes starting at @@ -53,14 +53,14 @@ This can happen even if is greater than or equal to .IR MB_CUR_MAX , if the multibyte string contains redundant shift sequences. -.PP +.P If the multibyte string starting at .I s contains an invalid multibyte sequence before the next complete character, .BR mblen () also returns \-1. -.PP +.P If .I s is NULL, the @@ -97,7 +97,6 @@ T{ .BR mblen () T} Thread safety MT-Unsafe race .TE -.sp 1 .SH VERSIONS The function .BR mbrlen (3) diff --git a/man3/mbrlen.3 b/man3/mbrlen.3 index bf19f88..a444a6a 100644 --- a/man3/mbrlen.3 +++ b/man3/mbrlen.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbrlen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbrlen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mbrlen \- determine number of bytes in next multibyte character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t mbrlen(const char " s "[restrict ." n "], size_t " n , .BI " mbstate_t *restrict " ps ); .fi @@ -40,7 +40,7 @@ If the multibyte character is the null wide character, it resets the shift state .I *ps to the initial state and returns 0. -.PP +.P If the .I n bytes starting at @@ -56,7 +56,7 @@ This can happen even if .IR MB_CUR_MAX , if the multibyte string contains redundant shift sequences. -.PP +.P If the multibyte string starting at .I s contains an invalid multibyte @@ -72,7 +72,7 @@ In this case, the effects on .I *ps are undefined. -.PP +.P If .I ps is NULL, a static anonymous state known only to the @@ -115,7 +115,6 @@ T{ .BR mbrlen () T} Thread safety MT-Unsafe race:mbrlen/!ps .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3 index 2dc8f15..c35f540 100644 --- a/man3/mbrtowc.3 +++ b/man3/mbrtowc.3 @@ -10,7 +10,7 @@ .\" http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbrtowc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbrtowc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mbrtowc \- convert a multibyte sequence to a wide character .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n ], .BI " size_t " n ", mbstate_t *restrict " ps ); .fi @@ -50,7 +50,7 @@ If the converted wide character is L\[aq]\e0\[aq], it resets the shift state .I *ps to the initial state and returns 0. -.PP +.P If the .I n bytes starting at @@ -66,7 +66,7 @@ This can happen even if .IR MB_CUR_MAX , if the multibyte string contains redundant shift sequences. -.PP +.P If the multibyte string starting at .I s contains an invalid multibyte @@ -82,7 +82,7 @@ In this case, the effects on .I *ps are undefined. -.PP +.P A different case is when .I s is not NULL but @@ -92,7 +92,7 @@ In this case, the .BR mbrtowc () function behaves as above, except that it does not store the converted wide character in memory. -.PP +.P A third case is when .I s is NULL. @@ -124,7 +124,7 @@ function puts .I *ps in the initial state and returns 0. -.PP +.P In all of the above cases, if .I ps is NULL, a static anonymous @@ -142,7 +142,7 @@ object .I a can be initialized to the initial state by zeroing it, for example using -.PP +.P .in +4n .EX memset(&a, 0, sizeof(a)); @@ -185,7 +185,6 @@ T{ .BR mbrtowc () T} Thread safety MT-Unsafe race:mbrtowc/!ps .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/mbsinit.3 b/man3/mbsinit.3 index 41a43a4..fc76d62 100644 --- a/man3/mbsinit.3 +++ b/man3/mbsinit.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbsinit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbsinit 3 2024-01-28 "Linux man-pages 6.7" .SH NAME mbsinit \- test for initial shift state .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int mbsinit(const mbstate_t *" ps ); .fi .SH DESCRIPTION @@ -29,8 +29,8 @@ Conversion of a string uses a finite-state machine; when it is interrupted after the complete conversion of a number of characters, it may need to save a state for processing the remaining characters. Such a conversion -state is needed for the sake of encodings such as ISO-2022 and UTF-7. -.PP +state is needed for the sake of encodings such as ISO/IEC\~2022 and UTF-7. +.P The initial state is the state at the beginning of conversion of a string. There are two kinds of state: the one used by multibyte to wide character conversion functions, such as @@ -42,7 +42,7 @@ but they both fit in a .IR mbstate_t , and they both have the same representation for an initial state. -.PP +.P For 8-bit encodings, all states are equivalent to the initial state. For multibyte encodings like UTF-8, EUC-*, BIG5, or SJIS, the wide character to multibyte conversion functions never produce non-initial states, but the @@ -50,26 +50,26 @@ multibyte to wide-character conversion functions like .BR mbrtowc (3) do produce non-initial states when interrupted in the middle of a character. -.PP +.P One possible way to create an .I mbstate_t in initial state is to set it to zero: -.PP +.P .in +4n .EX mbstate_t state; memset(&state, 0, sizeof(state)); .EE .in -.PP +.P On Linux, the following works as well, but might generate compiler warnings: -.PP +.P .in +4n .EX mbstate_t state = { 0 }; .EE .in -.PP +.P The function .BR mbsinit () tests whether @@ -98,7 +98,6 @@ T{ .BR mbsinit () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3 index b9d0029..5d683a0 100644 --- a/man3/mbsnrtowcs.3 +++ b/man3/mbsnrtowcs.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH mbsnrtowcs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbsnrtowcs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mbsnrtowcs \- convert a multibyte string to a wide-character string .SH LIBRARY @@ -17,17 +17,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t mbsnrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src , .BI " size_t " nms ", size_t " len \ ", mbstate_t *restrict " ps ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mbsnrtowcs (): .nf Since glibc 2.10: @@ -46,7 +46,7 @@ the number of bytes to be converted, starting at is limited to at most .I nms bytes. -.PP +.P If .I dest is not NULL, the @@ -120,13 +120,13 @@ characters written to .IR dest , excluding the terminating null wide character, is returned. -.PP +.P According to POSIX.1, if the input buffer ends with an incomplete character, it is unspecified whether conversion stops at the end of the previous character (if any), or at the end of the input buffer. The glibc implementation adopts the former behavior. -.PP +.P If .I dest is NULL, @@ -135,14 +135,14 @@ is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no destination length limit exists. -.PP +.P In both of the above cases, if .I ps is NULL, a static anonymous state known only to the .BR mbsnrtowcs () function is used instead. -.PP +.P The programmer must ensure that there is room for at least .I len wide @@ -179,7 +179,6 @@ T} Thread safety T{ MT-Unsafe race:mbsnrtowcs/!ps T} .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH NOTES @@ -189,7 +188,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P Passing NULL as .I ps is not multithread safe. diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3 index e613a14..6844536 100644 --- a/man3/mbsrtowcs.3 +++ b/man3/mbsrtowcs.3 @@ -9,31 +9,31 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbsrtowcs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbsrtowcs 3 2024-02-26 "Linux man-pages 6.7" .SH NAME -mbsrtowcs \- convert a multibyte string to a wide-character string +mbsrtowcs \- convert a multibyte string to a wide-character string (restartable) .SH LIBRARY Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf .B #include <wchar.h> -.PP -.BI "size_t mbsrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src , -.BI " size_t " len ", mbstate_t *restrict " ps ); +.P +.BI "size_t mbsrtowcs(wchar_t " dest "[restrict ." dsize ], +.BI " const char **restrict " src , +.BI " size_t " dsize ", mbstate_t *restrict " ps ); .fi .SH DESCRIPTION If .I dest -is not NULL, the -.BR mbsrtowcs () -function converts the +is not NULL, +convert the multibyte string .I *src to a wide-character string starting at .IR dest . At most -.I len +.I dsize wide characters are written to .IR dest . The shift state @@ -63,7 +63,7 @@ and is set to .BR EILSEQ . .IP \[bu] -.I len +.I dsize non-L\[aq]\e0\[aq] wide characters have been stored at .IR dest . In this case, @@ -86,16 +86,16 @@ is set to NULL, and the number of wide characters written to .IR dest , excluding the terminating null wide character, is returned. -.PP +.P If .I dest is NULL, -.I len +.I dsize is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no length limit exists. -.PP +.P In both of the above cases, if .I ps @@ -103,16 +103,23 @@ is NULL, a static anonymous state known only to the .BR mbsrtowcs () function is used instead. -.PP +.P +In order to avoid the case 2 above, the programmer should make sure +.I dsize +is +greater than or equal to +.IR "mbsrtowcs(NULL,src,0,ps)+1" . +.P The programmer must ensure that there is room for at least -.I len +.I dsize wide characters at .IR dest . +.P +This function is a restartable version of +.BR mbstowcs (3). .SH RETURN VALUE -The -.BR mbsrtowcs () -function returns the number of wide characters that make +The number of wide characters that make up the converted part of the wide-character string, not including the terminating null wide character. If an invalid multibyte sequence was @@ -140,7 +147,6 @@ T} Thread safety T{ MT-Unsafe race:mbsrtowcs/!ps T} .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -152,7 +158,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P Passing NULL as .I ps is not multithread safe. diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3 index c66b9c2..6a0d655 100644 --- a/man3/mbstowcs.3 +++ b/man3/mbstowcs.3 @@ -10,7 +10,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbstowcs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbstowcs 3 2023-11-14 "Linux man-pages 6.7" .SH NAME mbstowcs \- convert a multibyte string to a wide-character string .SH LIBRARY @@ -19,24 +19,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP -.BI "size_t mbstowcs(wchar_t " dest "[restrict ." n "], \ +.P +.BI "size_t mbstowcs(wchar_t " dest "[restrict ." dsize "], \ const char *restrict " src , -.BI " size_t " n ); +.BI " size_t " dsize ); .fi .SH DESCRIPTION If .I dest is not NULL, -the -.BR mbstowcs () -function converts the +convert the multibyte string .I src to a wide-character string starting at .IR dest . At most -.I n +.I dsize wide characters are written to .IR dest . The sequence of characters in the string @@ -49,7 +47,7 @@ In this case, .I (size_t)\ \-1 is returned. .IP \[bu] -.I n +.I dsize non-L\[aq]\e0\[aq] wide characters have been stored at .IR dest . In this case, the number of wide characters written to @@ -62,30 +60,28 @@ terminating null character (\[aq]\e0\[aq]). In this case, the number of wide characters written to .IR dest , excluding the terminating null wide character, is returned. -.PP -The programmer must ensure that there is room for at least -.I n -wide -characters at -.IR dest . -.PP +.P If .I dest is NULL, -.I n +.I dsize is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no length limit exists. -.PP +.P In order to avoid the case 2 above, the programmer should make sure -.I n +.I dsize is greater than or equal to .IR "mbstowcs(NULL,src,0)+1" . +.P +The programmer must ensure that there is room for at least +.I dsize +wide +characters at +.IR dest . .SH RETURN VALUE -The -.BR mbstowcs () -function returns the number of wide characters that make +The number of wide characters that make up the converted part of the wide-character string, not including the terminating null wide character. If an invalid multibyte sequence was @@ -106,7 +102,6 @@ T{ .BR mbstowcs () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The function .BR mbsrtowcs (3) @@ -128,7 +123,7 @@ The program below illustrates the use of .BR mbstowcs (), as well as some of the wide character classification functions. An example run is the following: -.PP +.P .in +4n .EX $ ./t_mbstowcs de_DE.UTF\-8 Grüße! diff --git a/man3/mbtowc.3 b/man3/mbtowc.3 index 743e5a7..0e07144 100644 --- a/man3/mbtowc.3 +++ b/man3/mbtowc.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH mbtowc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mbtowc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mbtowc \- convert a multibyte sequence to a wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int mbtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n "], \ size_t " n ); .fi @@ -47,7 +47,7 @@ does not point to a null byte (\[aq]\e0\[aq]), it returns the number of bytes that were consumed from .IR s , otherwise it returns 0. -.PP +.P If the .I n bytes starting at @@ -61,7 +61,7 @@ This can happen even if >= .IR MB_CUR_MAX , if the multibyte string contains redundant shift sequences. -.PP +.P A different case is when .I s is not NULL but @@ -71,7 +71,7 @@ In this case, the .BR mbtowc () function behaves as above, except that it does not store the converted wide character in memory. -.PP +.P A third case is when .I s is NULL. @@ -102,7 +102,7 @@ or 0 if .I s points to a null byte, or \-1 upon failure. -.PP +.P If .I s is NULL, the @@ -124,7 +124,6 @@ T{ .BR mbtowc () T} Thread safety MT-Unsafe race .TE -.sp 1 .SH VERSIONS This function is not multithread safe. The function diff --git a/man3/mcheck.3 b/man3/mcheck.3 index 97f217f..7b6c7da 100644 --- a/man3/mcheck.3 +++ b/man3/mcheck.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mcheck 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mcheck 3 2024-02-26 "Linux man-pages 6.7" .SH NAME mcheck, mcheck_check_all, mcheck_pedantic, mprobe \- heap consistency checking .SH LIBRARY @@ -12,11 +12,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <mcheck.h> -.PP +.P .BI "int mcheck(void (*" abortfunc ")(enum mcheck_status " mstatus )); .BI "int mcheck_pedantic(void (*" abortfunc ")(enum mcheck_status " mstatus )); .B void mcheck_check_all(void); -.PP +.P .BI "enum mcheck_status mprobe(void *" ptr ); .fi .SH DESCRIPTION @@ -30,7 +30,7 @@ on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory. -.PP +.P To be effective, the .BR mcheck () function must be called before the first call to @@ -42,7 +42,7 @@ inserts an implicit call to .BR mcheck () (with a NULL argument) before the first call to a memory-allocation function. -.PP +.P The .BR mcheck_pedantic () function is similar to @@ -50,14 +50,14 @@ function is similar to but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow! -.PP +.P The .BR mcheck_check_all () function causes an immediate check on all allocated blocks. This call is effective only if .BR mcheck () is called beforehand. -.PP +.P If the system detects an inconsistency in the heap, the caller-supplied function pointed to by .I abortfunc @@ -70,7 +70,7 @@ is NULL, a default function prints an error message on .I stderr and calls .BR abort (3). -.PP +.P The .BR mprobe () function performs a consistency check on @@ -82,7 +82,7 @@ function should be called beforehand (otherwise .BR mprobe () returns .BR MCHECK_DISABLED ). -.PP +.P The following list describes the values returned by .BR mprobe () or passed as the @@ -135,7 +135,6 @@ MT-Unsafe race:mcheck const:malloc_hooks T} .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -167,7 +166,7 @@ The program below calls with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/memccpy.3 b/man3/memccpy.3 index 6d14698..71e4fce 100644 --- a/man3/memccpy.3 +++ b/man3/memccpy.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:57:24 1993 by Rik Faith (faith@cs.unc.edu) -.TH memccpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memccpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memccpy \- copy memory area .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "void *memccpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], .BI " int " c ", size_t " n ); .fi @@ -35,7 +35,7 @@ stopping when the character .I c is found. -.PP +.P If the memory areas overlap, the results are undefined. .SH RETURN VALUE The @@ -66,7 +66,6 @@ T{ .BR memccpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/memchr.3 b/man3/memchr.3 index 92708cd..716fabc 100644 --- a/man3/memchr.3 +++ b/man3/memchr.3 @@ -10,7 +10,7 @@ .\" Modified Wed Feb 20 21:09:36 2002, Ian Redfern (redferni@logica.com) .\" 2008-07-09, mtk, add rawmemchr() .\" -.TH memchr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memchr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memchr, memrchr, rawmemchr \- scan memory for a character .SH LIBRARY @@ -19,18 +19,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "void *memchr(const void " s [. n "], int " c ", size_t " n ); .BI "void *memrchr(const void " s [. n "], int " c ", size_t " n ); -.PP +.P .BI "[[deprecated]] void *rawmemchr(const void *" s ", int " c ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR memrchr (), .BR rawmemchr (): .nf @@ -52,7 +52,7 @@ and the bytes of the memory area pointed to by .I s are interpreted as .IR "unsigned char" . -.PP +.P The .BR memrchr () function is like the @@ -63,7 +63,7 @@ except that it searches backward from the end of the bytes pointed to by .I s instead of forward from the beginning. -.PP +.P The .BR rawmemchr () function is similar to @@ -90,7 +90,7 @@ and functions return a pointer to the matching byte or NULL if the character does not occur in the given memory area. -.PP +.P The .BR rawmemchr () function returns a pointer to the matching byte. @@ -110,7 +110,6 @@ T{ .BR rawmemchr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR memchr () diff --git a/man3/memcmp.3 b/man3/memcmp.3 index f3d94ea..76a8934 100644 --- a/man3/memcmp.3 +++ b/man3/memcmp.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu) -.TH memcmp 3 2023-07-30 "Linux man-pages 6.05.01" +.TH memcmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memcmp \- compare memory areas .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "int memcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); .fi .SH DESCRIPTION @@ -33,7 +33,7 @@ function returns an integer less than, equal to, or greater than zero if the first \fIn\fP bytes of \fIs1\fP is found, respectively, to be less than, to match, or be greater than the first \fIn\fP bytes of \fIs2\fP. -.PP +.P For a nonzero return value, the sign is determined by the sign of the difference between the first pair of bytes (interpreted as .IR "unsigned char" ) @@ -41,7 +41,7 @@ that differ in .I s1 and .IR s2 . -.PP +.P If .I n is zero, the return value is zero. @@ -59,7 +59,6 @@ T{ .BR memcmp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/memcpy.3 b/man3/memcpy.3 index ec8e3b4..553a261 100644 --- a/man3/memcpy.3 +++ b/man3/memcpy.3 @@ -9,7 +9,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:41:09 1993 by Rik Faith (faith@cs.unc.edu) -.TH memcpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memcpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memcpy \- copy memory area .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "void *memcpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], .BI " size_t " n ); .fi @@ -49,7 +49,6 @@ T{ .BR memcpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -70,7 +69,7 @@ in which bytes were copied from .I src to .IR dest . -.PP +.P This change revealed breakages in a number of applications that performed copying with overlapping areas. .\" Adobe Flash player was the highest profile example: diff --git a/man3/memfrob.3 b/man3/memfrob.3 index 3f19845..7f7e344 100644 --- a/man3/memfrob.3 +++ b/man3/memfrob.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:54:45 1993 by Rik Faith (faith@cs.unc.edu) -.TH memfrob 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memfrob 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memfrob \- frobnicate (obfuscate) a memory area .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "void *memfrob(void " s [. n "], size_t " n ); .fi .SH DESCRIPTION @@ -31,7 +31,7 @@ The effect can be reversed by using .BR memfrob () on the obfuscated memory area. -.PP +.P Note that this function is not a proper encryption routine as the XOR constant is fixed, and is suitable only for hiding strings. .SH RETURN VALUE @@ -53,7 +53,6 @@ T{ .BR memfrob () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH SEE ALSO diff --git a/man3/memmem.3 b/man3/memmem.3 index f87203c..711361d 100644 --- a/man3/memmem.3 +++ b/man3/memmem.3 @@ -8,7 +8,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 18:50:48 1993 by Rik Faith (faith@cs.unc.edu) .\" Interchanged 'needle' and 'haystack'; added history, aeb, 980113. -.TH memmem 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memmem 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memmem \- locate a substring .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "void *memmem(const void " haystack [. haystacklen "], size_t " haystacklen , .BI " const void " needle [. needlelen "], size_t " needlelen ); .fi @@ -54,7 +54,6 @@ T{ .BR memmem () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/memmove.3 b/man3/memmove.3 index 6b3b8f0..f0e3e9f 100644 --- a/man3/memmove.3 +++ b/man3/memmove.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:49:59 1993 by Rik Faith (faith@cs.unc.edu) -.TH memmove 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memmove 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memmove \- copy memory area .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "void *memmove(void " dest [. n "], const void " src [. n "], size_t " n ); .fi .SH DESCRIPTION @@ -57,7 +57,6 @@ T{ .BR memmove () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/mempcpy.3 b/man3/mempcpy.3 index 46337c2..376636f 100644 --- a/man3/mempcpy.3 +++ b/man3/mempcpy.3 @@ -6,7 +6,7 @@ .\" Heavily based on glibc infopages, copyright Free Software Foundation .\" .\" aeb, 2003, polished a little -.TH mempcpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mempcpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mempcpy, wmempcpy \- copy memory area .SH LIBRARY @@ -16,13 +16,13 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "void *mempcpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], .BI " size_t " n ); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <wchar.h> -.PP +.P .BI "wchar_t *wmempcpy(wchar_t " dest "[restrict ." n ], .BI " const wchar_t " src "[restrict ." n ], .BI " size_t " n ); @@ -42,10 +42,10 @@ into the object pointed to by But instead of returning the value of .I dest it returns a pointer to the byte following the last written byte. -.PP +.P This function is useful in situations where a number of objects shall be copied to consecutive memory positions. -.PP +.P The .BR wmempcpy () function is identical but takes @@ -72,7 +72,6 @@ T{ .BR wmempcpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY diff --git a/man3/memset.3 b/man3/memset.3 index b56ef46..64eb203 100644 --- a/man3/memset.3 +++ b/man3/memset.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:49:23 1993 by Rik Faith (faith@cs.unc.edu) -.TH memset 3 2023-07-20 "Linux man-pages 6.05.01" +.TH memset 3 2023-10-31 "Linux man-pages 6.7" .SH NAME memset \- fill memory with a constant byte .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "void *memset(void " s [. n "], int " c ", size_t " n ); .fi .SH DESCRIPTION @@ -49,7 +49,6 @@ T{ .BR memset () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/mkdtemp.3 b/man3/mkdtemp.3 index 4c55259..d7daaee 100644 --- a/man3/mkdtemp.3 +++ b/man3/mkdtemp.3 @@ -4,7 +4,7 @@ .\" and GNU libc documentation .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft -.TH mkdtemp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mkdtemp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mkdtemp \- create a unique temporary directory .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "char *mkdtemp(char *" template ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mkdtemp (): .nf /* Since glibc 2.19: */ _DEFAULT_SOURCE @@ -53,7 +53,7 @@ is set to indicate the error. .B EINVAL The last six characters of \fItemplate\fP were not XXXXXX. Now \fItemplate\fP is unchanged. -.PP +.P Also see .BR mkdir (2) for other possible values for \fIerrno\fP. @@ -71,7 +71,6 @@ T{ .BR mkdtemp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/mkfifo.3 b/man3/mkfifo.3 index f43f07d..0f5c21c 100644 --- a/man3/mkfifo.3 +++ b/man3/mkfifo.3 @@ -6,7 +6,7 @@ .\" .\" changed section from 2 to 3, aeb, 950919 .\" -.TH mkfifo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mkfifo 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mkfifo, mkfifoat \- make a FIFO special file (a named pipe) .SH LIBRARY @@ -16,20 +16,20 @@ Standard C library .nf .B #include <sys/types.h> .B #include <sys/stat.h> -.PP +.P .BI "int mkfifo(const char *" pathname ", mode_t " mode ); -.PP +.P .BR "#include <fcntl.h> " "/* Definition of AT_* constants */" .B #include <sys/stat.h> -.PP +.P .BI "int mkfifoat(int " dirfd ", const char *" pathname ", mode_t " mode ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mkfifoat (): .nf Since glibc 2.10: @@ -44,14 +44,14 @@ makes a FIFO special file with name \fIpathname\fP. It is modified by the process's \fBumask\fP in the usual way: the permissions of the created file are \fB(\fP\fImode\fP\fB & \[ti]umask)\fP. -.PP +.P A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the filesystem by calling .BR mkfifo (). -.PP +.P Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file. However, it has to be open at both ends simultaneously before you can @@ -67,7 +67,7 @@ The function operates in exactly the same way as .BR mkfifo (), except for the differences described here. -.PP +.P If the pathname given in .I pathname is relative, then it is interpreted relative to the directory @@ -77,7 +77,7 @@ referred to by the file descriptor the calling process, as is done by .BR mkfifo () for a relative pathname). -.PP +.P If .I pathname is relative and @@ -89,13 +89,13 @@ then is interpreted relative to the current working directory of the calling process (like .BR mkfifo ()). -.PP +.P If .I pathname is absolute, then .I dirfd is ignored. -.PP +.P See .BR openat (2) for an explanation of the need for @@ -177,7 +177,6 @@ T{ .BR mkfifoat () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS It is implemented using .BR mknodat (2). diff --git a/man3/mkstemp.3 b/man3/mkstemp.3 index dbfa252..2b7a986 100644 --- a/man3/mkstemp.3 +++ b/man3/mkstemp.3 @@ -13,7 +13,7 @@ .\" Modified 990328, aeb .\" 2008-06-19, mtk, Added mkostemp(); various other changes .\" -.TH mkstemp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mkstemp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mkstemp, mkostemp, mkstemps, mkostemps \- create a unique temporary file .SH LIBRARY @@ -22,18 +22,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int mkstemp(char *" template ); .BI "int mkostemp(char *" template ", int " flags ); .BI "int mkstemps(char *" template ", int " suffixlen ); .BI "int mkostemps(char *" template ", int " suffixlen ", int " flags ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mkstemp (): .nf _XOPEN_SOURCE >= 500 @@ -41,18 +41,18 @@ Feature Test Macro Requirements for glibc (see || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR mkostemp (): .nf _GNU_SOURCE .fi -.PP +.P .BR mkstemps (): .nf /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR mkostemps (): .nf _GNU_SOURCE @@ -64,7 +64,7 @@ function generates a unique temporary filename from .IR template , creates and opens the file, and returns an open file descriptor for the file. -.PP +.P The last six characters of .I template must be "XXXXXX" and these are replaced with a string that makes the @@ -72,7 +72,7 @@ filename unique. Since it will be modified, .I template must not be a string constant, but should be declared as a character array. -.PP +.P The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. @@ -80,7 +80,7 @@ The file is opened with the .BR open (2) .B O_EXCL flag, guaranteeing that the caller is the process that creates the file. -.PP +.P The .BR mkostemp () function is like @@ -111,7 +111,7 @@ argument given to is unnecessary, and produces errors on some .\" Reportedly, FreeBSD systems. -.PP +.P The .BR mkstemps () function is like @@ -127,7 +127,7 @@ is of the form .IR "prefixXXXXXXsuffix" , and the string XXXXXX is modified as for .BR mkstemp (). -.PP +.P The .BR mkostemps () function is to @@ -166,7 +166,7 @@ is less than characters long, or the last 6 characters before the suffix in .I template were not XXXXXX. -.PP +.P These functions may also fail with any of the errors described for .BR open (2). .SH ATTRIBUTES @@ -186,7 +186,6 @@ T{ .BR mkostemps () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR mkstemp () @@ -215,14 +214,14 @@ glibc 2.7. .TP .BR mkostemps () glibc 2.11. -.PP +.P In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600. -.PP +.P More generally, the POSIX specification of .BR mkstemp () does not say anything diff --git a/man3/mktemp.3 b/man3/mktemp.3 index c925dd0..fb40594 100644 --- a/man3/mktemp.3 +++ b/man3/mktemp.3 @@ -12,7 +12,7 @@ .\" (prompted by Scott Burkett <scottb@IntNet.net>) .\" Modified Sun Mar 28 23:44:38 1999 by Andries Brouwer (aeb@cwi.nl) .\" -.TH mktemp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mktemp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mktemp \- make a unique temporary filename .SH LIBRARY @@ -21,15 +21,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "char *mktemp(char *" template ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mktemp (): .nf Since glibc 2.12: @@ -43,7 +43,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION .IR "Never use this function" ; see BUGS. -.PP +.P The .BR mktemp () function generates a unique temporary filename @@ -83,7 +83,6 @@ T{ .BR mktemp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/modf.3 b/man3/modf.3 index 118d213..c510733 100644 --- a/man3/modf.3 +++ b/man3/modf.3 @@ -11,7 +11,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH modf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH modf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME modf, modff, modfl \- extract signed integral and fractional values from floating-point number @@ -21,17 +21,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double modf(double " x ", double *" iptr ); .BI "float modff(float " x ", float *" iptr ); .BI "long double modfl(long double " x ", long double *" iptr ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR modff (), .BR modfl (): .nf @@ -50,13 +50,13 @@ The integral part is stored in the location pointed to by .SH RETURN VALUE These functions return the fractional part of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned, and .I *iptr is set to a NaN. -.PP +.P If .I x is positive infinity (negative infinity), +0 (\-0) is returned, and @@ -80,12 +80,11 @@ T{ .BR modfl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/mpool.3 b/man3/mpool.3 index 20dd313..38f1366 100644 --- a/man3/mpool.3 +++ b/man3/mpool.3 @@ -5,7 +5,7 @@ .\" .\" @(#)mpool.3 8.1 (Berkeley) 6/4/93 .\" -.TH mpool 3 2023-03-30 "Linux man-pages 6.05.01" +.TH mpool 3 2023-10-31 "Linux man-pages 6.7" .UC 7 .SH NAME mpool \- shared memory buffer pool @@ -16,18 +16,18 @@ Standard C library .nf .B #include <db.h> .B #include <mpool.h> -.PP +.P .BI "MPOOL *mpool_open(DBT *" key ", int " fd ", pgno_t " pagesize \ ", pgno_t " maxcache ); -.PP +.P .BI "void mpool_filter(MPOOL *" mp ", void (*pgin)(void *, pgno_t, void *)," .BI " void (*" pgout ")(void *, pgno_t, void *)," .BI " void *" pgcookie ); -.PP +.P .BI "void *mpool_new(MPOOL *" mp ", pgno_t *" pgnoaddr ); .BI "void *mpool_get(MPOOL *" mp ", pgno_t " pgno ", unsigned int " flags ); .BI "int mpool_put(MPOOL *" mp ", void *" pgaddr ", unsigned int " flags ); -.PP +.P .BI "int mpool_sync(MPOOL *" mp ); .BI "int mpool_close(MPOOL *" mp ); .fi @@ -38,12 +38,12 @@ Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the .I libdb library instead. -.PP +.P .I Mpool is the library interface intended to provide page oriented buffer management of files. The buffers may be shared between processes. -.PP +.P The function .BR mpool_open () initializes a memory pool. @@ -64,7 +64,7 @@ If is non-NULL and matches a file already being mapped, the .I fd argument is ignored. -.PP +.P The .I pagesize argument is the size, in bytes, of the pages into which the file is broken up. @@ -75,7 +75,7 @@ at any one time. This value is not relative to the number of processes which share a file's buffers, but will be the largest value specified by any of the processes sharing the file. -.PP +.P The .BR mpool_filter () function is intended to make transparent input and output processing of the @@ -91,7 +91,7 @@ backing file. Both functions are called with the .I pgcookie pointer, the page number and a pointer to the page to being read or written. -.PP +.P The function .BR mpool_new () takes an @@ -104,7 +104,7 @@ address. Otherwise, NULL is returned and .I errno is set. -.PP +.P The function .BR mpool_get () takes an @@ -117,7 +117,7 @@ is set. The .I flags argument is not currently used. -.PP +.P The function .BR mpool_put () unpins the page referenced by @@ -132,10 +132,10 @@ any of the following values: .TP .B MPOOL_DIRTY The page has been modified and needs to be written to the backing file. -.PP +.P .BR mpool_put () returns 0 on success and \-1 if an error occurs. -.PP +.P The function .BR mpool_sync () writes all modified pages associated with the @@ -144,7 +144,7 @@ pointer to the backing file. .BR mpool_sync () returns 0 on success and \-1 if an error occurs. -.PP +.P The .BR mpool_close () function free's up any allocated memory associated with the memory pool @@ -161,7 +161,7 @@ function may fail and set .I errno for any of the errors specified for the library routine .BR malloc (3). -.PP +.P The .BR mpool_get () function may fail and set @@ -170,7 +170,7 @@ for the following: .TP 15 .B EINVAL The requested record doesn't exist. -.PP +.P The .BR mpool_new () and @@ -182,14 +182,14 @@ for any of the errors specified for the library routines .BR write (2), and .BR malloc (3). -.PP +.P The .BR mpool_sync () function may fail and set .I errno for any of the errors specified for the library routine .BR write (2). -.PP +.P The .BR mpool_close () function may fail and set diff --git a/man3/mq_close.3 b/man3/mq_close.3 index 4834660..1f12165 100644 --- a/man3/mq_close.3 +++ b/man3/mq_close.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_close 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_close 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_close \- close a message queue descriptor .SH LIBRARY @@ -12,14 +12,14 @@ Real-time library .SH SYNOPSIS .nf .B #include <mqueue.h> -.PP +.P .BI "int mq_close(mqd_t " mqdes ); .fi .SH DESCRIPTION .BR mq_close () closes the message queue descriptor .IR mqdes . -.PP +.P If the calling process has attached a notification request (see .BR mq_notify (3)) to this message queue via @@ -52,7 +52,6 @@ T{ .BR mq_close () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3 index 7c183e7..7c124ea 100644 --- a/man3/mq_getattr.3 +++ b/man3/mq_getattr.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_getattr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_getattr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_getattr, mq_setattr \- get/set message queue attributes .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B #include <mqueue.h> -.PP +.P .BI "int mq_getattr(mqd_t " mqdes ", struct mq_attr *" attr ); .BI "int mq_setattr(mqd_t " mqdes ", const struct mq_attr *restrict " newattr , .BI " struct mq_attr *restrict " oldattr ); @@ -24,14 +24,14 @@ and respectively retrieve and modify attributes of the message queue referred to by the message queue descriptor .IR mqdes . -.PP +.P .BR mq_getattr () returns an .I mq_attr structure in the buffer pointed by .IR attr . This structure is defined as: -.PP +.P .in +4n .EX struct mq_attr { @@ -42,7 +42,7 @@ struct mq_attr { }; .EE .in -.PP +.P The .I mq_flags field contains flags associated with the open message queue description. @@ -50,7 +50,7 @@ This field is initialized when the queue is created by .BR mq_open (3). The only flag that can appear in this field is .BR O_NONBLOCK . -.PP +.P The .I mq_maxmsg and @@ -71,11 +71,11 @@ Two .I /proc files that place ceilings on the values for these fields are described in .BR mq_overview (7). -.PP +.P The .I mq_curmsgs field returns the number of messages currently held in the queue. -.PP +.P .BR mq_setattr () sets message queue attributes using information supplied in the .I mq_attr @@ -129,7 +129,6 @@ T{ .BR mq_setattr () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On Linux, .BR mq_getattr () @@ -153,7 +152,7 @@ in which the .I attr argument is NULL. Here is an example run of the program: -.PP +.P .in +4n .EX $ \fB./a.out /testq\fP @@ -161,13 +160,13 @@ Maximum # of messages on queue: 10 Maximum message size: 8192 .EE .in -.PP +.P Since Linux 3.5, the following .I /proc files (described in .BR mq_overview (7)) can be used to control the defaults: -.PP +.P .in +4n .EX $ \fBuname \-sr\fP diff --git a/man3/mq_notify.3 b/man3/mq_notify.3 index bb0d514..591eb32 100644 --- a/man3/mq_notify.3 +++ b/man3/mq_notify.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_notify 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_notify 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_notify \- register for notification when a message is available .SH LIBRARY @@ -13,7 +13,7 @@ Real-time library .nf .B #include <mqueue.h> .BR "#include <signal.h> " "/* Definition of SIGEV_* constants */" -.PP +.P .BI "int mq_notify(mqd_t " mqdes ", const struct sigevent *" sevp ); .fi .SH DESCRIPTION @@ -22,15 +22,15 @@ allows the calling process to register or unregister for delivery of an asynchronous notification when a new message arrives on the empty message queue referred to by the message queue descriptor .IR mqdes . -.PP +.P The .I sevp argument is a pointer to a .I sigevent structure. For the definition and general details of this structure, see -.BR sigevent (7). -.PP +.BR sigevent (3type). +.P If .I sevp is a non-null pointer, then @@ -54,7 +54,7 @@ for notification, but when a message arrives, no notification is sent. Notify the process by sending the signal specified in .IR sigev_signo . See -.BR sigevent (7) +.BR sigevent (3type) for general details. The .I si_code @@ -75,26 +75,26 @@ Upon message delivery, invoke .I sigev_notify_function as if it were the start function of a new thread. See -.BR sigevent (7) +.BR sigevent (3type) for details. -.PP +.P Only one process can be registered to receive notification from a message queue. -.PP +.P If .I sevp is NULL, and the calling process is currently registered to receive notifications for this message queue, then the registration is removed; another process can then register to receive a message notification for this queue. -.PP +.P Message notification occurs only when a new message arrives and the queue was previously empty. If the queue was not empty at the time .BR mq_notify () was called, then a notification will occur only after the queue is emptied and a new message arrives. -.PP +.P If another process or thread is waiting to read a message from an empty queue using .BR mq_receive (3), @@ -102,7 +102,7 @@ then any message notification registration is ignored: the message is delivered to the process or thread calling .BR mq_receive (3), and the message notification registration remains in effect. -.PP +.P Notification occurs once: after a notification is delivered, the notification registration is removed, and another process can register for message notification. @@ -142,7 +142,7 @@ is not a valid signal number. .TP .B ENOMEM Insufficient memory. -.PP +.P POSIX.1-2008 says that an implementation .I may generate an @@ -167,7 +167,6 @@ T{ .BR mq_notify () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .SS C library/kernel differences In the glibc implementation, the @@ -271,4 +270,4 @@ main(int argc, char *argv[]) .BR mq_send (3), .BR mq_unlink (3), .BR mq_overview (7), -.BR sigevent (7) +.BR sigevent (3type) diff --git a/man3/mq_open.3 b/man3/mq_open.3 index 32ff069..09b112f 100644 --- a/man3/mq_open.3 +++ b/man3/mq_open.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_open 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_open 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_open \- open a message queue .SH LIBRARY @@ -14,7 +14,7 @@ Real-time library .BR "#include <fcntl.h>" " /* For O_* constants */" .BR "#include <sys/stat.h>" " /* For mode constants */" .B #include <mqueue.h> -.PP +.P .BI "mqd_t mq_open(const char *" name ", int " oflag ); .BI "mqd_t mq_open(const char *" name ", int " oflag ", mode_t " mode , .BI " struct mq_attr *" attr ); @@ -28,7 +28,7 @@ For details of the construction of .IR name , see .BR mq_overview (7). -.PP +.P The .I oflag argument specifies flags that control the operation of the call. @@ -45,7 +45,7 @@ Open the queue to send messages only. .TP .B O_RDWR Open the queue to both send and receive messages. -.PP +.P Zero or more of the following flags can additionally be .IR OR ed in @@ -84,7 +84,7 @@ and .BR mq_send (3) would normally block, these functions instead fail with the error .BR EAGAIN . -.PP +.P If .B O_CREAT is specified in @@ -98,7 +98,7 @@ as for (Symbolic definitions for the permissions bits can be obtained by including .IR <sys/stat.h> .) The permissions settings are masked against the process umask. -.PP +.P The fields of the .I struct mq_attr pointed to @@ -106,7 +106,7 @@ pointed to specify the maximum number of messages and the maximum size of messages that the queue will allow. This structure is defined as follows: -.PP +.P .in +4n .EX struct mq_attr { @@ -118,7 +118,7 @@ struct mq_attr { }; .EE .in -.PP +.P Only the .I mq_maxmsg and @@ -126,7 +126,7 @@ and fields are employed when calling .BR mq_open (); the values in the remaining fields are ignored. -.PP +.P If .I attr is NULL, then the queue is created with implementation-defined @@ -262,7 +262,6 @@ T{ .BR mq_open () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .SS C library/kernel differences The diff --git a/man3/mq_receive.3 b/man3/mq_receive.3 index 40e9973..aa90aaa 100644 --- a/man3/mq_receive.3 +++ b/man3/mq_receive.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_receive 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_receive 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_receive, mq_timedreceive \- receive a message from a message queue .SH LIBRARY @@ -12,25 +12,25 @@ Real-time library .SH SYNOPSIS .nf .B #include <mqueue.h> -.PP +.P .BI "ssize_t mq_receive(mqd_t " mqdes ", char " msg_ptr [. msg_len ], .BI " size_t " msg_len ", unsigned int *" msg_prio ); -.PP +.P .B #include <time.h> .B #include <mqueue.h> -.PP +.P .BI "ssize_t mq_timedreceive(mqd_t " mqdes ", \ char *restrict " msg_ptr [. msg_len ], .BI " size_t " msg_len ", unsigned int *restrict " msg_prio , .BI " const struct timespec *restrict " abs_timeout ); .fi -.PP +.P .ad l .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mq_timedreceive (): .nf _POSIX_C_SOURCE >= 200112L @@ -54,7 +54,7 @@ If .I msg_prio is not NULL, then the buffer to which it points is used to return the priority associated with the received message. -.PP +.P If the queue is empty, then, by default, .BR mq_receive () blocks until a message becomes available, @@ -64,7 +64,7 @@ If the flag is enabled for the message queue description, then the call instead fails immediately with the error .BR EAGAIN . -.PP +.P .BR mq_timedreceive () behaves just like .BR mq_receive (), @@ -78,7 +78,7 @@ since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a .BR timespec (3) structure. -.PP +.P If no message is available, and the timeout has already expired by the time of the call, .BR mq_timedreceive () @@ -141,7 +141,6 @@ T{ .BR mq_timedreceive () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On Linux, .BR mq_timedreceive () diff --git a/man3/mq_send.3 b/man3/mq_send.3 index 7e1b6c6..a083dbe 100644 --- a/man3/mq_send.3 +++ b/man3/mq_send.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_send 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_send 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_send, mq_timedsend \- send a message to a message queue .SH LIBRARY @@ -12,24 +12,24 @@ Real-time library .SH SYNOPSIS .nf .B #include <mqueue.h> -.PP +.P .BI "int mq_send(mqd_t " mqdes ", const char " msg_ptr [. msg_len ], .BI " size_t " msg_len ", unsigned int " msg_prio ); -.PP +.P .B #include <time.h> .B #include <mqueue.h> -.PP +.P .BI "int mq_timedsend(mqd_t " mqdes ", const char " msg_ptr [. msg_len ], .BI " size_t " msg_len ", unsigned int " msg_prio , .BI " const struct timespec *" abs_timeout ); .fi -.PP +.P .ad l .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR mq_timedsend (): .nf _POSIX_C_SOURCE >= 200112L @@ -48,7 +48,7 @@ this length must be less than or equal to the queue's .I mq_msgsize attribute. Zero-length messages are allowed. -.PP +.P The .I msg_prio argument is a nonnegative integer that specifies the priority @@ -59,7 +59,7 @@ older messages with the same priority. See .BR mq_overview (7) for details on the range for the message priority. -.PP +.P If the message queue is already full (i.e., the number of messages on the queue equals the queue's .I mq_maxmsg @@ -72,7 +72,7 @@ If the flag is enabled for the message queue description, then the call instead fails immediately with the error .BR EAGAIN . -.PP +.P .BR mq_timedsend () behaves just like .BR mq_send (), @@ -86,7 +86,7 @@ since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a .BR timespec (3) structure. -.PP +.P If the message queue is full, and the timeout has already expired by the time of the call, .BR mq_timedsend () @@ -148,7 +148,6 @@ T{ .BR mq_timedsend () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On Linux, .BR mq_timedsend () diff --git a/man3/mq_unlink.3 b/man3/mq_unlink.3 index 7564ccf..819dd21 100644 --- a/man3/mq_unlink.3 +++ b/man3/mq_unlink.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mq_unlink 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mq_unlink 3 2023-10-31 "Linux man-pages 6.7" .SH NAME mq_unlink \- remove a message queue .SH LIBRARY @@ -12,7 +12,7 @@ Real-time library .SH SYNOPSIS .nf .B #include <mqueue.h> -.PP +.P .BI "int mq_unlink(const char *" name ); .fi .SH DESCRIPTION @@ -54,7 +54,6 @@ T{ .BR mq_unlink () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/mtrace.3 b/man3/mtrace.3 index 442da6f..61e8251 100644 --- a/man3/mtrace.3 +++ b/man3/mtrace.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH mtrace 3 2023-07-20 "Linux man-pages 6.05.01" +.TH mtrace 3 2024-02-26 "Linux man-pages 6.7" .SH NAME mtrace, muntrace \- malloc tracing .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <mcheck.h>" -.PP +.P .B "void mtrace(void);" .B "void muntrace(void);" .fi @@ -28,7 +28,7 @@ These hook functions record tracing information about memory allocation and deallocation. The tracing information can be used to discover memory leaks and attempts to free nonallocated memory in a program. -.PP +.P The .BR muntrace () function disables the hook functions installed by @@ -39,7 +39,7 @@ If no hook functions were successfully installed by .BR mtrace (), .BR muntrace () does nothing. -.PP +.P When .BR mtrace () is called, it checks the value of the environment variable @@ -47,7 +47,7 @@ is called, it checks the value of the environment variable which should contain the pathname of a file in which the tracing information is to be recorded. If the pathname is successfully opened, it is truncated to zero length. -.PP +.P If .B MALLOC_TRACE is not set, @@ -75,7 +75,6 @@ T{ .BR muntrace () T} Thread safety MT-Unsafe .TE -.sp 1 .\" FIXME: The marking is different from that in the glibc manual, .\" markings in glibc manual are more detailed: .\" @@ -93,7 +92,7 @@ In normal usage, is called once at the start of execution of a program, and .BR muntrace () is never called. -.PP +.P The tracing output produced after a call to .BR mtrace () is textual, but not designed to be human readable. @@ -103,7 +102,7 @@ that interprets the trace log and produces human-readable output. For best results, the traced program should be compiled with debugging enabled, so that line-number information is recorded in the executable. -.PP +.P The tracing performed by .BR mtrace () incurs a performance penalty (if @@ -122,7 +121,7 @@ function and the .BR mtrace (1) command in a program that has memory leaks at two different locations. The demonstration uses the following program: -.PP +.P .in +4n .RB "$ " "cat t_mtrace.c" .\" SRC BEGIN (t_mtrace.c) @@ -145,11 +144,11 @@ main(void) .EE .\" SRC END .in -.PP +.P When we run the program as follows, we see that .BR mtrace () diagnosed memory leaks at two different locations in the program: -.PP +.P .in +4n .EX .RB "$ " "cc \-g t_mtrace.c \-o t_mtrace" @@ -164,7 +163,7 @@ Memory not freed: 0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16 .EE .in -.PP +.P The first two messages about unfreed memory correspond to the two .BR malloc (3) calls inside the @@ -7,7 +7,7 @@ .\" .\" Corrections by aeb .\" -.TH nan 3 2023-07-20 "Linux man-pages 6.05.01" +.TH nan 3 2023-10-31 "Linux man-pages 6.7" .SH NAME nan, nanf, nanl \- return 'Not a Number' .SH LIBRARY @@ -16,17 +16,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double nan(const char *" tagp ); .BI "float nanf(const char *" tagp ); .BI "long double nanl(const char *" tagp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR nan (), .BR nanf (), .BR nanl (): @@ -39,17 +39,17 @@ These functions return a representation (determined by of a quiet NaN. If the implementation does not support quiet NaNs, these functions return zero. -.PP +.P The call .I nan("char\-sequence") is equivalent to: -.PP +.P .in +4n .EX strtod("NAN(char\-sequence)", NULL); .EE .in -.PP +.P Similarly, calls to .BR nanf () and @@ -58,7 +58,7 @@ are equivalent to analogous calls to .BR strtof (3) and .BR strtold (3). -.PP +.P The argument .I tagp is used in an unspecified manner. @@ -82,10 +82,9 @@ T{ .BR nanl () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. -.PP +.P See also IEC 559 and the appendix with recommended functions in IEEE 754/IEEE 854. .SH HISTORY diff --git a/man3/netlink.3 b/man3/netlink.3 index eeb8875..5040521 100644 --- a/man3/netlink.3 +++ b/man3/netlink.3 @@ -5,7 +5,7 @@ .\" Based on the original comments from Alexey Kuznetsov .\" $Id: netlink.3,v 1.1 1999/05/14 17:17:24 freitag Exp $ .\" -.TH netlink 3 2023-03-30 "Linux man-pages 6.05.01" +.TH netlink 3 2023-10-31 "Linux man-pages 6.7" .SH NAME netlink \- Netlink macros .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .nf .B #include <asm/types.h> .B #include <linux/netlink.h> -.PP +.P .BI "int NLMSG_ALIGN(size_t " len ); .BI "int NLMSG_LENGTH(size_t " len ); .BI "int NLMSG_SPACE(size_t " len ); diff --git a/man3/newlocale.3 b/man3/newlocale.3 index 2c602a4..4bbaf14 100644 --- a/man3/newlocale.3 +++ b/man3/newlocale.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH newlocale 3 2023-05-03 "Linux man-pages 6.05.01" +.TH newlocale 3 2023-10-31 "Linux man-pages 6.7" .SH NAME newlocale, freelocale \- create, modify, and free a locale object .SH LIBRARY @@ -11,17 +11,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <locale.h> -.PP +.P .BI "locale_t newlocale(int " category_mask ", const char *" locale , .BI " locale_t " base ); .BI "void freelocale(locale_t " locobj ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR newlocale (), .BR freelocale (): .nf @@ -67,7 +67,7 @@ reference returned as the function result. If the call fails, the contents of .I base remain valid and unchanged. -.PP +.P If .I base is the special locale object @@ -78,7 +78,7 @@ or is not .I (locale_t)\ 0 and is not a valid locale object handle, the behavior is undefined. -.PP +.P The .I category_mask argument is a bit mask that specifies the locale categories @@ -101,7 +101,7 @@ and Alternatively, the mask can be specified as .BR LC_ALL_MASK , which is equivalent to ORing all of the preceding constants. -.PP +.P For each category specified in .IR category_mask , the locale data from @@ -112,7 +112,7 @@ If a new locale object is being created, data for all categories not specified in .I category_mask is taken from the default ("POSIX") locale. -.PP +.P The following preset values of .I locale are defined for all categories that can be specified in @@ -146,7 +146,7 @@ If is .B LC_GLOBAL_LOCALE or is not valid locale object handle, the results are undefined. -.PP +.P Once a locale object has been freed, the program should make no further use of it. .SH RETURN VALUE @@ -202,7 +202,7 @@ The second command-line argument is optional; if it is present, it is used to set the .B LC_TIME category of the locale object. -.PP +.P Having created and initialized the locale object, the program then applies it using .BR uselocale (3), @@ -220,15 +220,15 @@ Displaying the date. The format and language of the output will be affected by the .B LC_TIME setting. -.PP +.P The following shell sessions show some example runs of this program. -.PP +.P Set the .B LC_NUMERIC category to .I fr_FR (French): -.PP +.P .in +4n .EX $ \fB./a.out fr_FR\fP @@ -236,7 +236,7 @@ $ \fB./a.out fr_FR\fP Fri Mar 7 00:25:08 2014 .EE .in -.PP +.P Set the .B LC_NUMERIC category to @@ -247,7 +247,7 @@ and the category to .I it_IT (Italian): -.PP +.P .in +4n .EX $ \fB./a.out fr_FR it_IT\fP @@ -255,7 +255,7 @@ $ \fB./a.out fr_FR it_IT\fP ven 07 mar 2014 00:26:01 CET .EE .in -.PP +.P Specify the .B LC_TIME setting as an empty string, @@ -263,7 +263,7 @@ which causes the value to be taken from environment variable settings (which, here, specify .IR mi_NZ , New Zealand Māori): -.PP +.P .in +4n .EX $ LC_ALL=mi_NZ ./a.out fr_FR "" diff --git a/man3/nextafter.3 b/man3/nextafter.3 index 3636b55..51b770f 100644 --- a/man3/nextafter.3 +++ b/man3/nextafter.3 @@ -7,7 +7,7 @@ .\" .\" Based on glibc infopages .\" -.TH nextafter 3 2023-07-20 "Linux man-pages 6.05.01" +.TH nextafter 3 2023-10-31 "Linux man-pages 6.7" .SH NAME nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \- floating-point number manipulation @@ -17,21 +17,21 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double nextafter(double " x ", double " y ); .BI "float nextafterf(float " x ", float " y ); .BI "long double nextafterl(long double " x ", long double " y ); -.PP +.P .BI "double nexttoward(double " x ", long double " y ); .BI "float nexttowardf(float " x ", long double " y ); .BI "long double nexttowardl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR nextafter (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -40,7 +40,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR nextafterf (), .BR nextafterl (): .nf @@ -48,7 +48,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR nexttoward (), .BR nexttowardf (), .BR nexttowardl (): @@ -72,14 +72,14 @@ is less than .IR x , these functions will return the largest representable number less than .IR x . -.PP +.P If .I x equals .IR y , the functions return .IR y . -.PP +.P The .BR nexttoward (), .BR nexttowardf (), @@ -96,7 +96,7 @@ these functions return the next representable floating-point value after .I x in the direction of .IR y . -.PP +.P If .I x equals @@ -106,14 +106,14 @@ then (cast to the same type as .IR x ) is returned. -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If .I x is finite, @@ -126,7 +126,7 @@ and the functions return or .BR HUGE_VALL , respectively, with the correct mathematical sign. -.PP +.P If .I x is not equal to @@ -140,7 +140,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result overflow @@ -179,10 +179,9 @@ T{ .BR nexttowardl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. -.PP +.P This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854). .SH HISTORY @@ -192,7 +191,7 @@ In glibc 2.5 and earlier, these functions do not raise an underflow floating-point .RB ( FE_UNDERFLOW ) exception when an underflow occurs. -.PP +.P Before glibc 2.23 .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799 these functions did not set diff --git a/man3/nextup.3 b/man3/nextup.3 index 7a0eaaa..422143d 100644 --- a/man3/nextup.3 +++ b/man3/nextup.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH nextup 3 2023-07-20 "Linux man-pages 6.05.01" +.TH nextup 3 2023-10-31 "Linux man-pages 6.7" .SH NAME nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \- return next floating-point number toward positive/negative infinity @@ -14,11 +14,11 @@ Math library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <math.h> -.PP +.P .BI "double nextup(double " x ); .BI "float nextupf(float " x ); .BI "long double nextupl(long double " x ); -.PP +.P .BI "double nextdown(double " x ); .BI "float nextdownf(float " x ); .BI "long double nextdownl(long double " x ); @@ -31,7 +31,7 @@ and .BR nextupl () functions return the next representable floating-point number greater than .IR x . -.PP +.P If .I x is the smallest representable negative number in the corresponding type, @@ -40,7 +40,7 @@ If .I x is 0, the returned value is the smallest representable positive number of the corresponding type. -.PP +.P If .I x is positive infinity, the returned value is positive infinity. @@ -49,12 +49,12 @@ If is negative infinity, the returned value is the largest representable finite negative number of the corresponding type. -.PP +.P If .I x is Nan, the returned value is NaN. -.PP +.P The value returned by .I nextdown(x) is @@ -82,7 +82,6 @@ T{ .BR nextdownl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS These functions are described in .I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic diff --git a/man3/nl_langinfo.3 b/man3/nl_langinfo.3 index 2726c29..2b9fa51 100644 --- a/man3/nl_langinfo.3 +++ b/man3/nl_langinfo.3 @@ -11,7 +11,7 @@ .\" .\" Corrected prototype, 2002-10-18, aeb .\" -.TH nl_langinfo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH nl_langinfo 3 2024-01-28 "Linux man-pages 6.7" .SH NAME nl_langinfo, nl_langinfo_l \- query language and locale information .SH LIBRARY @@ -20,16 +20,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <langinfo.h> -.PP +.P .BI "char *nl_langinfo(nl_item " item ); .BI "char *nl_langinfo_l(nl_item " item ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR nl_langinfo_l (): .nf Since glibc 2.24: @@ -56,13 +56,13 @@ which was previously created by .BR newlocale (3). Individual and additional elements of the locale categories can be queried. -.PP +.P Examples for the locale elements that can be specified in \fIitem\fP using the constants defined in \fI<langinfo.h>\fP are: .TP .BR CODESET \ (LC_CTYPE) Return a string with the name of the character encoding used in the -selected locale, such as "UTF-8", "ISO-8859-1", or "ANSI_X3.4-1968" +selected locale, such as "UTF\-8", "ISO\-8859\-1", or "ANSI_X3.4\-1968" (better known as US-ASCII). This is the same string that you get with "locale charmap". @@ -202,7 +202,7 @@ conversion specification). Return name of the \fIn\fP-th day of the week. [Warning: this follows the US convention DAY_1 = Sunday, not the international convention -(ISO 8601) that Monday is the first day of the week.] +(ISO\~8601) that Monday is the first day of the week.] (Used in .B %A .BR strftime (3) @@ -249,7 +249,7 @@ function to recognize a negative response to a yes/no question. Return the currency symbol, preceded by "\-" if the symbol should appear before the value, "+" if the symbol should appear after the value, or "." if the symbol should replace the radix character. -.PP +.P The above list covers just some examples of items that can be requested. For a more detailed list, consult .IR "The GNU C Library Reference Manual" . @@ -258,7 +258,7 @@ On success, these functions return a pointer to a string which is the value corresponding to .I item in the specified locale. -.PP +.P If no locale has been selected by .BR setlocale (3) for the appropriate category, @@ -271,9 +271,9 @@ if specifies a locale where .I langinfo data is not defined. -.PP +.P If \fIitem\fP is not valid, a pointer to an empty string is returned. -.PP +.P The pointer returned by these functions may point to static data that may be overwritten, or the pointer itself may be invalidated, by a subsequent call to @@ -289,7 +289,7 @@ is freed or modified by .BR freelocale (3) or .BR newlocale (3). -.PP +.P POSIX specifies that the application may not modify the string returned by these functions. .SH ATTRIBUTES @@ -306,7 +306,6 @@ T{ .BR nl_langinfo () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -323,7 +322,7 @@ or is not a valid locale object handle. The following program sets the character type and the numeric locale according to the environment and queries the terminal character set and the radix character. -.PP +.P .\" SRC BEGIN (nl_langinfo.c) .EX #include <langinfo.h> @@ -350,5 +349,5 @@ main(void) .BR setlocale (3), .BR charsets (7), .BR locale (7) -.PP +.P The GNU C Library Reference Manual diff --git a/man3/ntp_gettime.3 b/man3/ntp_gettime.3 index 30ec3ce..cb1f4f1 100644 --- a/man3/ntp_gettime.3 +++ b/man3/ntp_gettime.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH ntp_gettime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ntp_gettime 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ntp_gettime, ntp_gettimex \- get time parameters (NTP daemon interface) .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/timex.h> -.PP +.P .BI "int ntp_gettime(struct ntptimeval *" ntv ); .BI "int ntp_gettimex(struct ntptimeval *" ntv ); .fi @@ -20,7 +20,7 @@ Standard C library Both of these APIs return information to the caller via the .I ntv argument, a structure of the following type: -.PP +.P .in +4n .EX struct ntptimeval { @@ -33,7 +33,7 @@ struct ntptimeval { }; .EE .in -.PP +.P The fields of this structure are as follows: .TP .I time @@ -69,7 +69,7 @@ This value is not used inside the kernel. .TP .I tai TAI (Atomic International Time) offset. -.PP +.P .BR ntp_gettime () returns an .I ntptimeval @@ -79,7 +79,7 @@ structure in which the and .I esterror fields are filled in. -.PP +.P .BR ntp_gettimex () performs the same task as .BR ntp_gettime (), @@ -110,7 +110,6 @@ T{ .BR ntp_gettimex () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR ntp_gettime () @@ -129,7 +128,7 @@ glibc 2.12. .BR adjtimex (2), .BR ntp_adjtime (3), .BR time (7) -.PP +.P .ad l .UR http://www.slac.stanford.edu/comp/unix/\:package/\:rtems/\:src/\:ssrlApps/\:ntpNanoclock/\:api.htm NTP "Kernel Application Program Interface" diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 5dbccc8..3cf0301 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -25,7 +25,7 @@ .\" References: .\" /usr/lib/gcc/i486-linux-gnu/4.1.1/include/stddef.h .\" glibc-doc -.TH offsetof 3 2023-05-03 "Linux man-pages 6.05.01" +.TH offsetof 3 2023-10-31 "Linux man-pages 6.7" .SH NAME offsetof \- offset of a structure member .SH LIBRARY @@ -34,7 +34,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stddef.h> -.PP +.P .BI "size_t offsetof(" type ", " member ); .fi .SH DESCRIPTION @@ -44,14 +44,14 @@ returns the offset of the field .I member from the start of the structure .IR type . -.PP +.P This macro is useful because the sizes of the fields that compose a structure can vary across implementations, and compilers may insert different numbers of padding bytes between fields. Consequently, an element's offset is not necessarily given by the sum of the sizes of the previous elements. -.PP +.P A compiler error will result if .I member is not aligned to a byte boundary @@ -71,7 +71,7 @@ POSIX.1-2001, C89. On a Linux/i386 system, when compiled using the default .BR gcc (1) options, the program below produces the following output: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/on_exit.3 b/man3/on_exit.3 index 4ab7aa1..1f5a33a 100644 --- a/man3/on_exit.3 +++ b/man3/on_exit.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified 1993-04-02, David Metcalfe .\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu) -.TH on_exit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH on_exit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME on_exit \- register a function to be called at normal process termination .SH LIBRARY @@ -18,15 +18,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int on_exit(void (*" function ")(int, void *), void *" arg ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR on_exit (): .nf Since glibc 2.19: @@ -52,10 +52,10 @@ and the .I arg argument from .BR on_exit (). -.PP +.P The same function may be registered multiple times: it is called once for each registration. -.PP +.P When a child process is created via .BR fork (2), it inherits copies of its parent's registrations. @@ -81,7 +81,6 @@ T{ .BR on_exit () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/open_memstream.3 b/man3/open_memstream.3 index ce9da19..ce5ad7c 100644 --- a/man3/open_memstream.3 +++ b/man3/open_memstream.3 @@ -5,28 +5,28 @@ .\" .\" 2008-12-04, Petr Baudis <pasky@suse.cz>: Document open_wmemstream() .\" -.TH open_memstream 3 2023-07-20 "Linux man-pages 6.05.01" +.TH open_memstream 3 2023-12-28 "Linux man-pages 6.7" .SH NAME -open_memstream, open_wmemstream \- open a dynamic memory buffer stream +open_memstream, open_wmemstream \- open a dynamic memory buffer stream .SH LIBRARY Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "FILE *open_memstream(char **" ptr ", size_t *" sizeloc ); -.PP +.P .B #include <wchar.h> -.PP +.P .BI "FILE *open_wmemstream(wchar_t **" ptr ", size_t *" sizeloc ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR open_memstream (), .BR open_wmemstream (): .nf @@ -45,7 +45,7 @@ Initially, the buffer has a size of zero. After closing the stream, the caller should .BR free (3) this buffer. -.PP +.P The locations pointed to by .I ptr and @@ -61,13 +61,13 @@ These values remain valid only as long as the caller performs no further output on the stream. If further output is performed, then the stream must again be flushed before trying to access these values. -.PP +.P A null byte is maintained at the end of the buffer. This byte is .I not included in the size value stored at .IR sizeloc . -.PP +.P The stream maintains the notion of a current position, which is initially zero (the start of the buffer). Each write operation implicitly adjusts the buffer position. @@ -78,7 +78,7 @@ or Moving the buffer position past the end of the data already written fills the intervening space with null characters. -.PP +.P The .BR open_wmemstream () is similar to @@ -110,7 +110,6 @@ T{ .BR open_wmemstream () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/opendir.3 b/man3/opendir.3 index 4ecbd62..5c8fcca 100644 --- a/man3/opendir.3 +++ b/man3/opendir.3 @@ -10,7 +10,7 @@ .\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) .\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>: document fdopendir(). -.TH opendir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH opendir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME opendir, fdopendir \- open a directory .SH LIBRARY @@ -20,16 +20,16 @@ Standard C library .nf .B #include <sys/types.h> .B #include <dirent.h> -.PP +.P .BI "DIR *opendir(const char *" name ); .BI "DIR *fdopendir(int " fd ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR fdopendir (): .nf Since glibc 2.10: @@ -43,7 +43,7 @@ The function opens a directory stream corresponding to the directory \fIname\fP, and returns a pointer to the directory stream. The stream is positioned at the first entry in the directory. -.PP +.P The .BR fdopendir () function @@ -104,7 +104,6 @@ T{ .BR fdopendir () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH STANDARDS @@ -118,10 +117,10 @@ glibc 2.4. .SH NOTES Filename entries can be read from a directory stream using .BR readdir (3). -.PP +.P The underlying file descriptor of the directory stream can be obtained using .BR dirfd (3). -.PP +.P The .BR opendir () function sets the close-on-exec flag for the file descriptor underlying the diff --git a/man3/openpty.3 b/man3/openpty.3 index 9bdcb14..505c481 100644 --- a/man3/openpty.3 +++ b/man3/openpty.3 @@ -8,7 +8,7 @@ .\" .\" Added -lutil remark, 030718 .\" -.TH openpty 3 2023-07-20 "Linux man-pages 6.05.01" +.TH openpty 3 2023-10-31 "Linux man-pages 6.7" .SH NAME openpty, login_tty, forkpty \- terminal utility functions .SH LIBRARY @@ -17,16 +17,16 @@ System utilities library .SH SYNOPSIS .nf .B #include <pty.h> -.PP +.P .BI "int openpty(int *" amaster ", int *" aslave ", char *" name , .BI " const struct termios *" termp , .BI " const struct winsize *" winp ); .BI "pid_t forkpty(int *" amaster ", char *" name , .BI " const struct termios *" termp , .BI " const struct winsize *" winp ); -.PP +.P .B #include <utmp.h> -.PP +.P .BI "int login_tty(int " fd ); .fi .SH DESCRIPTION @@ -50,7 +50,7 @@ If .I winp is not NULL, the window size of the slave will be set to the values in .IR winp . -.PP +.P The .BR login_tty () function prepares for a login on the terminal @@ -66,7 +66,7 @@ the controlling terminal for the calling process, setting to be the standard input, output, and error streams of the current process, and closing .IR fd . -.PP +.P The .BR forkpty () function combines @@ -112,14 +112,14 @@ fails if: .TP .B ENOENT There are no available terminals. -.PP +.P .BR login_tty () fails if .BR ioctl (2) fails to set .I fd to the controlling terminal of the calling process. -.PP +.P .BR forkpty () fails if either .BR openpty () @@ -146,7 +146,6 @@ T{ .BR login_tty () T} Thread safety MT-Unsafe race:ttyname .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY @@ -157,7 +156,7 @@ modifiers were added to the structure pointer arguments of and .BR forkpty () in glibc 2.8. -.PP +.P Before glibc 2.0.92, .BR openpty () returns file descriptors for a BSD pseudoterminal pair; diff --git a/man3/perror.3 b/man3/perror.3 index efb3e6f..2bd83c2 100644 --- a/man3/perror.3 +++ b/man3/perror.3 @@ -10,7 +10,7 @@ .\" (msmith@falcon.mercer.peachnet.edu) and various other changes. .\" Modified 1996-05-16 by Martin Schulze (joey@infodrom.north.de) .\" -.TH perror 3 2023-07-20 "Linux man-pages 6.05.01" +.TH perror 3 2023-10-31 "Linux man-pages 6.7" .SH NAME perror \- print a system error message .SH LIBRARY @@ -19,22 +19,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "void perror(const char *" s ); -.PP +.P .B #include <errno.h> -.PP +.P .BI "int " errno "; \fR/* Not really declared this way; see errno(3) */" -.PP +.P .BI "[[deprecated]] const char *const " sys_errlist []; .BI "[[deprecated]] int " sys_nerr ; .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .IR sys_errlist , .IR sys_nerr : .nf @@ -48,7 +48,7 @@ The .BR perror () function produces a message on standard error describing the last error encountered during a call to a system or library function. -.PP +.P First (if .I s is not NULL and @@ -59,10 +59,10 @@ is printed, followed by a colon and a blank. Then an error message corresponding to the current value of .I errno and a new-line. -.PP +.P To be of most use, the argument string should include the name of the function that incurred the error. -.PP +.P The global error list .IR sys_errlist "[]," which can be indexed by @@ -78,7 +78,7 @@ The use of is nowadays deprecated; use .BR strerror (3) instead. -.PP +.P When a system call fails, it usually returns \-1 and sets the variable .I errno @@ -113,7 +113,6 @@ T{ .BR perror () T} Thread safety MT-Safe race:stderr .TE -.sp 1 .SH STANDARDS .TP .I errno diff --git a/man3/popen.3 b/man3/popen.3 index 698fe28..6c2cd00 100644 --- a/man3/popen.3 +++ b/man3/popen.3 @@ -10,7 +10,7 @@ .\" Modified Sat May 18 20:37:44 1996 by Martin Schulze (joey@linux.de) .\" Modified 7 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) .\" -.TH popen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH popen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME popen, pclose \- pipe stream to or from a process .SH LIBRARY @@ -19,16 +19,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "FILE *popen(const char *" command ", const char *" type ); .BI "int pclose(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR popen (), .BR pclose (): .nf @@ -44,7 +44,7 @@ Since a pipe is by definition unidirectional, the .I type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only. -.PP +.P The .I command argument is a pointer to a null-terminated string containing a shell @@ -54,7 +54,7 @@ This command is passed to using the .B \-c flag; interpretation, if any, is performed by the shell. -.PP +.P The .I type argument is a pointer to a null-terminated string which must contain @@ -69,7 +69,7 @@ see the description of the flag in .BR open (2) for reasons why this may be useful. -.PP +.P The return value from .BR popen () is a normal standard I/O stream in all respects save that it must be closed @@ -85,11 +85,11 @@ Conversely, reading from the stream reads the command's standard output, and the command's standard input is the same as that of the process that called .BR popen (). -.PP +.P Note that output .BR popen () streams are block buffered by default. -.PP +.P The .BR pclose () function waits for the associated process to terminate and returns the exit @@ -105,7 +105,7 @@ or .BR pipe (2) calls fail, or if the function cannot allocate memory, NULL is returned. -.PP +.P .BR pclose (): on success, returns the exit status of the command; if .\" These conditions actually give undefined results, so I commented @@ -117,7 +117,7 @@ on success, returns the exit status of the command; if .BR wait4 (2) returns an error, or some other error is detected, \-1 is returned. -.PP +.P On failure, both functions set .I errno to indicate the error. @@ -140,7 +140,7 @@ argument is invalid, and this condition is detected, .I errno is set to .BR EINVAL . -.PP +.P If .BR pclose () cannot obtain the child status, @@ -162,7 +162,6 @@ T{ .BR pclose () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The \[aq]e\[aq] value for .I type @@ -187,9 +186,9 @@ The latter can be avoided by calling .BR fflush (3) before .BR popen (). -.PP +.P Failure to execute the shell is indistinguishable from the shell's failure -to execute command, or an immediate exit of the command. +to execute the command, or an immediate exit of the command. The only hint is an exit status of 127. .\" .SH HISTORY .\" A diff --git a/man3/posix_fallocate.3 b/man3/posix_fallocate.3 index 1c5c189..f70d27c 100644 --- a/man3/posix_fallocate.3 +++ b/man3/posix_fallocate.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH posix_fallocate 3 2023-07-20 "Linux man-pages 6.05.01" +.TH posix_fallocate 3 2023-10-31 "Linux man-pages 6.7" .SH NAME posix_fallocate \- allocate file space .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <fcntl.h> -.PP +.P .BI "int posix_fallocate(int " fd ", off_t " offset ", off_t " len ); .fi -.PP +.P .ad l .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR posix_fallocate (): .nf _POSIX_C_SOURCE >= 200112L @@ -41,7 +41,7 @@ After a successful call to .BR posix_fallocate (), subsequent writes to bytes in the specified range are guaranteed not to fail because of lack of disk space. -.PP +.P If the size of the file is less than .IR offset + len , then the file is increased to this size; @@ -109,13 +109,12 @@ T} Thread safety T{ MT-Safe (but see NOTES) T} .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.1.94. POSIX.1-2001 -.PP +.P POSIX.1-2008 says that an implementation .I shall give the @@ -165,7 +164,7 @@ or .B O_WRONLY flags, the function fails with the error .BR EBADF . -.PP +.P In general, the emulation is not MT-safe. On Linux, applications may use .BR fallocate (2) diff --git a/man3/posix_madvise.3 b/man3/posix_madvise.3 index 25ab37d..440feb4 100644 --- a/man3/posix_madvise.3 +++ b/man3/posix_madvise.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH posix_madvise 3 2023-03-30 "Linux man-pages 6.05.01" +.TH posix_madvise 3 2023-10-31 "Linux man-pages 6.7" .SH NAME posix_madvise \- give advice about patterns of memory usage .SH LIBRARY @@ -11,15 +11,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/mman.h> -.PP +.P .BI "int posix_madvise(void " addr [. len "], size_t " len ", int " advice ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR posix_madvise (): .nf _POSIX_C_SOURCE >= 200112L @@ -37,7 +37,7 @@ The system is free to use this advice in order to improve the performance of memory accesses (or to ignore the advice altogether), but calling .BR posix_madvise () shall not affect the semantics of access to memory in the specified range. -.PP +.P The .I advice argument is one of the following: @@ -92,7 +92,7 @@ is 0. On Linux, specifying .I len as 0 is permitted (as a successful no-op). -.PP +.P In glibc, this function is implemented using .BR madvise (2). However, since glibc 2.6, diff --git a/man3/posix_memalign.3 b/man3/posix_memalign.3 index f0c1f6f..194c55a 100644 --- a/man3/posix_memalign.3 +++ b/man3/posix_memalign.3 @@ -7,7 +7,7 @@ .\" 2001-10-11, 2003-08-22, aeb, added some details .\" 2012-03-23, Michael Kerrisk <mtk.manpages@mail.com> .\" Document pvalloc() and aligned_alloc() -.TH posix_memalign 3 2023-07-20 "Linux man-pages 6.05.01" +.TH posix_memalign 3 2023-11-24 "Linux man-pages 6.7" .SH NAME posix_memalign, aligned_alloc, memalign, valloc, pvalloc \- allocate aligned memory @@ -17,32 +17,32 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int posix_memalign(void **" memptr ", size_t " alignment ", size_t " size ); .BI "void *aligned_alloc(size_t " alignment ", size_t " size ); .BI "[[deprecated]] void *valloc(size_t " size ); -.PP +.P .B #include <malloc.h> -.PP +.P .BI "[[deprecated]] void *memalign(size_t " alignment ", size_t " size ); .BI "[[deprecated]] void *pvalloc(size_t " size ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR posix_memalign (): .nf _POSIX_C_SOURCE >= 200112L .fi -.PP +.P .BR aligned_alloc (): .nf _ISOC11_SOURCE .fi -.PP +.P .BR valloc (): .nf Since glibc 2.12: @@ -54,7 +54,6 @@ Feature Test Macro Requirements for glibc (see .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED .fi .SH DESCRIPTION -The function .BR posix_memalign () allocates .I size @@ -74,7 +73,7 @@ the value placed in is either NULL .\" glibc does this: or a unique pointer value. -.PP +.P The obsolete function .BR memalign () allocates @@ -85,15 +84,14 @@ The memory address will be a multiple of which must be a power of two. .\" The behavior of memalign() for size==0 is as for posix_memalign() .\" but no standards govern this. -.PP -The function +.P .BR aligned_alloc () is the same as .BR memalign (), except for the added restriction that .I alignment must be a power of two. -.PP +.P The obsolete function .BR valloc () allocates @@ -102,14 +100,14 @@ bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to .IR "memalign(sysconf(_SC_PAGESIZE),size)" . -.PP +.P The obsolete function .BR pvalloc () is similar to .BR valloc (), but rounds the size of the allocation up to the next multiple of the system page size. -.PP +.P For all of these functions, the memory is not zeroed. .SH RETURN VALUE .BR aligned_alloc (), @@ -120,7 +118,7 @@ and return a pointer to the allocated memory on success. On error, NULL is returned, and \fIerrno\fP is set to indicate the error. -.PP +.P .BR posix_memalign () returns zero on success, or one of the error values listed in the next section on failure. @@ -143,7 +141,7 @@ argument was not a power of two, or was not a multiple of .IR "sizeof(void\ *)" . .TP .B ENOMEM -There was insufficient memory to fulfill the allocation request. +Out of memory. .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). @@ -166,7 +164,6 @@ T{ .BR pvalloc () T} Thread safety MT-Unsafe init .TE -.sp 1 .SH STANDARDS .TP .BR aligned_alloc () @@ -209,11 +206,11 @@ glibc 2.0. Everybody agrees that .BR posix_memalign () is declared in \fI<stdlib.h>\fP. -.PP +.P On some systems .BR memalign () is declared in \fI<stdlib.h>\fP instead of \fI<malloc.h>\fP. -.PP +.P According to SUSv2, .BR valloc () is declared in \fI<stdlib.h>\fP. @@ -230,7 +227,7 @@ call that tells what alignment is needed. Now one can use .BR posix_memalign () to satisfy this requirement. -.PP +.P .BR posix_memalign () verifies that .I alignment @@ -239,7 +236,7 @@ matches the requirements detailed above. may not check that the .I alignment argument is correct. -.PP +.P POSIX requires that memory obtained from .BR posix_memalign () can be freed using @@ -267,7 +264,7 @@ The glibc implementation allows memory obtained from any of these functions to be reclaimed with .BR free (3). -.PP +.P The glibc .BR malloc (3) always returns 8-byte aligned memory addresses, so these functions are diff --git a/man3/posix_openpt.3 b/man3/posix_openpt.3 index 09733d0..8d25557 100644 --- a/man3/posix_openpt.3 +++ b/man3/posix_openpt.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH posix_openpt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH posix_openpt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME posix_openpt \- open a pseudoterminal device .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .nf .B #include <stdlib.h> .B #include <fcntl.h> -.PP +.P .BI "int posix_openpt(int " flags ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR posix_openpt (): .nf _XOPEN_SOURCE >= 600 @@ -31,7 +31,7 @@ The .BR posix_openpt () function opens an unused pseudoterminal master device, returning a file descriptor that can be used to refer to that device. -.PP +.P The .I flags argument is a bit mask that ORs together zero or more of @@ -68,20 +68,19 @@ T{ .BR posix_openpt () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.2.1. POSIX.1-2001. -.PP +.P It is part of the UNIX 98 pseudoterminal support (see .BR pts (4)). .SH NOTES Some older UNIX implementations that support System V (aka UNIX 98) pseudoterminals don't have this function, but it can be easily implemented by opening the pseudoterminal multiplexor device: -.PP +.P .in +4n .EX int @@ -91,7 +90,7 @@ posix_openpt(int flags) } .EE .in -.PP +.P Calling .BR posix_openpt () creates a pathname for the corresponding pseudoterminal slave device. diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 32fa8b3..8fa746f 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -8,7 +8,7 @@ .\" POSIX 1003.1-2004 documentation .\" (http://www.opengroup.org/onlinepubs/009695399) .\" -.TH posix_spawn 3 2023-05-03 "Linux man-pages 6.05.01" +.TH posix_spawn 3 2023-10-31 "Linux man-pages 6.7" .SH NAME posix_spawn, posix_spawnp \- spawn a process .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <spawn.h> -.PP +.P .BI "int posix_spawn(pid_t *restrict " pid ", const char *restrict " path , .BI " const posix_spawn_file_actions_t *restrict " file_actions , .BI " const posix_spawnattr_t *restrict " attrp , @@ -42,7 +42,7 @@ to support the .BR fork (2) system call. These machines are generally small, embedded systems lacking MMU support. -.PP +.P The .BR posix_spawn () and @@ -60,7 +60,7 @@ and system calls. In fact, they provide only a subset of the functionality that can be achieved by using the system calls. -.PP +.P The only difference between .BR posix_spawn () and @@ -83,7 +83,7 @@ For the remainder of this page, the discussion is phrased in terms of with the understanding that .BR posix_spawnp () differs only on the point just described. -.PP +.P The remaining arguments to these two functions are as follows: .TP .I pid @@ -125,7 +125,7 @@ functions. specify the argument list and environment for the program that is executed in the child process, as for .BR execve (2). -.PP +.P Below, the functions are described in terms of a three-step process: the .BR fork () step, the @@ -149,20 +149,20 @@ Older implementations use or possibly .BR vfork (2) (see below). -.PP +.P The PID of the new child process is placed in .IR *pid . The .BR posix_spawn () function then returns control to the parent process. -.PP +.P Subsequently, the parent can use one of the system calls described in .BR wait (2) to check the status of the child process. If the child fails in any of the housekeeping steps described below, or fails to execute the desired file, it exits with a status of 127. -.PP +.P Before glibc 2.24, the child process is created using .BR vfork (2) instead of @@ -190,7 +190,7 @@ does \fInot\fP contain .BR POSIX_SPAWN_SETPGROUP , or .BR POSIX_SPAWN_RESETIDS . -.PP +.P In other words, .BR vfork (2) is used if the caller requests it, @@ -231,7 +231,7 @@ functions. File descriptors with the .B FD_CLOEXEC flag set are closed. -.PP +.P All process attributes in the child, other than those affected by attributes specified in the object pointed to by @@ -242,7 +242,7 @@ will be affected as though the child was created with .BR fork (2) and it executed the program with .BR execve (2). -.PP +.P The process attributes actions are defined by the attributes object pointed to by .IR attrp . @@ -253,7 +253,7 @@ attribute (set using controls the general actions that occur, and other attributes in the object specify values to be used during those actions. -.PP +.P The effects of the flags that may be specified in .I spawn-flags are as follows: @@ -325,7 +325,7 @@ attribute of the object pointed to by .I attrp (but see BUGS). -.PP +.P If the .B POSIX_SPAWN_SETSCHEDPARAM and @@ -387,7 +387,7 @@ feature test macro must be defined to obtain the definition of this constant. .\" http://austingroupbugs.net/view.php?id=1044 .\" and has been implemented since glibc 2.26 .\" commit daeb1fa2e1b33323e719015f5f546988bd4cc73b -.PP +.P If .I attrp is NULL, then the default behaviors described above for each flag apply. @@ -398,7 +398,7 @@ is NULL, then the default behaviors described above for each flag apply. .\" .I attrp .\" when you are done with it; .\" however, on Linux systems this operation is a no-op. -.PP +.P The .I file_actions argument specifies a sequence of file operations @@ -415,7 +415,7 @@ except those for which the .B FD_CLOEXEC flag has been set. File locks remain in place. -.PP +.P If .I file_actions is not NULL, then it contains an ordered set of requests to @@ -444,7 +444,7 @@ The requested operations are performed in the order they were added to .\" closed by the earlier operations .\" added to .\" .I file_actions . -.PP +.P If any of the housekeeping actions fails (due to bogus values being passed or other reasons why signal handling, process scheduling, process group ID functions, @@ -454,7 +454,7 @@ the child process exits with exit value 127. Once the child has successfully forked and performed all requested pre-exec steps, the child runs the requested executable. -.PP +.P The child process takes its environment from the .I envp argument, which is interpreted as if it had been passed to @@ -479,7 +479,7 @@ the contents of .I *pid are unspecified, and these functions return an error number as described below. -.PP +.P Even when these functions return a success status, the child process may still fail for a plethora of reasons related to its pre-\fBexec\fR() initialization. @@ -503,7 +503,7 @@ which will be one of the errors described for .BR vfork (2), or .BR clone (2). -.PP +.P In addition, these functions fail if: .TP .B ENOSYS @@ -537,7 +537,7 @@ only the POSIX-specified functions. (In other words, although these objects may be implemented as structures containing fields, portable programs must avoid dependence on such implementation details.) -.PP +.P According to POSIX, it is unspecified whether fork handlers established with .BR pthread_atfork (3) are called when @@ -548,7 +548,7 @@ Since glibc 2.24, the fork handlers are not executed in any case. On older implementations, fork handlers are called only if the child is created using .BR fork (2). -.PP +.P There is no "posix_fspawn" function (i.e., a function that is to .BR posix_spawn () as @@ -582,13 +582,13 @@ The program accepts command-line attributes that can be used to create file actions and attributes objects. The remaining command-line arguments are used as the executable name and command-line arguments of the program that is executed in the child. -.PP +.P In the first run, the .BR date (1) command is executed in the child, and the .BR posix_spawn () call employs no file actions or attributes objects. -.PP +.P .in +4n .EX $ \fB./a.out date\fP @@ -597,7 +597,7 @@ Tue Feb 1 19:47:50 CEST 2011 Child status: exited, status=0 .EE .in -.PP +.P In the next run, the .I \-c command-line option is used to create a file actions object that closes @@ -605,7 +605,7 @@ standard output in the child. Consequently, .BR date (1) fails when trying to perform output and exits with a status of 1. -.PP +.P .in +4n .EX $ \fB./a.out \-c date\fP @@ -614,7 +614,7 @@ date: write error: Bad file descriptor Child status: exited, status=1 .EE .in -.PP +.P In the next run, the .I \-s command-line option is used to create an attributes object that @@ -629,24 +629,24 @@ Therefore, to kill the child, is necessary .RB ( SIGKILL can't be blocked). -.PP +.P .in +4n .EX $ \fB./a.out \-s sleep 60 &\fP [1] 7637 $ PID of child: 7638 -.PP +.P $ \fBkill 7638\fP $ \fBkill \-KILL 7638\fP $ Child status: killed by signal 9 [1]+ Done ./a.out \-s sleep 60 .EE .in -.PP +.P When we try to execute a nonexistent command in the child, the .BR exec (3) fails and the child exits with a status of 127. -.PP +.P .in +4n .EX $ \fB./a.out xxxxx @@ -13,7 +13,7 @@ .\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no> .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH pow 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pow 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pow, powf, powl \- power functions .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double pow(double " x ", double " y ); .BI "float powf(float " x ", float " y ); .BI "long double powl(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR powf (), .BR powl (): .nf @@ -51,7 +51,7 @@ On success, these functions return the value of .I x to the power of .IR y . -.PP +.P If the result overflows, a range error occurs, .\" The range error is generated at least as far back as glibc 2.4 @@ -61,14 +61,14 @@ and the functions return or .BR HUGE_VALL , respectively, with the mathematically correct sign. -.PP +.P If result underflows, and is not representable, a range error occurs, and 0.0 with the appropriate sign is returned. .\" POSIX.1 does not specify the sign of the zero, .\" but https://www.sourceware.org/bugzilla/show_bug.cgi?id=2678 .\" points out that the zero has the wrong sign in some cases. -.PP +.P .\" pow(\(+-0, <0 [[odd]]) = HUGE_VAL* If .I x @@ -84,7 +84,7 @@ or is returned, with the same sign as .IR x . -.PP +.P .\" pow(\(+-0, <0 [[!odd]]) = HUGE_VAL* If .I x @@ -99,7 +99,7 @@ a pole error occurs and or .RB + HUGE_VALL , is returned. -.PP +.P .\" pow(\(+-0, >0 [[odd]]) = \(+-0 If .I x @@ -108,7 +108,7 @@ and .I y is an odd integer greater than 0, the result is +0 (\-0). -.PP +.P .\" pow(\(+-0, >0 [[!odd]]) = +0 If .I x @@ -117,7 +117,7 @@ and .I y greater than 0 and not an odd integer, the result is +0. -.PP +.P .\" pow(-1, \(+-INFINITY) = 1.0 If .I x @@ -126,21 +126,21 @@ and .I y is positive infinity or negative infinity, the result is 1.0. -.PP +.P .\" pow(+1, y) = 1.0 If .I x is +1, the result is 1.0 (even if .I y is a NaN). -.PP +.P .\" pow(x, \(+-0) = 1.0 If .I y is 0, the result is 1.0 (even if .I x is a NaN). -.PP +.P .\" pow(<0, y) = NaN If .I x @@ -149,7 +149,7 @@ is a finite value less than 0, and is a finite noninteger, a domain error occurs, .\" The domain error is generated at least as far back as glibc 2.4 and a NaN is returned. -.PP +.P .\" pow(|x|<1, -INFINITY) = INFINITY If the absolute value of .I x @@ -158,7 +158,7 @@ and .I y is negative infinity, the result is positive infinity. -.PP +.P .\" pow(|x|>1, -INFINITY) = +0 If the absolute value of .I x @@ -167,7 +167,7 @@ and .I y is negative infinity, the result is +0. -.PP +.P .\" pow(|x|<1, INFINITY) = +0 If the absolute value of .I x @@ -176,7 +176,7 @@ and .I y is positive infinity, the result is +0. -.PP +.P .\" pow(|x|>1, INFINITY) = INFINITY If the absolute value of .I x @@ -185,7 +185,7 @@ and .I y is positive infinity, the result is positive infinity. -.PP +.P .\" pow(-INFINITY, <0 [[odd]]) = -0 If .I x @@ -194,7 +194,7 @@ and .I y is an odd integer less than 0, the result is \-0. -.PP +.P .\" pow(-INFINITY, <0 [[!odd]]) = +0 If .I x @@ -203,7 +203,7 @@ and .I y less than 0 and not an odd integer, the result is +0. -.PP +.P .\" pow(-INFINITY, >0 [[odd]]) = -INFINITY If .I x @@ -212,7 +212,7 @@ and .I y is an odd integer greater than 0, the result is negative infinity. -.PP +.P .\" pow(-INFINITY, >0 [[!odd]]) = INFINITY If .I x @@ -221,7 +221,7 @@ and .I y greater than 0 and not an odd integer, the result is positive infinity. -.PP +.P .\" pow(INFINITY, <0) = +0 If .I x @@ -230,7 +230,7 @@ and .I y less than 0, the result is +0. -.PP +.P .\" pow(INFINITY, >0) = INFINITY If .I x @@ -239,7 +239,7 @@ and .I y greater than 0, the result is positive infinity. -.PP +.P .\" pow(NaN, y) or pow(x, NaN) = NaN Except as specified above, if .I x @@ -271,7 +271,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is negative, and \fIy\fP is a finite noninteger @@ -322,12 +322,11 @@ T{ .BR powl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to @@ -349,13 +348,13 @@ nor This problem was fixed .\" commit c3d466cba1692708a19c6ff829d0386c83a0c6e5 in glibc 2.28. -.PP +.P A number of bugs .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=3866 in the glibc implementation of .BR pow () were fixed in glibc 2.16. -.PP +.P In glibc 2.9 and earlier, .\" .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6776 @@ -369,7 +368,7 @@ Since glibc 2.10, .\" or possibly 2.9, I haven't found the source code change .\" and I don't have a 2.9 system to test glibc does the right thing. -.PP +.P In glibc 2.3.2 and earlier, .\" Actually, glibc 2.3.2 is the earliest test result I have; so yet .\" to confirm if this error occurs only in glibc 2.3.2. diff --git a/man3/pow10.3 b/man3/pow10.3 index bbbac22..0a0bdac 100644 --- a/man3/pow10.3 +++ b/man3/pow10.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pow10 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pow10 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pow10, pow10f, pow10l \- base-10 power functions .SH LIBRARY @@ -13,7 +13,7 @@ Math library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <math.h> -.PP +.P .BI "double pow10(double " x ); .BI "float pow10f(float " x ); .BI "long double pow10l(long double " x ); @@ -21,7 +21,7 @@ Math library .SH DESCRIPTION These functions return the value of 10 raised to the power .IR x . -.PP +.P .BR "Note well" : These functions perform exactly the same task as the functions described in .BR exp10 (3), @@ -45,7 +45,6 @@ T{ .BR pow10l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH VERSIONS diff --git a/man3/powerof2.3 b/man3/powerof2.3 index fae024f..cc21e4d 100644 --- a/man3/powerof2.3 +++ b/man3/powerof2.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH powerof2 3 2023-03-30 "Linux man-pages 6.05.01" +.TH powerof2 3 2023-10-31 "Linux man-pages 6.7" .SH NAME powerof2 \- test if a value is a power of 2 .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/param.h> -.PP +.P .BI "int powerof2(" x ); .fi .SH DESCRIPTION @@ -19,7 +19,7 @@ This macro returns true if .I x is a power of 2, and false otherwise. -.PP +.P .B 0 is considered a power of 2. This can make sense considering wrapping of unsigned integers, @@ -34,7 +34,7 @@ respectively. BSD. .SH CAVEATS The arguments may be evaluated more than once. -.PP +.P Because this macro is implemented using bitwise operations, some negative values can invoke undefined behavior. For example, diff --git a/man3/printf.3 b/man3/printf.3 index edd6ba8..205bf9b 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -13,7 +13,7 @@ .\" 2000-07-26 jsm28@hermes.cam.ac.uk - three small fixes .\" 2000-10-16 jsm28@hermes.cam.ac.uk - more fixes .\" -.TH printf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH printf 3 2024-03-16 "Linux man-pages 6.7" .SH NAME printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf, vsprintf, vsnprintf \- formatted output conversion @@ -23,7 +23,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int printf(const char *restrict " format ", ...);" .BI "int fprintf(FILE *restrict " stream , .BI " const char *restrict " format ", ...);" @@ -33,7 +33,7 @@ Standard C library .BI " const char *restrict " format ", ...);" .BI "int snprintf(char " str "[restrict ." size "], size_t " size , .BI " const char *restrict " format ", ...);" -.PP +.P .BI "int vprintf(const char *restrict " format ", va_list " ap ); .BI "int vfprintf(FILE *restrict " stream , .BI " const char *restrict " format ", va_list " ap ); @@ -44,19 +44,19 @@ Standard C library .BI "int vsnprintf(char " str "[restrict ." size "], size_t " size , .BI " const char *restrict " format ", va_list " ap ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR snprintf (), .BR vsnprintf (): .nf _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE .fi -.PP +.P .BR dprintf (), .BR vdprintf (): .nf @@ -90,7 +90,7 @@ and .BR vsnprintf () write to the character string .IR str . -.PP +.P The function .BR dprintf () is the same as @@ -100,7 +100,7 @@ except that it outputs to a file descriptor, instead of to a .BR stdio (3) stream. -.PP +.P The functions .BR snprintf () and @@ -109,7 +109,7 @@ write at most .I size bytes (including the terminating null byte (\[aq]\e0\[aq])) to .IR str . -.PP +.P The functions .BR vprintf (), .BR vfprintf (), @@ -135,14 +135,14 @@ macro, the value of is undefined after the call. See .BR stdarg (3). -.PP +.P All of these functions write the output under the control of a .I format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of .BR stdarg (3)) are converted for output. -.PP +.P C99 and POSIX.1-2001 specify that the results are undefined if a call to .BR sprintf (), .BR snprintf (), @@ -152,7 +152,7 @@ or would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). -See NOTES. +See CAVEATS. .SS Format of the format string The format string is a character string, beginning and ending in its initial shift state, if any. @@ -175,15 +175,15 @@ an optional .I precision and an optional .IR "length modifier" . -.PP +.P The overall syntax of a conversion specification is: -.PP +.P .in +4n .nf %[$][flags][width][.precision][length modifier]conversion .fi .in -.PP +.P The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order @@ -200,21 +200,21 @@ where the decimal integer \fIm\fP denotes the position in the argument list of the desired argument, indexed starting from 1. Thus, -.PP +.P .in +4n .EX printf("%*d", width, num); .EE .in -.PP +.P and -.PP +.P .in +4n .EX printf("%2$*1$d", width, num); .EE .in -.PP +.P are equivalent. The second style allows repeated references to the same argument. @@ -228,7 +228,7 @@ There may be no gaps in the numbers of arguments specified using \[aq]$\[aq]; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string. -.PP +.P For some numeric conversions a radix character ("decimal point") or thousands' grouping character is used. The actual character used @@ -240,13 +240,13 @@ part of the locale. The POSIX locale uses \[aq].\[aq] as radix character, and does not have a grouping character. Thus, -.PP +.P .in +4n .EX printf("%\[aq].2f", 1234567.89); .EE .in -.PP +.P results in "1234567.89" in the POSIX locale, in "1234567,89" in the nl_NL locale, and in "1.234.567,89" in the da_DK locale. .SS Flag characters @@ -359,7 +359,7 @@ By default, a sign is used only for negative numbers. A .B + overrides a space if both are used. -.PP +.P The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character. .TP @@ -386,7 +386,7 @@ whose locale information indicates no thousands' grouping character. Therefore, without a prior call to .BR setlocale (3), no thousands' grouping characters will be printed. -.PP +.P glibc 2.2 adds one further flag character. .TP .B I @@ -585,7 +585,7 @@ argument, or a following conversion corresponds to a pointer to a .I ptrdiff_t argument. -.PP +.P SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers @@ -616,7 +616,7 @@ and .BR Lf , .BR Lg , .BR LG ). -.PP +.P As a nonstandard extension, the GNU implementations treats .B ll and @@ -875,9 +875,9 @@ No argument is converted. The complete conversion specification is \[aq]%%\[aq]. .SH RETURN VALUE -Upon successful return, these functions return the number of characters +Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings). -.PP +.P The functions .BR snprintf () and @@ -892,8 +892,8 @@ had been available. Thus, a return value of .I size or more means that the output was truncated. -(See also below under NOTES.) -.PP +(See also below under CAVEATS.) +.P If an output error is encountered, a negative value is returned. .SH ATTRIBUTES For an explanation of the terms used in this section, see @@ -916,7 +916,6 @@ T{ .BR vsnprintf () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS .TP .BR fprintf () @@ -980,7 +979,7 @@ with C99. .TQ .BR vdprintf () GNU, POSIX.1-2008. -.PP +.P .\" Linux libc4 knows about the five C standard flags. .\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, .\" and the conversions @@ -994,7 +993,7 @@ GNU, POSIX.1-2008. .\" support for \fB%D\fP disappeared.) .\" No locale-dependent radix character, .\" no thousands' separator, no NaN or infinity, no "%m$" and "*m$". -.\" .PP +.\" .P .\" Linux libc5 knows about the five C standard flags and the \[aq] flag, .\" locale, "%m$" and "*m$". .\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, @@ -1005,15 +1004,15 @@ GNU, POSIX.1-2008. .\" .BR m , .\" which outputs .\" .IR strerror(errno) . -.\" .PP +.\" .P .\" glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. -.\" .PP +.\" .P glibc 2.1 adds length modifiers \fBhh\fP, \fBj\fP, \fBt\fP, and \fBz\fP and conversion characters \fBa\fP and \fBA\fP. -.PP +.P glibc 2.2 adds the conversion character \fBF\fP with C99 semantics, and the flag character \fBI\fP. -.PP +.P glibc 2.35 gives a meaning to the alternate form .RB ( # ) of the @@ -1022,13 +1021,13 @@ conversion specifier, that is .IR %#m . .SH CAVEATS Some programs imprudently rely on code such as the following -.PP +.P .in +4n .EX sprintf(buf, "%s some further text", buf); .EE .in -.PP +.P to append text to .IR buf . However, the standards explicitly note that the results are undefined @@ -1044,7 +1043,7 @@ Depending on the version of used, and the compiler options employed, calls such as the above will .B not produce the expected results. -.PP +.P The glibc implementation of the functions .BR snprintf () and @@ -1103,7 +1102,7 @@ instead (or .BR asprintf (3) and .BR vasprintf (3)). -.\" .PP +.\" .P .\" Linux libc4.[45] does not have a .\" .BR snprintf (), .\" but provides a libbsd that contains an @@ -1116,7 +1115,7 @@ and .\" Thus, the use of .\" .BR snprintf () .\" with early libc4 leads to serious security problems. -.PP +.P Code such as .BI printf( foo ); often indicates a bug, since @@ -1127,14 +1126,14 @@ If comes from untrusted user input, it may contain \fB%n\fP, causing the .BR printf () call to write to memory and creating a security hole. -.\" .PP +.\" .P .\" Some floating-point conversions under early libc4 .\" caused memory leaks. .SH EXAMPLES To print .I Pi to five decimal places: -.PP +.P .in +4n .EX #include <math.h> @@ -1142,14 +1141,14 @@ to five decimal places: fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0)); .EE .in -.PP +.P To print a date and time in the form "Sunday, July 3, 10:02", where .I weekday and .I month are pointers to strings: -.PP +.P .in +4n .EX #include <stdio.h> @@ -1157,11 +1156,11 @@ fprintf(stdout, "%s, %s %d, %.2d:%.2d\en", weekday, month, day, hour, min); .EE .in -.PP +.P Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format: -.PP +.P .in +4n .EX #include <stdio.h> @@ -1169,23 +1168,23 @@ fprintf(stdout, format, weekday, month, day, hour, min); .EE .in -.PP +.P where .I format depends on locale, and may permute the arguments. With the value: -.PP +.P .in +4n .EX "%1$s, %3$d. %2$s, %4$d:%5$.2d\en" .EE .in -.PP +.P one might obtain "Sonntag, 3. Juli, 10:02". -.PP +.P To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1): -.PP +.P .EX #include <stdio.h> #include <stdlib.h> @@ -1225,7 +1224,7 @@ make_message(const char *fmt, ...) return p; } .EE -.PP +.P If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully. .SH SEE ALSO diff --git a/man3/profil.3 b/man3/profil.3 index caa5f48..6bdb2e3 100644 --- a/man3/profil.3 +++ b/man3/profil.3 @@ -6,7 +6,7 @@ .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer <aeb@cwi.nl> .\" (prompted by Bas V. de Bakker <bas@phys.uva.nl>) .\" Corrected (and moved to man3), 980612, aeb -.TH profil 3 2023-07-20 "Linux man-pages 6.05.01" +.TH profil 3 2023-10-31 "Linux man-pages 6.7" .SH NAME profil \- execution time profile .SH LIBRARY @@ -15,16 +15,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "int profil(unsigned short *" buf ", size_t " bufsiz , .BI " size_t " offset ", unsigned int " scale ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR profil (): .nf Since glibc 2.21: @@ -73,7 +73,6 @@ T{ .BR profil () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -84,7 +83,7 @@ cannot be used on a program that also uses .B ITIMER_PROF interval timers (see .BR setitimer (2)). -.PP +.P True kernel profiling provides more accurate results. .\" Libc 4.4 contained a kernel patch providing a system call profil. .SH SEE ALSO diff --git a/man3/program_invocation_name.3 b/man3/program_invocation_name.3 index 79bd2f7..b840ada 100644 --- a/man3/program_invocation_name.3 +++ b/man3/program_invocation_name.3 @@ -21,7 +21,7 @@ .\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" %%%LICENSE_END .\" -.TH program_invocation_name 3 2023-03-30 "Linux man-pages 6.05.01" +.TH program_invocation_name 3 2023-10-31 "Linux man-pages 6.7" .SH NAME program_invocation_name, program_invocation_short_name \- \ obtain name used to invoke calling program @@ -32,7 +32,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <errno.h> -.PP +.P .BI "extern char *" program_invocation_name ; .BI "extern char *" program_invocation_short_name ; .fi @@ -46,14 +46,14 @@ in with the difference that the scope of .I program_invocation_name is global. -.PP +.P .I program_invocation_short_name contains the basename component of name that was used to invoke the calling program. That is, it is the same value as .IR program_invocation_name , with all text up to and including the final slash (/), if any, removed. -.PP +.P These variables are automatically initialized by the glibc run-time startup code. .SH VERSIONS diff --git a/man3/psignal.3 b/man3/psignal.3 index e9c9728..011f44c 100644 --- a/man3/psignal.3 +++ b/man3/psignal.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu) -.TH psignal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH psignal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME psignal, psiginfo \- print signal description .SH LIBRARY @@ -17,16 +17,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "void psignal(int " sig ", const char *" s ); .BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR psignal (): .nf Since glibc 2.19: @@ -34,7 +34,7 @@ Feature Test Macro Requirements for glibc (see glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR psiginfo (): .nf _POSIX_C_SOURCE >= 200809L @@ -48,7 +48,7 @@ describing the signal number \fIsig\fP, and a trailing newline. If the string \fIs\fP is NULL or empty, the colon and space are omitted. If \fIsig\fP is invalid, the message displayed will indicate an unknown signal. -.PP +.P The .BR psiginfo () function is like @@ -90,7 +90,6 @@ T{ .BR psiginfo () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_atfork.3 b/man3/pthread_atfork.3 index 1bcfc7e..0c01904 100644 --- a/man3/pthread_atfork.3 +++ b/man3/pthread_atfork.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_atfork 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_atfork 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_atfork \- register fork handlers .SH LIBRARY @@ -11,7 +11,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_atfork(void (*" prepare ")(void), void (*" parent ")(void)," .BI " void (*" child ")(void));" .fi @@ -23,7 +23,7 @@ function registers fork handlers that are to be executed when is called by any thread in a process. The handlers are executed in the context of the thread that calls .BR fork (2). -.PP +.P Three kinds of handler can be registered: .IP \[bu] 3 .I prepare @@ -40,7 +40,7 @@ processing completes. specifies a handler that is executed in the child process after .BR fork (2) processing completes. -.PP +.P Any of the three arguments may be NULL if no handler is needed in the corresponding phase of .BR fork (2) @@ -88,7 +88,7 @@ was to provide a mechanism whereby the application (or a library) could ensure that mutexes and other process and thread state would be restored to a consistent state. In practice, this task is generally too difficult to be practicable. -.PP +.P After a .BR fork (2) in a multithreaded process returns in the child, @@ -97,7 +97,7 @@ the child should call only async-signal-safe functions (see until such time as it calls .BR execve (2) to execute a new program. -.PP +.P POSIX.1 specifies that .BR pthread_atfork () shall not fail with the error diff --git a/man3/pthread_attr_init.3 b/man3/pthread_attr_init.3 index 8792ab4..2f23061 100644 --- a/man3/pthread_attr_init.3 +++ b/man3/pthread_attr_init.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_init 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_init 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_init, pthread_attr_destroy \- initialize and destroy thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_init(pthread_attr_t *" attr ); .BI "int pthread_attr_destroy(pthread_attr_t *" attr ); .fi @@ -29,19 +29,19 @@ using various related functions (listed under SEE ALSO), and then the object can be used in one or more .BR pthread_create (3) calls that create threads. -.PP +.P Calling .BR pthread_attr_init () on a thread attributes object that has already been initialized results in undefined behavior. -.PP +.P When a thread attributes object is no longer required, it should be destroyed using the .BR pthread_attr_destroy () function. Destroying a thread attributes object has no effect on threads that were created using that object. -.PP +.P Once a thread attributes object has been destroyed, it can be reinitialized using .BR pthread_attr_init (). @@ -73,7 +73,6 @@ T{ .BR pthread_attr_destroy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -93,7 +92,7 @@ Once created, the thread uses the .BR pthread_getattr_np (3) function (a nonstandard GNU extension) to retrieve the thread's attributes, and then displays those attributes. -.PP +.P If the program is run with no command-line argument, then it passes NULL as the .I attr @@ -102,7 +101,7 @@ argument of so that the thread is created with default attributes. Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following: -.PP +.P .in +4n .EX .\" Results from glibc 2.8, SUSE 11.0; Oct 2008 @@ -120,7 +119,7 @@ Thread attributes: Stack size = 0x201000 bytes .EE .in -.PP +.P When we supply a stack size as a command-line argument, the program initializes a thread attributes object, sets various attributes in that object, @@ -128,7 +127,7 @@ and passes a pointer to the object in the call to .BR pthread_create (3). Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following: -.PP +.P .in +4n .EX .\" Results from glibc 2.8, SUSE 11.0; Oct 2008 diff --git a/man3/pthread_attr_setaffinity_np.3 b/man3/pthread_attr_setaffinity_np.3 index 923ee0b..0ab2224 100644 --- a/man3/pthread_attr_setaffinity_np.3 +++ b/man3/pthread_attr_setaffinity_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setaffinity_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setaffinity_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setaffinity_np, pthread_attr_getaffinity_np \- set/get CPU affinity attribute in thread attributes object @@ -15,7 +15,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setaffinity_np(pthread_attr_t *" attr , .BI " size_t " cpusetsize ", const cpu_set_t *" cpuset ); .BI "int pthread_attr_getaffinity_np(const pthread_attr_t *" attr , @@ -33,7 +33,7 @@ to the value specified in This attribute determines the CPU affinity mask of a thread created using the thread attributes object .IR attr . -.PP +.P The .BR pthread_attr_getaffinity_np () function @@ -42,14 +42,14 @@ referred to by .I attr in the buffer pointed to by .IR cpuset . -.PP +.P The argument .I cpusetsize is the length (in bytes) of the buffer pointed to by .IR cpuset . Typically, this argument would be specified as .IR sizeof(cpu_set_t) . -.PP +.P For more details on CPU affinity masks, see .BR sched_setaffinity (2). For a description of a set of macros @@ -100,7 +100,6 @@ T{ .BR pthread_attr_getaffinity_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the names. diff --git a/man3/pthread_attr_setdetachstate.3 b/man3/pthread_attr_setdetachstate.3 index c984943..2fcf6e0 100644 --- a/man3/pthread_attr_setdetachstate.3 +++ b/man3/pthread_attr_setdetachstate.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setdetachstate 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setdetachstate 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setdetachstate, pthread_attr_getdetachstate \- set/get detach state attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setdetachstate(pthread_attr_t *" attr \ ", int " detachstate ); .BI "int pthread_attr_getdetachstate(const pthread_attr_t *" attr , @@ -32,7 +32,7 @@ The detach state attribute determines whether a thread created using the thread attributes object .I attr will be created in a joinable or a detached state. -.PP +.P The following values may be specified in .IR detachstate : .TP @@ -45,11 +45,11 @@ will be created in a detached state. Threads that are created using .I attr will be created in a joinable state. -.PP +.P The default setting of the detach state attribute in a newly initialized thread attributes object is .BR PTHREAD_CREATE_JOINABLE . -.PP +.P The .BR pthread_attr_getdetachstate () returns the detach state attribute of the thread attributes object @@ -81,7 +81,6 @@ T{ .BR pthread_attr_getdetachstate () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -90,7 +89,7 @@ POSIX.1-2001. See .BR pthread_create (3) for more details on detached and joinable threads. -.PP +.P A thread that is created in a joinable state should eventually either be joined using .BR pthread_join (3) @@ -98,7 +97,7 @@ or detached using .BR pthread_detach (3); see .BR pthread_create (3). -.PP +.P It is an error to specify the thread ID of a thread that was created in a detached state in a later call to diff --git a/man3/pthread_attr_setguardsize.3 b/man3/pthread_attr_setguardsize.3 index 7d8d8cb..b436260 100644 --- a/man3/pthread_attr_setguardsize.3 +++ b/man3/pthread_attr_setguardsize.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setguardsize 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setguardsize 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setguardsize, pthread_attr_getguardsize \- set/get guard size attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setguardsize(pthread_attr_t *" attr \ ", size_t " guardsize ); .BI "int pthread_attr_getguardsize(const pthread_attr_t *restrict " attr , @@ -28,7 +28,7 @@ thread attributes object referred to by .I attr to the value specified in .IR guardsize . -.PP +.P If .I guardsize is greater than 0, @@ -38,15 +38,15 @@ the system allocates an additional region of at least .I guardsize bytes at the end of the thread's stack to act as the guard area for the stack (but see BUGS). -.PP +.P If .I guardsize is 0, then new threads created with .I attr will not have a guard area. -.PP +.P The default guard size is the same as the system page size. -.PP +.P If the stack address attribute has been set in .I attr (using @@ -61,7 +61,7 @@ it is the application's responsibility to handle stack overflow .BR mprotect (2) to manually define a guard area at the end of the stack that it has allocated). -.PP +.P The .BR pthread_attr_getguardsize () function returns the guard size attribute of the @@ -98,7 +98,6 @@ T{ .BR pthread_attr_getguardsize () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -118,11 +117,11 @@ the system page size when creating a thread. .BR pthread_attr_getguardsize () returns the guard size that was set by .BR pthread_attr_setguardsize ().) -.PP +.P Setting a guard size of 0 may be useful to save memory in an application that creates many threads and knows that stack overflow can never occur. -.PP +.P Choosing a guard size larger than the default size may be necessary for detecting stack overflows if a thread allocates large data structures on the stack. @@ -137,7 +136,7 @@ error from .BR pthread_create (3) if the guard size value is too large, leaving no space for the actual stack.) -.PP +.P The obsolete LinuxThreads implementation did the right thing, allocating extra space at the end of the stack for the guard area. .\" glibc includes the guardsize within the allocated stack size, diff --git a/man3/pthread_attr_setinheritsched.3 b/man3/pthread_attr_setinheritsched.3 index aa062d1..218522e 100644 --- a/man3/pthread_attr_setinheritsched.3 +++ b/man3/pthread_attr_setinheritsched.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setinheritsched 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setinheritsched 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setinheritsched, pthread_attr_getinheritsched \- set/get inherit-scheduler attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setinheritsched(pthread_attr_t *" attr , .BI " int " inheritsched ); .BI "int pthread_attr_getinheritsched(const pthread_attr_t *restrict " attr , @@ -34,7 +34,7 @@ the thread attributes object will inherit its scheduling attributes from the calling thread or whether it will take them from .IR attr . -.PP +.P The following scheduling attributes are affected by the inherit-scheduler attribute: scheduling policy @@ -43,7 +43,7 @@ scheduling priority .RB ( pthread_attr_setschedparam (3)), and contention scope .RB ( pthread_attr_setscope (3)). -.PP +.P The following values may be specified in .IR inheritsched : .TP @@ -61,11 +61,11 @@ Threads that are created using take their scheduling attributes from the values specified by the attributes object. .\" FIXME Document the defaults for scheduler settings -.PP +.P The default setting of the inherit-scheduler attribute in a newly initialized thread attributes object is .BR PTHREAD_INHERIT_SCHED . -.PP +.P The .BR pthread_attr_getinheritsched () returns the inherit-scheduler attribute of the thread attributes object @@ -82,7 +82,7 @@ can fail with the following error: .B EINVAL Invalid value in .IR inheritsched . -.PP +.P POSIX.1 also documents an optional .B ENOTSUP error ("attempt was made to set the attribute to an unsupported value") for @@ -102,7 +102,6 @@ T{ .BR pthread_attr_getinheritsched () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_attr_setschedparam.3 b/man3/pthread_attr_setschedparam.3 index 379f30c..b01f0f9 100644 --- a/man3/pthread_attr_setschedparam.3 +++ b/man3/pthread_attr_setschedparam.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setschedparam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setschedparam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setschedparam, pthread_attr_getschedparam \- set/get scheduling parameter attributes in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setschedparam(pthread_attr_t *restrict " attr , .BI " const struct sched_param *restrict " param ); .BI "int pthread_attr_getschedparam(const pthread_attr_t *restrict " attr , @@ -31,16 +31,16 @@ to the values specified in the buffer pointed to by These attributes determine the scheduling parameters of a thread created using the thread attributes object .IR attr . -.PP +.P The .BR pthread_attr_getschedparam () returns the scheduling parameter attributes of the thread attributes object .I attr in the buffer pointed to by .IR param . -.PP +.P Scheduling parameters are maintained in the following structure: -.PP +.P .in +4n .EX struct sched_param { @@ -48,12 +48,12 @@ struct sched_param { }; .EE .in -.PP +.P As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see .BR sched (7). -.PP +.P In order for the parameter setting made by .BR pthread_attr_setschedparam () to have effect when calling @@ -76,7 +76,7 @@ The priority specified in .I param does not make sense for the current scheduling policy of .IR attr . -.PP +.P POSIX.1 also documents an .B ENOTSUP error for @@ -99,7 +99,6 @@ T{ .BR pthread_attr_getschedparam () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_attr_setschedpolicy.3 b/man3/pthread_attr_setschedpolicy.3 index 9311af6..cbd630f 100644 --- a/man3/pthread_attr_setschedpolicy.3 +++ b/man3/pthread_attr_setschedpolicy.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setschedpolicy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setschedpolicy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setschedpolicy, pthread_attr_getschedpolicy \- set/get scheduling policy attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setschedpolicy(pthread_attr_t *" attr ", int " policy ); .BI "int pthread_attr_getschedpolicy(const pthread_attr_t *restrict " attr , .BI " int *restrict " policy ); @@ -30,7 +30,7 @@ to the value specified in This attribute determines the scheduling policy of a thread created using the thread attributes object .IR attr . -.PP +.P The supported values for .I policy are @@ -43,14 +43,14 @@ with the semantics described in .\" FIXME . pthread_setschedparam() places no restriction on the policy, .\" but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7013 -.PP +.P The .BR pthread_attr_getschedpolicy () returns the scheduling policy attribute of the thread attributes object .I attr in the buffer pointed to by .IR policy . -.PP +.P In order for the policy setting made by .BR pthread_attr_setschedpolicy () to have effect when calling @@ -71,7 +71,7 @@ can fail with the following error: .B EINVAL Invalid value in .IR policy . -.PP +.P POSIX.1 also documents an optional .B ENOTSUP error ("attempt was made to set the attribute to an unsupported value") for @@ -91,7 +91,6 @@ T{ .BR pthread_attr_getschedpolicy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_attr_setscope.3 b/man3/pthread_attr_setscope.3 index c9acfc4..024efa5 100644 --- a/man3/pthread_attr_setscope.3 +++ b/man3/pthread_attr_setscope.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setscope 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setscope 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setscope, pthread_attr_getscope \- set/get contention scope attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setscope(pthread_attr_t *" attr ", int " scope ); .BI "int pthread_attr_getscope(const pthread_attr_t *restrict " attr , .BI " int *restrict " scope ); @@ -54,14 +54,14 @@ with other threads in the same process that were created with the .B PTHREAD_SCOPE_SYSTEM contention scope. -.PP +.P POSIX.1 requires that an implementation support at least one of these contention scopes. Linux supports .BR PTHREAD_SCOPE_SYSTEM , but not .BR PTHREAD_SCOPE_PROCESS . -.PP +.P On systems that support multiple contention scopes, then, in order for the parameter setting made by .BR pthread_attr_setscope () @@ -73,7 +73,7 @@ to set the inherit-scheduler attribute of the attributes object .I attr to .BR PTHREAD_EXPLICIT_SCHED . -.PP +.P The .BR pthread_attr_getscope () function returns the contention scope attribute of the @@ -112,7 +112,6 @@ T{ .BR pthread_attr_getscope () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -125,7 +124,7 @@ bound directly to a single kernel-scheduling entity. This is the case on Linux for the obsolete LinuxThreads implementation and the modern NPTL implementation, which are both 1:1 threading implementations. -.PP +.P POSIX.1 specifies that the default contention scope is implementation-defined. .SH SEE ALSO diff --git a/man3/pthread_attr_setsigmask_np.3 b/man3/pthread_attr_setsigmask_np.3 index ee789a6..0ff9bee 100644 --- a/man3/pthread_attr_setsigmask_np.3 +++ b/man3/pthread_attr_setsigmask_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setsigmask_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setsigmask_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setsigmask_np, pthread_attr_getsigmask_np \- set/get signal mask attribute in thread attributes object @@ -15,7 +15,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setsigmask_np(pthread_attr_t *" attr , .BI " const sigset_t *" sigmask ); .BI "int pthread_attr_getsigmask_np(const pthread_attr_t *" attr , @@ -34,7 +34,7 @@ If is specified as NULL, then any existing signal mask attribute in .I attr is unset. -.PP +.P The .BR pthread_attr_getsigmask_np () function returns the signal mask attribute of the thread attributes object @@ -50,7 +50,7 @@ as its result. The .BR pthread_attr_setsigmask_np () function returns 0 on success, or a nonzero error number on failure. -.PP +.P the .BR pthread_attr_getsigmask_np () function returns either 0 or @@ -61,7 +61,7 @@ A return value of .B PTHREAD_ATTR_NO_SIGMASK_NP indicates that the signal mask attribute is not set in .IR attr . -.PP +.P On error, these functions return a positive error number. .SH ERRORS .TP @@ -83,7 +83,6 @@ T{ .BR pthread_attr_getsigmask_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the names. @@ -96,13 +95,13 @@ a thread created using the thread attributes object If this attribute is not set, then a thread created using .I attr will inherit a copy of the creating thread's signal mask. -.PP +.P For more details on signal masks, see .BR sigprocmask (2). For a description of a set of macros that can be used to manipulate and inspect signal sets, see .BR sigsetops (3). -.PP +.P In the absence of .BR pthread_attr_setsigmask_np () it is possible to create a thread with a desired signal mask as follows: @@ -119,7 +118,7 @@ The new thread sets its signal mask to the desired value using .BR pthread_sigmask (3). .IP \[bu] The creating thread restores its signal mask to the original value. -.PP +.P Following the above steps, there is no possibility for the new thread to receive a signal before it has adjusted its signal mask to the desired value. diff --git a/man3/pthread_attr_setstack.3 b/man3/pthread_attr_setstack.3 index 78c2ff4..1cf976b 100644 --- a/man3/pthread_attr_setstack.3 +++ b/man3/pthread_attr_setstack.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setstack 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setstack 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setstack, pthread_attr_getstack \- set/get stack attributes in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setstack(pthread_attr_t *" attr , .BI " void " stackaddr [. stacksize ], .BI " size_t " stacksize ); @@ -22,12 +22,12 @@ POSIX threads library .BI " void **restrict " stackaddr , .BI " size_t *restrict " stacksize ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_attr_getstack (), .BR pthread_attr_setstack (): .nf @@ -47,13 +47,13 @@ respectively. These attributes specify the location and size of the stack that should be used by a thread that is created using the thread attributes object .IR attr . -.PP +.P .I stackaddr should point to the lowest addressable byte of a buffer of .I stacksize bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable. -.PP +.P The .BR pthread_attr_getstack () function returns the stack address and stack size attributes of the @@ -81,7 +81,7 @@ On some systems, this error may also occur if or .I stackaddr\~+\~stacksize is not suitably aligned. -.PP +.P POSIX.1 also documents an .B EACCES error if the stack area described by @@ -104,7 +104,6 @@ T{ .BR pthread_attr_getstack () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -118,7 +117,7 @@ and the use of these functions should be avoided. (Use .BR pthread_attr_setstacksize (3) if an application simply requires a stack size other than the default.) -.PP +.P When an application employs .BR pthread_attr_setstack (), it takes over the responsibility of allocating the stack. @@ -129,7 +128,7 @@ If deemed necessary, it is the application's responsibility to allocate a guard area (one or more pages protected against reading and writing) to handle the possibility of stack overflow. -.PP +.P The address specified in .I stackaddr should be suitably aligned: @@ -140,7 +139,7 @@ may be useful for allocation. Probably, .I stacksize should also be a multiple of the system page size. -.PP +.P If .I attr is used to create multiple threads, then the caller must change the diff --git a/man3/pthread_attr_setstackaddr.3 b/man3/pthread_attr_setstackaddr.3 index 9ec2e9a..7e9c2cc 100644 --- a/man3/pthread_attr_setstackaddr.3 +++ b/man3/pthread_attr_setstackaddr.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setstackaddr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setstackaddr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setstackaddr, pthread_attr_getstackaddr \- set/get stack address attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .B [[deprecated]] .BI "int pthread_attr_setstackaddr(pthread_attr_t *" attr \ ", void *" stackaddr ); @@ -30,7 +30,7 @@ Use and .BR pthread_attr_getstack (3) instead. -.PP +.P The .BR pthread_attr_setstackaddr () function sets the stack address attribute of the @@ -41,13 +41,13 @@ to the value specified in This attribute specifies the location of the stack that should be used by a thread that is created using the thread attributes object .IR attr . -.PP +.P .I stackaddr should point to a buffer of at least .B PTHREAD_STACK_MIN bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable. -.PP +.P The .BR pthread_attr_getstackaddr () function returns the stack address attribute of the @@ -77,7 +77,6 @@ T{ .BR pthread_attr_getstackaddr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/pthread_attr_setstacksize.3 b/man3/pthread_attr_setstacksize.3 index 278346e..466a6ee 100644 --- a/man3/pthread_attr_setstacksize.3 +++ b/man3/pthread_attr_setstacksize.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_attr_setstacksize 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_attr_setstacksize 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_attr_setstacksize, pthread_attr_getstacksize \- set/get stack size attribute in thread attributes object @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_attr_setstacksize(pthread_attr_t *" attr \ ", size_t " stacksize ); .BI "int pthread_attr_getstacksize(const pthread_attr_t *restrict " attr , @@ -28,11 +28,11 @@ thread attributes object referred to by .I attr to the value specified in .IR stacksize . -.PP +.P The stack size attribute determines the minimum size (in bytes) that will be allocated for threads created using the thread attributes object .IR attr . -.PP +.P The .BR pthread_attr_getstacksize () function returns the stack size attribute of the @@ -51,7 +51,7 @@ can fail with the following error: The stack size is less than .B PTHREAD_STACK_MIN (16384) bytes. -.PP +.P On some systems, .\" e.g., MacOS .BR pthread_attr_setstacksize () @@ -75,7 +75,6 @@ T{ .BR pthread_attr_getstacksize () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS These functions are provided since glibc 2.1. .SH STANDARDS @@ -83,10 +82,10 @@ POSIX.1-2001, POSIX.1-2008. .SH NOTES For details on the default stack size of new threads, see .BR pthread_create (3). -.PP +.P A thread's stack size is fixed at the time of thread creation. Only the main thread can dynamically grow its stack. -.PP +.P The .BR pthread_attr_setstack (3) function allows an application to set both the size and location diff --git a/man3/pthread_cancel.3 b/man3/pthread_cancel.3 index 8230c80..c1a160b 100644 --- a/man3/pthread_cancel.3 +++ b/man3/pthread_cancel.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_cancel 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_cancel 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_cancel \- send a cancelation request to a thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_cancel(pthread_t " thread ); .fi .SH DESCRIPTION @@ -28,7 +28,7 @@ its cancelability .I state and .IR type . -.PP +.P A thread's cancelability state, determined by .BR pthread_setcancelstate (3), can be @@ -40,7 +40,7 @@ then a cancelation request remains queued until the thread enables cancelation. If a thread has enabled cancelation, then its cancelability type determines when cancelation occurs. -.PP +.P A thread's cancelation type, determined by .BR pthread_setcanceltype (3), may be either @@ -56,7 +56,7 @@ the thread next calls a function that is a .IR "cancelation point" . A list of functions that are or may be cancelation points is provided in .BR pthreads (7). -.PP +.P When a cancelation requested is acted on, the following steps occur for .I thread (in this order): @@ -74,7 +74,7 @@ in an unspecified order. The thread is terminated. (See .BR pthread_exit (3).) -.PP +.P The above steps happen asynchronously with respect to the .BR pthread_cancel () call; @@ -82,7 +82,7 @@ the return status of .BR pthread_cancel () merely informs the caller whether the cancelation request was successfully queued. -.PP +.P After a canceled thread has terminated, a join with that thread using .BR pthread_join (3) @@ -116,7 +116,6 @@ T{ .BR pthread_cancel () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On Linux, cancelation is implemented using signals. Under the NPTL threading implementation, @@ -136,7 +135,7 @@ The main thread joins with the canceled thread to check that its exit status was .BR PTHREAD_CANCELED . The following shell session shows what happens when we run the program: -.PP +.P .in +4n .EX $ ./a.out diff --git a/man3/pthread_cleanup_push.3 b/man3/pthread_cleanup_push.3 index 9fcccb3..eec8c8e 100644 --- a/man3/pthread_cleanup_push.3 +++ b/man3/pthread_cleanup_push.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_cleanup_push 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_cleanup_push 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_cleanup_push, pthread_cleanup_pop \- push and pop thread cancelation clean-up handlers @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "void pthread_cleanup_push(void (*" routine ")(void *), void *" arg ); .BI "void pthread_cleanup_pop(int " execute ); .fi @@ -26,7 +26,7 @@ when a thread is canceled (or in various other circumstances described below); it might, for example, unlock a mutex so that it becomes available to other threads in the process. -.PP +.P The .BR pthread_cleanup_push () function pushes @@ -37,14 +37,14 @@ When is later invoked, it will be given .I arg as its argument. -.PP +.P The .BR pthread_cleanup_pop () function removes the routine at the top of the stack of clean-up handlers, and optionally executes it if .I execute is nonzero. -.PP +.P A cancelation clean-up handler is popped from the stack and executed in the following circumstances: .IP \[bu] 3 @@ -67,7 +67,7 @@ When a thread calls with a nonzero .I execute argument, the top-most clean-up handler is popped and executed. -.PP +.P POSIX.1 permits .BR pthread_cleanup_push () and @@ -79,7 +79,7 @@ functions are paired within the same function, and at the same lexical nesting level. (In other words, a clean-up handler is established only during the execution of a specified section of code.) -.PP +.P Calling .BR longjmp (3) .RB ( siglongjmp (3)) @@ -118,7 +118,6 @@ T{ .BR pthread_cleanup_pop () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On glibc, the .BR pthread_cleanup_push () @@ -130,7 +129,7 @@ implemented as macros that expand to text containing \[aq]\fB{\fP\[aq] and \[aq]\fB}\fP\[aq], respectively. This means that variables declared within the scope of paired calls to these functions will be visible within only that scope. -.PP +.P POSIX.1 .\" The text was actually added in the 2004 TC2 says that the effect of using @@ -165,10 +164,10 @@ the main thread sends the other thread a cancelation request, or sets a global variable that causes the other thread to exit its loop and terminate normally (by doing a .IR return ). -.PP +.P In the following shell session, the main thread sends a cancelation request to the other thread: -.PP +.P .in +4n .EX $ \fB./a.out\fP @@ -180,16 +179,16 @@ Called clean\-up handler Thread was canceled; cnt = 0 .EE .in -.PP +.P From the above, we see that the thread was canceled, and that the cancelation clean-up handler was called and it reset the value of the global variable .I cnt to 0. -.PP +.P In the next run, the main program sets a global variable that causes other thread to terminate normally: -.PP +.P .in +4n .EX $ \fB./a.out x\fP @@ -199,18 +198,18 @@ cnt = 1 Thread terminated normally; cnt = 2 .EE .in -.PP +.P From the above, we see that the clean-up handler was not executed (because .I cleanup_pop_arg was 0), and therefore the value of .I cnt was not reset. -.PP +.P In the next run, the main program sets a global variable that causes the other thread to terminate normally, and supplies a nonzero value for .IR cleanup_pop_arg : -.PP +.P .in +4n .EX $ \fB./a.out x 1\fP @@ -221,7 +220,7 @@ Called clean\-up handler Thread terminated normally; cnt = 0 .EE .in -.PP +.P In the above, we see that although the thread was not canceled, the clean-up handler was executed, because the argument given to .BR pthread_cleanup_pop () diff --git a/man3/pthread_cleanup_push_defer_np.3 b/man3/pthread_cleanup_push_defer_np.3 index d72b3d2..ca0e3d4 100644 --- a/man3/pthread_cleanup_push_defer_np.3 +++ b/man3/pthread_cleanup_push_defer_np.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_cleanup_push_defer_np 3 2023-05-03 "Linux man-pages 6.05.01" +.TH pthread_cleanup_push_defer_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np \- push and pop thread cancelation clean-up handlers while saving cancelability type @@ -13,16 +13,16 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "void pthread_cleanup_push_defer_np(void (*" routine ")(void *), void *" arg ); .BI "void pthread_cleanup_pop_restore_np(int " execute ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_cleanup_push_defer_np (), .BR pthread_cleanup_pop_defer_np (): .nf @@ -34,7 +34,7 @@ These functions are the same as and .BR pthread_cleanup_pop (3), except for the differences noted on this page. -.PP +.P Like .BR pthread_cleanup_push (3), .BR pthread_cleanup_push_defer_np () @@ -47,7 +47,7 @@ and sets the cancelability type to "deferred" (see this ensures that cancelation clean-up will occur even if the thread's cancelability type was "asynchronous" before the call. -.PP +.P Like .BR pthread_cleanup_pop (3), .BR pthread_cleanup_pop_restore_np () @@ -56,24 +56,24 @@ stack of cancelation clean-up handlers. In addition, it restores the thread's cancelability type to its value at the time of the matching .BR pthread_cleanup_push_defer_np (). -.PP +.P The caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. Other restrictions apply, as described in .BR pthread_cleanup_push (3). -.PP +.P This sequence of calls: -.PP +.P .in +4n .EX pthread_cleanup_push_defer_np(routine, arg); pthread_cleanup_pop_restore_np(execute); .EE .in -.PP +.P is equivalent to (but shorter and more efficient than): -.PP +.P .\" As far as I can see, LinuxThreads reverses the two substeps .\" in the push and pop below. .in +4n diff --git a/man3/pthread_cond_init.3 b/man3/pthread_cond_init.3 new file mode 100644 index 0000000..7fff419 --- /dev/null +++ b/man3/pthread_cond_init.3 @@ -0,0 +1,264 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_cond_init 3 2024-02-26 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_cond_init, +pthread_cond_signal, +pthread_cond_broadcast, +pthread_cond_wait, +pthread_cond_timedwait, +pthread_cond_destroy +\- +operations on conditions +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "pthread_cond_t " cond " = PTHREAD_COND_INITIALIZER;" +.P +.BI "int pthread_cond_init(pthread_cond_t *" cond ", pthread_condattr_t *" cond_attr ");" +.BI "int pthread_cond_signal(pthread_cond_t *" cond ");" +.BI "int pthread_cond_broadcast(pthread_cond_t *" cond ");" +.BI "int pthread_cond_wait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ");" +.BI "int pthread_cond_timedwait(pthread_cond_t *" cond ", pthread_mutex_t *" mutex ", const struct timespec *" abstime ");" +.BI "int pthread_cond_destroy(pthread_cond_t *" cond ");" +. +. +.SH DESCRIPTION +A condition (short for ``condition variable'') +is a synchronization device that allows threads +to suspend execution and relinquish the processors +until some predicate on shared data is satisfied. +The basic operations on conditions are: +signal the condition (when the predicate becomes true), +and wait for the condition, +suspending the thread execution until another thread signals the condition. +.P +A condition variable must always be associated with a mutex, +to avoid the race condition where +a thread prepares to wait on a condition variable +and another thread signals the condition +just before the first thread actually waits on it. +.P +\fBpthread_cond_init\fP initializes the condition variable \fIcond\fP, +using the condition attributes specified in \fIcond_attr\fP, +or default attributes if \fIcond_attr\fP is \fBNULL\fP. +The LinuxThreads implementation supports no attributes for conditions, +hence the \fIcond_attr\fP parameter is actually ignored. +.P +Variables of type \fBpthread_cond_t\fP can also be initialized statically, +using the constant \fBPTHREAD_COND_INITIALIZER\fP. +.P +\fBpthread_cond_signal\fP restarts one of the threads that +are waiting on the condition variable \fIcond\fP. +If no threads are waiting on \fIcond\fP, +nothing happens. +If several threads are waiting on \fIcond\fP, +exactly one is restarted, +but it is not specified which. +.P +\fBpthread_cond_broadcast\fP restarts all the threads that +are waiting on the condition variable \fIcond\fP. +Nothing happens if no threads are waiting on \fIcond\fP. +.P +\fBpthread_cond_wait\fP atomically unlocks the \fImutex\fP +(as per \fBpthread_unlock_mutex\fP) +and waits for the condition variable \fIcond\fP to be signaled. +The thread execution is suspended and does not consume any CPU time +until the condition variable is signaled. +The \fImutex\fP must be locked by the calling thread +on entrance to \fBpthread_cond_wait\fP. +Before returning to the calling thread, +\fBpthread_cond_wait\fP re-acquires \fImutex\fP +(as per \fBpthread_lock_mutex\fP). +.P +Unlocking the mutex and suspending on the condition variable is done atomically. +Thus, +if all threads always acquire the mutex before signaling the condition, +this guarantees that the condition cannot be signaled (and thus ignored) +between the time a thread locks the mutex +and the time it waits on the condition variable. +.P +\fBpthread_cond_timedwait\fP atomically unlocks \fImutex\fP +and waits on \fIcond\fP, +as \fBpthread_cond_wait\fP does, +but it also bounds the duration of the wait. +If \fIcond\fP has not been signaled +within the amount of time specified by \fIabstime\fP, +the mutex \fImutex\fP is re-acquired +and \fBpthread_cond_timedwait\fP returns the error \fBETIMEDOUT\fP. +The \fIabstime\fP parameter specifies an absolute time, +with the same origin as \fBtime\fP(2) and \fBgettimeofday\fP(2): +an \fIabstime\fP of 0 +corresponds to 00:00:00 GMT, January 1, 1970. +.P +\fBpthread_cond_destroy\fP destroys a condition variable, +freeing the resources it might hold. +No threads must be waiting on the condition variable +on entrance to \fBpthread_cond_destroy\fP. +In the LinuxThreads implementation, +no resources are associated with condition variables, +thus \fBpthread_cond_destroy\fP actually does nothing +except checking that the condition has no waiting threads. +. +. +.SH CANCELLATION +\fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP +are cancelation points. +If a thread is cancelled while suspended in one of these functions, +the thread immediately resumes execution, +then locks again the \fImutex\fP +argument to \fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP, +and finally executes the cancelation. +Consequently, +cleanup handlers are assured that \fImutex\fP is locked +when they are called. +. +. +.SH "ASYNC-SIGNAL SAFETY" +The condition functions are not async-signal safe, +and should not be called from a signal handler. +In particular, +calling \fBpthread_cond_signal\fP or \fBpthread_cond_broadcast\fP +from a signal handler +may deadlock the calling thread. +. +. +.SH "RETURN VALUE" +All condition variable functions return 0 on success +and a non-zero error code on error. +. +. +.SH ERRORS +\fBpthread_cond_init\fP, +\fBpthread_cond_signal\fP, +\fBpthread_cond_broadcast\fP, +and \fBpthread_cond_wait\fP +never return an error code. +.P +The \fBpthread_cond_timedwait\fP function returns +the following error codes on error: +.RS +.TP +\fBETIMEDOUT\fP +The condition variable was not signaled +until the timeout specified by \fIabstime\fP. +.TP +\fBEINTR\fP +\fBpthread_cond_timedwait\fP was interrupted by a signal. +.RE +.P +The \fBpthread_cond_destroy\fP function returns +the following error code on error: +.RS +.TP +\fBEBUSY\fP +Some threads are currently waiting on \fIcond\fP. +.RE +. +. +.SH "SEE ALSO" +\fBpthread_condattr_init\fP(3), +\fBpthread_mutex_lock\fP(3), +\fBpthread_mutex_unlock\fP(3), +\fBgettimeofday\fP(2), +\fBnanosleep\fP(2). +. +. +.SH EXAMPLE +Consider two shared variables \fIx\fP and \fIy\fP, +protected by the mutex \fImut\fP, +and a condition variable \fIcond\fP +that is to be signaled +whenever \fIx\fP becomes greater than \fIy\fP. +.P +.RS +.ft 3 +.nf +.sp +int x,y; +pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +.ft +.P +.RE +.fi +.P +Waiting until \fIx\fP is greater than \fIy\fP is performed as follows: +.P +.RS +.ft 3 +.nf +.sp +pthread_mutex_lock(&mut); +while (x <= y) { + pthread_cond_wait(&cond, &mut); +} +/* operate on x and y */ +pthread_mutex_unlock(&mut); +.ft +.P +.RE +.fi +.P +Modifications on \fIx\fP and \fIy\fP +that may cause \fIx\fP to become greater than \fIy\fP +should signal the condition if needed: +.P +.RS +.ft 3 +.nf +.sp +pthread_mutex_lock(&mut); +/* modify x and y */ +if (x > y) pthread_cond_broadcast(&cond); +pthread_mutex_unlock(&mut); +.ft +.P +.RE +.fi +.P +If it can be proved that at most one waiting thread needs to be waken up +(for instance, +if there are only two threads communicating through \fIx\fP and \fIy\fP), +\fBpthread_cond_signal\fP can be used as +a slightly more efficient alternative to \fBpthread_cond_broadcast\fP. +In doubt, +use \fBpthread_cond_broadcast\fP. +.P +To wait for \fIx\fP to become greater than \fIy\fP +with a timeout of 5 seconds, +do: +.P +.RS +.ft 3 +.nf +.sp +struct timeval now; +struct timespec timeout; +int retcode; +\& +pthread_mutex_lock(&mut); +gettimeofday(&now); +timeout.tv_sec = now.tv_sec + 5; +timeout.tv_nsec = now.tv_usec * 1000; +retcode = 0; +while (x <= y && retcode != ETIMEDOUT) { + retcode = pthread_cond_timedwait(&cond, &mut, &timeout); +} +if (retcode == ETIMEDOUT) { + /* timeout occurred */ +} else { + /* operate on x and y */ +} +pthread_mutex_unlock(&mut); +.ft +.P +.RE +.fi diff --git a/man3/pthread_condattr_init.3 b/man3/pthread_condattr_init.3 new file mode 100644 index 0000000..bed354c --- /dev/null +++ b/man3/pthread_condattr_init.3 @@ -0,0 +1,48 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_condattr_init 3 2023-10-31 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_condattr_init, +pthread_condattr_destroy +\- +condition creation attributes +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "int pthread_condattr_init(pthread_condattr_t *" attr ");" +.BI "int pthread_condattr_destroy(pthread_condattr_t *" attr ");" +. +. +.SH DESCRIPTION +Condition attributes can be specified at condition creation time, +by passing a condition attribute object +as second argument to \fBpthread_cond_init\fP(3). +Passing \fBNULL\fP is equivalent to +passing a condition attribute object +with all attributes set to their default values. +.P +The LinuxThreads implementation supports no attributes for conditions. +The functions on condition attributes are +included only for compliance with the POSIX standard. +.P +\fBpthread_condattr_init\fP +initializes the condition attribute object \fIattr\fP +and fills it with default values for the attributes. +\fBpthread_condattr_destroy\fP destroys a condition attribute object, +which must not be reused until it is reinitialized. +Both functions do nothing in the LinuxThreads implementation. +. +. +.SH "RETURN VALUE" +\fBpthread_condattr_init\fP and \fBpthread_condattr_destroy\fP always return 0. +. +. +.SH "SEE ALSO" +\fBpthread_cond_init\fP(3). diff --git a/man3/pthread_create.3 b/man3/pthread_create.3 index 268bfa0..beba117 100644 --- a/man3/pthread_create.3 +++ b/man3/pthread_create.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_create 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_create 3 2024-02-12 "Linux man-pages 6.7" .SH NAME pthread_create \- create a new thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_create(pthread_t *restrict " thread , .BI " const pthread_attr_t *restrict " attr , .BI " void *(*" start_routine ")(void *)," @@ -28,7 +28,7 @@ The new thread starts execution by invoking .I arg is passed as the sole argument of .IR start_routine (). -.PP +.P The new thread terminates in one of the following ways: .IP \[bu] 3 It calls @@ -53,7 +53,7 @@ Any of the threads in the process calls or the main thread performs a return from .IR main (). This causes the termination of all threads in the process. -.PP +.P The .I attr argument points to a @@ -67,14 +67,14 @@ If .I attr is NULL, then the thread is created with default attributes. -.PP +.P Before returning, a successful call to .BR pthread_create () stores the ID of the new thread in the buffer pointed to by .IR thread ; this identifier is used to refer to the thread in subsequent calls to other pthreads functions. -.PP +.P The new thread inherits a copy of the creating thread's signal mask .RB ( pthread_sigmask (3)). The set of pending signals for the new thread is empty @@ -82,10 +82,10 @@ The set of pending signals for the new thread is empty The new thread does not inherit the creating thread's alternate signal stack .RB ( sigaltstack (2)). -.PP +.P The new thread inherits the calling thread's floating-point environment .RB ( fenv (3)). -.PP +.P The initial value of the new thread's CPU-time clock is 0 (see .BR pthread_getcpuclockid (3)). @@ -148,7 +148,6 @@ T{ .BR pthread_create () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -165,7 +164,7 @@ after a call to .BR pthread_create (), it is indeterminate which thread\[em]the caller or the new thread\[em]will next execute. -.PP +.P A thread may either be .I joinable or @@ -185,7 +184,7 @@ By default, a new thread is created in a joinable state, unless .I attr was set to create the thread in a detached state (using .BR pthread_attr_setdetachstate (3)). -.PP +.P Under the NPTL threading implementation, if the .B RLIMIT_STACK soft resource limit @@ -201,23 +200,8 @@ in order to obtain a stack size other than the default. If the .B RLIMIT_STACK resource limit is set to "unlimited", -a per-architecture value is used for the stack size. -Here is the value for a few architectures: -.RS -.TS -allbox; -lb lb -l r. -Architecture Default stack size -i386 2 MB -IA-64 32 MB -PowerPC 4 MB -S/390 2 MB -Sparc-32 2 MB -Sparc-64 4 MB -x86_64 2 MB -.TE -.RE +a per-architecture value is used for the stack size: +2 MB on most architectures; 4 MB on POWER and Sparc-64. .SH BUGS In the obsolete LinuxThreads implementation, each of the threads in a process has a different process ID. @@ -228,12 +212,12 @@ and is the source of many other nonconformances to the standard; see The program below demonstrates the use of .BR pthread_create (), as well as a number of other functions in the pthreads API. -.PP +.P In the following run, on a system providing the NPTL threading implementation, the stack size defaults to the value given by the "stack size" resource limit: -.PP +.P .in +4n .EX .RB "$" " ulimit \-s" @@ -247,11 +231,11 @@ Joined with thread 2; returned value was SALUT Joined with thread 3; returned value was SERVUS .EE .in -.PP +.P In the next run, the program explicitly sets a stack size of 1\ MB (using .BR pthread_attr_setstacksize (3)) for the created threads: -.PP +.P .in +4n .EX .RB "$" " ./a.out \-s 0x100000 hola salut servus" diff --git a/man3/pthread_detach.3 b/man3/pthread_detach.3 index aba9f05..25b588a 100644 --- a/man3/pthread_detach.3 +++ b/man3/pthread_detach.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_detach 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_detach 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_detach \- detach a thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_detach(pthread_t " thread ); .fi .SH DESCRIPTION @@ -25,7 +25,7 @@ as detached. When a detached thread terminates, its resources are automatically released back to the system without the need for another thread to join with the terminated thread. -.PP +.P Attempting to detach an already detached thread results in unspecified behavior. .SH RETURN VALUE @@ -57,7 +57,6 @@ T{ .BR pthread_detach () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -66,21 +65,21 @@ POSIX.1-2001. Once a thread has been detached, it can't be joined with .BR pthread_join (3) or be made joinable again. -.PP +.P A new thread can be created in a detached state using .BR pthread_attr_setdetachstate (3) to set the detached attribute of the .I attr argument of .BR pthread_create (3). -.PP +.P The detached attribute merely determines the behavior of the system when the thread terminates; it does not prevent the thread from being terminated if the process terminates using .BR exit (3) (or equivalently, if the main thread returns). -.PP +.P Either .BR pthread_join (3) or @@ -91,7 +90,7 @@ so that system resources for the thread can be released. actions has not been done will be freed when the process terminates.) .SH EXAMPLES The following statement detaches the calling thread: -.PP +.P .in +4n .EX pthread_detach(pthread_self()); diff --git a/man3/pthread_equal.3 b/man3/pthread_equal.3 index 976e273..5046d8e 100644 --- a/man3/pthread_equal.3 +++ b/man3/pthread_equal.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_equal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_equal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_equal \- compare thread IDs .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_equal(pthread_t " t1 ", pthread_t " t2 ); .fi .SH DESCRIPTION @@ -40,7 +40,6 @@ T{ .BR pthread_equal () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_exit.3 b/man3/pthread_exit.3 index 4f317a9..edd6f90 100644 --- a/man3/pthread_exit.3 +++ b/man3/pthread_exit.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_exit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_exit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_exit \- terminate calling thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "[[noreturn]] void pthread_exit(void *" retval ); .fi .SH DESCRIPTION @@ -24,7 +24,7 @@ function terminates the calling thread and returns a value via that (if the thread is joinable) is available to another thread in the same process that calls .BR pthread_join (3). -.PP +.P Any clean-up handlers established by .BR pthread_cleanup_push (3) that have not yet been popped, @@ -34,14 +34,14 @@ If the thread has any thread-specific data, then, after the clean-up handlers have been executed, the corresponding destructor functions are called, in an unspecified order. -.PP +.P When a thread terminates, process-shared resources (e.g., mutexes, condition variables, semaphores, and file descriptors) are not released, and functions registered using .BR atexit (3) are not called. -.PP +.P After the last thread in a process terminates, the process terminates as by calling .BR exit (3) @@ -68,7 +68,6 @@ T{ .BR pthread_exit () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -78,13 +77,13 @@ Performing a return from the start function of any thread other than the main thread results in an implicit call to .BR pthread_exit (), using the function's return value as the thread's exit status. -.PP +.P To allow other threads to continue execution, the main thread should terminate by calling .BR pthread_exit () rather than .BR exit (3). -.PP +.P The value pointed to by .I retval should not be located on the calling thread's stack, diff --git a/man3/pthread_getattr_default_np.3 b/man3/pthread_getattr_default_np.3 index a88961a..ac8ee10 100644 --- a/man3/pthread_getattr_default_np.3 +++ b/man3/pthread_getattr_default_np.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_getattr_default_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_getattr_default_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_getattr_default_np, pthread_setattr_default_np, \- get or set default thread-creation attributes @@ -14,7 +14,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_getattr_default_np(pthread_attr_t *" attr ); .BI "int pthread_setattr_default_np(const pthread_attr_t *" attr ); .fi @@ -39,7 +39,7 @@ attribute must not be set in the object. Setting the .I stack size attribute to zero means leave the default stack size unchanged. -.PP +.P The .BR pthread_getattr_default_np () function initializes the thread attributes object referred to by @@ -73,7 +73,6 @@ T{ .BR pthread_setattr_default_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in their names. @@ -85,7 +84,7 @@ The program below uses to fetch the default thread-creation attributes and then displays various settings from the returned thread attributes object. When running the program, we see the following output: -.PP +.P .in +4n .EX $ \fB./a.out\fP @@ -122,12 +121,12 @@ display_pthread_attr(pthread_attr_t *attr) s = pthread_attr_getstacksize(attr, &stacksize); if (s != 0) errc(EXIT_FAILURE, s, "pthread_attr_getstacksize"); - printf("Stack size: %zd\en", stacksize); + printf("Stack size: %zu\en", stacksize); \& s = pthread_attr_getguardsize(attr, &guardsize); if (s != 0) errc(EXIT_FAILURE, s, "pthread_attr_getguardsize"); - printf("Guard size: %zd\en", guardsize); + printf("Guard size: %zu\en", guardsize); \& s = pthread_attr_getschedpolicy(attr, &policy); if (s != 0) diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3 index be1fb19..02a621f 100644 --- a/man3/pthread_getattr_np.3 +++ b/man3/pthread_getattr_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_getattr_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_getattr_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_getattr_np \- get attributes of created thread .SH LIBRARY @@ -14,7 +14,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_getattr_np(pthread_t " thread ", pthread_attr_t *" attr ); .fi .SH DESCRIPTION @@ -24,7 +24,7 @@ function initializes the thread attributes object referred to by .I attr so that it contains actual attribute values describing the running thread .IR thread . -.PP +.P The returned attribute values may differ from the corresponding attribute values passed in the .I attr @@ -42,12 +42,12 @@ and the guard size, which the implementation may round upward to a multiple of the page size, or ignore (i.e., treat as 0), if the application is allocating its own stack. -.PP +.P Furthermore, if the stack address attribute was not set in the thread attributes object used to create the thread, then the returned thread attributes object will report the actual stack address that the implementation selected for the thread. -.PP +.P When the thread attributes object returned by .BR pthread_getattr_np () is no longer required, it should be destroyed using @@ -60,7 +60,7 @@ on error, it returns a nonzero error number. .B ENOMEM .\" Can happen (but unlikely) while trying to allocate memory for cpuset Insufficient memory. -.PP +.P In addition, if .I thread refers to the main thread, then @@ -89,7 +89,6 @@ T{ .BR pthread_getattr_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the name. @@ -105,10 +104,10 @@ and stack size attributes. Command-line arguments can be used to set these attributes to values other than the default when creating the thread. The shell sessions below demonstrate the use of the program. -.PP +.P In the first run, on an x86-32 system, a thread is created using default attributes: -.PP +.P .in +4n .EX .RB "$" " ulimit \-s" " # No stack limit ==> default stack size is 2 MB" @@ -120,11 +119,11 @@ Attributes of created thread: Stack size = 0x201000 (2101248) bytes .EE .in -.PP +.P In the following run, we see that if a guard size is specified, it is rounded up to the next multiple of the system page size (4096 bytes on x86-32): -.PP +.P .in +4n .EX .RB "$" " ./a.out \-g 4097" @@ -153,10 +152,10 @@ Attributes of created thread: .\" Stack size = 0x8000 (32768) bytes .\".fi .\".in -.PP +.P In the last run, the program manually allocates a stack for the thread. In this case, the guard size attribute is ignored. -.PP +.P .in +4n .EX .RB "$" " ./a.out \-g 4096 \-s 0x8000 \-a" @@ -273,7 +272,7 @@ get_thread_attributes_from_cl(int argc, char *argv[], if (argc > optind) usage(argv[0], "Extraneous command\-line arguments\en"); \& - if (stack_size >= 0 || guard_size > 0) { + if (stack_size != -1 || guard_size > 0) { ret_attrp = attrp; \& s = pthread_attr_init(attrp); @@ -281,7 +280,7 @@ get_thread_attributes_from_cl(int argc, char *argv[], errc(EXIT_FAILURE, s, "pthread_attr_init"); } \& - if (stack_size >= 0) { + if (stack_size != -1) { if (!allocate_stack) { s = pthread_attr_setstacksize(attrp, stack_size); if (s != 0) @@ -299,7 +298,7 @@ get_thread_attributes_from_cl(int argc, char *argv[], } } \& - if (guard_size >= 0) { + if (guard_size != -1) { s = pthread_attr_setguardsize(attrp, guard_size); if (s != 0) errc(EXIT_FAILURE, s, "pthread_attr_setstacksize"); diff --git a/man3/pthread_getcpuclockid.3 b/man3/pthread_getcpuclockid.3 index 127d662..872134c 100644 --- a/man3/pthread_getcpuclockid.3 +++ b/man3/pthread_getcpuclockid.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_getcpuclockid 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_getcpuclockid 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_getcpuclockid \- retrieve ID of a thread's CPU time clock .SH LIBRARY @@ -14,7 +14,7 @@ POSIX threads library .nf .B #include <pthread.h> .B #include <time.h> -.PP +.P .BI "int pthread_getcpuclockid(pthread_t " thread ", clockid_t *" clockid ); .fi .SH DESCRIPTION @@ -59,7 +59,6 @@ T{ .BR pthread_getcpuclockid () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -82,7 +81,7 @@ The program below creates a thread and then uses to retrieve the total process CPU time, and the per-thread CPU time consumed by the two threads. The following shell session shows an example run: -.PP +.P .in +4n .EX $ \fB./a.out\fP diff --git a/man3/pthread_join.3 b/man3/pthread_join.3 index 9284d85..f063a79 100644 --- a/man3/pthread_join.3 +++ b/man3/pthread_join.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_join 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_join 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_join \- join with a terminated thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_join(pthread_t " thread ", void **" retval ); .fi .SH DESCRIPTION @@ -28,7 +28,7 @@ returns immediately. The thread specified by .I thread must be joinable. -.PP +.P If .I retval is not NULL, then @@ -42,7 +42,7 @@ If the target thread was canceled, then .B PTHREAD_CANCELED is placed in the location pointed to by .IR retval . -.PP +.P If multiple threads simultaneously try to join with the same thread, the results are undefined. If the thread calling @@ -91,7 +91,6 @@ T{ .BR pthread_join () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -103,10 +102,10 @@ the caller is guaranteed that the target thread has terminated. The caller may then choose to do any clean-up that is required after termination of the thread (e.g., freeing memory or other resources that were allocated to the target thread). -.PP +.P Joining with a thread that has previously been joined results in undefined behavior. -.PP +.P Failure to join with a thread that is joinable (i.e., one that is not detached), produces a "zombie thread". @@ -114,13 +113,13 @@ Avoid doing this, since each zombie thread consumes some system resources, and when enough zombie threads have accumulated, it will no longer be possible to create new threads (or processes). -.PP +.P There is no pthreads analog of .IR "waitpid(\-1,\ &status,\ 0)" , that is, "join with any terminated thread". If you believe you need this functionality, you probably need to rethink your application design. -.PP +.P All of the threads in a process are peers: any thread can join with any other thread in the process. .SH EXAMPLES diff --git a/man3/pthread_key_create.3 b/man3/pthread_key_create.3 new file mode 100644 index 0000000..1e7d680 --- /dev/null +++ b/man3/pthread_key_create.3 @@ -0,0 +1,178 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_key_create 3 2024-02-26 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_key_create, +pthread_key_delete, +pthread_setspecific, +pthread_getspecific +\- +management of thread-specific data +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "int pthread_key_create(pthread_key_t *" key ", void (*" destr_function ") (void *));" +.BI "int pthread_key_delete(pthread_key_t " key ");" +.BI "int pthread_setspecific(pthread_key_t " key ", const void *" pointer ");" +.BI "void * pthread_getspecific(pthread_key_t " key ");" +. +. +.SH DESCRIPTION +Programs often need global or static variables +that have different values in different threads. +Since threads share one memory space, +this cannot be achieved with regular variables. +Thread-specific data is the POSIX threads answer to this need. +.P +Each thread possesses a private memory block, +the thread-specific data area, +or TSD area for short. +This area is indexed by TSD keys. +The TSD area associates values of type \fBvoid *\fP to TSD keys. +TSD keys are common to all threads, +but the value associated with a given TSD key +can be different in each thread. +.P +For concreteness, +the TSD areas can be viewed as arrays of \fBvoid *\fP pointers, +TSD keys as integer indices into these arrays, +and the value of a TSD key +as the value of the corresponding array element in the calling thread. +.P +When a thread is created, +its TSD area initially associates \fBNULL\fP with all keys. +.P +\fBpthread_key_create\fP allocates a new TSD key. +The key is stored in the location pointed to by \fIkey\fP. +There is a limit of \fBPTHREAD_KEYS_MAX\fP +on the number of keys allocated at a given time. +The value initially associated with the returned key +is \fBNULL\fP in all currently executing threads. +.P +The \fIdestr_function\fP argument, +if not \fBNULL\fP, +specifies a destructor function associated with the key. +When a thread terminates via \fBpthread_exit\fP or by cancelation, +\fIdestr_function\fP is called with arguments +the value associated with the key in that thread. +The \fIdestr_function\fP is not called if that value is \fBNULL\fP. +The order in which destructor functions are called at thread termination time +is unspecified. +.P +Before the destructor function is called, +the \fBNULL\fP value is associated with the key in the current thread. +A destructor function might, +however, +re-associate non-\fBNULL\fP values to that key or some other key. +To deal with this, +if after all the destructors have been called +for all non-\fBNULL\fP values, +there are still some non-\fBNULL\fP values with associated destructors, +then the process is repeated. +The glibc implementation stops the process +after \fBPTHREAD_DESTRUCTOR_ITERATIONS\fP iterations, +even if some non-\fBNULL\fP values with associated descriptors remain. +Other implementations may loop indefinitely. +.P +\fBpthread_key_delete\fP deallocates a TSD key. +It does not check +whether non-\fBNULL\fP values are associated with that key +in the currently executing threads, +nor call the destructor function associated with the key. +.P +\fBpthread_setspecific\fP changes the value +associated with \fIkey\fP in the calling thread, +storing the given \fIpointer\fP instead. +.P +\fBpthread_getspecific\fP returns the value +currently associated with \fIkey\fP in the calling thread. +. +. +.SH "RETURN VALUE" +\fBpthread_key_create\fP, +\fBpthread_key_delete\fP, +and \fBpthread_setspecific\fP +return 0 on success and a non-zero error code on failure. +If successful, +\fBpthread_key_create\fP stores the newly allocated key +in the location pointed to by its \fIkey\fP argument. +.P +\fBpthread_getspecific\fP returns +the value associated with \fIkey\fP on success, +and \fBNULL\fP on error. +. +. +.SH ERRORS +\fBpthread_key_create\fP returns the following error code on error: +.RS +.TP +\fBEAGAIN\fP +\fBPTHREAD_KEYS_MAX\fP keys are already allocated. +.RE +.P +\fBpthread_key_delete\fP and \fBpthread_setspecific\fP return +the following error code on error: +.RS +.TP +\fBEINVAL\fP +\fIkey\fP is not a valid, allocated TSD key. +.RE +.P +\fBpthread_getspecific\fP returns \fBNULL\fP if \fIkey\fP is not a valid, +allocated TSD key. +. +. +.SH "SEE ALSO" +pthread_create(3), pthread_exit(3), pthread_testcancel(3). +. +. +.SH EXAMPLE +The following code fragment +allocates a thread-specific array of 100 characters, +with automatic reclamation at thread exit: +.P +.RS +.ft 3 +.nf +.sp +/* Key for the thread-specific buffer */ +static pthread_key_t buffer_key; +\& +/* Once-only initialisation of the key */ +static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT; +\& +/* Allocate the thread-specific buffer */ +void buffer_alloc(void) +{ + pthread_once(&buffer_key_once, buffer_key_alloc); + pthread_setspecific(buffer_key, malloc(100)); +} +\& +/* Return the thread-specific buffer */ +char * get_buffer(void) +{ + return (char *) pthread_getspecific(buffer_key); +} +\& +/* Allocate the key */ +static void buffer_key_alloc() +{ + pthread_key_create(&buffer_key, buffer_destroy); +} +\& +/* Free the thread-specific buffer */ +static void buffer_destroy(void * buf) +{ + free(buf); +} +.ft +.P +.RE +.fi diff --git a/man3/pthread_kill.3 b/man3/pthread_kill.3 index 0501c4f..659b0db 100644 --- a/man3/pthread_kill.3 +++ b/man3/pthread_kill.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_kill 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_kill 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_kill \- send a signal to a thread .SH LIBRARY @@ -13,15 +13,15 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int pthread_kill(pthread_t " thread ", int " sig ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_kill (): .nf _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500 @@ -36,7 +36,7 @@ to a thread in the same process as the caller. The signal is asynchronously directed to .IR thread . -.PP +.P If .I sig is 0, then no signal is sent, but error checking is still performed. @@ -63,7 +63,6 @@ T{ .BR pthread_kill () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The glibc implementation of .BR pthread_kill () @@ -74,7 +73,7 @@ used internally by the NPTL threading implementation. See .BR nptl (7) for details. -.PP +.P POSIX.1-2008 recommends that if an implementation detects the use of a thread ID after the end of its lifetime, .BR pthread_kill () diff --git a/man3/pthread_kill_other_threads_np.3 b/man3/pthread_kill_other_threads_np.3 index aec544d..b924273 100644 --- a/man3/pthread_kill_other_threads_np.3 +++ b/man3/pthread_kill_other_threads_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_kill_other_threads_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_kill_other_threads_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_kill_other_threads_np \- terminate all other threads in process .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .B void pthread_kill_other_threads_np(void); .fi .SH DESCRIPTION @@ -40,7 +40,6 @@ T{ .BR pthread_kill_other_threads_np () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS In the NPTL threading implementation, .BR pthread_kill_other_threads_np () diff --git a/man3/pthread_mutex_consistent.3 b/man3/pthread_mutex_consistent.3 index 0f9cda3..54cdc51 100644 --- a/man3/pthread_mutex_consistent.3 +++ b/man3/pthread_mutex_consistent.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_mutex_consistent 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_mutex_consistent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_mutex_consistent \- make a robust mutex consistent .SH LIBRARY @@ -12,15 +12,15 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_mutex_consistent(pthread_mutex_t *" mutex ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_mutex_consistent (): .nf _POSIX_C_SOURCE >= 200809L @@ -49,19 +49,19 @@ POSIX.1-2008. .SH HISTORY glibc 2.12. POSIX.1-2008. -.PP +.P Before the addition of .BR pthread_mutex_consistent () to POSIX, glibc defined the following equivalent nonstandard function if .B _GNU_SOURCE was defined: -.PP +.P .nf .B [[deprecated]] .BI "int pthread_mutex_consistent_np(const pthread_mutex_t *" mutex ); .fi -.PP +.P This GNU-specific API, which first appeared in glibc 2.4, is nowadays obsolete and should not be used in new programs; since glibc 2.34 it has been marked as deprecated. diff --git a/man3/pthread_mutex_init.3 b/man3/pthread_mutex_init.3 new file mode 100644 index 0000000..8d9abf9 --- /dev/null +++ b/man3/pthread_mutex_init.3 @@ -0,0 +1,241 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutex_init 3 2024-02-26 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_mutex_init, +pthread_mutex_lock, +pthread_mutex_trylock, +pthread_mutex_unlock, +pthread_mutex_destroy +\- +operations on mutexes +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "pthread_mutex_t " fastmutex " = PTHREAD_MUTEX_INITIALIZER;" +.BI "pthread_mutex_t " recmutex " = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;" +.BI "pthread_mutex_t " errchkmutex " = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;" +.P +.BI "int pthread_mutex_init(pthread_mutex_t *" mutex ", const pthread_mutexattr_t *" mutexattr ");" +.BI "int pthread_mutex_lock(pthread_mutex_t *" mutex ");" +.BI "int pthread_mutex_trylock(pthread_mutex_t *" mutex ");" +.BI "int pthread_mutex_unlock(pthread_mutex_t *" mutex ");" +.BI "int pthread_mutex_destroy(pthread_mutex_t *" mutex ");" +. +. +.SH DESCRIPTION +A mutex is a MUTual EXclusion device, +and is useful for +protecting shared data structures from concurrent modifications, +and implementing critical sections and monitors. +.P +A mutex has two possible states: +unlocked (not owned by any thread), +and locked (owned by one thread). +A mutex can never be owned by two different threads simultaneously. +A thread attempting to lock a mutex +that is already locked by another thread +is suspended until the owning thread unlocks the mutex first. +.P +\fBpthread_mutex_init\fP initializes the mutex object pointed to by \fImutex\fP +according to the mutex attributes specified in \fImutexattr\fP. +If \fImutexattr\fP is \fBNULL\fP, +default attributes are used instead. +.P +The LinuxThreads implementation supports only one mutex attributes, +the \fImutex kind\fP, +which is either ``fast'', +``recursive'', +or ``error checking''. +The kind of a mutex determines +whether it can be locked again by a thread that already owns it. +The default kind is ``fast''. +See \fBpthread_mutexattr_init\fP(3) for more information on mutex attributes. +.P +Variables of type \fBpthread_mutex_t\fP can also be initialized statically, +using the constants +\fBPTHREAD_MUTEX_INITIALIZER\fP +(for fast mutexes), +\fBPTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP\fP +(for recursive mutexes), +and \fBPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\fP +(for error checking mutexes). +.P +\fBpthread_mutex_lock\fP locks the given mutex. +If the mutex is currently unlocked, +it becomes locked and owned by the calling thread, +and \fBpthread_mutex_lock\fP returns immediately. +If the mutex is already locked by another thread, +\fBpthread_mutex_lock\fP suspends the calling thread +until the mutex is unlocked. +.P +If the mutex is already locked by the calling thread, +the behavior of \fBpthread_mutex_lock\fP depends on the kind of the mutex. +If the mutex is of the ``fast'' kind, +the calling thread is suspended until the mutex is unlocked, +thus effectively causing the calling thread to deadlock. +If the mutex is of the ``error checking'' kind, +\fBpthread_mutex_lock\fP returns immediately with the error code \fBEDEADLK\fP. +If the mutex is of the ``recursive'' kind, +\fBpthread_mutex_lock\fP succeeds and returns immediately, +recording the number of times the calling thread has locked the mutex. +An equal number of \fBpthread_mutex_unlock\fP operations +must be performed before the mutex returns to the unlocked state. +.P +\fBpthread_mutex_trylock\fP behaves identically to \fBpthread_mutex_lock\fP, +except that it does not block the calling thread +if the mutex is already locked by another thread +(or by the calling thread in the case of a ``fast'' mutex). +Instead, +\fBpthread_mutex_trylock\fP returns immediately +with the error code \fBEBUSY\fP. +.P +\fBpthread_mutex_unlock\fP unlocks the given mutex. +The mutex is assumed to be locked and owned by the calling thread +on entrance to \fBpthread_mutex_unlock\fP. +If the mutex is of the ``fast'' kind, +\fBpthread_mutex_unlock\fP always returns it to the unlocked state. +If it is of the ``recursive'' kind, +it decrements the locking count of the mutex +(number of \fBpthread_mutex_lock\fP operations +performed on it by the calling thread), +and only when this count reaches zero is the mutex actually unlocked. +.P +On ``error checking'' and ``recursive'' mutexes, +\fBpthread_mutex_unlock\fP actually checks at run-time +that the mutex is locked on entrance, +and that it was locked by the same thread +that is now calling \fBpthread_mutex_unlock\fP. +If these conditions are not met, +an error code is returned and the mutex remains unchanged. +``Fast'' mutexes perform no such checks, +thus allowing a locked mutex to be +unlocked by a thread other than its owner. +This is non-portable behavior and must not be relied upon. +.P +\fBpthread_mutex_destroy\fP destroys a mutex object, +freeing the resources it might hold. +The mutex must be unlocked on entrance. +In the LinuxThreads implementation, +no resources are associated with mutex objects, +thus \fBpthread_mutex_destroy\fP actually does nothing +except checking that the mutex is unlocked. +. +. +.SH CANCELLATION +None of the mutex functions is a cancelation point, +not even \fBpthread_mutex_lock\fP, +in spite of the fact that it can suspend a thread for arbitrary durations. +This way, +the status of mutexes at cancelation points is predictable, +allowing cancelation handlers +to unlock precisely those mutexes that need to be unlocked +before the thread stops executing. +Consequently, +threads using deferred cancelation +should never hold a mutex for extended periods of time. +. +. +.SH "ASYNC-SIGNAL SAFETY" +The mutex functions are not async-signal safe. +What this means is that they should not be called from a signal handler. +In particular, +calling \fBpthread_mutex_lock\fP or \fBpthread_mutex_unlock\fP +from a signal handler +may deadlock the calling thread. +. +. +.SH "RETURN VALUE" +\fBpthread_mutex_init\fP always returns 0. +The other mutex functions +return 0 on success and a non-zero error code on error. +. +. +.SH ERRORS +The \fBpthread_mutex_lock\fP function returns +the following error code on error: +.RS +.TP +\fBEINVAL\fP +The mutex has not been properly initialized. +.TP +\fBEDEADLK\fP +The mutex is already locked by the calling thread +(``error checking'' mutexes only). +.RE +.P +The \fBpthread_mutex_trylock\fP function returns +the following error codes on error: +.RS +.TP +\fBEBUSY\fP +The mutex could not be acquired because it was currently locked. +.TP +\fBEINVAL\fP +The mutex has not been properly initialized. +.RE +.P +The \fBpthread_mutex_unlock\fP function returns +the following error code on error: +.RS +.TP +\fBEINVAL\fP +The mutex has not been properly initialized. +.TP +\fBEPERM\fP +The calling thread does not own the mutex +(``error checking'' mutexes only). +.RE +.P +The \fBpthread_mutex_destroy\fP function returns +the following error code on error: +.RS +.TP +\fBEBUSY\fP +The mutex is currently locked. +.RE +. +. +.SH "SEE ALSO" +\fBpthread_mutexattr_init\fP(3), +\fBpthread_mutexattr_setkind_np\fP(3), +\fBpthread_cancel\fP(3). +. +. +.SH EXAMPLE +A shared global variable \fIx\fP can be protected by a mutex as follows: +.P +.RS +.ft 3 +.nf +.sp +int x; +pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +.ft +.P +.RE +.fi +.P +All accesses and modifications to \fIx\fP +should be bracketed by calls to +\fBpthread_mutex_lock\fP and \fBpthread_mutex_unlock\fP +as follows: +.P +.RS +.ft 3 +.nf +.sp +pthread_mutex_lock(&mut); +/* operate on x */ +pthread_mutex_unlock(&mut); +.ft +.P +.RE +.fi diff --git a/man3/pthread_mutexattr_getpshared.3 b/man3/pthread_mutexattr_getpshared.3 index b2abac1..47fe8dd 100644 --- a/man3/pthread_mutexattr_getpshared.3 +++ b/man3/pthread_mutexattr_getpshared.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_mutexattr_getpshared 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_mutexattr_getpshared 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_mutexattr_getpshared, pthread_mutexattr_setpshared \- get/set process-shared mutex attribute @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .B int pthread_mutexattr_getpshared( .BI " const pthread_mutexattr_t *restrict " attr , .BI " int *restrict " pshared ); @@ -24,7 +24,7 @@ These functions get and set the process-shared attribute in a mutex attributes object. This attribute must be appropriately set to ensure correct, efficient operation of a mutex created using this attributes object. -.PP +.P The process-shared attribute can have one of the following values: .TP .B PTHREAD_PROCESS_PRIVATE @@ -36,21 +36,21 @@ This is the default value for the process-shared mutex attribute. Mutexes created with this attributes object can be shared between any threads that have access to the memory containing the object, including threads in different processes. -.PP +.P .BR pthread_mutexattr_getpshared () places the value of the process-shared attribute of the mutex attributes object referred to by .I attr in the location pointed to by .IR pshared . -.PP +.P .BR pthread_mutexattr_setpshared () sets the value of the process-shared attribute of the mutex attributes object referred to by .I attr to the value specified in .BR pshared . -.PP +.P If .I attr does not refer to an initialized mutex attributes object, diff --git a/man3/pthread_mutexattr_init.3 b/man3/pthread_mutexattr_init.3 index 55d2530..4b09f5b 100644 --- a/man3/pthread_mutexattr_init.3 +++ b/man3/pthread_mutexattr_init.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_mutexattr_init 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_mutexattr_init 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_mutexattr_init, pthread_mutexattr_destroy \- initialize and destroy a mutex attributes object @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_mutexattr_init(pthread_mutexattr_t *" attr ");" .BI "int pthread_mutexattr_destroy(pthread_mutexattr_t *" attr ");" .fi @@ -22,16 +22,16 @@ The function initializes the mutex attributes object pointed to by .I attr with default values for all attributes defined by the implementation. -.PP +.P The results of initializing an already initialized mutex attributes object are undefined. -.PP +.P The .BR pthread_mutexattr_destroy () function destroys a mutex attribute object (making it uninitialized). Once a mutex attributes object has been destroyed, it can be reinitialized with .BR pthread_mutexattr_init (). -.PP +.P The results of destroying an uninitialized mutex attributes object are undefined. .SH RETURN VALUE diff --git a/man3/pthread_mutexattr_setkind_np.3 b/man3/pthread_mutexattr_setkind_np.3 new file mode 100644 index 0000000..ca6a64e --- /dev/null +++ b/man3/pthread_mutexattr_setkind_np.3 @@ -0,0 +1,52 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutexattr_setkind_np 3 2023-10-31 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_mutexattr_setkind_np, +pthread_mutexattr_getkind_np +\- +deprecated mutex creation attributes +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "int pthread_mutexattr_setkind_np(pthread_mutexattr_t *" attr ", int " kind ");" +.BI "int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *" attr ", int *" kind ");" +. +. +.SH DESCRIPTION +These functions are deprecated, +use \fBpthread_mutexattr_settype\fP(3) +and \fBpthread_mutexattr_gettype\fP(3) +instead. +. +. +.SH "RETURN VALUE" +\fBpthread_mutexattr_getkind_np\fP always returns 0. +.P +\fBpthread_mutexattr_setkind_np\fP +returns 0 on success and a non-zero error code on error. +. +. +.SH ERRORS +On error, +\fBpthread_mutexattr_setkind_np\fP returns the following error code: +.TP +\fBEINVAL\fP +\fIkind\fP is neither +\fBPTHREAD_MUTEX_FAST_NP\fP +nor +\fBPTHREAD_MUTEX_RECURSIVE_NP\fP +nor +\fBPTHREAD_MUTEX_ERRORCHECK_NP\fP. +. +. +.SH "SEE ALSO" +\fBpthread_mutexattr_settype\fP(3), +\fBpthread_mutexattr_gettype\fP(3). diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3 index 3612e15..802b400 100644 --- a/man3/pthread_mutexattr_setrobust.3 +++ b/man3/pthread_mutexattr_setrobust.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_mutexattr_setrobust 3 2023-05-03 "Linux man-pages 6.05.01" +.TH pthread_mutexattr_setrobust 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_mutexattr_getrobust, pthread_mutexattr_setrobust \- get and set the robustness attribute of a mutex attributes object @@ -13,18 +13,18 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_mutexattr_getrobust(const pthread_mutexattr_t *" attr , .BI " int *" robustness ");" .BI "int pthread_mutexattr_setrobust(pthread_mutexattr_t *" attr , .BI " int " robustness ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_mutexattr_getrobust (), .BR pthread_mutexattr_setrobust (): .nf @@ -47,7 +47,7 @@ the mutex attributes object referred to by .I attr to the value specified in .IR *robustness . -.PP +.P The robustness attribute specifies the behavior of the mutex when the owning thread dies without unlocking the mutex. The following values are valid for @@ -94,7 +94,7 @@ further .BR pthread_mutex_lock (3) operations on this mutex will still return .BR EOWNERDEAD . -.PP +.P Note that the .I attr argument of @@ -107,7 +107,7 @@ otherwise the behavior is undefined. .SH RETURN VALUE On success, these functions return 0. On error, they return a positive error number. -.PP +.P In the glibc implementation, .BR pthread_mutexattr_getrobust () always return zero. @@ -136,7 +136,7 @@ POSIX.1-2008. .SH HISTORY glibc 2.12. POSIX.1-2008. -.PP +.P Before the addition of .BR pthread_mutexattr_getrobust () and @@ -145,7 +145,7 @@ to POSIX, glibc defined the following equivalent nonstandard functions if .B _GNU_SOURCE was defined: -.PP +.P .nf .B [[deprecated]] .BI "int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *" attr , @@ -154,13 +154,13 @@ was defined: .BI "int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *" attr , .BI " int " robustness ");" .fi -.PP +.P Correspondingly, the constants .B PTHREAD_MUTEX_STALLED_NP and .B PTHREAD_MUTEX_ROBUST_NP were also defined. -.PP +.P These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays obsolete and should not be used in new programs; since glibc 2.34 these APIs are marked as deprecated. @@ -173,9 +173,9 @@ The main thread subsequently acquires the mutex successfully and gets the error .BR EOWNERDEAD , after which it makes the mutex consistent. -.PP +.P The following shell session shows what we see when running this program: -.PP +.P .in +4n .EX $ \fB./a.out\fP diff --git a/man3/pthread_once.3 b/man3/pthread_once.3 new file mode 100644 index 0000000..852dffa --- /dev/null +++ b/man3/pthread_once.3 @@ -0,0 +1,44 @@ +.\" Copyright, Xavier Leroy <Xavier.Leroy@inria.fr> +.\" Copyright 2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_once 3 2023-10-31 "Linux man-pages 6.7" +. +. +.SH NAME +pthread_once +\- +once-only initialization +. +. +.SH SYNOPSIS +.B #include <pthread.h> +.P +.BI "pthread_once_t " once_control " = PTHREAD_ONCE_INIT;" +.P +.BI "int pthread_once(pthread_once_t *" once_control ", void (*" init_routine ") (void));" +. +. +.SH DESCRIPTION +The purpose of \fBpthread_once\fP is +to ensure that a piece of initialization code is executed at most once. +The \fIonce_control\fP argument points to a static or extern variable +statically initialized to \fBPTHREAD_ONCE_INIT\fP. +.P +The first time \fBpthread_once\fP is called +with a given \fIonce_control\fP argument, +it calls \fIinit_routine\fP with no argument +and changes the value of the \fIonce_control\fP variable +to record that initialization has been performed. +Subsequent calls to \fBpthread_once\fP +with the same \fBonce_control\fP argument +do nothing. +. +. +.SH "RETURN VALUE" +\fBpthread_once\fP always returns 0. +. +. +.SH ERRORS +None. diff --git a/man3/pthread_rwlockattr_setkind_np.3 b/man3/pthread_rwlockattr_setkind_np.3 index d068119..f2998ca 100644 --- a/man3/pthread_rwlockattr_setkind_np.3 +++ b/man3/pthread_rwlockattr_setkind_np.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_rwlockattr_setkind_np 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_rwlockattr_setkind_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_rwlockattr_setkind_np, pthread_rwlockattr_getkind_np \- set/get the read-write lock kind of the thread read-write lock attribute object @@ -12,19 +12,19 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *" attr , .BI " int " pref ); .B int pthread_rwlockattr_getkind_np( .BI " const pthread_rwlockattr_t *restrict " attr , .BI " int *restrict " pref ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_rwlockattr_setkind_np (), .BR pthread_rwlockattr_getkind_np (): .nf @@ -89,7 +89,7 @@ read locks thus avoiding deadlocks. Setting the lock kind to this avoids writer starvation as long as any read locking is not done in a recursive fashion. -.PP +.P The .BR pthread_rwlockattr_getkind_np () function returns the value of the lock kind attribute of the diff --git a/man3/pthread_self.3 b/man3/pthread_self.3 index 6c2d58e..7d703dd 100644 --- a/man3/pthread_self.3 +++ b/man3/pthread_self.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_self 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_self 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_self \- obtain ID of the calling thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .B pthread_t pthread_self(void); .fi .SH DESCRIPTION @@ -43,7 +43,6 @@ T{ .BR pthread_self () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -59,15 +58,15 @@ can't portably be compared using the C equality operator (\fB==\fP); use .BR pthread_equal (3) instead. -.PP +.P Thread identifiers should be considered opaque: any attempt to use a thread ID other than in pthreads calls is nonportable and can lead to unspecified results. -.PP +.P Thread IDs are guaranteed to be unique only within a process. A thread ID may be reused after a terminated thread has been joined, or a detached thread has terminated. -.PP +.P The thread ID returned by .BR pthread_self () is not the same thing as the kernel thread ID returned by a call to diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3 index 112317d..cf91c59 100644 --- a/man3/pthread_setaffinity_np.3 +++ b/man3/pthread_setaffinity_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setaffinity_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_setaffinity_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setaffinity_np, pthread_getaffinity_np \- set/get CPU affinity of a thread @@ -15,7 +15,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_setaffinity_np(pthread_t " thread ", size_t " cpusetsize , .BI " const cpu_set_t *" cpuset ); .BI "int pthread_getaffinity_np(pthread_t " thread ", size_t " cpusetsize , @@ -33,20 +33,20 @@ If the call is successful, and the thread is not currently running on one of the CPUs in .IR cpuset , then it is migrated to one of those CPUs. -.PP +.P The .BR pthread_getaffinity_np () function returns the CPU affinity mask of the thread .I thread in the buffer pointed to by .IR cpuset . -.PP +.P For more details on CPU affinity masks, see .BR sched_setaffinity (2). For a description of a set of macros that can be used to manipulate and inspect CPU sets, see .BR CPU_SET (3). -.PP +.P The argument .I cpusetsize is the length (in bytes) of the buffer pointed to by @@ -109,13 +109,12 @@ T{ .BR pthread_getaffinity_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the names. .SH HISTORY glibc 2.3.4. -.PP +.P In glibc 2.3.3 only, versions of these functions were provided that did not have a .I cpusetsize @@ -135,13 +134,13 @@ runs if the "cpuset" mechanism described in is being used. These restrictions on the actual set of CPUs on which the thread will run are silently imposed by the kernel. -.PP +.P These functions are implemented on top of the .BR sched_setaffinity (2) and .BR sched_getaffinity (2) system calls. -.PP +.P A new thread created by .BR pthread_create (3) inherits a copy of its creator's CPU affinity mask. @@ -153,7 +152,7 @@ to set its CPU affinity mask to include CPUs 0 to 7 and then calls .BR pthread_getaffinity_np () to check the resulting CPU affinity mask of the thread. -.PP +.P .\" SRC BEGIN (pthread_setaffinity_np.c) .EX #define _GNU_SOURCE diff --git a/man3/pthread_setcancelstate.3 b/man3/pthread_setcancelstate.3 index 5fd0d27..40b0a6e 100644 --- a/man3/pthread_setcancelstate.3 +++ b/man3/pthread_setcancelstate.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setcancelstate 3 2023-07-30 "Linux man-pages 6.05.01" +.TH pthread_setcancelstate 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setcancelstate, pthread_setcanceltype \- set cancelability state and type @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_setcancelstate(int " state ", int *" oldstate ); .BI "int pthread_setcanceltype(int " type ", int *" oldtype ); .fi @@ -42,7 +42,7 @@ will respond to a cancelation request. The thread is not cancelable. If a cancelation request is received, it is blocked until cancelability is enabled. -.PP +.P The .BR pthread_setcanceltype () sets the cancelability type of the calling thread to the value @@ -72,7 +72,7 @@ The thread can be canceled at any time. (Typically, it will be canceled immediately upon receiving a cancelation request, but the system doesn't guarantee this.) -.PP +.P The set-and-get operation performed by each of these functions is atomic with respect to other threads in the process calling the same function. @@ -87,7 +87,7 @@ can fail with the following error: .B EINVAL Invalid value for .IR state . -.PP +.P The .BR pthread_setcanceltype () can fail with the following error: @@ -124,7 +124,6 @@ T} Async-cancel safety T{ AC-Safe T} .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -133,7 +132,7 @@ POSIX.1-2001. .SH NOTES For details of what happens when a thread is canceled, see .BR \%pthread_cancel (3). -.PP +.P Briefly disabling cancelability is useful if a thread performs some critical action that must not be interrupted by a cancelation request. @@ -159,7 +158,7 @@ Furthermore, some internal data structures family of functions) may be left in an inconsistent state if cancelation occurs in the middle of the function call. Consequently, clean-up handlers cease to be useful. -.PP +.P Functions that can be safely asynchronously canceled are called .IR "async-cancel-safe functions" . POSIX.1-2001 and POSIX.1-2008 require only that @@ -170,7 +169,7 @@ and be async-cancel-safe. In general, other library functions can't be safely called from an asynchronously cancelable thread. -.PP +.P One of the few circumstances in which asynchronous cancelability is useful is for cancelation of a thread that is in a pure compute-bound loop. .SS Portability notes diff --git a/man3/pthread_setconcurrency.3 b/man3/pthread_setconcurrency.3 index 642208f..0c2ffd0 100644 --- a/man3/pthread_setconcurrency.3 +++ b/man3/pthread_setconcurrency.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setconcurrency 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_setconcurrency 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setconcurrency, pthread_getconcurrency \- set/get the concurrency level @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_setconcurrency(int " new_level ); .BI "int pthread_getconcurrency(" void ); .fi @@ -27,12 +27,12 @@ The implementation takes this only as a hint: POSIX.1 does not specify the level of concurrency that should be provided as a result of calling .BR pthread_setconcurrency (). -.PP +.P Specifying .I new_level as 0 instructs the implementation to manage the concurrency level as it deems appropriate. -.PP +.P .BR pthread_getconcurrency () returns the current value of the concurrency level for this process. .SH RETURN VALUE @@ -40,7 +40,7 @@ On success, .BR pthread_setconcurrency () returns 0; on error, it returns a nonzero error number. -.PP +.P .BR pthread_getconcurrency () always succeeds, returning the concurrency level set by a previous call to .BR pthread_setconcurrency (), @@ -54,7 +54,7 @@ can fail with the following error: .B EINVAL .I new_level is negative. -.PP +.P POSIX.1 also documents an .B EAGAIN error ("the value specified by @@ -75,7 +75,6 @@ T{ .BR pthread_getconcurrency () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -83,14 +82,14 @@ glibc 2.1. POSIX.1-2001. .SH NOTES The default concurrency level is 0. -.PP +.P Concurrency levels are meaningful only for M:N threading implementations, where at any moment a subset of a process's set of user-level threads may be bound to a smaller number of kernel-scheduling entities. Setting the concurrency level allows the application to give the system a hint as to the number of kernel-scheduling entities that should be provided for efficient execution of the application. -.PP +.P Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the concurrency level has no meaning. In other words, diff --git a/man3/pthread_setname_np.3 b/man3/pthread_setname_np.3 index 5d9a711..4ff9f06 100644 --- a/man3/pthread_setname_np.3 +++ b/man3/pthread_setname_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setname_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_setname_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setname_np, pthread_getname_np \- set/get the name of a thread .SH LIBRARY @@ -14,7 +14,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_setname_np(pthread_t " thread ", const char *" name ); .BI "int pthread_getname_np(pthread_t " thread ", char " name [. size "], \ size_t " size ); @@ -36,7 +36,7 @@ The argument specifies the thread whose name is to be changed; .I name specifies the new name. -.PP +.P The .BR pthread_getname_np () function can be used to retrieve the name of the thread. @@ -65,7 +65,7 @@ function can fail with the following error: The length of the string specified pointed to by .I name exceeds the allowed limit. -.PP +.P The .BR pthread_getname_np () function can fail with the following error: @@ -76,7 +76,7 @@ The buffer specified by and .I size is too small to hold the thread name. -.PP +.P If either of these functions fails to open .IR /proc/self/task/ tid /comm , then the call may fail with one of the errors described in @@ -96,7 +96,6 @@ T{ .BR pthread_getname_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the names. @@ -117,9 +116,9 @@ The program below demonstrates the use of .BR pthread_setname_np () and .BR pthread_getname_np (). -.PP +.P The following shell session shows a sample run of the program: -.PP +.P .in +4n .EX .RB "$" " ./a.out" diff --git a/man3/pthread_setschedparam.3 b/man3/pthread_setschedparam.3 index 62a5832..5fdb307 100644 --- a/man3/pthread_setschedparam.3 +++ b/man3/pthread_setschedparam.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setschedparam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_setschedparam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setschedparam, pthread_getschedparam \- set/get scheduling policy and parameters of a thread @@ -14,7 +14,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_setschedparam(pthread_t " thread ", int " policy , .BI " const struct sched_param *" param ); .BI "int pthread_getschedparam(pthread_t " thread ", int *restrict " policy , @@ -25,7 +25,7 @@ The .BR pthread_setschedparam () function sets the scheduling policy and parameters of the thread .IR thread . -.PP +.P .I policy specifies the new scheduling policy for .IR thread . @@ -36,13 +36,13 @@ and their semantics, are described in .\" FIXME . pthread_setschedparam() places no restriction on the policy, .\" but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7013 -.PP +.P The structure pointed to by .I param specifies the new scheduling parameters for .IR thread . Scheduling parameters are maintained in the following structure: -.PP +.P .in +4n .EX struct sched_param { @@ -50,12 +50,12 @@ struct sched_param { }; .EE .in -.PP +.P As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see .BR sched (7). -.PP +.P The .BR pthread_getschedparam () function returns the scheduling policy and parameters of the thread @@ -98,7 +98,7 @@ Both of these functions can fail with the following error: No thread with the ID .I thread could be found. -.PP +.P .BR pthread_setschedparam () may additionally fail with the following errors: .TP @@ -112,7 +112,7 @@ does not make sense for the .B EPERM The caller does not have appropriate privileges to set the specified scheduling policy and parameters. -.PP +.P POSIX.1 also documents an .B ENOTSUP ("attempt was made to set the policy or scheduling parameters @@ -133,7 +133,6 @@ T{ .BR pthread_getschedparam () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -152,7 +151,7 @@ and .BR pthread_getschedparam (), as well as the use of a number of other scheduling-related pthreads functions. -.PP +.P In the following run, the main thread sets its scheduling policy to .B SCHED_FIFO with a priority of 10, @@ -168,7 +167,7 @@ meaning that threads created using this attributes object should take their scheduling attributes from the thread attributes object. The program then creates a thread using the thread attributes object, and that thread displays its scheduling policy and priority. -.PP +.P .in +4n .EX $ \fBsu\fP # Need privilege to set real\-time scheduling policies @@ -185,17 +184,17 @@ Scheduler attributes of new thread policy=SCHED_RR, priority=20 .EE .in -.PP +.P In the above output, one can see that the scheduling policy and priority were taken from the values specified in the thread attributes object. -.PP +.P The next run is the same as the previous, except that the inherit scheduler attribute is set to .BR PTHREAD_INHERIT_SCHED , meaning that threads created using the thread attributes object should ignore the scheduling attributes specified in the attributes object and instead take their scheduling attributes from the creating thread. -.PP +.P .in +4n .EX # \fB./a.out \-mf10 \-ar20 \-i i\fP @@ -210,11 +209,11 @@ Scheduler attributes of new thread policy=SCHED_FIFO, priority=10 .EE .in -.PP +.P In the above output, one can see that the scheduling policy and priority were taken from the creating thread, rather than the thread attributes object. -.PP +.P Note that if we had omitted the .I \-i\~i option, the output would have been the same, since @@ -235,6 +234,7 @@ is the default for the inherit scheduler attribute. #define handle_error_en(en, msg) \e do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) \& +[[noreturn]] static void usage(char *prog_name, char *msg) { @@ -270,7 +270,7 @@ get_policy(char p, int *policy) } \& static void -display_sched_attr(int policy, struct sched_param *param) +display_sched_attr(int policy, const struct sched_param *param) { printf(" policy=%s, priority=%d\en", (policy == SCHED_FIFO) ? "SCHED_FIFO" : diff --git a/man3/pthread_setschedprio.3 b/man3/pthread_setschedprio.3 index 64bcb57..acc752d 100644 --- a/man3/pthread_setschedprio.3 +++ b/man3/pthread_setschedprio.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_setschedprio 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_setschedprio 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_setschedprio \- set scheduling priority of a thread .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_setschedprio(pthread_t " thread ", int " prio ); .fi .SH DESCRIPTION @@ -54,7 +54,7 @@ to set the specified priority. No thread with the ID .I thread could be found. -.PP +.P POSIX.1 also documents an .B ENOTSUP ("attempt was made to set the priority @@ -74,7 +74,6 @@ T{ .BR pthread_setschedprio () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3 index 724f1e9..fb923a8 100644 --- a/man3/pthread_sigmask.3 +++ b/man3/pthread_sigmask.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_sigmask 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_sigmask 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_sigmask \- examine and change mask of blocked signals .SH LIBRARY @@ -13,16 +13,16 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int pthread_sigmask(int " how ", const sigset_t *" set \ ", sigset_t *" oldset ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_sigmask (): .nf _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500 @@ -35,7 +35,7 @@ function is just like with the difference that its use in multithreaded programs is explicitly specified by POSIX.1. Other differences are noted in this page. -.PP +.P For a description of the arguments and operation of this function, see .BR sigprocmask (2). .SH RETURN VALUE @@ -60,14 +60,13 @@ T{ .BR pthread_sigmask () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. .SH NOTES A new thread inherits a copy of its creator's signal mask. -.PP +.P The glibc .BR pthread_sigmask () function silently ignores attempts to block the two real-time signals that @@ -80,7 +79,7 @@ The program below blocks some signals in the main thread, and then creates a dedicated thread to fetch those signals via .BR sigwait (3). The following shell session demonstrates its use: -.PP +.P .in +4n .EX .RB "$" " ./a.out &" diff --git a/man3/pthread_sigqueue.3 b/man3/pthread_sigqueue.3 index 5873696..62a1b18 100644 --- a/man3/pthread_sigqueue.3 +++ b/man3/pthread_sigqueue.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_sigqueue 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_sigqueue 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_sigqueue \- queue a signal and data to a thread .SH LIBRARY @@ -13,16 +13,16 @@ POSIX threads library .nf .B #include <signal.h> .B #include <pthread.h> -.PP +.P .BI "int pthread_sigqueue(pthread_t " thread ", int " sig , .BI " const union sigval " value ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_sigqueue (): .nf _GNU_SOURCE @@ -35,7 +35,7 @@ function performs a similar task to but, rather than sending a signal to a process, it sends a signal to a thread in the same process as the calling thread. -.PP +.P The .I thread argument is the ID of a thread in the same process as the caller. @@ -85,7 +85,6 @@ T{ .BR pthread_sigqueue () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The glibc implementation of .BR pthread_sigqueue () diff --git a/man3/pthread_spin_init.3 b/man3/pthread_spin_init.3 index 87ad2e8..57ccb88 100644 --- a/man3/pthread_spin_init.3 +++ b/man3/pthread_spin_init.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_spin_init 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_spin_init 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_spin_init, pthread_spin_destroy \- initialize or destroy a spin lock .SH LIBRARY @@ -11,16 +11,16 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_spin_init(pthread_spinlock_t *" lock ", int " pshared ");" .BI "int pthread_spin_destroy(pthread_spinlock_t *" lock ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_spin_init (), .BR pthread_spin_destroy (): .nf @@ -33,7 +33,7 @@ instead of spin locks. Spin locks are primarily useful in conjunction with real-time scheduling policies. See NOTES. -.PP +.P The .BR pthread_spin_init () function allocates any resources required for the use of @@ -56,12 +56,12 @@ The spin lock may be operated on by any thread in any process that has access to the memory containing the lock (i.e., the lock may be in a shared memory object that is shared among multiple processes). -.PP +.P Calling .BR pthread_spin_init () on a spin lock that has already been initialized results in undefined behavior. -.PP +.P The .BR pthread_spin_destroy () function destroys a previously initialized spin lock, @@ -69,13 +69,13 @@ freeing any resources that were allocated for that lock. Destroying a spin lock that has not been previously been initialized or destroying a spin lock while another thread holds the lock results in undefined behavior. -.PP +.P Once a spin lock has been destroyed, performing any operation on the lock other than once more initializing it with .BR pthread_spin_init () results in undefined behavior. -.PP +.P The result of performing operations such as .BR pthread_spin_lock (3), .BR pthread_spin_unlock (3), @@ -108,7 +108,7 @@ POSIX.1-2008. .SH HISTORY glibc 2.2. POSIX.1-2001. -.PP +.P Support for process-shared spin locks is a POSIX option. The option is supported in the glibc implementation. .SH NOTES @@ -124,10 +124,10 @@ The problem is that if a thread operating under such a policy is scheduled off the CPU while it holds a spin lock, then other threads will waste time spinning on the lock until the lock holder is once more rescheduled and releases the lock. -.PP +.P If threads create a deadlock situation while employing spin locks, those threads will spin forever consuming CPU time. -.PP +.P User-space spin locks are .I not applicable as a general locking solution. diff --git a/man3/pthread_spin_lock.3 b/man3/pthread_spin_lock.3 index 4c9bcf1..65e4d45 100644 --- a/man3/pthread_spin_lock.3 +++ b/man3/pthread_spin_lock.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_spin_lock 3 2023-03-30 "Linux man-pages 6.05.01" +.TH pthread_spin_lock 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock \- lock and unlock a spin lock @@ -12,17 +12,17 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .BI "int pthread_spin_lock(pthread_spinlock_t *" lock ); .BI "int pthread_spin_trylock(pthread_spinlock_t *" lock ); .BI "int pthread_spin_unlock(pthread_spinlock_t *" lock ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR pthread_spin_lock (), .BR pthread_spin_trylock (): .nf @@ -38,14 +38,14 @@ the calling thread acquires the lock immediately. If the spin lock is currently locked by another thread, the calling thread spins, testing the lock until it becomes available, at which point the calling thread acquires the lock. -.PP +.P Calling .BR pthread_spin_lock () on a lock that is already held by the caller or a lock that has not been initialized with .BR pthread_spin_init (3) results in undefined behavior. -.PP +.P The .BR pthread_spin_trylock () function is like @@ -55,14 +55,14 @@ except that if the spin lock referred to by is currently locked, then, instead of spinning, the call returns immediately with the error .BR EBUSY . -.PP +.P The .BR pthread_spin_unlock () function unlocks the spin lock referred to .IR lock . If any threads are spinning on the lock, one of those threads will then acquire the lock. -.PP +.P Calling .BR pthread_spin_unlock () on a lock that is not held by the caller results in undefined behavior. @@ -76,7 +76,7 @@ may fail with the following errors: .B EDEADLOCK .\" Not detected in glibc The system detected a deadlock condition. -.PP +.P .BR pthread_spin_trylock () fails with the following errors: .TP @@ -90,7 +90,7 @@ POSIX.1-2001. .SH CAVEATS Applying any of the functions described on this page to an uninitialized spin lock results in undefined behavior. -.PP +.P Carefully read NOTES in .BR pthread_spin_init (3). .SH SEE ALSO diff --git a/man3/pthread_testcancel.3 b/man3/pthread_testcancel.3 index 9188ede..796c7a3 100644 --- a/man3/pthread_testcancel.3 +++ b/man3/pthread_testcancel.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_testcancel 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_testcancel 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_testcancel \- request delivery of any pending cancelation request .SH LIBRARY @@ -13,7 +13,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <pthread.h> -.PP +.P .B void pthread_testcancel(void); .fi .SH DESCRIPTION @@ -22,7 +22,7 @@ Calling creates a cancelation point within the calling thread, so that a thread that is otherwise executing code that contains no cancelation points will respond to a cancelation request. -.PP +.P If cancelability is disabled (using .BR pthread_setcancelstate (3)), or no cancelation request is pending, @@ -49,7 +49,6 @@ T{ .BR pthread_testcancel () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/pthread_tryjoin_np.3 b/man3/pthread_tryjoin_np.3 index 1a0643d..59d622e 100644 --- a/man3/pthread_tryjoin_np.3 +++ b/man3/pthread_tryjoin_np.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_tryjoin_np 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_tryjoin_np 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_tryjoin_np, pthread_timedjoin_np \- try to join with a terminated thread @@ -15,7 +15,7 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .BI "int pthread_tryjoin_np(pthread_t " thread ", void **" retval ); .BI "int pthread_timedjoin_np(pthread_t " thread ", void **" retval , .BI " const struct timespec *" abstime ); @@ -24,7 +24,7 @@ POSIX threads library These functions operate in the same way as .BR pthread_join (3), except for the differences described on this page. -.PP +.P The .BR pthread_tryjoin_np () function performs a nonblocking join with the thread @@ -36,7 +36,7 @@ If has not yet terminated, then instead of blocking, as is done by .BR pthread_join (3), the call returns an error. -.PP +.P The .BR pthread_timedjoin_np () function performs a join-with-timeout. @@ -72,7 +72,7 @@ can in addition fail with the following error: .B EBUSY .I thread had not yet terminated at the time of the call. -.PP +.P .BR pthread_timedjoin_np () can in addition fail with the following errors: .TP @@ -88,7 +88,7 @@ is greater than 1e9). The call timed out before .I thread terminated. -.PP +.P .BR pthread_timedjoin_np () never returns the error .BR EINTR . @@ -107,7 +107,6 @@ T{ .BR pthread_timedjoin_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU; hence the suffix "_np" (nonportable) in the names. @@ -127,7 +126,7 @@ Consequently, the timeout is unaffected by discontinuous changes to the clock. .SH EXAMPLES The following code waits to join for up to 5 seconds: -.PP +.P .in +4n .EX struct timespec ts; diff --git a/man3/pthread_yield.3 b/man3/pthread_yield.3 index 95bb580..34d2bad 100644 --- a/man3/pthread_yield.3 +++ b/man3/pthread_yield.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH pthread_yield 3 2023-07-20 "Linux man-pages 6.05.01" +.TH pthread_yield 3 2023-10-31 "Linux man-pages 6.7" .SH NAME pthread_yield \- yield the processor .SH LIBRARY @@ -13,13 +13,13 @@ POSIX threads library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <pthread.h> -.PP +.P .B [[deprecated]] int pthread_yield(void); .fi .SH DESCRIPTION .BR Note : This function is deprecated; see below. -.PP +.P .BR pthread_yield () causes the calling thread to relinquish the CPU. The thread is placed at the end of the run queue for its static @@ -49,7 +49,6 @@ T{ .BR pthread_yield () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On Linux, this function is implemented as a call to .BR sched_yield (2). diff --git a/man3/ptsname.3 b/man3/ptsname.3 index b57f057..e7887e9 100644 --- a/man3/ptsname.3 +++ b/man3/ptsname.3 @@ -5,7 +5,7 @@ .\" .\" 2004-12-17, mtk, added description of ptsname_r() + ERRORS .\" -.TH ptsname 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ptsname 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ptsname, ptsname_r \- get the name of the slave pseudoterminal .SH LIBRARY @@ -14,16 +14,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "char *ptsname(int " fd ); .BI "int ptsname_r(int " fd ", char " buf [. buflen "], size_t " buflen ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ptsname (): .nf Since glibc 2.24: @@ -32,7 +32,7 @@ Feature Test Macro Requirements for glibc (see glibc 2.23 and earlier: _XOPEN_SOURCE .fi -.PP +.P .BR ptsname_r (): .nf _GNU_SOURCE @@ -43,7 +43,7 @@ The function returns the name of the slave pseudoterminal device corresponding to the master referred to by the file descriptor .IR fd . -.PP +.P The .BR ptsname_r () function is the reentrant equivalent of @@ -62,7 +62,7 @@ returns a pointer to a string in static storage which will be overwritten by subsequent calls. This pointer must not be freed. On failure, NULL is returned. -.PP +.P On success, .BR ptsname_r () returns 0. @@ -108,7 +108,6 @@ T{ .BR ptsname_r () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS A version of .BR ptsname_r () @@ -122,7 +121,7 @@ Avoid using this function in portable programs. .TP .BR ptsname (): POSIX.1-2008. -.PP +.P .BR ptsname_r () is a Linux extension, that is proposed for inclusion .\" FIXME . for later review when Issue 8 is one day released @@ -134,7 +133,7 @@ in the next major revision of POSIX.1 (Issue 8). .BR ptsname (): POSIX.1-2001. glibc 2.1. -.PP +.P .BR ptsname () is part of the UNIX 98 pseudoterminal support (see .BR pts (4)). diff --git a/man3/putenv.3 b/man3/putenv.3 index da15b2e..c63d5e4 100644 --- a/man3/putenv.3 +++ b/man3/putenv.3 @@ -14,7 +14,7 @@ .\" Modified Mon Oct 11 11:11:11 1999 by Andries Brouwer (aeb@cwi.nl) .\" Modified Wed Nov 10 00:02:26 1999 by Andries Brouwer (aeb@cwi.nl) .\" Modified Sun May 20 22:17:20 2001 by Andries Brouwer (aeb@cwi.nl) -.TH putenv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH putenv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME putenv \- change or add an environment variable .SH LIBRARY @@ -23,16 +23,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int putenv(char *" string ); .\" Not: const char * .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR putenv (): .nf _XOPEN_SOURCE @@ -77,17 +77,16 @@ T{ .BR putenv () T} Thread safety MT-Unsafe const:env .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001, SVr2, 4.3BSD-Reno. -.PP +.P The .BR putenv () function is not required to be reentrant, and the one in glibc 2.0 is not, but the glibc 2.1 version is. -.\" .LP +.\" .P .\" Description for libc4, libc5, glibc: .\" If the argument \fIstring\fP is of the form \fIname\fP, .\" and does not contain an \[aq]=\[aq] character, then the variable \fIname\fP @@ -100,7 +99,7 @@ one in glibc 2.0 is not, but the glibc 2.1 version is. .\" then it will be freed. .\" In no case will the old storage associated .\" to the environment variable itself be freed. -.PP +.P Since glibc 2.1.2, the glibc implementation conforms to SUSv2: the pointer \fIstring\fP given to .BR putenv () @@ -116,23 +115,23 @@ However, from glibc 2.0 to glibc 2.1.1, it differs: a copy of the string is used. On the one hand this causes a memory leak, and on the other hand it violates SUSv2. -.PP +.P The 4.3BSD-Reno version, like glibc 2.0, uses a copy; this is fixed in all modern BSDs. -.PP +.P SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3. -.PP +.P The GNU C library implementation provides a nonstandard extension. If .I string does not include an equal sign: -.PP +.P .in +4n .EX putenv("NAME"); .EE .in -.PP +.P then the named variable is removed from the caller's environment. .SH SEE ALSO .BR clearenv (3), diff --git a/man3/putgrent.3 b/man3/putgrent.3 index e1b955c..1de2084 100644 --- a/man3/putgrent.3 +++ b/man3/putgrent.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH putgrent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH putgrent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME putgrent \- write a group database entry to a file .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <grp.h> -.PP +.P .BI "int putgrent(const struct group *restrict " grp \ ", FILE *restrict " stream ); .fi @@ -27,11 +27,11 @@ The function writes the content of the provided into the .IR stream . The list of group members must be NULL-terminated or NULL-initialized. -.PP +.P The .I struct group is defined as follows: -.PP +.P .in +4n .EX struct group { @@ -58,7 +58,6 @@ T{ .BR putgrent () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH SEE ALSO diff --git a/man3/putpwent.3 b/man3/putpwent.3 index d1755f8..645e8be 100644 --- a/man3/putpwent.3 +++ b/man3/putpwent.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:43:46 1993 by Rik Faith (faith@cs.unc.edu) -.TH putpwent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH putpwent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME putpwent \- write a password file entry .SH LIBRARY @@ -19,16 +19,16 @@ Standard C library .B #include <stdio.h> .B #include <sys/types.h> .B #include <pwd.h> -.PP +.P .BI "int putpwent(const struct passwd *restrict " p \ ", FILE *restrict " stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR putpwent (): .nf Since glibc 2.19: @@ -41,9 +41,9 @@ The .BR putpwent () function writes a password entry from the structure \fIp\fP in the file associated with \fIstream\fP. -.PP +.P The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: -.PP +.P .in +4n .EX struct passwd { @@ -82,7 +82,6 @@ T{ .BR putpwent () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/puts.3 b/man3/puts.3 index a113df5..dd50c52 100644 --- a/man3/puts.3 +++ b/man3/puts.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 18:42:59 1993 by Rik Faith (faith@cs.unc.edu) -.TH puts 3 2023-07-20 "Linux man-pages 6.05.01" +.TH puts 3 2023-10-31 "Linux man-pages 6.7" .SH NAME fputc, fputs, putc, putchar, puts \- output of characters and strings .SH LIBRARY @@ -13,11 +13,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int fputc(int " c ", FILE *" stream ); .BI "int putc(int " c ", FILE *" stream ); .BI "int putchar(int " c ); -.PP +.P .BI "int fputs(const char *restrict " s ", FILE *restrict " stream ); .BI "int puts(const char *" s ); .fi @@ -29,37 +29,37 @@ cast to an .IR "unsigned char" , to .IR stream . -.PP +.P .BR putc () is equivalent to .BR fputc () except that it may be implemented as a macro which evaluates .I stream more than once. -.PP +.P .BI "putchar(" c ) is equivalent to .BI "putc(" c ", " stdout ) \fR. -.PP +.P .BR fputs () writes the string .I s to .IR stream , without its terminating null byte (\[aq]\e0\[aq]). -.PP +.P .BR puts () writes the string .I s and a trailing newline to .IR stdout . -.PP +.P Calls to the functions described here can be mixed with each other and with calls to other output functions from the .I stdio library for the same output stream. -.PP +.P For nonlocking counterparts, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -74,7 +74,7 @@ cast to an or .B EOF on error. -.PP +.P .BR puts () and .BR fputs () @@ -99,7 +99,6 @@ T{ .BR puts () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/putwchar.3 b/man3/putwchar.3 index e544681..af64cba 100644 --- a/man3/putwchar.3 +++ b/man3/putwchar.3 @@ -10,7 +10,7 @@ .\" http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH putwchar 3 2023-07-20 "Linux man-pages 6.05.01" +.TH putwchar 3 2023-10-31 "Linux man-pages 6.7" .SH NAME putwchar \- write a wide character to standard output .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wint_t putwchar(wchar_t " wc ); .fi .SH DESCRIPTION @@ -45,7 +45,7 @@ and returns .BR WEOF . Otherwise, it returns .IR wc . -.PP +.P For a nonlocking counterpart, see .BR unlocked_stdio (3). .SH RETURN VALUE @@ -70,7 +70,6 @@ T{ .BR putwchar () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -82,7 +81,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P It is reasonable to expect that .BR putwchar () will actually write diff --git a/man3/qecvt.3 b/man3/qecvt.3 index aa19f81..a9aeed8 100644 --- a/man3/qecvt.3 +++ b/man3/qecvt.3 @@ -6,7 +6,7 @@ .\" This replaces an earlier man page written by Walter Harms .\" <walter.harms@informatik.uni-oldenburg.de>. .\" -.TH qecvt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH qecvt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME qecvt, qfcvt, qgcvt \- convert a floating-point number to a string .SH LIBRARY @@ -15,19 +15,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "[[deprecated]] char *qecvt(long double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign ); .BI "[[deprecated]] char *qfcvt(long double " number ", int " ndigits , .BI " int *restrict " decpt ", int *restrict " sign ); .BI "[[deprecated]] char *qgcvt(long double " number ", int " ndigit ", char *" buf ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR qecvt (), .BR qfcvt (), .BR qgcvt (): @@ -93,13 +93,12 @@ T{ .BR qgcvt () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY SVr4, SunOS, GNU. .\" Not supported by libc4 and libc5. -.PP +.P These functions are obsolete. Instead, .BR snprintf (3) diff --git a/man3/qsort.3 b/man3/qsort.3 index 09737a2..6959a9a 100644 --- a/man3/qsort.3 +++ b/man3/qsort.3 @@ -15,7 +15,7 @@ .\" and Ben Bacarisse <software@bsb.me.uk> .\" Document qsort_r() .\" -.TH qsort 3 2023-07-20 "Linux man-pages 6.05.01" +.TH qsort 3 2023-10-31 "Linux man-pages 6.7" .SH NAME qsort, qsort_r \- sort an array .SH LIBRARY @@ -24,7 +24,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "void qsort(void " base [. size " * ." nmemb "], size_t " nmemb ", \ size_t " size , .BI " int (*" compar ")(const void [." size "], \ @@ -35,12 +35,12 @@ size_t " size , const void [." size "], void *)," .BI " void *" arg ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR qsort_r (): .nf _GNU_SOURCE @@ -52,17 +52,17 @@ function sorts an array with \fInmemb\fP elements of size \fIsize\fP. The \fIbase\fP argument points to the start of the array. -.PP +.P The contents of the array are sorted in ascending order according to a comparison function pointed to by \fIcompar\fP, which is called with two arguments that point to the objects being compared. -.PP +.P The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. If two members compare as equal, their order in the sorted array is undefined. -.PP +.P The .BR qsort_r () function is identical to @@ -96,7 +96,6 @@ T{ .BR qsort_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR qsort () @@ -115,10 +114,10 @@ as shown in the example below. .SH EXAMPLES For one example of use, see the example under .BR bsearch (3). -.PP +.P Another example is the following program, which sorts the strings given in its command-line arguments: -.PP +.P .\" SRC BEGIN (qsort.c) .EX #include <stdio.h> diff --git a/man3/raise.3 b/man3/raise.3 index 49d2d96..9fb5c72 100644 --- a/man3/raise.3 +++ b/man3/raise.3 @@ -7,7 +7,7 @@ .\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 1995 by Mike Battersby (mib@deakin.edu.au) .\" -.TH raise 3 2023-07-20 "Linux man-pages 6.05.01" +.TH raise 3 2023-10-31 "Linux man-pages 6.7" .SH NAME raise \- send a signal to the caller .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int raise(int " sig ); .fi .SH DESCRIPTION @@ -24,21 +24,21 @@ The .BR raise () function sends a signal to the calling process or thread. In a single-threaded program it is equivalent to -.PP +.P .in +4n .EX kill(getpid(), sig); .EE .in -.PP +.P In a multithreaded program it is equivalent to -.PP +.P .in +4n .EX pthread_kill(pthread_self(), sig); .EE .in -.PP +.P If the signal causes a handler to be called, .BR raise () will return only after the signal handler has returned. @@ -59,12 +59,11 @@ T{ .BR raise () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C89. -.PP +.P Since glibc 2.3.3, .BR raise () is implemented by calling diff --git a/man3/rand.3 b/man3/rand.3 index 6146ce9..681a5f7 100644 --- a/man3/rand.3 +++ b/man3/rand.3 @@ -19,7 +19,7 @@ .\" Modified 2003-11-15, aeb, added rand_r .\" 2010-09-13, mtk, added example program .\" -.TH rand 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rand 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rand, rand_r, srand \- pseudo-random number generator .SH LIBRARY @@ -28,18 +28,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B int rand(void); .BI "void srand(unsigned int " seed ); -.PP +.P .BI "[[deprecated]] int rand_r(unsigned int *" seedp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR rand_r (): .nf Since glibc 2.24: @@ -53,7 +53,7 @@ The function returns a pseudo-random integer in the range 0 to .B RAND_MAX inclusive (i.e., the mathematical range [0,\ \fBRAND_MAX\fR]). -.PP +.P The .BR srand () function sets its argument as the seed for a new @@ -62,11 +62,11 @@ sequence of pseudo-random integers to be returned by These sequences are repeatable by calling .BR srand () with the same seed value. -.PP +.P If no seed value is provided, the .BR rand () function is automatically seeded with a value of 1. -.PP +.P The function .BR rand () is not reentrant, since it @@ -77,7 +77,7 @@ In order to get reproducible behavior in a threaded application, this state must be made explicit; this can be done using the reentrant function .BR rand_r (). -.PP +.P Like .BR rand (), .BR rand_r () @@ -93,7 +93,7 @@ is called with the same initial value for the integer pointed to by .IR seedp , and that value is not modified between calls, then the same pseudo-random sequence will result. -.PP +.P The value pointed to by the .I seedp argument of @@ -130,7 +130,6 @@ T{ .BR srand () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The versions of .BR rand () @@ -175,7 +174,7 @@ POSIX.1-2001 gives the following example of an implementation of and .BR srand (), possibly useful when one needs the same sequence on two different machines. -.PP +.P .in +4n .EX static unsigned long next = 1; @@ -191,7 +190,7 @@ void mysrand(unsigned int seed) { } .EE .in -.PP +.P The following program can be used to display the pseudo-random sequence produced by .BR rand () @@ -199,7 +198,7 @@ when given a particular seed. When the seed is .IR \-1 , the program uses a random seed. -.PP +.P .in +4n .\" SRC BEGIN (rand.c) .EX diff --git a/man3/random.3 b/man3/random.3 index 9c69344..3d1c4dd 100644 --- a/man3/random.3 +++ b/man3/random.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 18:13:39 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Aug 20 21:47:07 2000, aeb .\" -.TH random 3 2023-07-20 "Linux man-pages 6.05.01" +.TH random 3 2023-10-31 "Linux man-pages 6.7" .SH NAME random, srandom, initstate, setstate \- random number generator .SH LIBRARY @@ -20,19 +20,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .B long random(void); .BI "void srandom(unsigned int " seed ); -.PP +.P .BI "char *initstate(unsigned int " seed ", char " state [. n "], size_t " n ); .BI "char *setstate(char *" state ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR random (), .BR srandom (), .BR initstate (), @@ -52,7 +52,7 @@ return successive pseudo-random numbers in the range from 0 to 2\[ha]31\ \-\ 1. The period of this random number generator is very large, approximately .IR "16\ *\ ((2\[ha]31)\ \-\ 1)" . -.PP +.P The .BR srandom () function sets its argument as the seed for a new @@ -66,7 +66,7 @@ If no seed value is provided, the .BR random () function is automatically seeded with a value of 1. -.PP +.P The .BR initstate () function allows a state array \fIstate\fP to @@ -85,7 +85,7 @@ Using less than 8 bytes results in an error. \fIseed\fP is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point. -.PP +.P The .BR setstate () function changes the state array used by the @@ -109,14 +109,14 @@ function returns a value between 0 and The .BR srandom () function returns no value. -.PP +.P The .BR initstate () function returns a pointer to the previous state array. On failure, it returns NULL, and .I errno is set to indicate the error. -.PP +.P On success, .BR setstate () returns a pointer to the previous state array. @@ -152,7 +152,6 @@ T{ .BR setstate () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -164,7 +163,7 @@ Random-number generation is a complex topic. William T.\& Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers). -.PP +.P For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E.\& Knuth's .IR "The Art of Computer Programming" , diff --git a/man3/random_r.3 b/man3/random_r.3 index c812c2f..f1647f8 100644 --- a/man3/random_r.3 +++ b/man3/random_r.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH random_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH random_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME random_r, srandom_r, initstate_r, setstate_r \- reentrant random number generator @@ -14,23 +14,23 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int random_r(struct random_data *restrict " buf , .BI " int32_t *restrict " result ); .BI "int srandom_r(unsigned int " seed ", struct random_data *" buf ); -.PP +.P .BI "int initstate_r(unsigned int " seed ", \ char " statebuf "[restrict ." statelen ], .BI " size_t " statelen ", struct random_data *restrict " buf ); .BI "int setstate_r(char *restrict " statebuf , .BI " struct random_data *restrict " buf ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR random_r (), .BR srandom_r (), .BR initstate_r (), @@ -45,7 +45,7 @@ of the functions described in .BR random (3). They are suitable for use in multithreaded programs where each thread needs to obtain an independent, reproducible sequence of random numbers. -.PP +.P The .BR random_r () function is like @@ -58,7 +58,7 @@ which must have been previously initialized by .BR initstate_r (). The generated random number is returned in the argument .IR result . -.PP +.P The .BR srandom_r () function is like @@ -69,7 +69,7 @@ whose state is maintained in the object pointed to by which must have been previously initialized by .BR initstate_r (), instead of the seed associated with the global state variable. -.PP +.P The .BR initstate_r () function is like @@ -97,7 +97,7 @@ should typically be allocated as a static variable, or allocated on the heap using .BR malloc (3) or similar.) -.PP +.P The .BR setstate_r () function is like @@ -155,7 +155,6 @@ T{ .BR setstate_r () T} Thread safety MT-Safe race:buf .TE -.sp 1 .SH STANDARDS GNU. .\" These functions appear to be on Tru64, but don't seem to be on diff --git a/man3/rcmd.3 b/man3/rcmd.3 index 765e85a..012dc62 100644 --- a/man3/rcmd.3 +++ b/man3/rcmd.3 @@ -13,7 +13,7 @@ .\" .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" -.TH rcmd 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rcmd 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rcmd, rresvport, iruserok, ruserok, rcmd_af, rresvport_af, iruserok_af, ruserok_af \- routines for returning a @@ -24,27 +24,27 @@ Standard C library .SH SYNOPSIS .nf .BR "#include <netdb.h> " "/* Or <unistd.h> on some systems */" -.PP +.P .BI "int rcmd(char **restrict " ahost ", unsigned short " inport , .BI " const char *restrict " locuser , .BI " const char *restrict " remuser , .BI " const char *restrict " cmd ", int *restrict " fd2p ); -.PP +.P .BI "int rresvport(int *" port ); -.PP +.P .BI "int iruserok(uint32_t " raddr ", int " superuser , .BI " const char *" ruser ", const char *" luser ); .BI "int ruserok(const char *" rhost ", int " superuser , .BI " const char *" ruser ", const char *" luser ); -.PP +.P .BI "int rcmd_af(char **restrict " ahost ", unsigned short " inport , .BI " const char *restrict " locuser , .BI " const char *restrict " remuser , .BI " const char *restrict " cmd ", int *restrict " fd2p , .BI " sa_family_t " af ); -.PP +.P .BI "int rresvport_af(int *" port ", sa_family_t " af ); -.PP +.P .BI "int iruserok_af(const void *restrict " raddr ", int " superuser , .BI " const char *restrict " ruser ", const char *restrict " luser , .BI " sa_family_t " af ); @@ -52,13 +52,13 @@ Standard C library .BI " const char *" ruser ", const char *" luser , .BI " sa_family_t " af ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE .ad l -.PP +.P .BR rcmd (), .BR rcmd_af (), .BR rresvport (), @@ -110,7 +110,7 @@ is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port .IR inport . -.PP +.P If the connection succeeds, a socket in the Internet domain of type .B SOCK_STREAM @@ -139,7 +139,7 @@ command) will be made the same as the and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data. -.PP +.P The protocol is described in detail in .BR rshd (8). .SS rresvport() @@ -182,7 +182,7 @@ If that lookup is not done, or is unsuccessful, the .I .rhosts in the local user's home directory is checked to see if the request for service is allowed. -.PP +.P If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. @@ -198,7 +198,7 @@ return \-1. If the local domain (as obtained from .BR gethostname (2)) is the same as the remote domain, only the machine name need be specified. -.PP +.P If the IP address of the remote host is known, .BR iruserok () should be used in preference to @@ -226,7 +226,7 @@ The function returns a valid socket descriptor on success. It returns \-1 on error and prints a diagnostic message on the standard error. -.PP +.P The .BR rresvport () function @@ -237,7 +237,7 @@ to indicate the error. The error code .B EAGAIN is overloaded to mean: "All network ports in use". -.PP +.P For information on the return from .BR ruserok () and @@ -272,7 +272,6 @@ T{ .BR ruserok_af () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY @@ -285,7 +284,7 @@ BSD. .TQ .BR ruserok_af () glibc 2.2. -.PP +.P Solaris, 4.2BSD. The "_af" variants are more recent additions, and are not present on as wide a range of systems. diff --git a/man3/re_comp.3 b/man3/re_comp.3 index 3cb4450..038dc96 100644 --- a/man3/re_comp.3 +++ b/man3/re_comp.3 @@ -5,7 +5,7 @@ .\" .\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk) .\" -.TH re_comp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH re_comp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME re_comp, re_exec \- BSD regex functions .SH LIBRARY @@ -16,7 +16,7 @@ Standard C library .B #define _REGEX_RE_COMP .B #include <sys/types.h> .B #include <regex.h> -.PP +.P .BI "[[deprecated]] char *re_comp(const char *" regex ); .BI "[[deprecated]] int re_exec(const char *" string ); .fi @@ -32,7 +32,7 @@ If is NULL, no operation is performed and the pattern buffer's contents are not altered. -.PP +.P .BR re_exec () is used to assess whether the null-terminated string pointed to by .I string @@ -43,7 +43,7 @@ matches the previously compiled returns NULL on successful compilation of .I regex otherwise it returns a pointer to an appropriate error message. -.PP +.P .BR re_exec () returns 1 for a successful match, zero for failure. .SH ATTRIBUTES @@ -61,12 +61,11 @@ T{ .BR re_exec () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY 4.3BSD. -.PP +.P These functions are obsolete; the functions documented in .BR regcomp (3) should be used instead. diff --git a/man3/readdir.3 b/man3/readdir.3 index 2e0ea09..9b61aaf 100644 --- a/man3/readdir.3 +++ b/man3/readdir.3 @@ -14,7 +14,7 @@ .\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>, mtk: .\" Rework discussion of nonstandard structure fields. .\" -.TH readdir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH readdir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME readdir \- read a directory .SH LIBRARY @@ -23,7 +23,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "struct dirent *readdir(DIR *" dirp ); .fi .SH DESCRIPTION @@ -34,11 +34,11 @@ representing the next directory entry in the directory stream pointed to by \fIdirp\fP. It returns NULL on reaching the end of the directory stream or if an error occurred. -.PP +.P In the glibc implementation, the .I dirent structure is defined as follows: -.PP +.P .in +4n .EX struct dirent { @@ -51,7 +51,7 @@ struct dirent { }; .EE .in -.PP +.P The only fields in the .I dirent structure that are mandated by POSIX.1 are @@ -60,7 +60,7 @@ and .IR d_ino . The other fields are unstandardized, and not present on all systems; see NOTES below for some further details. -.PP +.P The fields of the .I dirent structure are as follows: @@ -139,7 +139,7 @@ All applications must properly handle a return of .I d_name This field contains the null terminated filename. .IR "See NOTES" . -.PP +.P The data returned by .BR readdir () may be overwritten by subsequent calls to @@ -154,7 +154,7 @@ structure. (This structure may be statically allocated; do not attempt to .BR free (3) it.) -.PP +.P If the end of the directory stream is reached, NULL is returned and .I errno is not changed. @@ -186,8 +186,7 @@ T{ .BR readdir () T} Thread safety MT-Unsafe race:dirstream .TE -.sp 1 -.PP +.P In the current POSIX.1 specification (POSIX.1-2008), .BR readdir () is not required to be thread-safe. @@ -235,7 +234,7 @@ structure definition shown above is taken from the glibc headers, and shows the .I d_name field with a fixed size. -.PP +.P .IR Warning : applications should avoid any dependence on the size of the .I d_name @@ -245,7 +244,7 @@ POSIX defines it as a character array of unspecified size, with at most .B NAME_MAX characters preceding the terminating null byte (\[aq]\e0\[aq]). -.PP +.P POSIX.1 explicitly notes that this field should not be used as an lvalue. The standard also notes that the use of .I sizeof(d_name) @@ -259,15 +258,15 @@ By implication, the use to capture the size of the record including the size of .I d_name is also incorrect. -.PP +.P Note that while the call -.PP +.P .in +4n .EX fpathconf(fd, _PC_NAME_MAX) .EE .in -.PP +.P returns the value 255 for most filesystems, on some filesystems (e.g., CIFS, Windows SMB servers), the null-terminated filename that is (correctly) returned in @@ -285,7 +284,7 @@ POSIX.1-2001, SVr4, 4.3BSD. .SH NOTES A directory stream is opened using .BR opendir (3). -.PP +.P The order in which filenames are read by successive calls to .BR readdir () depends on the filesystem implementation; diff --git a/man3/readdir_r.3 b/man3/readdir_r.3 index f853e51..f90a70b 100644 --- a/man3/readdir_r.3 +++ b/man3/readdir_r.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH readdir_r 3 2023-07-20 "Linux man-pages 6.05.01" +.TH readdir_r 3 2023-10-31 "Linux man-pages 6.7" .SH NAME readdir_r \- read a directory .SH LIBRARY @@ -13,17 +13,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "[[deprecated]] int readdir_r(DIR *restrict " dirp , .BI " struct dirent *restrict " entry , .BI " struct dirent **restrict " result ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR readdir_r (): .nf _POSIX_C_SOURCE @@ -33,7 +33,7 @@ Feature Test Macro Requirements for glibc (see This function is deprecated; use .BR readdir (3) instead. -.PP +.P The .BR readdir_r () function was invented as a reentrant version of @@ -46,13 +46,13 @@ For details of the .I dirent structure, see .BR readdir (3). -.PP +.P A pointer to the returned buffer is placed in .IR *result ; if the end of the directory stream was encountered, then NULL is instead returned in .IR *result . -.PP +.P It is recommended that applications use .BR readdir (3) instead of @@ -137,7 +137,6 @@ T{ .BR readdir_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/realpath.3 b/man3/realpath.3 index 3f25e60..dc1ec7f 100644 --- a/man3/realpath.3 +++ b/man3/realpath.3 @@ -6,7 +6,7 @@ .\" Rewritten old page, 990824, aeb@cwi.nl .\" 2004-12-14, mtk, added discussion of resolved_path == NULL .\" -.TH realpath 3 2023-07-20 "Linux man-pages 6.05.01" +.TH realpath 3 2023-10-31 "Linux man-pages 6.7" .SH NAME realpath \- return the canonicalized absolute pathname .SH LIBRARY @@ -16,16 +16,16 @@ Standard C library .nf .B #include <limits.h> .B #include <stdlib.h> -.PP +.P .BI "char *realpath(const char *restrict " path , .BI " char *restrict " resolved_path ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR realpath (): .nf _XOPEN_SOURCE >= 500 @@ -53,7 +53,7 @@ The resulting path will have no symbolic link, or .I "/../" components. -.PP +.P If .I resolved_path is specified as NULL, then @@ -74,7 +74,7 @@ If there is no error, .BR realpath () returns a pointer to the .IR resolved_path . -.PP +.P Otherwise, it returns NULL, the contents of the array .I resolved_path @@ -130,7 +130,6 @@ T{ .BR realpath () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .SS GNU extensions If the call fails with either @@ -147,12 +146,12 @@ that is not readable or does not exist is returned in POSIX.1-2008. .SH HISTORY 4.4BSD, POSIX.1-2001, Solaris. -.PP +.P POSIX.1-2001 says that the behavior if .I resolved_path is NULL is implementation-defined. POSIX.1-2008 specifies the behavior described in this page. -.PP +.P In 4.4BSD and Solaris, the limit on the pathname length is .B MAXPATHLEN (found in \fI<sys/param.h>\fP). @@ -164,7 +163,7 @@ as found in \fI<limits.h>\fP or provided by the .BR pathconf (3) function. A typical source fragment would be -.PP +.P .in +4n .EX #ifdef PATH_MAX @@ -176,9 +175,9 @@ A typical source fragment would be #endif .EE .in -.PP +.P (But see the BUGS section.) -.\".PP +.\".P .\" 2012-05-05, According to Casper Dik, the statement about .\" Solaris was not true at least as far back as 1997, and .\" may never have been true. @@ -217,7 +216,7 @@ The .I "resolved_path\ ==\ NULL" feature, not standardized in POSIX.1-2001, but standardized in POSIX.1-2008, allows this design problem to be avoided. -.\" .LP +.\" .P .\" The libc4 and libc5 implementation contained a buffer overflow .\" (fixed in libc-5.4.13). .\" Thus, set-user-ID programs like diff --git a/man3/recno.3 b/man3/recno.3 index a4a38d2..afc4e72 100644 --- a/man3/recno.3 +++ b/man3/recno.3 @@ -5,7 +5,7 @@ .\" .\" @(#)recno.3 8.5 (Berkeley) 8/18/94 .\" -.TH recno 3 2022-12-04 "Linux man-pages 6.05.01" +.TH recno 3 2023-10-31 "Linux man-pages 6.7" .UC 7 .SH NAME recno \- record number database access method @@ -26,7 +26,7 @@ Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the .I libdb library instead. -.PP +.P The routine .BR dbopen (3) is the library interface to database files. @@ -34,7 +34,7 @@ One of the supported file formats is record number files. The general description of the database access methods is in .BR dbopen (3), this manual page describes only the recno-specific information. -.PP +.P The record number data structure is either variable or fixed-length records stored in a flat-file format, accessed by the logical record number. @@ -43,13 +43,13 @@ one through four, and the deletion of record number one causes record number five to be renumbered to record number four, as well as the cursor, if positioned after record number one, to shift down one record. -.PP +.P The recno access-method-specific data structure provided to .BR dbopen (3) is defined in the .I <db.h> include file as follows: -.PP +.P .in +4n .EX typedef struct { @@ -63,7 +63,7 @@ typedef struct { } RECNOINFO; .EE .in -.PP +.P The elements of this structure are defined as follows: .TP .I flags @@ -151,7 +151,7 @@ is non-NULL, it specifies the name of the btree file, as if specified as the filename for a .BR dbopen (3) of a btree file. -.PP +.P The data part of the key/data pair used by the .I recno access method @@ -169,12 +169,12 @@ the implementation. The .I size field of the key should be the size of that type. -.PP +.P Because there can be no metadata associated with the underlying recno access method files, any changes made to the default values (e.g., fixed record length or byte separator value) must be explicitly specified each time the file is opened. -.PP +.P In the interface specified by .BR dbopen (3), using the @@ -201,7 +201,7 @@ Only big and little endian byte order is supported. .BR dbopen (3), .BR hash (3), .BR mpool (3) -.PP +.P .IR "Document Processing in a Relational Database System" , Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman, Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982. diff --git a/man3/regex.3 b/man3/regex.3 index fe6a6b3..fb641ef 100644 --- a/man3/regex.3 +++ b/man3/regex.3 @@ -10,7 +10,7 @@ .\" Modified 8 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) .\" .\" show the synopsis section nicely -.TH regex 3 2023-07-20 "Linux man-pages 6.05.01" +.TH regex 3 2023-10-31 "Linux man-pages 6.7" .SH NAME regcomp, regexec, regerror, regfree \- POSIX regex functions .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <regex.h> -.PP +.P .BI "int regcomp(regex_t *restrict " preg ", const char *restrict " regex , .BI " int " cflags ); .BI "int regexec(const regex_t *restrict " preg \ @@ -27,21 +27,21 @@ Standard C library .BI " size_t " nmatch ", \ regmatch_t " pmatch "[_Nullable restrict ." nmatch ], .BI " int " eflags ); -.PP +.P .BI "size_t regerror(int " errcode ", const regex_t *_Nullable restrict " preg , .BI " char " errbuf "[_Nullable restrict ." errbuf_size ], .BI " size_t " errbuf_size ); .BI "void regfree(regex_t *" preg ); -.PP +.P .B typedef struct { .B " size_t re_nsub;" .B } regex_t; -.PP +.P .B typedef struct { .B " regoff_t rm_so;" .B " regoff_t rm_eo;" .B } regmatch_t; -.PP +.P .BR typedef " /* ... */ " regoff_t; .fi .SH DESCRIPTION @@ -51,7 +51,7 @@ is used to compile a regular expression into a form that is suitable for subsequent .BR regexec () searches. -.PP +.P On success, the pattern buffer at .I *preg is initialized. @@ -59,7 +59,7 @@ is initialized. is a null-terminated string. The locale must be the same when running .BR regexec (). -.PP +.P After .BR regcomp () succeeds, @@ -74,7 +74,7 @@ passed as to .BR regexec () is sufficient to capture all matches. -.PP +.P .I cflags is the bitwise OR @@ -205,12 +205,12 @@ unused elements of .I pmatch are filled with .BR \-1 s. -.PP +.P Each returned valid .RB (non- \-1 ) match corresponds to the range .RI [ "string + rm_so" , " string + rm_eo" ). -.PP +.P .I regoff_t is a signed integer type capable of storing the largest value that can be stored in either an @@ -225,14 +225,14 @@ is used to turn the error codes that can be returned by both and .BR regexec () into error message strings. -.PP +.P If .I preg isn't a null pointer, .I errcode must be the latest error returned from an operation on .IR preg . -.PP +.P If .I errbuf_size isn't 0, up to @@ -251,12 +251,12 @@ must have been initialized via .SH RETURN VALUE .BR regcomp () returns zero for a successful compilation or an error code for failure. -.PP +.P .BR regexec () returns zero for a successful match or .B REG_NOMATCH for failure. -.PP +.P .BR regerror () returns the size of the buffer required to hold the string. .SH ERRORS @@ -333,12 +333,11 @@ T{ .BR regfree () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Prior to POSIX.1-2008, .I regoff_t was required to be @@ -353,7 +352,7 @@ is only required to be initialized if .B REG_NOSUB wasn't specified, but all known implementations initialize it regardless. .\" glibc, musl, 4.4BSD, illumos -.PP +.P Both .I regex_t and @@ -407,6 +406,6 @@ int main(void) .SH SEE ALSO .BR grep (1), .BR regex (7) -.PP +.P The glibc manual section, .I "Regular Expressions" diff --git a/man3/remainder.3 b/man3/remainder.3 index df97879..774b355 100644 --- a/man3/remainder.3 +++ b/man3/remainder.3 @@ -15,7 +15,7 @@ .\" (walter.harms@informatik.uni-oldenburg.de) .\" Modified 2003-11-18, 2004-10-05 aeb .\" -.TH remainder 3 2023-07-20 "Linux man-pages 6.05.01" +.TH remainder 3 2023-10-31 "Linux man-pages 6.7" .SH NAME drem, dremf, dreml, remainder, remainderf, remainderl \- \ floating-point remainder function @@ -25,22 +25,22 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double remainder(double " x ", double " y ); .BI "float remainderf(float " x ", float " y ); .BI "long double remainderl(long double " x ", long double " y ); -.PP +.P /* Obsolete synonyms */ .BI "[[deprecated]] double drem(double " x ", double " y ); .BI "[[deprecated]] float dremf(float " x ", float " y ); .BI "[[deprecated]] long double dreml(long double " x ", long double " y ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR remainder (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -49,7 +49,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR remainderf (), .BR remainderl (): .nf @@ -57,7 +57,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR drem (), .BR dremf (), .BR dreml (): @@ -83,10 +83,10 @@ If the absolute value of is 0.5, .I n is chosen to be even. -.PP +.P These functions are unaffected by the current rounding mode (see .BR fenv (3)). -.PP +.P The .BR drem () function does precisely the same thing. @@ -96,13 +96,13 @@ functions return the floating-point remainder, \fIx\fP\-\fIn\fP*\fIy\fP. If the return value is 0, it has the sign of .IR x . -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If .I x is an infinity, @@ -111,7 +111,7 @@ and is not a NaN, a domain error occurs, and a NaN is returned. -.PP +.P If .I y is zero, @@ -127,7 +127,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity and \fIy\fP is not a NaN @@ -169,7 +169,6 @@ T{ .BR remainderl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .\" IEC 60559. .TP @@ -207,16 +206,16 @@ Tru64, glibc2. Before glibc 2.15, .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779 the call -.PP +.P .in +4n .EX remainder(nan(""), 0); .EE .in -.PP +.P returned a NaN, as expected, but wrongly caused a domain error. Since glibc 2.15, a silent NaN (i.e., no domain error) is returned. -.PP +.P Before glibc 2.15, .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6783 .I errno diff --git a/man3/remove.3 b/man3/remove.3 index d814d71..48ca0a6 100644 --- a/man3/remove.3 +++ b/man3/remove.3 @@ -9,7 +9,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH remove 3 2023-07-20 "Linux man-pages 6.05.01" +.TH remove 3 2023-10-31 "Linux man-pages 6.7" .SH NAME remove \- remove a file or directory .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int remove(const char *" pathname ); .fi .SH DESCRIPTION @@ -29,18 +29,18 @@ It calls for files, and .BR rmdir (2) for directories. -.PP +.P If the removed name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse. -.PP +.P If the name was the last link to a file, but any processes still have the file open, the file will remain in existence until the last file descriptor referring to it is closed. -.PP +.P If the name referred to a symbolic link, the link is removed. -.PP +.P If the name referred to a socket, FIFO, or device, the name is removed, but processes which have the object open may continue to use it. .SH RETURN VALUE @@ -67,7 +67,6 @@ T{ .BR remove () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/remquo.3 b/man3/remquo.3 index 4fd76ea..8dcfec0 100644 --- a/man3/remquo.3 +++ b/man3/remquo.3 @@ -8,7 +8,7 @@ .\" based on glibc infopages .\" polished, aeb .\" -.TH remquo 3 2023-07-20 "Linux man-pages 6.05.01" +.TH remquo 3 2023-10-31 "Linux man-pages 6.7" .SH NAME remquo, remquof, remquol \- remainder and part of quotient .SH LIBRARY @@ -17,17 +17,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double remquo(double " x ", double " y ", int *" quo ); .BI "float remquof(float " x ", float " y ", int *" quo ); .BI "long double remquol(long double " x ", long double " y ", int *" quo ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR remquo (), .BR remquof (), .BR remquol (): @@ -44,17 +44,17 @@ A few bits of the quotient are stored via the .I quo pointer. The remainder is returned as the function result. -.PP +.P The value of the remainder is the same as that computed by the .BR remainder (3) function. -.PP +.P The value stored via the .I quo pointer has the sign of .I x\~/\~y and agrees with the quotient in at least the low order 3 bits. -.PP +.P For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2. Note that the actual quotient might not fit in an integer. .\" A possible application of this function might be the computation @@ -66,13 +66,13 @@ Note that the actual quotient might not fit in an integer. On success, these functions return the same value as the analogous functions described in .BR remainder (3). -.PP +.P If .I x or .I y is a NaN, a NaN is returned. -.PP +.P If .I x is an infinity, @@ -81,7 +81,7 @@ and is not a NaN, a domain error occurs, and a NaN is returned. -.PP +.P If .I y is zero, @@ -95,7 +95,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \ @@ -106,7 +106,7 @@ and the other argument is not a NaN An invalid floating-point exception .RB ( FE_INVALID ) is raised. -.PP +.P These functions do not set .IR errno . .\" FIXME . Is it intentional that these functions do not set errno? @@ -127,7 +127,6 @@ T{ .BR remquol () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/resolver.3 b/man3/resolver.3 index 416951f..f44c51b 100644 --- a/man3/resolver.3 +++ b/man3/resolver.3 @@ -11,7 +11,7 @@ .\" Modified 1993-07-25 by Rik Faith (faith@cs.unc.edu) .\" Modified 2004-10-31 by aeb .\" -.TH resolver 3 2023-07-20 "Linux man-pages 6.05.01" +.TH resolver 3 2023-10-31 "Linux man-pages 6.7" .SH NAME res_ninit, res_nquery, res_nsearch, res_nquerydomain, res_nmkquery, res_nsend, res_nclose, @@ -26,71 +26,71 @@ Resolver library .B #include <netinet/in.h> .B #include <arpa/nameser.h> .B #include <resolv.h> -.PP +.P .B struct __res_state; .B typedef struct __res_state *res_state; -.PP +.P .BI "int res_ninit(res_state " statep ); -.PP +.P .BI "void res_nclose(res_state " statep ); -.PP +.P .BI "int res_nquery(res_state " statep , .BI " const char *" dname ", int " class ", int " type , .BI " unsigned char " answer [. anslen "], int " anslen ); -.PP +.P .BI "int res_nsearch(res_state " statep , .BI " const char *" dname ", int " class ", int " type , .BI " unsigned char " answer [. anslen "], int " anslen ); -.PP +.P .BI "int res_nquerydomain(res_state " statep , .BI " const char *" name ", const char *" domain , .BI " int " class ", int " type ", unsigned char " answer [. anslen ], .BI " int " anslen ); -.PP +.P .BI "int res_nmkquery(res_state " statep , .BI " int " op ", const char *" dname ", int " class , .BI " int " type ", const unsigned char " data [. datalen "], \ int " datalen , .BI " const unsigned char *" newrr , .BI " unsigned char " buf [. buflen "], int " buflen ); -.PP +.P .BI "int res_nsend(res_state " statep , .BI " const unsigned char " msg [. msglen "], int " msglen , .BI " unsigned char " answer [. anslen "], int " anslen ); -.PP +.P .BI "int dn_comp(const char *" exp_dn ", unsigned char " comp_dn [. length ], .BI " int " length ", unsigned char **" dnptrs , .BI " unsigned char **" lastdnptr ); -.PP +.P .BI "int dn_expand(const unsigned char *" msg , .BI " const unsigned char *" eomorig , .BI " const unsigned char *" comp_dn ", char " exp_dn [. length ], .BI " int " length ); -.PP +.P .B [[deprecated]] extern struct __res_state _res; -.PP +.P .B [[deprecated]] int res_init(void); -.PP +.P .B [[deprecated]] .BI "int res_query(const char *" dname ", int " class ", int " type , .BI " unsigned char " answer [. anslen "], int " anslen ); -.PP +.P .B [[deprecated]] .BI "int res_search(const char *" dname ", int " class ", int " type , .BI " unsigned char " answer [. anslen "], int " anslen ); -.PP +.P .B [[deprecated]] .BI "int res_querydomain(const char *" name ", const char *" domain , .BI " int " class ", int " type ", unsigned char " answer [. anslen ], .BI " int " anslen ); -.PP +.P .B [[deprecated]] .BI "int res_mkquery(int " op ", const char *" dname ", int " class , .BI " int " type ", const unsigned char " data [. datalen "], \ int " datalen , .BI " const unsigned char *" newrr , .BI " unsigned char " buf [. buflen "], int " buflen ); -.PP +.P .B [[deprecated]] .BI "int res_send(const unsigned char " msg [. msglen "], int " msglen , .BI " unsigned char " answer [. anslen "], int " anslen ); @@ -99,10 +99,10 @@ int " datalen , .B Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date. -.PP +.P The functions described below make queries to and interpret the responses from Internet domain name servers. -.PP +.P The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as @@ -118,7 +118,7 @@ BIND 8.2 introduced a set of new interfaces and so on, which take a .I res_state as their first argument, so you can use a per-thread resolver state. -.PP +.P The .BR res_ninit () and @@ -144,7 +144,7 @@ to free memory allocated by .BR res_ninit () and subsequent calls to .BR res_nquery (). -.PP +.P The .BR res_nquery () and @@ -154,7 +154,7 @@ fully qualified domain name \fIname\fP of specified \fItype\fP and \fIclass\fP. The reply is left in the buffer \fIanswer\fP of length \fIanslen\fP supplied by the caller. -.PP +.P The .BR res_nsearch () and @@ -170,7 +170,7 @@ and .B RES_DNSRCH (see description of \fI_res\fP options below). -.PP +.P The .BR res_nquerydomain () and @@ -178,10 +178,10 @@ and functions make a query using .BR res_nquery ()/ res_query () on the concatenation of \fIname\fP and \fIdomain\fP. -.PP +.P The following functions are lower-level routines used by .BR res_nquery ()/ res_query (). -.PP +.P The .BR res_nmkquery () and @@ -203,9 +203,9 @@ since it has not been supported by DNS servers for a very long time. .TP .B NS_NOTIFY_OP Notify secondary of SOA (Start of Authority) change. -.PP +.P \fInewrr\fP is currently unused. -.PP +.P The .BR res_nsend () and @@ -216,7 +216,7 @@ which is of length \fIanslen\fP. They will call .BR res_ninit ()/ res_init () if it has not already been called. -.PP +.P The .BR dn_comp () function compresses the domain name \fIexp_dn\fP @@ -229,7 +229,7 @@ The limit of the array is specified by \fIlastdnptr\fP. If \fIdnptr\fP is NULL, domain names are not compressed. If \fIlastdnptr\fP is NULL, the list of labels is not updated. -.PP +.P The .BR dn_expand () function expands the compressed domain name @@ -238,7 +238,7 @@ function expands the compressed domain name The compressed name is contained in a query or reply message, and \fImsg\fP points to the beginning of the message. -.PP +.P The resolver routines use configuration and state information contained in a .I __res_state @@ -427,7 +427,7 @@ and .BR res_init () functions return 0 on success, or \-1 if an error occurs. -.PP +.P The .BR res_nquery (), .BR res_query (), @@ -442,14 +442,14 @@ and .BR res_send () functions return the length of the response, or \-1 if an error occurs. -.PP +.P The .BR dn_comp () and .BR dn_expand () functions return the length of the compressed name, or \-1 if an error occurs. -.PP +.P In the case of an error return from .BR res_nquery (), .BR res_query (), @@ -496,7 +496,6 @@ T{ .BR dn_expand () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -507,6 +506,6 @@ None. .BR resolver (5), .BR hostname (7), .BR named (8) -.PP +.P The GNU C library source file .IR resolv/README . diff --git a/man3/rewinddir.3 b/man3/rewinddir.3 index 61221ba..fbc8b1a 100644 --- a/man3/rewinddir.3 +++ b/man3/rewinddir.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 18:29:11 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) -.TH rewinddir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rewinddir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rewinddir \- reset directory stream .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .nf .B #include <sys/types.h> .B #include <dirent.h> -.PP +.P .BI "void rewinddir(DIR *" dirp ); .fi .SH DESCRIPTION @@ -47,7 +47,6 @@ T{ .BR rewinddir () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/rexec.3 b/man3/rexec.3 index 7f94d27..ca680d3 100644 --- a/man3/rexec.3 +++ b/man3/rexec.3 @@ -11,7 +11,7 @@ .\" .\" 2013-06-21, mtk, Converted from mdoc to man macros .\" -.TH rexec 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rexec 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rexec, rexec_af \- return stream to a remote command .SH LIBRARY @@ -20,19 +20,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .B [[deprecated]] .BI "int rexec(char **restrict " ahost ", int " inport , .BI " const char *restrict " user ", const char *restrict " passwd , .BI " const char *restrict " cmd ", int *restrict " fd2p ); -.PP +.P .B [[deprecated]] .BI "int rexec_af(char **restrict " ahost ", int " inport , .BI " const char *restrict " user ", const char *restrict " passwd , .BI " const char *restrict " cmd ", int *restrict " fd2p , .BI " sa_family_t " af ); .fi -.PP +.P .BR rexec (), .BR rexec_af (): .nf @@ -44,7 +44,7 @@ Standard C library .SH DESCRIPTION This interface is obsoleted by .BR rcmd (3). -.PP +.P The .BR rexec () function @@ -63,7 +63,7 @@ the environment and then the file in user's home directory are searched for appropriate information. If all this fails, the user is prompted for the information. -.PP +.P The port .I inport specifies which well-known DARPA Internet port to use for @@ -74,7 +74,7 @@ the connection; the call will return a pointer to a structure that contains the necessary port. The protocol for connection is described in detail in .BR rexecd (8). -.PP +.P If the connection succeeds, a socket in the Internet domain of type .B SOCK_STREAM @@ -138,7 +138,6 @@ T{ .BR rexec_af () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -152,7 +151,7 @@ glibc 2.2. The .BR rexec () function sends the unencrypted password across the network. -.PP +.P The underlying service is considered a big security hole and therefore not enabled on many sites; see .BR rexecd (8) diff --git a/man3/rint.3 b/man3/rint.3 index 945f48b..812d6ae 100644 --- a/man3/rint.3 +++ b/man3/rint.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH rint 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rint 3 2023-10-31 "Linux man-pages 6.7" .SH NAME nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl \- round to nearest integer @@ -15,28 +15,28 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double nearbyint(double " x ); .BI "float nearbyintf(float " x ); .BI "long double nearbyintl(long double " x ); -.PP +.P .BI "double rint(double " x ); .BI "float rintf(float " x ); .BI "long double rintl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR nearbyint (), .BR nearbyintf (), .BR nearbyintl (): .nf _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE .fi -.PP +.P .BR rint (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -45,7 +45,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR rintf (), .BR rintl (): .nf @@ -68,7 +68,7 @@ exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754. -.PP +.P The .BR rint (), .BR rintf (), @@ -83,7 +83,7 @@ checkable via when the result differs in value from the argument. .SH RETURN VALUE These functions return the rounded integer value. -.PP +.P If .I x is integral, +0, \-0, NaN, or infinite, @@ -111,7 +111,6 @@ T{ .BR rintl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -133,7 +132,7 @@ the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).) -.PP +.P If you want to store the rounded value in an integer type, you probably want to use one of the functions described in .BR lrint (3) diff --git a/man3/round.3 b/man3/round.3 index 591875f..4e27fd6 100644 --- a/man3/round.3 +++ b/man3/round.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH round 3 2023-07-20 "Linux man-pages 6.05.01" +.TH round 3 2023-10-31 "Linux man-pages 6.7" .SH NAME round, roundf, roundl \- round to nearest integer, away from zero .SH LIBRARY @@ -14,17 +14,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double round(double " x ); .BI "float roundf(float " x ); .BI "long double roundl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR round (), .BR roundf (), .BR roundl (): @@ -40,7 +40,7 @@ direction, see .BR fenv (3)), instead of to the nearest even integer like .BR rint (3). -.PP +.P For example, .I round(0.5) is 1.0, and @@ -48,7 +48,7 @@ is 1.0, and is \-1.0. .SH RETURN VALUE These functions return the rounded integer value. -.PP +.P If .I x is integral, +0, \-0, NaN, or infinite, @@ -73,7 +73,6 @@ T{ .BR roundl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -97,7 +96,7 @@ the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).) -.PP +.P If you want to store the rounded value in an integer type, you probably want to use one of the functions described in .BR lround (3) diff --git a/man3/roundup.3 b/man3/roundup.3 index d21949e..bcde64a 100644 --- a/man3/roundup.3 +++ b/man3/roundup.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH roundup 3 2023-03-30 "Linux man-pages 6.05.01" +.TH roundup 3 2023-10-31 "Linux man-pages 6.7" .SH NAME roundup \- round up in steps .SH LIBRARY @@ -11,7 +11,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/param.h> -.PP +.P .BI roundup( x ", " step ); .fi .SH DESCRIPTION @@ -21,11 +21,11 @@ to the nearest multiple of .I step that is not less than .IR x . -.PP +.P It is typically used for rounding up a pointer to align it or increasing a buffer to be allocated. -.PP +.P This API is not designed to be generic, and doesn't work in some cases that are not important for the typical use cases described above. @@ -36,13 +36,13 @@ This macro returns the rounded value. None. .SH CAVEATS The arguments may be evaluated more than once. -.PP +.P .I x should be nonnegative, and .I step should be positive. -.PP +.P If .I x + step would overflow or wrap around, @@ -9,7 +9,7 @@ .\" .\" 2007-12-30, mtk, Convert function prototypes to modern C syntax .\" -.TH rpc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rpc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rpc \- library routines for remote procedure calls .SH LIBRARY @@ -22,28 +22,28 @@ First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client. -.\" .LP +.\" .P .\" We don't have an rpc_secure.3 page at the moment -- MTK, 19 Sep 05 .\" Routines that are used for Secure RPC (DES authentication) are described in .\" .BR rpc_secure (3). .\" Secure RPC can be used only if DES encryption is available. -.PP +.P To take use of these routines, include the header file .IR "<rpc/rpc.h>" . -.PP +.P The prototypes below make use of the following types: -.PP +.P .RS 4 .EX .BI "typedef int " bool_t ; -.PP +.P .BI "typedef bool_t (*" xdrproc_t ")(XDR *, void *, ...);" -.PP +.P .BI "typedef bool_t (*" resultproc_t ")(caddr_t " resp , .BI " struct sockaddr_in *" raddr ); .EE .RE -.PP +.P See the header files for the declarations of the .IR AUTH , .IR CLIENT , @@ -51,7 +51,7 @@ See the header files for the declarations of the and .I XDR types. -.PP +.P .nf .BI "void auth_destroy(AUTH *" auth ); .fi @@ -63,7 +63,7 @@ The use of .I auth is undefined after calling .BR auth_destroy (). -.PP +.P .nf .B AUTH *authnone_create(void); .fi @@ -72,7 +72,7 @@ Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC. -.PP +.P .nf .BI "AUTH *authunix_create(char *" host ", uid_t " uid ", gid_t " gid , .BI " int " len ", gid_t " aup_gids [. len ]); @@ -92,7 +92,7 @@ and .I aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user. -.PP +.P .nf .B AUTH *authunix_create_default(void); .fi @@ -100,7 +100,7 @@ It is easy to impersonate a user. Calls .BR authunix_create () with the appropriate parameters. -.PP +.P .nf .BI "int callrpc(char *" host ", unsigned long " prognum , .BI " unsigned long " versnum ", unsigned long " procnum , @@ -136,7 +136,7 @@ uses UDP/IP as a transport; see .BR clntudp_create () for restrictions. You do not have control of timeouts or authentication using this routine. -.PP +.P .nf .BI "enum clnt_stat clnt_broadcast(unsigned long " prognum , .BI " unsigned long " versnum ", unsigned long " procnum , @@ -177,7 +177,7 @@ waits for more replies; otherwise it returns with appropriate status. Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes. -.PP +.P .nf .BI "enum clnt_stat clnt_call(CLIENT *" clnt ", unsigned long " procnum , .BI " xdrproc_t " inproc ", char *" in , @@ -202,7 +202,7 @@ is used to encode the procedure's parameters, and is used to decode the procedure's results; .I tout is the time allowed for results to come back. -.PP +.P .nf .BI "clnt_destroy(CLIENT *" clnt ); .fi @@ -218,7 +218,7 @@ is undefined after calling .BR clnt_destroy (). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open. -.PP +.P .nf .BI "CLIENT *clnt_create(const char *" host ", unsigned long " prog , .BI " unsigned long " vers ", const char *" proto ); @@ -238,7 +238,7 @@ Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results. -.PP +.P .nf .BI "bool_t clnt_control(CLIENT *" cl ", int " req ", char *" info ); .fi @@ -285,7 +285,7 @@ The following operations are valid for UDP only: The retry timeout is the time that "UDP RPC" waits for the server to reply before retransmitting the request. -.PP +.P .nf .BI "clnt_freeres(CLIENT * " clnt ", xdrproc_t " outproc ", char *" out ); .fi @@ -299,7 +299,7 @@ is the address of the results, and is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise. -.PP +.P .nf .BI "void clnt_geterr(CLIENT *" clnt ", struct rpc_err *" errp ); .fi @@ -307,7 +307,7 @@ and zero otherwise. A macro that copies the error structure out of the client handle to the structure at address .IR errp . -.PP +.P .nf .BI "void clnt_pcreateerror(const char *" s ); .fi @@ -324,7 +324,7 @@ Used when a or .BR clntudp_create () call fails. -.PP +.P .nf .BI "void clnt_perrno(enum clnt_stat " stat ); .fi @@ -334,7 +334,7 @@ to the condition indicated by .IR stat . Used after .BR callrpc (). -.PP +.P .nf .BI "clnt_perror(CLIENT *" clnt ", const char *" s ); .fi @@ -347,7 +347,7 @@ The message is prepended with string and a colon. Used after .BR clnt_call (). -.PP +.P .nf .BI "char *clnt_spcreateerror(const char *" s ); .fi @@ -357,7 +357,7 @@ Like except that it returns a string instead of printing to the standard error. .IP Bugs: returns pointer to static data that is overwritten on each call. -.PP +.P .nf .BI "char *clnt_sperrno(enum clnt_stat " stat ); .fi @@ -385,7 +385,7 @@ and .BR clnt_sperrno () returns pointer to static data, but the result will not get overwritten on each call. -.PP +.P .nf .BI "char *clnt_sperror(CLIENT *" rpch ", const char *" s ); .fi @@ -397,7 +397,7 @@ except that (like it returns a string instead of printing to standard error. .IP Bugs: returns pointer to static data that is overwritten on each call. -.PP +.P .nf .BI "CLIENT *clntraw_create(unsigned long " prognum \ ", unsigned long " versnum ); @@ -414,7 +414,7 @@ corresponding RPC server should live in the same address space; see This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails. -.PP +.P .nf .BI "CLIENT *clnttcp_create(struct sockaddr_in *" addr , .BI " unsigned long " prognum ", unsigned long " versnum , @@ -450,7 +450,7 @@ and .IR recvsz ; values of zero choose suitable defaults. This routine returns NULL if it fails. -.PP +.P .nf .BI "CLIENT *clntudp_create(struct sockaddr_in *" addr , .BI " unsigned long " prognum ", unsigned long " versnum , @@ -485,7 +485,7 @@ The total time for the call to time out is specified by Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results. -.PP +.P .nf .BI "CLIENT *clntudp_bufcreate(struct sockaddr_in *" addr , .BI " unsigned long " prognum ", unsigned long " versnum , @@ -520,7 +520,7 @@ The total time for the call to time out is specified by .IP This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages. -.PP +.P .nf .BI "void get_myaddress(struct sockaddr_in *" addr ); .fi @@ -531,7 +531,7 @@ without consulting the library routines that deal with .IR /etc/hosts . The port number is always set to .BR htons(PMAPPORT) . -.PP +.P .nf .BI "struct pmaplist *pmap_getmaps(struct sockaddr_in *" addr ); .fi @@ -545,7 +545,7 @@ This routine can return NULL. The command .I rpcinfo\~\-p uses this routine. -.PP +.P .nf .BI "unsigned short pmap_getport(struct sockaddr_in *" addr , .BI " unsigned long " prognum ", unsigned long " versnum , @@ -574,7 +574,7 @@ service. In the latter case, the global variable .I rpc_createerr contains the RPC status. -.PP +.P .nf .BI "enum clnt_stat pmap_rmtcall(struct sockaddr_in *" addr , .BI " unsigned long " prognum ", unsigned long " versnum , @@ -602,7 +602,7 @@ and This procedure should be used for a \[lq]ping\[rq] and nothing else. See also .BR clnt_broadcast (). -.PP +.P .nf .BI "bool_t pmap_set(unsigned long " prognum ", unsigned long " versnum , .BI " int " protocol ", unsigned short " port ); @@ -626,7 +626,7 @@ or This routine returns one if it succeeds, zero otherwise. Automatically done by .BR svc_register (). -.PP +.P .nf .BI "bool_t pmap_unset(unsigned long " prognum ", unsigned long " versnum ); .fi @@ -641,7 +641,7 @@ on the machine's .B portmap service. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "int registerrpc(unsigned long " prognum ", unsigned long " versnum , .BI " unsigned long " procnum ", char *(*" procname ")(char *)," @@ -671,7 +671,7 @@ Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see .BR svcudp_create () for restrictions. -.PP +.P .nf .BI "struct rpc_createerr " rpc_createerr ; .fi @@ -681,7 +681,7 @@ that does not succeed. Use the routine .BR clnt_pcreateerror () to print the reason why. -.PP +.P .nf .BI "void svc_destroy(SVCXPRT *" xprt ); .fi @@ -695,7 +695,7 @@ itself. Use of .I xprt is undefined after calling this routine. -.PP +.P .nf .BI "fd_set " svc_fdset ; .fi @@ -712,7 +712,7 @@ This variable is read-only (do not pass its address to yet it may change after calls to .BR svc_getreqset () or any creation routines. -.PP +.P .nf .BI "int " svc_fds ; .fi @@ -722,7 +722,7 @@ Similar to but limited to 32 file descriptors. This interface is obsoleted by .BR svc_fdset . -.PP +.P .nf .BI "svc_freeargs(SVCXPRT *" xprt ", xdrproc_t " inproc ", char *" in ); .fi @@ -732,7 +732,7 @@ system when it decoded the arguments to a service procedure using .BR svc_getargs (). This routine returns 1 if the results were successfully freed, and zero otherwise. -.PP +.P .nf .BI "svc_getargs(SVCXPRT *" xprt ", xdrproc_t " inproc ", char *" in ); .fi @@ -746,7 +746,7 @@ is the address where the arguments will be placed; .I inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise. -.PP +.P .nf .BI "struct sockaddr_in *svc_getcaller(SVCXPRT *" xprt ); .fi @@ -754,7 +754,7 @@ This routine returns one if decoding succeeds, and zero otherwise. The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, .IR xprt . -.PP +.P .nf .BI "void svc_getreqset(fd_set *" rdfds ); .fi @@ -771,7 +771,7 @@ is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of .I rdfds have been serviced. -.PP +.P .nf .BI "void svc_getreq(int " rdfds ); .fi @@ -781,7 +781,7 @@ Similar to but limited to 32 file descriptors. This interface is obsoleted by .BR svc_getreqset (). -.PP +.P .nf .BI "bool_t svc_register(SVCXPRT *" xprt ", unsigned long " prognum , .BI " unsigned long " versnum , @@ -827,7 +827,7 @@ dispatch(struct svc_req *request, SVCXPRT *xprt); The .BR svc_register () routine returns one if it succeeds, and zero otherwise. -.PP +.P .nf .B "void svc_run(void);" .fi @@ -840,7 +840,7 @@ when one arrives. This procedure is usually waiting for a .BR select (2) system call to return. -.PP +.P .nf .BI "bool_t svc_sendreply(SVCXPRT *" xprt ", xdrproc_t " outproc \ ", char *" out ); @@ -856,7 +856,7 @@ is the XDR routine which is used to encode the results; and .I out is the address of the results. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "void svc_unregister(unsigned long " prognum ", unsigned long " versnum ); .fi @@ -866,14 +866,14 @@ Remove all mapping of the double to dispatch routines, and of the triple .RI [ prognum , versnum , * ] to port number. -.PP +.P .nf .BI "void svcerr_auth(SVCXPRT *" xprt ", enum auth_stat " why ); .fi .IP Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error. -.PP +.P .nf .BI "void svcerr_decode(SVCXPRT *" xprt ); .fi @@ -882,21 +882,21 @@ Called by a service dispatch routine that cannot successfully decode its parameters. See also .BR svc_getargs (). -.PP +.P .nf .BI "void svcerr_noproc(SVCXPRT *" xprt ); .fi .IP Called by a service dispatch routine that does not implement the procedure number that the caller requests. -.PP +.P .nf .BI "void svcerr_noprog(SVCXPRT *" xprt ); .fi .IP Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine. -.PP +.P .nf .BI "void svcerr_progvers(SVCXPRT *" xprt ", unsigned long " low_vers , .BI " unsigned long " high_vers ); @@ -905,7 +905,7 @@ Service implementors usually do not need this routine. Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine. -.PP +.P .nf .BI "void svcerr_systemerr(SVCXPRT *" xprt ); .fi @@ -914,7 +914,7 @@ Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine. -.PP +.P .nf .BI "void svcerr_weakauth(SVCXPRT *" xprt ); .fi @@ -923,7 +923,7 @@ Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls .BR "svcerr_auth(xprt, AUTH_TOOWEAK)" . -.PP +.P .nf .BI "SVCXPRT *svcfd_create(int " fd ", unsigned int " sendsize , .BI " unsigned int " recvsize ); @@ -937,7 +937,7 @@ and .I recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen. -.PP +.P .nf .B SVCXPRT *svcraw_create(void); .fi @@ -950,7 +950,7 @@ so the corresponding RPC client should live in the same address space; see This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails. -.PP +.P .nf .BI "SVCXPRT *svctcp_create(int " sock ", unsigned int " send_buf_size , .BI " unsigned int " recv_buf_size ); @@ -974,7 +974,7 @@ This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults. -.PP +.P .nf .BI "SVCXPRT *svcudp_bufcreate(int " sock ", unsigned int " sendsize , .BI " unsigned int " recosize ); @@ -998,7 +998,7 @@ This routine returns NULL if it fails. .IP This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages. -.PP +.P .nf .BI "SVCXPRT *svcudp_create(int " sock ); .fi @@ -1007,7 +1007,7 @@ This call is equivalent to .I svcudp_bufcreate(sock,SZ,SZ) for some default size .IR SZ . -.PP +.P .nf .BI "bool_t xdr_accepted_reply(XDR *" xdrs ", struct accepted_reply *" ar ); .fi @@ -1015,7 +1015,7 @@ for some default size Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. -.PP +.P .nf .BI "bool_t xdr_authunix_parms(XDR *" xdrs ", struct authunix_parms *" aupp ); .fi @@ -1024,7 +1024,7 @@ Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package. -.PP +.P .nf .BI "void xdr_callhdr(XDR *" xdrs ", struct rpc_msg *" chdr ); .fi @@ -1032,7 +1032,7 @@ authentication package. Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. -.PP +.P .nf .BI "bool_t xdr_callmsg(XDR *" xdrs ", struct rpc_msg *" cmsg ); .fi @@ -1040,7 +1040,7 @@ RPC-style messages without using the RPC package. Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. -.PP +.P .nf .BI "bool_t xdr_opaque_auth(XDR *" xdrs ", struct opaque_auth *" ap ); .fi @@ -1048,7 +1048,7 @@ messages without using the RPC package. Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. -.PP +.P .nf .BI "bool_t xdr_pmap(XDR *" xdrs ", struct pmap *" regs ); .fi @@ -1060,7 +1060,7 @@ This routine is useful for users who wish to generate these parameters without using the .B pmap interface. -.PP +.P .nf .BI "bool_t xdr_pmaplist(XDR *" xdrs ", struct pmaplist **" rp ); .fi @@ -1070,7 +1070,7 @@ This routine is useful for users who wish to generate these parameters without using the .B pmap interface. -.PP +.P .nf .BI "bool_t xdr_rejected_reply(XDR *" xdrs ", struct rejected_reply *" rr ); .fi @@ -1078,7 +1078,7 @@ interface. Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. -.PP +.P .nf .BI "bool_t xdr_replymsg(XDR *" xdrs ", struct rpc_msg *" rmsg ); .fi @@ -1086,7 +1086,7 @@ RPC-style messages without using the RPC package. Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package. -.PP +.P .nf .BI "void xprt_register(SVCXPRT *" xprt ); .fi @@ -1096,7 +1096,7 @@ they should register themselves with the RPC service package. This routine modifies the global variable .IR svc_fds . Service implementors usually do not need this routine. -.PP +.P .nf .BI "void xprt_unregister(SVCXPRT *" xprt ); .fi @@ -1181,12 +1181,11 @@ T{ .BR xprt_unregister () T} Thread safety MT-Safe .TE -.sp 1 .SH SEE ALSO .\" We don't have an rpc_secure.3 page in the set at the moment -- MTK, 19 Sep 05 .\" .BR rpc_secure (3), .BR xdr (3) -.PP +.P The following manuals: .RS Remote Procedure Calls: Protocol Specification @@ -1196,7 +1195,7 @@ Remote Procedure Call Programming Guide rpcgen Programming Guide .br .RE -.PP +.P .IR "RPC: Remote Procedure Call Protocol Specification" , RFC\ 1050, Sun Microsystems, Inc., USC-ISI. diff --git a/man3/rpmatch.3 b/man3/rpmatch.3 index ac3fa09..dac2474 100644 --- a/man3/rpmatch.3 +++ b/man3/rpmatch.3 @@ -27,7 +27,7 @@ .\" .\" 2006-05-19, mtk, various edits and example program .\" -.TH rpmatch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rpmatch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rpmatch \- determine if the answer to a question is affirmative or negative .SH LIBRARY @@ -36,15 +36,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int rpmatch(const char *" response ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR rpmatch (): .nf Since glibc 2.19: @@ -56,14 +56,14 @@ Feature Test Macro Requirements for glibc (see .BR rpmatch () handles a user response to yes or no questions, with support for internationalization. -.PP +.P .I response should be a null-terminated string containing a user-supplied response, perhaps obtained with .BR fgets (3) or .BR getline (3). -.PP +.P The user's language preference is taken into account per the environment variables .BR LANG , @@ -73,7 +73,7 @@ and if the program has called .BR setlocale (3) to effect their changes. -.PP +.P Regardless of the locale, responses matching .B \[ha][Yy] are always accepted as affirmative, and those matching @@ -92,7 +92,7 @@ is unrecognized. A return value of \-1 may indicate either an invalid input, or some other error. It is incorrect to only test if the return value is nonzero. -.PP +.P .BR rpmatch () can fail for any of the reasons that .BR regcomp (3) @@ -119,7 +119,6 @@ T{ .BR rpmatch () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -139,7 +138,7 @@ being the proper way to distinguish between binary answers. The following program displays the results when .BR rpmatch () is applied to the string given in the program's command-line argument. -.PP +.P .\" SRC BEGIN (rpmatch.c) .EX #define _DEFAULT_SOURCE diff --git a/man3/rtime.3 b/man3/rtime.3 index a866d0b..4d1a4a0 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -8,7 +8,7 @@ .\" .\" Slightly polished, aeb, 2003-04-06 .\" -.TH rtime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH rtime 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rtime \- get time from a remote machine .SH LIBRARY @@ -17,20 +17,20 @@ Standard C library .SH SYNOPSIS .nf .B "#include <rpc/auth_des.h>" -.PP +.P .BI "int rtime(struct sockaddr_in *" addrp ", struct rpc_timeval *" timep , .BI " struct rpc_timeval *" timeout ); .fi .SH DESCRIPTION This function uses the Time Server Protocol as described in RFC\ 868 to obtain the time from a remote machine. -.PP +.P The Time Server Protocol gives the time in seconds since 00:00:00 UTC, 1 Jan 1900, and this function subtracts the appropriate constant in order to convert the result to seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). -.PP +.P When .I timeout is non-NULL, the udp/time socket (port 37) is used. @@ -70,23 +70,22 @@ T{ .BR rtime () T} Thread safety MT-Safe .TE -.sp 1 .SH NOTES Only IPv4 is supported. -.PP +.P Some .I in.timed versions support only TCP. Try the example program with .I use_tcp set to 1. -.\" .PP +.\" .P .\" Libc5 uses the prototype -.\" .PP +.\" .P .\" .nf .\" int rtime(struct sockaddr_in *, struct timeval *, struct timeval *); .\" .fi -.\" .PP +.\" .P .\" and requires .\" .I <sys/time.h> .\" instead of @@ -100,11 +99,11 @@ You may check that the time entry within .I /etc/inetd.conf is not commented out. -.PP +.P The program connects to a computer called "linux". Using "localhost" does not work. The result is the localtime of the computer "linux". -.PP +.P .\" SRC BEGIN (rtime.c) .EX #include <errno.h> diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3 index 7033d4b..b0f9f43 100644 --- a/man3/rtnetlink.3 +++ b/man3/rtnetlink.3 @@ -4,7 +4,7 @@ .\" .\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $ .\" -.TH rtnetlink 3 2023-07-15 "Linux man-pages 6.05.01" +.TH rtnetlink 3 2023-10-31 "Linux man-pages 6.7" .SH NAME rtnetlink \- macros to manipulate rtnetlink messages .SH LIBRARY @@ -16,18 +16,18 @@ Standard C library .B #include <linux/netlink.h> .B #include <linux/rtnetlink.h> .B #include <sys/socket.h> -.PP +.P .BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type \ ", NETLINK_ROUTE);" -.PP +.P .BI "int RTA_OK(struct rtattr *" rta ", int " rtabuflen ); -.PP +.P .BI "void *RTA_DATA(struct rtattr *" rta ); .BI "unsigned int RTA_PAYLOAD(struct rtattr *" rta ); -.PP +.P .BI "struct rtattr *RTA_NEXT(struct rtattr *" rta \ ", unsigned int " rtabuflen ); -.PP +.P .BI "unsigned int RTA_LENGTH(unsigned int " length ); .BI "unsigned int RTA_SPACE(unsigned int "length ); .fi @@ -38,7 +38,7 @@ messages consist of a .BR netlink (7) message header and appended attributes. The attributes should be manipulated only using the macros provided here. -.PP +.P .BI RTA_OK( rta ", " attrlen ) returns true if .I rta @@ -49,13 +49,13 @@ When not true then you must assume there are no more attributes in the message, even if .I attrlen is nonzero. -.PP +.P .BI RTA_DATA( rta ) returns a pointer to the start of this attribute's data. -.PP +.P .BI RTA_PAYLOAD( rta ) returns the length of this attribute's data. -.PP +.P .BI RTA_NEXT( rta ", " attrlen ) gets the next attribute after .IR rta . @@ -64,12 +64,12 @@ Calling this macro will update You should use .B RTA_OK to check the validity of the returned pointer. -.PP +.P .BI RTA_LENGTH( len ) returns the length which is required for .I len bytes of data plus the header. -.PP +.P .BI RTA_SPACE( len ) returns the amount of space which will be needed in a message with .I len @@ -81,7 +81,7 @@ This manual page is incomplete. .SH EXAMPLES .\" FIXME . ? would be better to use libnetlink in the EXAMPLE code here Creating a rtnetlink message to set the MTU of a device: -.PP +.P .in +4n .EX #include <linux/rtnetlink.h> diff --git a/man3/scalb.3 b/man3/scalb.3 index 5513a27..f99fd2d 100644 --- a/man3/scalb.3 +++ b/man3/scalb.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH scalb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH scalb 3 2023-10-31 "Linux man-pages 6.7" .SH NAME scalb, scalbf, scalbl \- multiply floating-point number by integral power of radix (OBSOLETE) @@ -15,17 +15,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "[[deprecated]] double scalb(double " x ", double " exp ); .BI "[[deprecated]] float scalbf(float " x ", float " exp ); .BI "[[deprecated]] long double scalbl(long double " x ", long double " exp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR scalb (): .nf _XOPEN_SOURCE >= 500 @@ -33,7 +33,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR scalbf (), .BR scalbl (): .nf @@ -50,11 +50,11 @@ by to the power of .IR exp , that is: -.PP +.P .nf x * FLT_RADIX ** exp .fi -.PP +.P The definition of .B FLT_RADIX can be obtained by including @@ -67,13 +67,13 @@ On success, these functions return .B FLT_RADIX ** .IR exp . -.PP +.P If .I x or .I exp is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity (negative infinity), @@ -81,13 +81,13 @@ and .I exp is not negative infinity, positive infinity (negative infinity) is returned. -.PP +.P If .I x is +0 (\-0), and .I exp is not positive infinity, +0 (\-0) is returned. -.PP +.P If .I x is zero, and @@ -95,7 +95,7 @@ is zero, and is positive infinity, a domain error occurs, and a NaN is returned. -.PP +.P If .I x is an infinity, @@ -104,7 +104,7 @@ and is negative infinity, a domain error occurs, and a NaN is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -114,7 +114,7 @@ or .BR HUGE_VALL , respectively, with a sign the same as .IR x . -.PP +.P If the result underflows, a range error occurs, and the functions return zero, with a sign the same as @@ -124,7 +124,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \ @@ -168,7 +168,6 @@ T{ .BR scalbl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY diff --git a/man3/scalbln.3 b/man3/scalbln.3 index 0651456..beeeff4 100644 --- a/man3/scalbln.3 +++ b/man3/scalbln.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH scalbln 3 2023-07-20 "Linux man-pages 6.05.01" +.TH scalbln 3 2023-10-31 "Linux man-pages 6.7" .SH NAME scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl \- multiply floating-point number by integral power of radix @@ -15,21 +15,21 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double scalbln(double " x ", long " exp ); .BI "float scalblnf(float " x ", long " exp ); .BI "long double scalblnl(long double " x ", long " exp ); -.PP +.P .BI "double scalbn(double " x ", int " exp ); .BI "float scalbnf(float " x ", int " exp ); .BI "long double scalbnl(long double " x ", int " exp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR scalbln (), .BR scalblnf (), .BR scalblnl (): @@ -37,7 +37,7 @@ Feature Test Macro Requirements for glibc (see _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* Since glibc 2.19: */ _DEFAULT_SOURCE .fi -.PP +.P .BR scalbn (), .BR scalbnf (), .BR scalbnl (): @@ -55,11 +55,11 @@ by to the power of .IR exp , that is: -.PP +.P .nf x * FLT_RADIX ** exp .fi -.PP +.P The definition of .B FLT_RADIX can be obtained by including @@ -72,20 +72,20 @@ On success, these functions return .B FLT_RADIX ** .IR exp . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity (negative infinity), positive infinity (negative infinity) is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -95,7 +95,7 @@ or .BR HUGE_VALL , respectively, with a sign the same as .IR x . -.PP +.P If the result underflows, a range error occurs, and the functions return zero, with a sign the same as @@ -105,7 +105,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error, overflow @@ -142,7 +142,6 @@ T{ .BR scalblnl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/scandir.3 b/man3/scandir.3 index 1abda05..eeab256 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -21,7 +21,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH scandir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH scandir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME scandir, scandirat, alphasort, versionsort \- scan a directory for matching entries @@ -31,43 +31,43 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "int scandir(const char *restrict " dirp , .BI " struct dirent ***restrict " namelist , .BI " int (*" filter ")(const struct dirent *)," .BI " int (*" compar ")(const struct dirent **," .B " const struct dirent **));" -.PP +.P .BI "int alphasort(const struct dirent **" a ", const struct dirent **" b ); .BI "int versionsort(const struct dirent **" a ", const struct dirent **" b ); -.PP +.P .BR "#include <fcntl.h>" " /* Definition of AT_* constants */" .B #include <dirent.h> -.PP +.P .BI "int scandirat(int " dirfd ", const char *restrict " dirp , .BI " struct dirent ***restrict " namelist , .BI " int (*" filter ")(const struct dirent *)," .BI " int (*" compar ")(const struct dirent **," .B " const struct dirent **));" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR scandir (), .BR alphasort (): .nf /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR versionsort (): .nf _GNU_SOURCE .fi -.PP +.P .BR scandirat (): .nf _GNU_SOURCE @@ -87,7 +87,7 @@ function \fIcompar\fP(), and collected in array \fInamelist\fP which is allocated via .BR malloc (3). If \fIfilter\fP is NULL, all entries are selected. -.PP +.P The .BR alphasort () and @@ -105,7 +105,7 @@ The function operates in exactly the same way as .BR scandir (), except for the differences described here. -.PP +.P If the pathname given in .I dirp is relative, then it is interpreted relative to the directory @@ -115,7 +115,7 @@ referred to by the file descriptor the calling process, as is done by .BR scandir () for a relative pathname). -.PP +.P If .I dirp is relative and @@ -127,13 +127,13 @@ then is interpreted relative to the current working directory of the calling process (like .BR scandir ()). -.PP +.P If .I dirp is absolute, then .I dirfd is ignored. -.PP +.P See .BR openat (2) for an explanation of the need for @@ -146,7 +146,7 @@ selected. On error, \-1 is returned, with .I errno set to indicate the error. -.PP +.P The .BR alphasort () and @@ -201,7 +201,6 @@ T{ .BR versionsort () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS .TP .BR alphasort () @@ -225,7 +224,7 @@ glibc 2.1. .TP .BR scandirat () glibc 2.15. -.\" .LP +.\" .P .\" The functions .\" .BR scandir () .\" and @@ -246,7 +245,7 @@ calls .BR strcoll (3); earlier it used .BR strcmp (3). -.PP +.P Before glibc 2.10, the two arguments of .BR alphasort () and diff --git a/man3/scanf.3 b/man3/scanf.3 index 7934509..3ac97c0 100644 --- a/man3/scanf.3 +++ b/man3/scanf.3 @@ -2,7 +2,7 @@ .\" Copyright 2022 Alejandro Colomar <alx@kernel.org> .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH scanf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH scanf 3 2023-12-09 "Linux man-pages 6.7" .SH NAME scanf, fscanf, vscanf, vfscanf \- input FILE format conversion .SH LIBRARY @@ -11,23 +11,23 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int scanf(const char *restrict " format ", ...);" .BI "int fscanf(FILE *restrict " stream , .BI " const char *restrict " format ", ...);" -.PP +.P .B #include <stdarg.h> -.PP +.P .BI "int vscanf(const char *restrict " format ", va_list " ap ); .BI "int vfscanf(FILE *restrict " stream , .BI " const char *restrict " format ", va_list " ap ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR vscanf (), .BR vfscanf (): .nf @@ -36,7 +36,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION The .BR scanf () -family of functions scans input like +family of functions scans formatted input like .BR sscanf (3), but read from a .IR FILE . @@ -49,7 +49,7 @@ and parse them later with .BR sscanf (3) or more specialized functions such as .BR strtol (3). -.PP +.P The .BR scanf () function reads input from the standard input stream @@ -58,7 +58,7 @@ and .BR fscanf () reads input from the stream pointer .IR stream . -.PP +.P The .BR vfscanf () function is analogous to @@ -77,7 +77,7 @@ On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure. -.PP +.P The value .B EOF is returned if the end of input is reached before either the first @@ -132,11 +132,27 @@ T{ .BR vfscanf () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. +.SH CAVEATS +These functions make it difficult to +distinguish newlines from other white space, +This is especially problematic with line-buffered input, +like the standard input stream. +.P +These functions can't report errors after the last +non-suppressed conversion specification. +.SH BUGS +It is impossible to accurately know +how many characters these functions have consumed from the input stream, +since they only report the number of successful conversions. +For example, +if the input is "123\en\ a", +.I scanf(\[dq]%d\ %d\[dq], &a, &b) +will consume the digits, the newline, and the space, but not the letter a. +This makes it difficult to recover from invalid input. .SH SEE ALSO .BR fgets (3), .BR getline (3), diff --git a/man3/sched_getcpu.3 b/man3/sched_getcpu.3 index eb34a11..ee7ff51 100644 --- a/man3/sched_getcpu.3 +++ b/man3/sched_getcpu.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sched_getcpu 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sched_getcpu 3 2024-01-01 "Linux man-pages 6.7" .SH NAME sched_getcpu \- determine CPU on which the calling thread is running .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sched.h> -.PP +.P .B int sched_getcpu(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sched_getcpu (): .nf Since glibc 2.14: @@ -60,28 +60,27 @@ T{ .BR sched_getcpu () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY glibc 2.6. .SH NOTES The call -.PP +.P .in +4n .EX cpu = sched_getcpu(); .EE .in -.PP +.P is equivalent to the following .BR getcpu (2) call: -.PP +.P .in +4n .EX int c, s; -s = getcpu(&c, NULL, NULL); +s = getcpu(&c, NULL); cpu = (s == \-1) ? s : c; .EE .in diff --git a/man3/seekdir.3 b/man3/seekdir.3 index 4a3fa51..500a636 100644 --- a/man3/seekdir.3 +++ b/man3/seekdir.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu) .\" -.TH seekdir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH seekdir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME seekdir \- set the position of the next readdir() call in the directory stream. @@ -19,15 +19,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "void seekdir(DIR *" dirp ", long " loc ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR seekdir (): .nf _XOPEN_SOURCE @@ -63,7 +63,6 @@ T{ .BR seekdir () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_close.3 b/man3/sem_close.3 index 88adb87..c68c502 100644 --- a/man3/sem_close.3 +++ b/man3/sem_close.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_close 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_close 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_close \- close a named semaphore .SH LIBRARY @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_close(sem_t *" sem ); .fi .SH DESCRIPTION @@ -46,7 +46,6 @@ T{ .BR sem_close () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_destroy.3 b/man3/sem_destroy.3 index 524a318..f786906 100644 --- a/man3/sem_destroy.3 +++ b/man3/sem_destroy.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_destroy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_destroy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_destroy \- destroy an unnamed semaphore .SH LIBRARY @@ -12,24 +12,24 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_destroy(sem_t *" sem ); .fi .SH DESCRIPTION .BR sem_destroy () destroys the unnamed semaphore at the address pointed to by .IR sem . -.PP +.P Only a semaphore that has been initialized by .BR sem_init (3) should be destroyed using .BR sem_destroy (). -.PP +.P Destroying a semaphore that other processes or threads are currently blocked on (in .BR sem_wait (3)) produces undefined behavior. -.PP +.P Using a semaphore that has been destroyed produces undefined results, until the semaphore has been reinitialized using .BR sem_init (3). @@ -58,7 +58,6 @@ T{ .BR sem_destroy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_getvalue.3 b/man3/sem_getvalue.3 index 6e529ba..925a9bd 100644 --- a/man3/sem_getvalue.3 +++ b/man3/sem_getvalue.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_getvalue 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_getvalue 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_getvalue \- get the value of a semaphore .SH LIBRARY @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_getvalue(sem_t *restrict " sem ", int *restrict " sval ); .fi .SH DESCRIPTION @@ -21,7 +21,7 @@ places the current value of the semaphore pointed to .I sem into the integer pointed to by .IR sval . -.PP +.P If one or more processes or threads are blocked waiting to lock the semaphore with .BR sem_wait (3), @@ -60,7 +60,6 @@ T{ .BR sem_getvalue () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_init.3 b/man3/sem_init.3 index 5f9c352..0cae896 100644 --- a/man3/sem_init.3 +++ b/man3/sem_init.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_init 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_init 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_init \- initialize an unnamed semaphore .SH LIBRARY @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_init(sem_t *" sem ", int " pshared ", unsigned int " value ); .fi .SH DESCRIPTION @@ -22,12 +22,12 @@ initializes the unnamed semaphore at the address pointed to by The .I value argument specifies the initial value for the semaphore. -.PP +.P The .I pshared argument indicates whether this semaphore is to be shared between the threads of a process, or between processes. -.PP +.P If .I pshared has the value 0, @@ -35,7 +35,7 @@ then the semaphore is shared between the threads of a process, and should be located at some address that is visible to all threads (e.g., a global variable, or a variable allocated dynamically on the heap). -.PP +.P If .I pshared is nonzero, then the semaphore is shared between processes, @@ -52,7 +52,7 @@ can operate on the semaphore using .BR sem_post (3), .BR sem_wait (3), and so on. -.PP +.P Initializing a semaphore that has already been initialized results in undefined behavior. .SH RETURN VALUE @@ -87,12 +87,11 @@ T{ .BR sem_init () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Bizarrely, POSIX.1-2001 does not specify the value that should be returned by a successful call to .BR sem_init (). diff --git a/man3/sem_open.3 b/man3/sem_open.3 index 0845be9..660daa9 100644 --- a/man3/sem_open.3 +++ b/man3/sem_open.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_open 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_open 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_open \- initialize and open a named semaphore .SH LIBRARY @@ -14,7 +14,7 @@ POSIX threads library .BR "#include <fcntl.h>" " /* For O_* constants */" .BR "#include <sys/stat.h>" " /* For mode constants */" .B #include <semaphore.h> -.PP +.P .BI "sem_t *sem_open(const char *" name ", int " oflag ); .BI "sem_t *sem_open(const char *" name ", int " oflag , .BI " mode_t " mode ", unsigned int " value ); @@ -28,7 +28,7 @@ For details of the construction of .IR name , see .BR sem_overview (7). -.PP +.P The .I oflag argument specifies flags that control the operation of the call. @@ -54,7 +54,7 @@ are specified in then an error is returned if a semaphore with the given .I name already exists. -.PP +.P If .B O_CREAT is specified in @@ -162,7 +162,6 @@ T{ .BR sem_open () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_post.3 b/man3/sem_post.3 index 5406484..1c06a81 100644 --- a/man3/sem_post.3 +++ b/man3/sem_post.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_post 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_post 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_post \- unlock a semaphore .SH LIBRARY @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_post(sem_t *" sem ); .fi .SH DESCRIPTION @@ -53,7 +53,6 @@ T{ .BR sem_post () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_unlink.3 b/man3/sem_unlink.3 index 434d145..dd8d402 100644 --- a/man3/sem_unlink.3 +++ b/man3/sem_unlink.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_unlink 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_unlink 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_unlink \- remove a named semaphore .SH LIBRARY @@ -12,7 +12,7 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_unlink(const char *" name ); .fi .SH DESCRIPTION @@ -54,7 +54,6 @@ T{ .BR sem_unlink () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index b1302ca..aa4793c 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sem_wait 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sem_wait 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sem_wait, sem_timedwait, sem_trywait \- lock a semaphore .SH LIBRARY @@ -12,18 +12,18 @@ POSIX threads library .SH SYNOPSIS .nf .B #include <semaphore.h> -.PP +.P .BI "int sem_wait(sem_t *" sem ); .BI "int sem_trywait(sem_t *" sem ); .BI "int sem_timedwait(sem_t *restrict " sem , .BI " const struct timespec *restrict " abs_timeout ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sem_timedwait (): .nf _POSIX_C_SOURCE >= 200112L @@ -38,7 +38,7 @@ If the semaphore currently has the value zero, then the call blocks until either it becomes possible to perform the decrement (i.e., the semaphore value rises above zero), or a signal handler interrupts the call. -.PP +.P .BR sem_trywait () is the same as .BR sem_wait (), @@ -48,7 +48,7 @@ then call returns an error set to .BR EAGAIN ) instead of blocking. -.PP +.P .BR sem_timedwait () is the same as .BR sem_wait (), @@ -62,7 +62,7 @@ argument points to a .BR timespec (3) structure that specifies an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). -.PP +.P If the timeout has already expired by the time of the call, and the semaphore could not be locked immediately, then @@ -71,7 +71,7 @@ fails with a timeout error .RI ( errno set to .BR ETIMEDOUT ). -.PP +.P If the operation can be performed immediately, then .BR sem_timedwait () never fails with a timeout error, regardless of the value of @@ -127,7 +127,6 @@ T{ .BR sem_timedwait () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -150,7 +149,7 @@ The second command-line argument specifies the length of the timeout, in seconds, for .BR sem_timedwait (). The following shows what happens on two different runs of the program: -.PP +.P .in +4n .EX .RB "$" " ./a.out 2 3" diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 45fb548..acdad17 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -5,7 +5,7 @@ .\" .\" Polished a bit, added a little, aeb .\" -.TH setaliasent 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setaliasent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, getaliasbyname_r \- read an alias entry @@ -15,16 +15,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <aliases.h> -.PP +.P .B "void setaliasent(void);" .B "void endaliasent(void);" -.PP +.P .B "struct aliasent *getaliasent(void);" .BI "int getaliasent_r(struct aliasent *restrict " result , .BI " char " buffer "[restrict ." buflen "], \ size_t " buflen , .BI " struct aliasent **restrict " res ); -.PP +.P .BI "struct aliasent *getaliasbyname(const char *" name ); .BI "int getaliasbyname_r(const char *restrict " name , .BI " struct aliasent *restrict " result , @@ -38,48 +38,48 @@ is the aliases database, that contains mail aliases. (To find out which databases are supported, try .IR "getent \-\-help" .) Six functions are provided to access the aliases database. -.PP +.P The .BR getaliasent () function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries. -.PP +.P The .BR setaliasent () function rewinds the file pointer to the beginning of the aliases database. -.PP +.P The .BR endaliasent () function closes the aliases database. -.PP +.P .BR getaliasent_r () is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail. -.PP +.P The function .BR getaliasbyname () takes the name argument and searches the aliases database. The entry is returned as a pointer to a .IR "struct aliasent" . -.PP +.P .BR getaliasbyname_r () is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail. -.PP +.P The .I "struct aliasent" is defined in .IR <aliases.h> : -.PP +.P .in +4n .EX struct aliasent { @@ -125,12 +125,11 @@ T{ .BR getaliasbyname () T} Thread safety MT-Unsafe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY The NeXT system has similar routines: -.PP +.P .in +4n .EX #include <aliasdb.h> @@ -145,7 +144,7 @@ alias_ent *alias_getbyname(char *name); The following example compiles with .IR "gcc example.c \-o example" . It will dump all names in the alias database. -.PP +.P .\" SRC BEGIN (setaliasent.c) .EX #include <aliases.h> diff --git a/man3/setbuf.3 b/man3/setbuf.3 index ad998c3..89865e2 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -18,7 +18,7 @@ .\" Correction, 2000-03-03, Andreas Jaeger <aj@suse.de> .\" Added return value for setvbuf, aeb, .\" -.TH setbuf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setbuf 3 2024-02-26 "Linux man-pages 6.7" .SH NAME setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations .SH LIBRARY @@ -27,21 +27,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int setvbuf(FILE *restrict " stream ", char " buf "[restrict ." size ], .BI " int " mode ", size_t " size ); -.PP +.P .BI "void setbuf(FILE *restrict " stream ", char *restrict " buf ); .BI "void setbuffer(FILE *restrict " stream ", char " buf "[restrict ." size ], .BI " size_t " size ); .BI "void setlinebuf(FILE *" stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR setbuffer (), .BR setlinebuf (): .nf @@ -63,7 +63,7 @@ The function may be used to force the block out early. (See .BR fclose (3).) -.PP +.P Normally all files are block buffered. If a stream refers to a terminal (as .I stdout @@ -71,7 +71,7 @@ normally does), it is line buffered. The standard error stream .I stderr is always unbuffered by default. -.PP +.P The .BR setvbuf () function may be used on any open stream to change its buffer. @@ -89,7 +89,7 @@ line buffered .B _IOFBF fully buffered .RE -.PP +.P Except for unbuffered files, the .I buf argument should point to a buffer at least @@ -104,17 +104,17 @@ The .BR setvbuf () function may be used only after opening a stream and before any other operations have been performed on it. -.PP +.P The other three calls are, in effect, simply aliases for calls to .BR setvbuf (). The .BR setbuf () function is exactly equivalent to the call -.PP +.P .in +4n setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ); .in -.PP +.P The .BR setbuffer () function is the same, except that the size of the buffer is up to the @@ -123,7 +123,7 @@ caller, rather than being determined by the default The .BR setlinebuf () function is exactly equivalent to the call: -.PP +.P .in +4n setvbuf(stream, NULL, _IOLBF, 0); .in @@ -137,7 +137,7 @@ is invalid or the request cannot be honored). It may set .I errno on failure. -.PP +.P The other functions do not return a value. .SH ATTRIBUTES For an explanation of the terms used in this section, see @@ -156,7 +156,6 @@ T{ .BR setvbuf () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR setbuf () @@ -194,15 +193,15 @@ in order to detect errors. .\" On 4.2BSD and 4.3BSD systems, .\" .BR setbuf () .\" always uses a suboptimal buffer size and should be avoided. -.\".PP +.\".P You must make sure that the space that .I buf points to still exists by the time .I stream is closed, which also happens at program termination. For example, the following is invalid: -.PP -.\" [[invalid]] SRC BEGIN (setbuf.c) +.P +.\" SRC BEGIN (setbuf.c) .EX #include <stdio.h> \& diff --git a/man3/setenv.3 b/man3/setenv.3 index 0fe6521..d51f0f8 100644 --- a/man3/setenv.3 +++ b/man3/setenv.3 @@ -15,7 +15,7 @@ .\" Noted nonstandard behavior of setenv() if name contains '=' .\" 2005-08-12, mtk, glibc 2.3.4 fixed the "name contains '='" bug .\" -.TH setenv 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setenv 3 2023-10-31 "Linux man-pages 6.7" .SH NAME setenv \- change or add an environment variable .SH LIBRARY @@ -24,16 +24,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int setenv(const char *" name ", const char *" value ", int " overwrite ); .BI "int unsetenv(const char *" name ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR setenv (), .BR unsetenv (): .nf @@ -73,7 +73,7 @@ and .I value (by contrast with .BR putenv (3)). -.PP +.P The .BR unsetenv () function deletes the variable @@ -116,12 +116,11 @@ T{ .BR unsetenv () T} Thread safety MT-Unsafe const:env .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001, 4.3BSD. -.PP +.P Prior to glibc 2.2.2, .BR unsetenv () was prototyped diff --git a/man3/setjmp.3 b/man3/setjmp.3 index 5133f89..18771aa 100644 --- a/man3/setjmp.3 +++ b/man3/setjmp.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH setjmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setjmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME setjmp, sigsetjmp, longjmp, siglongjmp \- performing a nonlocal goto .SH LIBRARY @@ -12,22 +12,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <setjmp.h> -.PP +.P .BI "int setjmp(jmp_buf " env ); .BI "int sigsetjmp(sigjmp_buf " env ", int " savesigs ); -.PP +.P .BI "[[noreturn]] void longjmp(jmp_buf " env ", int " val ); .BI "[[noreturn]] void siglongjmp(sigjmp_buf " env ", int " val ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR setjmp (): see NOTES. -.PP +.P .BR sigsetjmp (): .nf _POSIX_C_SOURCE @@ -42,7 +42,7 @@ function dynamically establishes the target to which control will later be transferred, and .BR longjmp () performs the transfer of execution. -.PP +.P The .BR setjmp () function saves various information about the calling environment @@ -55,7 +55,7 @@ for later use by In this case, .BR setjmp () returns 0. -.PP +.P The .BR longjmp () function uses the information saved in @@ -70,7 +70,7 @@ the values of some other registers and the process signal mask may be restored to their state at the time of the .BR setjmp () call. -.PP +.P Following a successful .BR longjmp (), execution continues as if @@ -89,7 +89,7 @@ and .BR siglongjmp () also perform nonlocal gotos, but provide predictable handling of the process signal mask. -.PP +.P If, and only if, the .I savesigs argument provided to @@ -112,7 +112,7 @@ or the nonzero value specified in .I val is returned. -.PP +.P The .BR longjmp () or @@ -139,7 +139,6 @@ T{ .BR siglongjmp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR setjmp () @@ -162,7 +161,7 @@ POSIX.1-2001, C89. .TQ .BR siglongjmp () POSIX.1-2001. -.PP +.P POSIX does not specify whether .BR setjmp () will save the signal mask @@ -239,7 +238,7 @@ and .IP \[bu] they are not declared as .IR volatile . -.PP +.P Analogous remarks apply for .BR siglongjmp (). .\" @@ -263,13 +262,13 @@ call. call should employ a unique .I jmp_buf variable.) -.PP +.P Adding further difficulty, the .BR setjmp () and .BR longjmp () calls may not even be in the same source code module. -.PP +.P In summary, nonlocal gotos can make programs harder to understand and maintain, and an alternative should be used if possible. .\" @@ -280,7 +279,7 @@ returns before .BR longjmp () is called, the behavior is undefined. Some kind of subtle or unsubtle chaos is sure to result. -.PP +.P If, in a multithreaded program, a .BR longjmp () call employs an @@ -298,7 +297,7 @@ in a different thread, the behavior is undefined. .\" (i.e., from a handler that was invoked in response to a signal that was .\" generated while another signal was already in the process of being .\" handled), the behavior is undefined. -.PP +.P POSIX.1-2008 Technical Corrigendum 2 adds .\" http://austingroupbugs.net/view.php?id=516#c1195 .BR longjmp () diff --git a/man3/setlocale.3 b/man3/setlocale.3 index d2b511e..50a36d8 100644 --- a/man3/setlocale.3 +++ b/man3/setlocale.3 @@ -10,7 +10,7 @@ .\" Modified Tue Aug 24 17:11:01 1999 by Andries Brouwer (aeb@cwi.nl) .\" Modified Tue Feb 6 03:31:55 2001 by Andries Brouwer (aeb@cwi.nl) .\" -.TH setlocale 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setlocale 3 2024-02-25 "Linux man-pages 6.7" .SH NAME setlocale \- set the current locale .SH LIBRARY @@ -19,14 +19,14 @@ Standard C library .SH SYNOPSIS .nf .B #include <locale.h> -.PP +.P .BI "char *setlocale(int " category ", const char *" locale ); .fi .SH DESCRIPTION The .BR setlocale () function is used to set or query the program's current locale. -.PP +.P If .I locale is not NULL, @@ -74,12 +74,12 @@ LC_TIME T{ Formatting of date and time values T} .TE -.PP +.P The categories marked with an asterisk in the above table are GNU extensions. For further information on these locale categories, see .BR locale (7). -.PP +.P The argument .I locale is a pointer to a character string containing the @@ -88,11 +88,11 @@ required setting of Such a string is either a well-known constant like "C" or "da_DK" (see below), or an opaque string that was returned by another call of .BR setlocale (). -.PP +.P If .I locale is an empty string, -.BR """""" , +.BR \[dq]\[dq] , each part of the locale that should be modified is set according to the environment variables. The details are implementation-dependent. @@ -110,21 +110,21 @@ If its value is not a valid locale specification, the locale is unchanged, and .BR setlocale () returns NULL. -.PP +.P The locale -.B """C""" +.B \[dq]C\[dq] or -.B """POSIX""" +.B \[dq]POSIX\[dq] is a portable locale; it exists on all conforming systems. -.PP +.P A locale name is typically of the form .IR language "[_" territory "][." codeset "][@" modifier "]," where .I language -is an ISO 639 language code, +is an ISO\~639 language code, .I territory -is an ISO 3166 country code, and +is an ISO\~3166 country code, and .I codeset is a character set or encoding identifier like .B "ISO\-8859\-1" @@ -132,22 +132,22 @@ or .BR "UTF\-8" . For a list of all supported locales, try "locale \-a" (see .BR locale (1)). -.PP +.P If .I locale is NULL, the current locale is only queried, not modified. -.PP +.P On startup of the main program, the portable -.B """C""" +.B \[dq]C\[dq] locale is selected as default. A program may be made portable to all locales by calling: -.PP +.P .in +4n .EX setlocale(LC_ALL, ""); .EE .in -.PP +.P after program initialization, and then: .IP \[bu] 3 using the values returned from a @@ -191,7 +191,6 @@ T{ .BR setlocale () T} Thread safety MT-Unsafe const:locale env .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SS Categories diff --git a/man3/setlogmask.3 b/man3/setlogmask.3 index 223b864..57fa9de 100644 --- a/man3/setlogmask.3 +++ b/man3/setlogmask.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH setlogmask 3 2023-07-20 "Linux man-pages 6.05.01" +.TH setlogmask 3 2023-11-01 "Linux man-pages 6.7" .SH NAME setlogmask \- set log priority mask .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <syslog.h> -.PP +.P .BI "int setlogmask(int " mask ); .fi .SH DESCRIPTION @@ -24,13 +24,17 @@ Logging is enabled for the priorities that have the corresponding bit set in .IR mask . The initial mask is such that logging is enabled for all priorities. -.PP +.P The .BR setlogmask () function sets this logmask for the calling process, and returns the previous mask. -If the mask argument is 0, the current logmask is not modified. -.PP +If the +.I mask +argument is +.BR 0 , +the current logmask is not modified. +.P The eight priorities are .BR LOG_EMERG , .BR LOG_ALERT , @@ -70,13 +74,12 @@ T{ .BR setlogmask () T} Thread safety MT-Unsafe race:LogMask .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. .\" Note that the description in POSIX.1-2001 is flawed. -.PP +.P .BR LOG_UPTO () will be included in the next release of the POSIX specification (Issue 8). .\" FIXME . https://www.austingroupbugs.net/view.php?id=1033 diff --git a/man3/setnetgrent.3 b/man3/setnetgrent.3 index 8cc779f..ec6e6d6 100644 --- a/man3/setnetgrent.3 +++ b/man3/setnetgrent.3 @@ -6,7 +6,7 @@ .\" based on glibc infopages .\" polished - aeb .\" -.TH setnetgrent 3 2023-07-30 "Linux man-pages 6.05.01" +.TH setnetgrent 3 2023-10-31 "Linux man-pages 6.7" .SH NAME setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \- handle network group entries @@ -16,25 +16,25 @@ Standard C library .SH SYNOPSIS .nf .B #include <netdb.h> -.PP +.P .BI "int setnetgrent(const char *" netgroup ); .B "void endnetgrent(void);" -.PP +.P .BI "int getnetgrent(char **restrict " host , .BI " char **restrict " user ", char **restrict " domain ); .BI "int getnetgrent_r(char **restrict " host , .BI " char **restrict " user ", char **restrict " domain , .BI " char " buf "[restrict ." buflen "], size_t " buflen ); -.PP +.P .BI "int innetgr(const char *" netgroup ", const char *" host , .BI " const char *" user ", const char *" domain ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR \%setnetgrent (), .BR \%endnetgrent (), .BR \%getnetgrent (), @@ -59,7 +59,7 @@ The functions described here allow access to the netgroup databases. The file .I /etc/nsswitch.conf defines what database is searched. -.PP +.P The .BR setnetgrent () call defines the netgroup that will be searched by subsequent @@ -79,7 +79,7 @@ To avoid this problem you can use the GNU function that stores the strings in the supplied buffer. To free all allocated buffers use .BR endnetgrent (). -.PP +.P In most cases you want to check only if the triplet .RI ( hostname ", " username ", " domainname ) is a member of a netgroup. @@ -134,7 +134,7 @@ MT-Unsafe race:netgrent race:netgrentbuf locale T} .TE -.sp 1 +.P In the above table, .I netgrent in diff --git a/man3/shm_open.3 b/man3/shm_open.3 index c5756c4..6d07292 100644 --- a/man3/shm_open.3 +++ b/man3/shm_open.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH shm_open 3 2023-07-20 "Linux man-pages 6.05.01" +.TH shm_open 3 2023-10-31 "Linux man-pages 6.7" .SH NAME shm_open, shm_unlink \- create/open or unlink POSIX shared memory objects .SH LIBRARY @@ -14,7 +14,7 @@ Real-time library .B #include <sys/mman.h> .BR "#include <sys/stat.h>" " /* For mode constants */" .BR "#include <fcntl.h>" " /* For O_* constants */" -.PP +.P .BI "int shm_open(const char *" name ", int " oflag ", mode_t " mode ); .BI "int shm_unlink(const char *" name ); .fi @@ -30,7 +30,7 @@ The function performs the converse operation, removing an object previously created by .BR shm_open (). -.PP +.P The operation of .BR shm_open () is analogous to that of @@ -51,7 +51,7 @@ followed by one or more characters, none of which are slashes. .\" case the subdirectory must exist under /dev/shm, and allow the .\" required permissions if a user wants to create a shared memory .\" object in that subdirectory. -.PP +.P .I oflag is a bit mask created by ORing together exactly one of .B O_RDONLY @@ -107,10 +107,10 @@ does not exist, are performed atomically. .TP .B O_TRUNC If the shared memory object already exists, truncate it to zero bytes. -.PP +.P Definitions of these flag values can be obtained by including .IR <fcntl.h> . -.PP +.P On successful completion .BR shm_open () returns a new file descriptor referring to the shared memory object. @@ -121,7 +121,7 @@ The flag (see .BR fcntl (2)) is set for the file descriptor. -.PP +.P The file descriptor is normally used in subsequent calls to .BR ftruncate (2) @@ -130,7 +130,7 @@ to After a call to .BR mmap (2) the file descriptor may be closed without affecting the memory mapping. -.PP +.P The operation of .BR shm_unlink () @@ -235,7 +235,6 @@ T{ .BR shm_unlink () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS POSIX leaves the behavior of the combination of .B O_RDONLY @@ -244,7 +243,7 @@ and unspecified. On Linux, this will successfully truncate an existing shared memory object\[em]this may not be so on other UNIX systems. -.PP +.P The POSIX shared memory object implementation on Linux makes use of a dedicated .BR tmpfs (5) @@ -255,7 +254,7 @@ POSIX.1-2008. .SH HISTORY glibc 2.2. POSIX.1-2001. -.PP +.P POSIX.1-2001 says that the group ownership of a newly created shared memory object is set to either the calling process's effective group ID or "a system default group ID". @@ -271,7 +270,7 @@ of a string that is placed into the shared memory by the "send" program. Once the data has been modified, the "send" program then prints the contents of the modified shared memory. An example execution of the two programs is the following: -.PP +.P .in +4n .EX $ \fB./pshm_ucase_bounce /myshm &\fP @@ -280,14 +279,14 @@ $ \fB./pshm_ucase_send /myshm hello\fP HELLO .EE .in -.PP +.P Further detail about these programs is provided below. .\" .SS Program source: pshm_ucase.h The following header file is included by both programs below. Its primary purpose is to define a structure that will be imposed on the memory object that is shared between the two programs. -.PP +.P .in +4n .\" SRC BEGIN (pshm_ucase.h) .EX @@ -325,12 +324,12 @@ match the size of the structure defined in the header file. It then maps the object into the process's address space, and initializes two POSIX semaphores inside the object to 0. -.PP +.P After the "send" program has posted the first of the semaphores, the "bounce" program upper cases the data that has been placed in the memory by the "send" program and then posts the second semaphore to tell the "send" program that it may now access the shared memory. -.PP +.P .in +4n .\" SRC BEGIN (pshm_ucase_bounce.c) .EX @@ -413,7 +412,7 @@ main(int argc, char *argv[]) The "send" program takes two command-line arguments: the pathname of a shared memory object previously created by the "bounce" program and a string that is to be copied into that object. -.PP +.P The program opens the shared memory object and maps the object into its address space. It then copies the data specified in its second argument @@ -423,7 +422,7 @@ which tells the "bounce" program that it can now access that data. After the "bounce" program posts the second semaphore, the "send" program prints the contents of the shared memory on standard output. -.PP +.P .in +4n .\" SRC BEGIN (pshm_ucase_send.c) .EX diff --git a/man3/siginterrupt.3 b/man3/siginterrupt.3 index 3f4c246..be7f093 100644 --- a/man3/siginterrupt.3 +++ b/man3/siginterrupt.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl) -.TH siginterrupt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH siginterrupt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME siginterrupt \- allow signals to interrupt system calls .SH LIBRARY @@ -18,15 +18,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "[[deprecated]] int siginterrupt(int " sig ", int " flag ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR siginterrupt (): .nf _XOPEN_SOURCE >= 500 @@ -43,12 +43,12 @@ If the \fIflag\fP argument is false (0), then system calls will be restarted if interrupted by the specified signal \fIsig\fP. This is the default behavior in Linux. -.PP +.P If the \fIflag\fP argument is true (1) and no data has been transferred, then a system call interrupted by the signal \fIsig\fP will return \-1 and \fIerrno\fP will be set to .BR EINTR . -.PP +.P If the \fIflag\fP argument is true (1) and data transfer has started, then the system call will be interrupted and will return the actual amount of data transferred. @@ -84,7 +84,6 @@ T} Thread safety T{ MT-Unsafe const:sigintr T} .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/signbit.3 b/man3/signbit.3 index 5dddad6..ad7a1f4 100644 --- a/man3/signbit.3 +++ b/man3/signbit.3 @@ -7,7 +7,7 @@ .\" .\" Based on glibc infopages, copyright Free Software Foundation .\" -.TH signbit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH signbit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME signbit \- test sign of a real floating-point number .SH LIBRARY @@ -16,15 +16,15 @@ Math library .SH SYNOPSIS .nf .B "#include <math.h>" -.PP +.P .BI "int signbit(" x ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR signbit (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -35,7 +35,7 @@ is a generic macro which can work on all real floating-point types. It returns a nonzero value if the value of .I x has its sign bit set. -.PP +.P This is not the same as .IR "x < 0.0" , because IEEE 754 floating point allows zero to be signed. @@ -44,7 +44,7 @@ The comparison is false, but .I signbit(\-0.0) will return a nonzero value. -.PP +.P NaNs and infinities have a sign bit. .SH RETURN VALUE The @@ -68,12 +68,11 @@ T{ .BR signbit () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C99. -.PP +.P This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854). .SH SEE ALSO diff --git a/man3/significand.3 b/man3/significand.3 index 794955a..dbd6f7b 100644 --- a/man3/significand.3 +++ b/man3/significand.3 @@ -5,7 +5,7 @@ .\" .\" heavily based on glibc infopages, copyright Free Software Foundation .\" -.TH significand 3 2023-07-20 "Linux man-pages 6.05.01" +.TH significand 3 2024-03-12 "Linux man-pages 6.7" .SH NAME significand, significandf, significandl \- get mantissa of floating-point number @@ -15,17 +15,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double significand(double " x ); .BI "float significandf(float " x ); .BI "long double significandl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR significand (), .BR significandf (), .BR significandl (): @@ -36,15 +36,16 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions return the mantissa of .I x -scaled to the range [1,2). +scaled to the range +.RB [ 1 ,\~ FLT_RADIX ). They are equivalent to -.PP +.P .in +4n .EX scalb(x, (double) \-ilogb(x)) .EE .in -.PP +.P This function exists mainly for use in certain standardized tests for IEEE 754 conformance. .SH ATTRIBUTES @@ -63,7 +64,6 @@ T{ .BR significandl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .TP diff --git a/man3/sigpause.3 b/man3/sigpause.3 index 492d9fa..062f069 100644 --- a/man3/sigpause.3 +++ b/man3/sigpause.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sigpause 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sigpause 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigpause \- atomically release blocked signals and wait for interrupt .SH LIBRARY @@ -12,9 +12,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "[[deprecated]] int sigpause(int " sigmask "); /* BSD (but see NOTES) */" -.PP +.P .BI "[[deprecated]] int sigpause(int " sig "); /* POSIX.1 / SysV / UNIX 95 */" .fi .SH DESCRIPTION @@ -22,7 +22,7 @@ Don't use this function. Use .BR sigsuspend (2) instead. -.PP +.P The function .BR sigpause () is designed to wait for some signal. @@ -51,7 +51,6 @@ T{ .BR sigpause () T} Thread safety MT-Safe .TE -.sp 1 .\" FIXME: The marking is different from that in the glibc manual, .\" marking in glibc manual is more detailed: .\" @@ -63,7 +62,7 @@ T} Thread safety MT-Safe .SH VERSIONS On Linux, this routine is a system call only on the Sparc (sparc64) architecture. -.PP +.P .\" Libc4 and libc5 know only about the BSD version. .\" glibc uses the BSD version if the @@ -84,7 +83,7 @@ _XOPEN_SOURCE >= 500 .\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) .IP \[bu] glibc 2.25 and earlier: _XOPEN_SOURCE -.PP +.P Since glibc 2.19, only the System V version is exposed by .IR <signal.h> ; applications that formerly used the BSD @@ -100,7 +99,7 @@ POSIX.1-2008. .SH HISTORY POSIX.1-2001. Obsoleted in POSIX.1-2008. -.PP +.P The classical BSD version of this function appeared in 4.2BSD. It sets the process's signal mask to .IR sigmask . diff --git a/man3/sigqueue.3 b/man3/sigqueue.3 index 98238a4..99ea60f 100644 --- a/man3/sigqueue.3 +++ b/man3/sigqueue.3 @@ -6,7 +6,7 @@ .\" added note on self-signaling, aeb, 2002-06-07 .\" added note on CAP_KILL, mtk, 2004-06-16 .\" -.TH sigqueue 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sigqueue 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigqueue \- queue a signal and data to a process .SH LIBRARY @@ -15,15 +15,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int sigqueue(pid_t " pid ", int " sig ", const union sigval " value ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sigqueue (): .nf _POSIX_C_SOURCE >= 199309L @@ -40,12 +40,12 @@ As with .BR kill (2), the null signal (0) can be used to check if a process with a given PID exists. -.PP +.P The .I value argument is used to specify an accompanying item of data (either an integer or a pointer value) to be sent with the signal, and has the following type: -.PP +.P .in +4n .EX union sigval { @@ -54,7 +54,7 @@ union sigval { }; .EE .in -.PP +.P If the receiving process has installed a handler for this signal using the .B SA_SIGINFO flag to @@ -111,7 +111,6 @@ T{ .BR sigqueue () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .SS C library/kernel differences On Linux, @@ -130,7 +129,7 @@ Inside the glibc wrapper, this argument, .IR uinfo , is initialized as follows: -.PP +.P .in +4n .EX uinfo.si_signo = sig; /* Argument supplied to sigqueue() */ diff --git a/man3/sigset.3 b/man3/sigset.3 index f7fad4d..2d393d6 100644 --- a/man3/sigset.3 +++ b/man3/sigset.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sigset 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sigset 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigset, sighold, sigrelse, sigignore \- System V signal API .SH LIBRARY @@ -12,21 +12,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .B typedef void (*sighandler_t)(int); -.PP +.P .BI "[[deprecated]] sighandler_t sigset(int " sig ", sighandler_t " disp ); -.PP +.P .BI "[[deprecated]] int sighold(int " sig ); .BI "[[deprecated]] int sigrelse(int " sig ); .BI "[[deprecated]] int sigignore(int " sig ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sigset (), .BR sighold (), .BR sigrelse (), @@ -42,7 +42,7 @@ This API is obsolete: new applications should use the POSIX signal API .RB ( sigaction (2), .BR sigprocmask (2), etc.) -.PP +.P The .BR sigset () function modifies the disposition of the signal @@ -67,13 +67,13 @@ Add to the process's signal mask, but leave the disposition of .I sig unchanged. -.PP +.P If .I disp specifies the address of a signal handler, then .I sig is added to the process's signal mask during execution of the handler. -.PP +.P If .I disp was specified as a value other than @@ -81,25 +81,25 @@ was specified as a value other than then .I sig is removed from the process's signal mask. -.PP +.P The dispositions for .B SIGKILL and .B SIGSTOP cannot be changed. -.PP +.P The .BR sighold () function adds .I sig to the calling process's signal mask. -.PP +.P The .BR sigrelse () function removes .I sig from the calling process's signal mask. -.PP +.P The .BR sigignore () function sets the disposition of @@ -122,7 +122,7 @@ returns \-1, with .I errno set to indicate the error. (But see BUGS below.) -.PP +.P The .BR sighold (), .BR sigrelse (), @@ -138,14 +138,14 @@ see the ERRORS under .BR sigaction (2) and .BR sigprocmask (2). -.PP +.P For .BR sighold () and .BR sigrelse () see the ERRORS under .BR sigprocmask (2). -.PP +.P For .BR sigignore (), see the errors under @@ -167,7 +167,6 @@ T{ .BR sigignore () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .TP @@ -194,7 +193,7 @@ function provides reliable signal handling semantics (as when calling with .I sa_mask equal to 0). -.PP +.P On System V, the .BR signal () function provides unreliable semantics (as when calling @@ -212,7 +211,7 @@ unspecified. See .BR signal (2) for further details. -.PP +.P In order to wait for a signal, BSD and System V both provided a function named .BR sigpause (3), @@ -229,7 +228,7 @@ if .I disp was specified as a value other than .BR SIG_HOLD . -.PP +.P Before glibc 2.5, .BR sigset () does not correctly return the previous disposition of the signal diff --git a/man3/sigsetops.3 b/man3/sigsetops.3 index 4172dbc..7fc1140 100644 --- a/man3/sigsetops.3 +++ b/man3/sigsetops.3 @@ -9,7 +9,7 @@ .\" 2007-10-26 mdw added wording that a sigset_t must be initialized .\" prior to use .\" -.TH SIGSETOPS 3 2023-07-20 "Linux man-pages 6.05.01" +.TH SIGSETOPS 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX signal set operations @@ -19,21 +19,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int sigemptyset(sigset_t *" set ); .BI "int sigfillset(sigset_t *" set ); -.PP +.P .BI "int sigaddset(sigset_t *" set ", int " signum ); .BI "int sigdelset(sigset_t *" set ", int " signum ); -.PP +.P .BI "int sigismember(const sigset_t *" set ", int " signum ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sigemptyset (), .BR sigfillset (), .BR sigaddset (), @@ -44,17 +44,17 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION These functions allow the manipulation of POSIX signal sets. -.PP +.P .BR sigemptyset () initializes the signal set given by .I set to empty, with all signals excluded from the set. -.PP +.P .BR sigfillset () initializes .I set to full, including all signals. -.PP +.P .BR sigaddset () and .BR sigdelset () @@ -62,13 +62,13 @@ add and delete respectively signal .I signum from .IR set . -.PP +.P .BR sigismember () tests whether .I signum is a member of .IR set . -.PP +.P Objects of type .I sigset_t must be initialized by a call to either @@ -93,7 +93,7 @@ The results are undefined if this is not done. and .BR sigdelset () return 0 on success and \-1 on error. -.PP +.P .BR sigismember () returns 1 if .I signum @@ -102,7 +102,7 @@ is a member of 0 if .I signum is not a member, and \-1 on error. -.PP +.P On error, these functions set .I errno to indicate the error. @@ -132,7 +132,6 @@ T{ .BR sigandset () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .SS GNU If the @@ -140,7 +139,7 @@ If the feature test macro is defined, then \fI<signal.h>\fP exposes three other functions for manipulating signal sets: -.PP +.P .nf .BI "int sigisemptyset(const sigset_t *" set ); .BI "int sigorset(sigset_t *" dest ", const sigset_t *" left , @@ -148,12 +147,12 @@ sets: .BI "int sigandset(sigset_t *" dest ", const sigset_t *" left , .BI " const sigset_t *" right ); .fi -.PP +.P .BR sigisemptyset () returns 1 if .I set contains no signals, and 0 otherwise. -.PP +.P .BR sigorset () places the union of the sets .I left @@ -169,7 +168,7 @@ and in .IR dest . Both functions return 0 on success, and \-1 on failure. -.PP +.P These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications. .SH STANDARDS diff --git a/man3/sigvec.3 b/man3/sigvec.3 index c4529a8..d5ae4b0 100644 --- a/man3/sigvec.3 +++ b/man3/sigvec.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sigvec 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sigvec 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD signal API .SH LIBRARY @@ -12,22 +12,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "[[deprecated]] int sigvec(int " sig ", const struct sigvec *" vec , .BI " struct sigvec *" ovec ); -.PP +.P .BI "[[deprecated]] int sigmask(int " signum ); -.PP +.P .BI "[[deprecated]] int sigblock(int " mask ); .BI "[[deprecated]] int sigsetmask(int " mask ); .B [[deprecated]] int siggetmask(void); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf Since glibc 2.19: @@ -42,7 +42,7 @@ This API is obsolete: new applications should use the POSIX signal API .RB ( sigaction (2), .BR sigprocmask (2), etc.). -.PP +.P The .BR sigvec () function sets and/or gets the disposition of the signal @@ -67,17 +67,17 @@ without changing it, specify NULL for .IR vec , and a non-null pointer for .IR ovec . -.PP +.P The dispositions for .B SIGKILL and .B SIGSTOP cannot be changed. -.PP +.P The .I sigvec structure has the following form: -.PP +.P .in +4n .EX struct sigvec { @@ -87,7 +87,7 @@ struct sigvec { }; .EE .in -.PP +.P The .I sv_handler field specifies the disposition of the signal, and is either: @@ -96,7 +96,7 @@ the address of a signal handler function; meaning the default disposition applies for the signal; or .BR SIG_IGN , meaning that the signal is ignored. -.PP +.P If .I sv_handler specifies the address of a signal handler, then @@ -110,7 +110,7 @@ Attempts to block or .B SIGSTOP are silently ignored. -.PP +.P If .I sv_handler specifies the address of a signal handler, then the @@ -141,7 +141,7 @@ Handle the signal on the alternate signal stack .BR sigstack () function; the POSIX replacement is .BR sigaltstack (2)). -.PP +.P The .BR sigmask () macro constructs and returns a "signal mask" for @@ -151,7 +151,7 @@ For example, we can initialize the field given to .BR sigvec () using code such as the following: -.PP +.P .in +4n .EX vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT); @@ -159,7 +159,7 @@ vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT); handler execution */ .EE .in -.PP +.P The .BR sigblock () function adds the signals in @@ -173,7 +173,7 @@ Attempts to block or .B SIGSTOP are silently ignored. -.PP +.P The .BR sigsetmask () function sets the process's signal mask to the value given in @@ -181,7 +181,7 @@ function sets the process's signal mask to the value given in (like POSIX .IR sigprocmask(SIG_SETMASK) ), and returns the process's previous signal mask. -.PP +.P The .BR siggetmask () function returns the process's current signal mask. @@ -193,13 +193,13 @@ The function returns 0 on success; on error, it returns \-1 and sets .I errno to indicate the error. -.PP +.P The .BR sigblock () and .BR sigsetmask () functions return the previous signal mask. -.PP +.P The .BR sigmask () macro returns the signal mask for @@ -227,7 +227,6 @@ T{ .BR siggetmask () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -263,7 +262,7 @@ unspecified. See .BR signal (2) for further details. -.PP +.P In order to wait for a signal, BSD and System V both provided a function named .BR sigpause (3), diff --git a/man3/sigwait.3 b/man3/sigwait.3 index 38250ec..2ac7d0e 100644 --- a/man3/sigwait.3 +++ b/man3/sigwait.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sigwait 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sigwait 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sigwait \- wait for a signal .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <signal.h> -.PP +.P .BI "int sigwait(const sigset_t *restrict " set ", int *restrict " sig ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sigwait (): .nf Since glibc 2.26: @@ -40,7 +40,7 @@ The function accepts the signal (removes it from the pending list of signals), and returns the signal number in .IR sig . -.PP +.P The operation of .BR sigwait () is the same as @@ -78,12 +78,11 @@ T{ .BR sigwait () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS .BR sigwait () is implemented using .BR sigtimedwait (2). -.PP +.P The glibc implementation of .BR sigwait () silently ignores attempts to wait for the two real-time signals that @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH sin 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sin, sinf, sinl \- sine function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double sin(double " x ); .BI "float sinf(float " x ); .BI "long double sinl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sinf (), .BR sinl (): .nf @@ -50,11 +50,11 @@ given in radians. .SH RETURN VALUE On success, these functions return the sine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity or negative infinity, @@ -68,7 +68,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity @@ -95,12 +95,11 @@ T{ .BR sinl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/sincos.3 b/man3/sincos.3 index 79b920d..1093c3b 100644 --- a/man3/sincos.3 +++ b/man3/sincos.3 @@ -5,7 +5,7 @@ .\" .\" SPDX-License-Identifier: GPL-1.0-or-later .\" -.TH sincos 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sincos 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sincos, sincosf, sincosl \- calculate sin and cos simultaneously .SH LIBRARY @@ -15,7 +15,7 @@ Math library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <math.h> -.PP +.P .BI "void sincos(double " x ", double *" sin ", double *" cos ); .BI "void sincosf(float " x ", float *" sin ", float *" cos ); .BI "void sincosl(long double " x ", long double *" sin ", long double *" cos ); @@ -31,7 +31,7 @@ Using this function can be more efficient than two separate calls to .BR sin (3) and .BR cos (3). -.PP +.P If .I x is a NaN, @@ -39,7 +39,7 @@ a NaN is returned in .I *sin and .IR *cos . -.PP +.P If .I x is positive infinity or negative infinity, @@ -56,7 +56,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity @@ -83,7 +83,6 @@ T{ .BR sincosl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -94,7 +93,7 @@ To see the performance advantage of it may be necessary to disable .BR gcc (1) built-in optimizations, using flags such as: -.PP +.P .in +4n .EX cc \-O \-lm \-fno\-builtin prog.c diff --git a/man3/sinh.3 b/man3/sinh.3 index bc9d17e..c9027d6 100644 --- a/man3/sinh.3 +++ b/man3/sinh.3 @@ -14,7 +14,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH sinh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sinh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sinh, sinhf, sinhl \- hyperbolic sine function .SH LIBRARY @@ -23,17 +23,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double sinh(double " x ); .BI "float sinhf(float " x ); .BI "long double sinhl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sinhf (), .BR sinhl (): .nf @@ -46,27 +46,27 @@ These functions return the hyperbolic sine of .IR x , which is defined mathematically as: -.PP +.P .nf sinh(x) = (exp(x) \- exp(\-x)) / 2 .fi .SH RETURN VALUE On success, these functions return the hyperbolic sine of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity (negative infinity), positive infinity (negative infinity) is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -85,7 +85,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Range error: result overflow @@ -111,12 +111,11 @@ T{ .BR sinhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/sleep.3 b/man3/sleep.3 index cf87069..ae70958 100644 --- a/man3/sleep.3 +++ b/man3/sleep.3 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu) -.TH sleep 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sleep 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sleep \- sleep for a specified number of seconds .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "unsigned int sleep(unsigned int " "seconds" ); .fi .SH DESCRIPTION @@ -40,7 +40,6 @@ T{ .BR sleep () T} Thread safety MT-Unsafe sig:SIGCHLD/linux .TE -.sp 1 .SH VERSIONS On Linux, .BR sleep () @@ -49,7 +48,7 @@ is implemented via See the .BR nanosleep (2) man page for a discussion of the clock used. -.PP +.P On some systems, .BR sleep () may be implemented using diff --git a/man3/slist.3 b/man3/slist.3 index 98ce859..396b9cb 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH SLIST 3 2023-05-03 "Linux man-pages 6.05.01" +.TH SLIST 3 2023-10-31 "Linux man-pages 6.7" .SH NAME SLIST_EMPTY, SLIST_ENTRY, @@ -31,45 +31,45 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/queue.h> -.PP +.P .B SLIST_ENTRY(TYPE); -.PP +.P .B SLIST_HEAD(HEADNAME, TYPE); .BI "SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD " head ); .BI "void SLIST_INIT(SLIST_HEAD *" head ); -.PP +.P .BI "int SLIST_EMPTY(SLIST_HEAD *" head ); -.PP +.P .BI "void SLIST_INSERT_HEAD(SLIST_HEAD *" head , .BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); .BI "void SLIST_INSERT_AFTER(struct TYPE *" listelm , .BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *SLIST_FIRST(SLIST_HEAD *" head ); .BI "struct TYPE *SLIST_NEXT(struct TYPE *" elm ", SLIST_ENTRY " NAME ); -.PP +.P .BI "SLIST_FOREACH(struct TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ); .\" .BI "SLIST_FOREACH_FROM(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "SLIST_FOREACH_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); .\" .BI "SLIST_FOREACH_FROM_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , .\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); -.PP +.P .BI "void SLIST_REMOVE(SLIST_HEAD *" head ", struct TYPE *" elm , .BI " SLIST_ENTRY " NAME ); .BI "void SLIST_REMOVE_HEAD(SLIST_HEAD *" head , .BI " SLIST_ENTRY " NAME ); .\" .BI "void SLIST_REMOVE_AFTER(struct TYPE *" elm , .\" .BI " SLIST_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 , .\" .BI " SLIST_ENTRY " NAME ); .fi .SH DESCRIPTION These macros define and operate on doubly linked lists. -.PP +.P In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -96,44 +96,44 @@ or at the head of the list. An .I SLIST_HEAD structure is declared as follows: -.PP +.P .in +4 .EX SLIST_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR SLIST_ENTRY () declares a structure that connects the elements in the list. -.PP +.P .BR SLIST_HEAD_INITIALIZER () evaluates to an initializer for the list .IR head . -.PP +.P .BR SLIST_INIT () initializes the list referenced by .IR head . -.PP +.P .BR SLIST_EMPTY () evaluates to true if there are no elements in the list. .SS Insertion @@ -141,7 +141,7 @@ evaluates to true if there are no elements in the list. inserts the new element .I elm at the head of the list. -.PP +.P .BR SLIST_INSERT_AFTER () inserts the new element .I elm @@ -150,17 +150,17 @@ after the element .SS Traversal .BR SLIST_FIRST () returns the first element in the list, or NULL if the list is empty. -.PP +.P .BR SLIST_NEXT () returns the next element in the list. -.PP +.P .BR SLIST_FOREACH () traverses the list referenced by .I head in the forward direction, assigning each element in turn to .IR var . -.\" .PP +.\" .P .\" .BR SLIST_FOREACH_FROM () .\" behaves identically to .\" .BR SLIST_FOREACH () @@ -185,7 +185,7 @@ assigning each element in turn to .\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .PP +.\" .P .\" .BR SLIST_FOREACH_FROM_SAFE () .\" behaves identically to .\" .BR SLIST_FOREACH_SAFE () @@ -202,7 +202,7 @@ assigning each element in turn to removes the element .I elm from the list. -.PP +.P .BR SLIST_REMOVE_HEAD () removes the element .I elm @@ -211,7 +211,7 @@ For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic .BR SLIST_REMOVE (). -.\" .PP +.\" .P .\" .BR SLIST_REMOVE_AFTER () .\" removes the element after .\" .I elm @@ -229,14 +229,14 @@ should explicitly use this macro instead of the generic .BR SLIST_EMPTY () returns nonzero if the list is empty, and zero if the list contains at least one entry. -.PP +.P .BR SLIST_FIRST (), and .BR SLIST_NEXT () return a pointer to the first or next .I TYPE structure, respectively. -.PP +.P .BR SLIST_HEAD_INITIALIZER () returns an initializer that can be assigned to the list .IR head . diff --git a/man3/sockatmark.3 b/man3/sockatmark.3 index ca03910..7d07791 100644 --- a/man3/sockatmark.3 +++ b/man3/sockatmark.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sockatmark 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sockatmark 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sockatmark \- determine whether socket is at out-of-band mark .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/socket.h> -.PP +.P .BI "int sockatmark(int " sockfd ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sockatmark (): .nf _POSIX_C_SOURCE >= 200112L @@ -67,7 +67,6 @@ T{ .BR sockatmark () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -80,14 +79,14 @@ returns 1, then the out-of-band data can be read using the .B MSG_OOB flag of .BR recv (2). -.PP +.P Out-of-band data is supported only on some stream socket protocols. -.PP +.P .BR sockatmark () can safely be called from a handler for the .B SIGURG signal. -.PP +.P .BR sockatmark () is implemented using the .B SIOCATMARK @@ -102,7 +101,7 @@ The following code can be used after receipt of a .B SIGURG signal to read (and discard) all data up to the mark, and then read the byte of data at the mark: -.PP +.P .EX char buf[BUF_LEN]; char oobdata; diff --git a/man3/sqrt.3 b/man3/sqrt.3 index fac38c0..6c6e469 100644 --- a/man3/sqrt.3 +++ b/man3/sqrt.3 @@ -12,7 +12,7 @@ .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) -.TH sqrt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sqrt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sqrt, sqrtf, sqrtl \- square root function .SH LIBRARY @@ -21,17 +21,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double sqrt(double " x ); .BI "float sqrtf(float " x ); .BI "long double sqrtl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sqrtf (), .BR sqrtl (): .nf @@ -45,19 +45,19 @@ These functions return the nonnegative square root of .SH RETURN VALUE On success, these functions return the square root of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is less than \-0, @@ -68,7 +68,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP less than \-0 @@ -94,12 +94,11 @@ T{ .BR sqrtl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/sscanf.3 b/man3/sscanf.3 index 223f4f5..7e0198c 100644 --- a/man3/sscanf.3 +++ b/man3/sscanf.3 @@ -22,7 +22,7 @@ .\" Add ERRORS section. .\" Document the 'a' and 'm' modifiers for dynamic string allocation. .\" -.TH sscanf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sscanf 3 2023-12-09 "Linux man-pages 6.7" .SH NAME sscanf, vsscanf \- input string format conversion .SH LIBRARY @@ -31,21 +31,21 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int sscanf(const char *restrict " str , .BI " const char *restrict " format ", ...);" -.PP +.P .B #include <stdarg.h> -.PP +.P .BI "int vsscanf(const char *restrict " str , .BI " const char *restrict " format ", va_list " ap ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR vsscanf (): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L @@ -53,7 +53,7 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION The .BR sscanf () -family of functions scans input according to +family of functions scans formatted input according to .I format as described below. This format may contain @@ -67,7 +67,7 @@ Each .I pointer argument must be of a type that is appropriate for the value returned by the corresponding conversion specification. -.PP +.P If the number of conversion specifications in .I format exceeds the number of @@ -78,17 +78,17 @@ If the number of arguments exceeds the number of conversion specifications, then the excess .I pointer arguments are evaluated, but are otherwise ignored. -.PP +.P .BR sscanf () These functions read their input from the string pointed to by .IR str . -.PP +.P The .BR vsscanf () function is analogous to .BR vsprintf (3). -.PP +.P The .I format string consists of a sequence of @@ -102,7 +102,7 @@ A "failure" can be either of the following: meaning that input characters were unavailable, or .IR "matching failure" , meaning that the input was inappropriate (see below). -.PP +.P A directive is one of the following: .TP \[bu] @@ -125,7 +125,7 @@ argument. If the next item of input does not match the conversion specification, the conversion fails\[em]this is a .IR "matching failure" . -.PP +.P Each .I conversion specification in @@ -205,7 +205,7 @@ rather than a pointer to an A .I "conversion specifier" that specifies the type of input conversion to be performed. -.PP +.P The conversion specifications in .I format are of two forms, either beginning with \[aq]%\[aq] or beginning with @@ -344,7 +344,7 @@ As for but the next pointer is a pointer to a .IR size_t . This modifier was introduced in C99. -.PP +.P The following .I "conversion specifiers" are available: @@ -359,7 +359,6 @@ No conversion is done (but initial white space characters are discarded), and assignment does not occur. .TP .B d -.IR Deprecated . Matches an optionally signed decimal integer; the next pointer must be a pointer to .IR int . @@ -374,7 +373,6 @@ the next pointer must be a pointer to .\" is silently ignored, causing old programs to fail mysteriously.) .TP .B i -.IR Deprecated . Matches an optionally signed integer; the next pointer must be a pointer to .IR int . The integer is read in base 16 if it begins with @@ -387,18 +385,15 @@ and in base 10 otherwise. Only characters that correspond to the base are used. .TP .B o -.IR Deprecated . Matches an unsigned octal integer; the next pointer must be a pointer to .IR "unsigned int" . .TP .B u -.IR Deprecated . Matches an unsigned decimal integer; the next pointer must be a pointer to .IR "unsigned int" . .TP .B x -.IR Deprecated . Matches an unsigned hexadecimal integer (that may optionally begin with a prefix of .I 0x @@ -409,33 +404,27 @@ be a pointer to .IR "unsigned int" . .TP .B X -.IR Deprecated . Equivalent to .BR x . .TP .B f -.IR Deprecated . Matches an optionally signed floating-point number; the next pointer must be a pointer to .IR float . .TP .B e -.IR Deprecated . Equivalent to .BR f . .TP .B g -.IR Deprecated . Equivalent to .BR f . .TP .B E -.IR Deprecated . Equivalent to .BR f . .TP .B a -.IR Deprecated . (C99) Equivalent to .BR f . .TP @@ -522,7 +511,7 @@ On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure. -.PP +.P The value .B EOF is returned if the end of input is reached before either the first @@ -554,12 +543,11 @@ T{ .BR vsscanf () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C89, POSIX.1-2001. -.PP +.P The .B q specifier is the 4.4BSD notation for @@ -569,7 +557,7 @@ while or the usage of .B L in integer conversions is the GNU notation. -.PP +.P The Linux version of these functions is based on the .I GNU .I libio @@ -592,14 +580,14 @@ Thus, one could write the following to have allocate a buffer for a string, with a pointer to that buffer being returned in .IR *buf : -.PP +.P .in +4n .EX char *buf; sscanf(str, "%as", &buf); .EE .in -.PP +.P The use of the letter .B a for this purpose was problematic, since @@ -610,7 +598,7 @@ is also specified by the ISO C standard as a synonym for POSIX.1-2008 instead specifies the .B m modifier for assignment allocation (as documented in DESCRIPTION, above). -.PP +.P Note that the .B a modifier is not available if the program is compiled with @@ -622,13 +610,13 @@ or is also specified), in which case the .B a is interpreted as a specifier for floating-point numbers (see above). -.PP +.P Support for the .B m modifier was added to glibc 2.7, and new programs should use that modifier instead of .BR a . -.PP +.P As well as being standardized by POSIX, the .B m modifier has the following further advantages over @@ -662,8 +650,8 @@ Instead, programs should use functions such as .BR strtol (3) to parse numeric input. -This manual page deprecates use of the numeric conversion specifiers -until they are fixed by ISO C. +Alternatively, +mitigate it by specifying a maximum field width. .SS Nonstandard modifiers These functions are fully C99 conformant, but provide the additional modifiers @@ -677,7 +665,7 @@ and modifiers. The latter may be considered to be a bug, as it changes the behavior of modifiers defined in C99. -.PP +.P Some combinations of the type modifiers and conversion specifiers defined by C99 do not make sense (e.g., @@ -693,7 +681,7 @@ in combination with \fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, and \fBX\fP conversions or .BR ll . -.PP +.P The usage of .B q is not the same as on 4.4BSD, @@ -709,7 +697,7 @@ or The caller must .BR free (3) the returned string, as in the following example: -.PP +.P .in +4n .EX char *p; @@ -727,7 +715,7 @@ if (n == 1) { } .EE .in -.PP +.P As shown in the above example, it is necessary to call .BR free (3) only if the diff --git a/man3/stailq.3 b/man3/stailq.3 index 2fca240..367b2bf 100644 --- a/man3/stailq.3 +++ b/man3/stailq.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH STAILQ 3 2023-05-03 "Linux man-pages 6.05.01" +.TH STAILQ 3 2023-10-31 "Linux man-pages 6.7" .SH NAME .\"SIMPLEQ_CONCAT, SIMPLEQ_EMPTY, @@ -54,43 +54,43 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/queue.h> -.PP +.P .B STAILQ_ENTRY(TYPE); -.PP +.P .B STAILQ_HEAD(HEADNAME, TYPE); .BI "STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD " head ); .BI "void STAILQ_INIT(STAILQ_HEAD *" head ); -.PP +.P .BI "int STAILQ_EMPTY(STAILQ_HEAD *" head ); -.PP +.P .BI "void STAILQ_INSERT_HEAD(STAILQ_HEAD *" head , .BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); .BI "void STAILQ_INSERT_TAIL(STAILQ_HEAD *" head , .BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); .BI "void STAILQ_INSERT_AFTER(STAILQ_HEAD *" head ", struct TYPE *" listelm , .BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *STAILQ_FIRST(STAILQ_HEAD *" head ); .\" .BI "struct TYPE *STAILQ_LAST(STAILQ_HEAD *" head ", struct TYPE *" elm , .\" .BI " STAILQ_ENTRY " NAME ); .BI "struct TYPE *STAILQ_NEXT(struct TYPE *" elm ", STAILQ_ENTRY " NAME ); -.PP +.P .BI "STAILQ_FOREACH(struct TYPE *" var ", STAILQ_HEAD *" head ", STAILQ_ENTRY " NAME ); .\" .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , .\" .BI " STAILQ_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , .\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); .\" .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , .\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); -.PP +.P .BI "void STAILQ_REMOVE(STAILQ_HEAD *" head ", struct TYPE *" elm ", TYPE," .BI " STAILQ_ENTRY " NAME ); .BI "void STAILQ_REMOVE_HEAD(STAILQ_HEAD *" head , .BI " STAILQ_ENTRY " NAME ); .\" .BI "void STAILQ_REMOVE_AFTER(STAILQ_HEAD *" head ", struct TYPE *" elm , .\" .BI " STAILQ_ENTRY " NAME ); -.PP +.P .BI "void STAILQ_CONCAT(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 ); .\" .BI "void STAILQ_SWAP(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 , .\" .BI " STAILQ_ENTRY " NAME ); @@ -99,7 +99,7 @@ Standard C library Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES. .SH DESCRIPTION These macros define and operate on singly linked tail queues. -.PP +.P In the macro definitions, .I TYPE is the name of a user-defined structure, @@ -126,43 +126,43 @@ at the head of the tail queue, or at the end of the tail queue. A .I STAILQ_HEAD structure is declared as follows: -.PP +.P .in +4 .EX STAILQ_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR STAILQ_ENTRY () declares a structure that connects the elements in the tail queue. -.PP +.P .BR STAILQ_HEAD_INITIALIZER () evaluates to an initializer for the tail queue .IR head . -.PP +.P .BR STAILQ_INIT () initializes the tail queue referenced by .IR head . -.PP +.P .BR STAILQ_EMPTY () evaluates to true if there are no items on the tail queue. .SS Insertion @@ -170,12 +170,12 @@ evaluates to true if there are no items on the tail queue. inserts the new element .I elm at the head of the tail queue. -.PP +.P .BR STAILQ_INSERT_TAIL () inserts the new element .I elm at the end of the tail queue. -.PP +.P .BR STAILQ_INSERT_AFTER () inserts the new element .I elm @@ -184,21 +184,21 @@ after the element .SS Traversal .BR STAILQ_FIRST () returns the first item on the tail queue or NULL if the tail queue is empty. -.\" .PP +.\" .P .\" .BR STAILQ_LAST () .\" returns the last item on the tail queue. .\" If the tail queue is empty the return value is NULL . -.PP +.P .BR STAILQ_NEXT () returns the next item on the tail queue, or NULL this item is the last. -.PP +.P .BR STAILQ_FOREACH () traverses the tail queue referenced by .I head in the forward direction, assigning each element in turn to .IR var . -.\" .PP +.\" .P .\" .BR STAILQ_FOREACH_FROM () .\" behaves identically to .\" .BR STAILQ_FOREACH () @@ -210,7 +210,7 @@ assigning each element in turn to .\" .I var .\" instead of the first element in the STAILQ referenced by .\" .IR head . -.\" .PP +.\" .P .\" .BR STAILQ_FOREACH_SAFE () .\" traverses the tail queue referenced by .\" .I head @@ -223,7 +223,7 @@ assigning each element in turn to .\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .PP +.\" .P .\" .BR STAILQ_FOREACH_FROM_SAFE () .\" behaves identically to .\" .BR STAILQ_FOREACH_SAFE () @@ -240,7 +240,7 @@ assigning each element in turn to removes the element .I elm from the tail queue. -.PP +.P .BR STAILQ_REMOVE_HEAD () removes the element at the head of the tail queue. For optimum efficiency, @@ -248,7 +248,7 @@ elements being removed from the head of the tail queue should use this macro explicitly rather than the generic .BR STAILQ_REMOVE () macro. -.\" .PP +.\" .P .\" .BR STAILQ_REMOVE_AFTER () .\" removes the element after .\" .I elm @@ -263,7 +263,7 @@ concatenates the tail queue headed by onto the end of the one headed by .I head1 removing all entries from the former. -.\" .PP +.\" .P .\" .BR STAILQ_SWAP () .\" swaps the contents of .\" .I head1 @@ -273,14 +273,14 @@ removing all entries from the former. .BR STAILQ_EMPTY () returns nonzero if the queue is empty, and zero if the queue contains at least one entry. -.PP +.P .BR STAILQ_FIRST (), and .BR STAILQ_NEXT () return a pointer to the first or next .I TYPE structure, respectively. -.PP +.P .BR STAILQ_HEAD_INITIALIZER () returns an initializer that can be assigned to the queue .IR head . diff --git a/man3/static_assert.3 b/man3/static_assert.3 index 86c6673..a81306d 100644 --- a/man3/static_assert.3 +++ b/man3/static_assert.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH static_assert 3 2023-05-03 "Linux man-pages 6.05.01" +.TH static_assert 3 2023-10-31 "Linux man-pages 6.7" .SH NAME static_assert, _Static_assert \- fail compilation if assertion is false .SH LIBRARY @@ -11,9 +11,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <assert.h> -.PP +.P .BI "void static_assert(scalar " constant-expression ", const char *" msg ); -.PP +.P /* Since C23: */ .BI "void static_assert(scalar " constant-expression ); .fi @@ -23,14 +23,14 @@ This macro is similar to but it works at compile time, generating a compilation error (with an optional message) when the input is false (i.e., compares equal to zero). -.PP +.P If the input is nonzero, no code is emitted. -.PP +.P .I msg must be a string literal. Since C23, this argument is optional. -.PP +.P There's a keyword, .BR \%_Static_assert (), that behaves identically, @@ -57,7 +57,7 @@ a macro can be written in terms of .BR \%static_assert (). The following program uses the macro to get the size of an array safely. -.PP +.P .in +4n .\" SRC BEGIN (must_be.c) .EX diff --git a/man3/statvfs.3 b/man3/statvfs.3 index 9b1978b..7d5d962 100644 --- a/man3/statvfs.3 +++ b/man3/statvfs.3 @@ -8,7 +8,7 @@ .\" .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com> .\" -.TH statvfs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH statvfs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME statvfs, fstatvfs \- get filesystem statistics .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/statvfs.h> -.PP +.P .BI "int statvfs(const char *restrict " path \ ", struct statvfs *restrict " buf ); .BI "int fstatvfs(int " fd ", struct statvfs *" buf ); @@ -32,7 +32,7 @@ is the pathname of any file within the mounted filesystem. is a pointer to a .I statvfs structure defined approximately as follows: -.PP +.P .in +4n .EX struct statvfs { @@ -52,7 +52,7 @@ struct statvfs { }; .EE .in -.PP +.P Here the types .I fsblkcnt_t and @@ -61,7 +61,7 @@ are defined in .IR <sys/types.h> . Both used to be .IR "unsigned long" . -.PP +.P The field .I f_flag is a bit mask indicating various options that were employed @@ -104,10 +104,10 @@ Writes are synched to the filesystem immediately (see the description of .B O_SYNC in .BR open (2)). -.PP +.P It is unspecified whether all members of the returned struct have meaningful values on all filesystems. -.PP +.P .BR fstatvfs () returns the same information about an open file referenced by descriptor .IR fd . @@ -188,7 +188,6 @@ T{ .BR fstatvfs () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Only the .B ST_NOSUID @@ -205,9 +204,9 @@ The Linux kernel has system calls and .BR fstatfs (2) to support this library call. -.PP +.P The glibc implementations of -.PP +.P .in +4n .EX pathconf(path, _PC_REC_XFER_ALIGN); @@ -215,7 +214,7 @@ pathconf(path, _PC_ALLOC_SIZE_MIN); pathconf(path, _PC_REC_MIN_XFER_SIZE); .EE .in -.PP +.P respectively use the .IR f_frsize , .IR f_frsize , @@ -225,7 +224,7 @@ fields returned by a call to .BR statvfs () with the argument .IR path . -.PP +.P Under Linux, .I f_favail is always the same as @@ -237,7 +236,7 @@ since no filesystems with an inode root reservation exist. POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Before glibc 2.13, .\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d .BR statvfs () diff --git a/man3/stdarg.3 b/man3/stdarg.3 index f3762f7..ce04704 100644 --- a/man3/stdarg.3 +++ b/man3/stdarg.3 @@ -13,7 +13,7 @@ .\" Converted for Linux, Mon Nov 29 15:11:11 1993, faith@cs.unc.edu .\" Additions, 2001-10-14, aeb .\" -.TH stdarg 3 2023-07-20 "Linux man-pages 6.05.01" +.TH stdarg 3 2023-10-31 "Linux man-pages 6.7" .SH NAME stdarg, va_start, va_arg, va_end, va_copy \- variable argument lists .SH LIBRARY @@ -22,7 +22,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdarg.h> -.PP +.P .BI "void va_start(va_list " ap ", " last ); .IB type " va_arg(va_list " ap ", " type ); .BI "void va_end(va_list " ap ); @@ -37,7 +37,7 @@ declares a type .I va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function. -.PP +.P The called function must declare an object of type .I va_list which is used by the macros @@ -55,12 +55,12 @@ for subsequent use by and .BR va_end (), and must be called first. -.PP +.P The argument .I last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type. -.PP +.P Because the address of this argument may be used in the .BR va_start () macro, it should not be declared as a register variable, @@ -87,7 +87,7 @@ The argument is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to .IR type . -.PP +.P The first use of the .BR va_arg () macro after that of the @@ -95,12 +95,12 @@ macro after that of the macro returns the argument after .IR last . Successive invocations return the values of the remaining arguments. -.PP +.P If there is no next argument, or if .I type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur. -.PP +.P If .I ap is passed to a function that uses @@ -144,30 +144,30 @@ argument, followed by the same number of .BR va_arg () invocations that was used to reach the current state of .IR src . -.PP +.P .\" Proposal from clive@demon.net, 1997-02-28 An obvious implementation would have a .I va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment -.PP +.P .in +4n .EX va_list aq = ap; .EE .in -.PP +.P Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs -.PP +.P .in +4n .EX va_list aq; *aq = *ap; .EE .in -.PP +.P Finally, on systems where arguments are passed in registers, it may be necessary for .BR va_start () @@ -181,7 +181,7 @@ can free the allocated memory again. To accommodate this situation, C99 adds a macro .BR va_copy (), so that the above assignment can be replaced by -.PP +.P .in +4n .EX va_list aq; @@ -190,7 +190,7 @@ va_copy(aq, ap); va_end(aq); .EE .in -.PP +.P Each invocation of .BR va_copy () must be matched by a corresponding invocation of @@ -222,7 +222,6 @@ T{ .BR va_arg () T} Thread safety MT-Safe race:ap .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -257,7 +256,7 @@ The function .I foo takes a string of format characters and prints out the argument associated with each format character based on the type. -.PP +.P .EX #include <stdio.h> #include <stdarg.h> diff --git a/man3/stdin.3 b/man3/stdin.3 index afe1fa5..42ed937 100644 --- a/man3/stdin.3 +++ b/man3/stdin.3 @@ -10,7 +10,7 @@ .\" 2005-06-16 mtk, mentioned freopen() .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" -.TH stdin 3 2023-03-30 "Linux man-pages 6.05.01" +.TH stdin 3 2023-10-31 "Linux man-pages 6.7" .SH NAME stdin, stdout, stderr \- standard I/O streams .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "extern FILE *" stdin ; .BI "extern FILE *" stdout ; .BI "extern FILE *" stderr ; @@ -35,7 +35,7 @@ but might instead refer to files or other devices, depending on what the parent process chose to set up. (See also the "Redirection" section of .BR sh (1).) -.PP +.P The input stream is referred to as "standard input"; the output stream is referred to as "standard output"; and the error stream is referred to as "standard error". @@ -45,7 +45,7 @@ used to refer to these files, namely .IR stdout , and .IR stderr . -.PP +.P Each of these symbols is a .BR stdio (3) macro of type pointer to @@ -54,7 +54,7 @@ and can be used with functions like .BR fprintf (3) or .BR fread (3). -.PP +.P Since .IR FILE s are a buffering wrapper around UNIX file descriptors, the @@ -63,7 +63,7 @@ interface, that is, the functions like .BR read (2) and .BR lseek (2). -.PP +.P On program startup, the integer file descriptors associated with the streams .IR stdin , @@ -82,7 +82,7 @@ are defined with these values in .BR freopen (3) to one of these streams can change the file descriptor number associated with the stream.) -.PP +.P Note that mixing use of .IR FILE s and raw file descriptors can produce @@ -95,7 +95,7 @@ This means for example, that after an .BR exec (3), the child inherits all open file descriptors, but all old streams have become inaccessible. -.PP +.P Since the symbols .IR stdin , .IR stdout , @@ -115,7 +115,7 @@ The standard streams are closed by a call to and by normal program termination. .SH STANDARDS C11, POSIX.1-2008. -.PP +.P The standards also stipulate that these three streams shall be open at program startup. .SH HISTORY diff --git a/man3/stdio.3 b/man3/stdio.3 index 3a5a447..73dfca2 100644 --- a/man3/stdio.3 +++ b/man3/stdio.3 @@ -9,7 +9,7 @@ .\" Converted for Linux, Mon Nov 29 16:07:22 1993, faith@cs.unc.edu .\" Modified, 2001-12-26, aeb .\" -.TH stdio 3 2023-07-30 "Linux man-pages 6.05.01" +.TH stdio 3 2023-12-29 "Linux man-pages 6.7" .SH NAME stdio \- standard input/output library functions .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "FILE *" stdin ; .BI "FILE *" stdout ; .BI "FILE *" stderr ; @@ -30,7 +30,7 @@ Input and output is mapped into logical data streams and the physical I/O characteristics are concealed. The functions and macros are listed below; more information is available from the individual man pages. -.PP +.P A stream is associated with an external file (which may be a physical device) by .I opening @@ -53,7 +53,7 @@ function; all output takes place as if all characters were written by successive calls to the .BR fputc (3) function. -.PP +.P A file is disassociated from a stream by .I closing the file. @@ -63,7 +63,7 @@ the file. The value of a pointer to a .I FILE object is indeterminate after a file is closed (garbage). -.PP +.P A file may be subsequently reopened, by the same or another program execution, and its contents reclaimed or modified (if it can be repositioned at the start). @@ -76,7 +76,7 @@ Other methods of program termination, such as .BR abort (3) do not bother about closing files properly. -.PP +.P At program startup, three text streams are predefined and need not be opened explicitly: .I standard input @@ -93,7 +93,7 @@ and When opened, the standard error stream is not fully buffered; the standard input and output streams are fully buffered if and only if the streams do not refer to an interactive device. -.PP +.P Output streams that refer to terminal devices are always line buffered by default; pending output to such streams is written automatically whenever an input stream that refers to a terminal device is read. @@ -103,7 +103,7 @@ output terminal, it is necessary to .BR fflush (3) the standard output before going off and computing so that the output will appear. -.PP +.P The .I stdio library is a part of the library @@ -115,7 +115,7 @@ SYNOPSIS sections of the following manual pages indicate which include files are to be used, what the compiler declaration for the function looks like and which external variables are of interest. -.PP +.P The following are defined as macros; these names may not be reused without first removing their current definitions with .BR #undef : @@ -192,9 +192,15 @@ T} \fBfileno\fP(3) T{ return the integer descriptor of the argument stream T} +\fBfmemopen\fP(3) T{ +open memory as stream +T} \fBfopen\fP(3) T{ stream open functions T} +\fBfopencookie\fP(3) T{ +open a custom stream +T} \fBfprintf\fP(3) T{ formatted output conversion T} @@ -243,6 +249,12 @@ T} \fBmktemp\fP(3) T{ make temporary filename (unique) T} +\fBopen_memstream\fP(3) T{ +open a dynamic memory buffer stream +T} +\fBopen_wmemstream\fP(3) T{ +open a dynamic memory buffer stream +T} \fBperror\fP(3) T{ system error messages T} diff --git a/man3/stdio_ext.3 b/man3/stdio_ext.3 index c154620..a98ffc5 100644 --- a/man3/stdio_ext.3 +++ b/man3/stdio_ext.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH stdio_ext 3 2023-07-20 "Linux man-pages 6.05.01" +.TH stdio_ext 3 2023-10-31 "Linux man-pages 6.7" .SH NAME __fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \- @@ -15,7 +15,7 @@ Standard C library .nf .B #include <stdio.h> .B #include <stdio_ext.h> -.PP +.P .BI "size_t __fbufsize(FILE *" stream ); .BI "size_t __fpending(FILE *" stream ); .BI "int __flbf(FILE *" stream ); @@ -32,46 +32,46 @@ Solaris introduced routines to allow portable access to the internals of the .I FILE structure, and glibc also implemented these. -.PP +.P The .BR __fbufsize () function returns the size of the buffer currently used by the given stream. -.PP +.P The .BR __fpending () function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only. -.PP +.P The .BR __flbf () function returns a nonzero value if the stream is line-buffered, and zero otherwise. -.PP +.P The .BR __freadable () function returns a nonzero value if the stream allows reading, and zero otherwise. -.PP +.P The .BR __fwritable () function returns a nonzero value if the stream allows writing, and zero otherwise. -.PP +.P The .BR __freading () function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise. -.PP +.P The .BR __fwriting () function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise. -.PP +.P The .BR __fsetlocking () function can be used to select the desired type of locking on the stream. @@ -95,13 +95,13 @@ will not do locking until the state is reset to .B FSETLOCKING_QUERY Don't change the type of locking. (Only return it.) -.PP +.P The .BR _flushlbf () function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.) -.PP +.P The .BR __fpurge () function discards the contents of the stream's buffer. @@ -132,7 +132,6 @@ T{ .BR _flushlbf () T} Thread safety MT-Safe .TE -.sp 1 .SH SEE ALSO .BR flockfile (3), .BR fpurge (3) diff --git a/man3/stpecpy.3 b/man3/stpecpy.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/stpecpy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3/stpecpyx.3 b/man3/stpecpyx.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/stpecpyx.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3/stpncpy.3 b/man3/stpncpy.3 index 617eb9b..c4b5db4 100644 --- a/man3/stpncpy.3 +++ b/man3/stpncpy.3 @@ -3,32 +3,32 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH stpncpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH stpncpy 3 2024-02-12 "Linux man-pages 6.7" .SH NAME stpncpy, strncpy -\- zero a fixed-width buffer and -copy a string into a character sequence with truncation -and zero the rest of it +\- +fill a fixed-size buffer with non-null bytes from a string, +padding with null bytes as needed .SH LIBRARY Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf .B #include <string.h> -.PP -.BI "char *strncpy(char " dst "[restrict ." sz "], \ +.P +.BI "char *strncpy(char " dst "[restrict ." dsize "], \ const char *restrict " src , -.BI " size_t " sz ); -.BI "char *stpncpy(char " dst "[restrict ." sz "], \ +.BI " size_t " dsize ); +.BI "char *stpncpy(char " dst "[restrict ." dsize "], \ const char *restrict " src , -.BI " size_t " sz ); +.BI " size_t " dsize ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR stpncpy (): .nf Since glibc 2.10: @@ -37,32 +37,36 @@ Feature Test Macro Requirements for glibc (see _GNU_SOURCE .fi .SH DESCRIPTION -These functions copy the string pointed to by +These functions copy non-null bytes from the string pointed to by .I src -into a null-padded character sequence at the fixed-width buffer pointed to by +into the array pointed to by .IR dst . +If the source has too few non-null bytes to fill the destination, +the functions pad the destination with trailing null bytes. If the destination buffer, limited by its size, isn't large enough to hold the copy, the resulting character sequence is truncated. For the difference between the two functions, see RETURN VALUE. -.PP +.P An implementation of these functions might be: -.PP +.P .in +4n .EX char * -strncpy(char *restrict dst, const char *restrict src, size_t sz) +strncpy(char *restrict dst, const char *restrict src, size_t dsize) { - stpncpy(dst, src, sz); + stpncpy(dst, src, dsize); return dst; } \& char * -stpncpy(char *restrict dst, const char *restrict src, size_t sz) +stpncpy(char *restrict dst, const char *restrict src, size_t dsize) { - bzero(dst, sz); - return mempcpy(dst, src, strnlen(src, sz)); + size_t dlen; +\& + dlen = strnlen(src, dsize); + return memset(mempcpy(dst, src, dlen), 0, dsize \- dlen); } .EE .in @@ -90,7 +94,6 @@ T{ .BR strncpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR strncpy () @@ -98,7 +101,7 @@ C11, POSIX.1-2008. .TP .BR stpncpy () POSIX.1-2008. -.SH STANDARDS +.SH HISTORY .TP .BR strncpy () C89, POSIX.1-2001, SVr4, 4.3BSD. @@ -111,13 +114,23 @@ The name of these functions is confusing. These functions produce a null-padded character sequence, not a string (see .BR string_copying (7)). -.PP +For example: +.P +.in +4n +.EX +strncpy(buf, "1", 5); // { \[aq]1\[aq], 0, 0, 0, 0 } +strncpy(buf, "1234", 5); // { \[aq]1\[aq], \[aq]2\[aq], \[aq]3\[aq], \[aq]4\[aq], 0 } +strncpy(buf, "12345", 5); // { \[aq]1\[aq], \[aq]2\[aq], \[aq]3\[aq], \[aq]4\[aq], \[aq]5\[aq] } +strncpy(buf, "123456", 5); // { \[aq]1\[aq], \[aq]2\[aq], \[aq]3\[aq], \[aq]4\[aq], \[aq]5\[aq] } +.EE +.in +.P It's impossible to distinguish truncation by the result of the call, from a character sequence that just fits the destination buffer; truncation should be detected by comparing the length of the input string with the size of the destination buffer. -.PP +.P If you're going to use this function in chained calls, it would be useful to develop a similar function that accepts a pointer to the end (one after the last element) of the destination buffer @@ -139,20 +152,22 @@ main(void) size_t len; \& if (sizeof(buf2) < strlen("Hello world!")) - warnx("strncpy: truncating character sequence"); + errx("strncpy: truncating character sequence"); strncpy(buf2, "Hello world!", sizeof(buf2)); len = strnlen(buf2, sizeof(buf2)); \& printf("[len = %zu]: ", len); - printf("%.*s\en", (int) len, buf2); // "Hello world!" + fwrite(buf2, 1, len, stdout); + putchar(\[aq]\en\[aq]); \& if (sizeof(buf1) < strlen("Hello world!")) - warnx("stpncpy: truncating character sequence"); + errx("stpncpy: truncating character sequence"); p = stpncpy(buf1, "Hello world!", sizeof(buf1)); len = p \- buf1; \& printf("[len = %zu]: ", len); - printf("%.*s\en", (int) len, buf1); // "Hello world!" + fwrite(buf1, 1, len, stdout); + putchar(\[aq]\en\[aq]); \& exit(EXIT_SUCCESS); } diff --git a/man3/strcasecmp.3 b/man3/strcasecmp.3 index f19a5da..3154740 100644 --- a/man3/strcasecmp.3 +++ b/man3/strcasecmp.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:12:45 1993 by Rik Faith (faith@cs.unc.edu) -.TH strcasecmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strcasecmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strcasecmp, strncasecmp \- compare two strings ignoring case .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <strings.h> -.PP +.P .BI "int strcasecmp(const char *" s1 ", const char *" s2 ); .BI "int strncasecmp(const char " s1 [. n "], const char " s2 [. n "], \ size_t " n ); @@ -36,7 +36,7 @@ less than, equal to, or greater than zero if is found, respectively, to be less than, to match, or be greater than .IR s2 . -.PP +.P The .BR strncasecmp () function is similar, except that it compares @@ -73,12 +73,11 @@ T{ .BR strncasecmp () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY 4.4BSD, POSIX.1-2001. -.PP +.P The .BR strcasecmp () and @@ -92,9 +91,9 @@ header file also declares these functions, if the (or, in glibc 2.19 and earlier, .BR _BSD_SOURCE ) feature test macro is defined. -.PP +.P The POSIX.1-2008 standard says of these functions: -.PP +.P .RS When the .B LC_CTYPE diff --git a/man3/strchr.3 b/man3/strchr.3 index 91bd8aa..bff3bd4 100644 --- a/man3/strchr.3 +++ b/man3/strchr.3 @@ -11,7 +11,7 @@ .\" 2006-05-19, Justin Pryzby <pryzbyj@justinpryzby.com> .\" Document strchrnul(3). .\" -.TH strchr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strchr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strchr, strrchr, strchrnul \- locate character in string .SH LIBRARY @@ -20,13 +20,13 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strchr(const char *" s ", int " c ); .BI "char *strrchr(const char *" s ", int " c ); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "char *strchrnul(const char *" s ", int " c ); .fi .SH DESCRIPTION @@ -37,7 +37,7 @@ of the character .I c in the string .IR s . -.PP +.P The .BR strrchr () function returns a pointer to the last occurrence @@ -45,7 +45,7 @@ of the character .I c in the string .IR s . -.PP +.P The .BR strchrnul () function is like @@ -58,7 +58,7 @@ then it returns a pointer to the null byte at the end of .IR s , rather than NULL. -.PP +.P Here "character" means "byte"; these functions do not work with wide or multibyte characters. .SH RETURN VALUE @@ -73,7 +73,7 @@ so that if .I c is specified as \[aq]\e0\[aq], these functions return a pointer to the terminator. -.PP +.P The .BR strchrnul () function returns a pointer to the matched character, @@ -98,7 +98,6 @@ T{ .BR strchrnul () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR strchr () diff --git a/man3/strcmp.3 b/man3/strcmp.3 index 57b378e..78fdf68 100644 --- a/man3/strcmp.3 +++ b/man3/strcmp.3 @@ -11,7 +11,7 @@ .\" Modified Sat Jul 24 18:08:52 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-08-31, aeb .\" -.TH strcmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strcmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strcmp, strncmp \- compare two strings .SH LIBRARY @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "int strcmp(const char *" s1 ", const char *" s2 ); .BI "int strncmp(const char " s1 [. n "], const char " s2 [. n "], size_t " n ); .fi @@ -34,7 +34,7 @@ and The locale is not taken into account (for a locale-aware comparison, see .BR strcoll (3)). The comparison is done using unsigned characters. -.PP +.P .BR strcmp () returns an integer indicating the result of the comparison, as follows: .IP \[bu] 3 @@ -53,7 +53,7 @@ a positive value if .I s1 is greater than .IR s2 . -.PP +.P The .BR strncmp () function is similar, except it compares @@ -91,18 +91,17 @@ T{ .BR strncmp () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS POSIX.1 specifies only that: .RS -.PP +.P The sign of a nonzero return value shall be determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type .IR "unsigned char" ) that differ in the strings being compared. .RE -.PP +.P In glibc, as in most other implementations, the return value is the arithmetic result of subtracting the last compared byte in @@ -122,7 +121,7 @@ The program below can be used to demonstrate the operation of (when given three arguments). First, some examples using .BR strcmp (): -.PP +.P .in +4n .EX $ \fB./string_comp ABC ABC\fP @@ -137,16 +136,16 @@ $ .\fB/string_comp $\[aq]\e201\[aq] A\fP # 0201 \- 0101 = 0100 (or 64 decimal) <str1> is greater than <str2> (64) .EE .in -.PP +.P The last example uses .BR bash (1)-specific syntax to produce a string containing an 8-bit ASCII code; the result demonstrates that the string comparison uses unsigned characters. -.PP +.P And then some examples using .BR strncmp (): -.PP +.P .in +4n .EX $ \fB./string_comp ABC AB 3\fP diff --git a/man3/strcoll.3 b/man3/strcoll.3 index e8146b7..71918ea 100644 --- a/man3/strcoll.3 +++ b/man3/strcoll.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:40:44 1993 by Rik Faith (faith@cs.unc.edu) -.TH strcoll 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strcoll 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strcoll \- compare two strings using the current locale .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "int strcoll(const char *" s1 ", const char *" s2 ); .fi .SH DESCRIPTION @@ -64,7 +64,6 @@ T{ .BR strcoll () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/strcpy.3 b/man3/strcpy.3 index 63ed127..fd0c335 100644 --- a/man3/strcpy.3 +++ b/man3/strcpy.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH strcpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strcpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME stpcpy, strcpy, strcat \- copy or catenate a string .SH LIBRARY @@ -12,17 +12,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *stpcpy(char *restrict " dst ", const char *restrict " src ); .BI "char *strcpy(char *restrict " dst ", const char *restrict " src ); .BI "char *strcat(char *restrict " dst ", const char *restrict " src ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR stpcpy (): .nf Since glibc 2.10: @@ -54,9 +54,9 @@ after the string pointed to by The programmer is responsible for allocating a destination buffer large enough, that is, .IR "strlen(dst) + strlen(src) + 1" . -.PP +.P An implementation of these functions might be: -.PP +.P .in +4n .EX char * @@ -112,7 +112,6 @@ T{ .BR strcat () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR stpcpy () @@ -137,19 +136,19 @@ The strings and .I dst may not overlap. -.PP +.P If the destination buffer is not large enough, the behavior is undefined. See .B _FORTIFY_SOURCE in .BR feature_test_macros (7). -.PP +.P .BR strcat () can be very inefficient. Read about .UR https://www.joelonsoftware.com/\:2001/12/11/\:back\-to\-basics/ -Shlemiel the painter +Shlemiel the painter .UE . .SH EXAMPLES .\" SRC BEGIN (strcpy.c) diff --git a/man3/strdup.3 b/man3/strdup.3 index e787219..75b678e 100644 --- a/man3/strdup.3 +++ b/man3/strdup.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Wed Oct 17 01:12:26 2001 by John Levon <moz@compsoc.man.ac.uk> -.TH strdup 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strdup 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strdup, strndup, strdupa, strndupa \- duplicate a string .SH LIBRARY @@ -18,19 +18,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strdup(const char *" s ); -.PP +.P .BI "char *strndup(const char " s [. n "], size_t " n ); .BI "char *strdupa(const char *" s ); .BI "char *strndupa(const char " s [. n "], size_t " n ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strdup (): .nf _XOPEN_SOURCE >= 500 @@ -38,7 +38,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi -.PP +.P .BR strndup (): .nf Since glibc 2.10: @@ -46,7 +46,7 @@ Feature Test Macro Requirements for glibc (see Before glibc 2.10: _GNU_SOURCE .fi -.PP +.P .BR strdupa (), .BR strndupa (): .nf @@ -63,7 +63,7 @@ obtained with .BR malloc (3), and can be freed with .BR free (3). -.PP +.P The .BR strndup () function is similar, but copies at most @@ -76,7 +76,7 @@ is longer than only .I n bytes are copied, and a terminating null byte (\[aq]\e0\[aq]) is added. -.PP +.P .BR strdupa () and .BR strndupa () @@ -112,7 +112,6 @@ T{ .BR strndupa () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR strdup () diff --git a/man3/strerror.3 b/man3/strerror.3 index 5ed507e..89f4e9b 100644 --- a/man3/strerror.3 +++ b/man3/strerror.3 @@ -17,7 +17,7 @@ .\" 2005-12-13, mtk, Substantial rewrite of strerror_r() description .\" Addition of extra material on portability and standards. .\" -.TH strerror 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strerror 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strerror, strerrorname_np, strerrordesc_np, strerror_r, strerror_l \- return string describing error number @@ -27,31 +27,31 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strerror(int " errnum ); .BI "const char *strerrorname_np(int " errnum ); .BI "const char *strerrordesc_np(int " errnum ); -.PP +.P .BI "int strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen ); /* XSI-compliant */ -.PP +.P .BI "char *strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen ); /* GNU-specific */ -.PP +.P .BI "char *strerror_l(int " errnum ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strerrorname_np (), .BR strerrordesc_np (): .nf _GNU_SOURCE .fi -.PP +.P .BR strerror_r (): .nf The XSI-compliant version is provided if: @@ -72,15 +72,16 @@ part of the current locale to select the appropriate language. is .BR EINVAL , the returned description will be "Invalid argument".) -This string must not be modified by the application, but may be -modified by a subsequent call to +This string must not be modified by the application, +and the returned pointer will be invalidated on a subsequent call to .BR strerror () or -.BR strerror_l (). +.BR strerror_l (), +or if the thread that obtained the string exits. No other library function, including .BR perror (3), will modify this string. -.PP +.P Like .BR strerror (), the @@ -90,7 +91,7 @@ code passed in the argument .IR errnum , with the difference that the returned string is not translated according to the current locale. -.PP +.P The .BR strerrorname_np () function returns a pointer to a string containing the name of the error @@ -99,14 +100,18 @@ code passed in the argument For example, given .B EPERM as an argument, this function returns a pointer to the string "EPERM". +Given +.B 0 +as an argument, +this function returns a pointer to the string "0". .\" .SS strerror_r() -The .BR strerror_r () -function is similar to +is like .BR strerror (), -but is -thread safe. +but might use the supplied buffer +.I buf +instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), @@ -121,7 +126,7 @@ is defined by default with the value 200112L, so that the XSI-compliant version of .BR strerror_r () is provided by default. -.PP +.P The XSI-compliant .BR strerror_r () is preferred for portable applications. @@ -129,7 +134,7 @@ It returns the error string in the user-supplied buffer .I buf of length .IR buflen . -.PP +.P The GNU-specific .BR strerror_r () returns a pointer to a string containing the error message. @@ -174,7 +179,7 @@ and the GNU-specific functions return the appropriate error description string, or an "Unknown error nnn" message if the error number is unknown. -.PP +.P On success, .BR strerrorname_np () and @@ -183,7 +188,7 @@ return the appropriate error description string. If .I errnum is an invalid error number, these functions return NULL. -.PP +.P The XSI-compliant .BR strerror_r () function returns 0 on success. @@ -192,7 +197,7 @@ a (positive) error number is returned (since glibc 2.13), or \-1 is returned and .I errno is set to indicate the error (before glibc 2.13). -.PP +.P POSIX.1-2001 and POSIX.1-2008 require that a successful call to .BR strerror () or @@ -231,7 +236,7 @@ T{ T} Thread safety T{ .na .nh -MT-Unsafe race:strerror +MT-Safe T} T{ .na @@ -246,7 +251,10 @@ T{ .BR strerror_l () T} Thread safety MT-Safe .TE -.sp 1 +.P +Before glibc 2.32, +.BR strerror () +is not MT-Safe. .SH STANDARDS .TP .BR strerror () @@ -265,7 +273,7 @@ POSIX.1-2008. .TQ .BR strerrordesc_np () GNU. -.PP +.P POSIX.1-2001 permits .BR strerror () to set @@ -302,13 +310,6 @@ POSIX.1-2008. .BR strerrordesc_np () glibc 2.32. .SH NOTES -The GNU C Library uses a buffer of 1024 characters for -.BR strerror (). -This buffer size therefore should be sufficient to avoid an -.B ERANGE -error when calling -.BR strerror_r (). -.PP .BR strerrorname_np () and .BR strerrordesc_np () @@ -319,4 +320,5 @@ are thread-safe and async-signal-safe. .BR error (3), .BR perror (3), .BR strsignal (3), -.BR locale (7) +.BR locale (7), +.BR signal-safety (7) diff --git a/man3/strfmon.3 b/man3/strfmon.3 index a8e34f5..687da22 100644 --- a/man3/strfmon.3 +++ b/man3/strfmon.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH strfmon 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strfmon 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strfmon, strfmon_l \- convert monetary value to a string .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <monetary.h> -.PP +.P .BI "ssize_t strfmon(char " s "[restrict ." max "], size_t " max , .BI " const char *restrict " format ", ...);" .BI "ssize_t strfmon_l(char " s "[restrict ." max "], size_t " max ", \ @@ -31,7 +31,7 @@ result in the character array .I s of size .IR max . -.PP +.P The .BR strfmon_l () function performs the same task, @@ -47,7 +47,7 @@ is the special locale object (see .BR duplocale (3)) or is not a valid locale object handle. -.PP +.P Ordinary characters in .I format are copied to @@ -83,20 +83,20 @@ Omit the currency symbol. .B \- Left justify all fields. The default is right justification. -.PP +.P Next, there may be a field width: a decimal digit string specifying a minimum field width in bytes. The default is 0. A result smaller than this width is padded with spaces (on the left, unless the left-justify flag was given). -.PP +.P Next, there may be a left precision of the form "#" followed by a decimal digit string. If the number of digits left of the radix character is smaller than this, the representation is padded on the left with the numeric fill character. Grouping characters are not counted in this field width. -.PP +.P Next, there may be a right precision of the form "." followed by a decimal digit string. The amount being formatted is rounded to @@ -111,7 +111,7 @@ If the right precision is 0, no radix character is printed. .BR LC_MONETARY , and may differ from that specified by .BR LC_NUMERIC .) -.PP +.P Finally, the conversion specification must be ended with a conversion character. The three conversion characters are @@ -161,29 +161,28 @@ T{ .BR strfmon_l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. .SH EXAMPLES The call -.PP +.P .in +4n .EX strfmon(buf, sizeof(buf), "[%\[ha]=*#6n] [%=*#6i]", 1234.567, 1234.567); .EE .in -.PP +.P outputs -.PP +.P .in +4n .EX [€ **1234,57] [EUR **1 234,57] .EE .in -.PP +.P in the .I nl_NL locale. @@ -194,7 +193,7 @@ The and .I en_GB locales yield -.PP +.P .in +4n .EX [ **1234,57 €] [ **1.234,57 EUR] diff --git a/man3/strfromd.3 b/man3/strfromd.3 index 6bcc113..9243191 100644 --- a/man3/strfromd.3 +++ b/man3/strfromd.3 @@ -10,7 +10,7 @@ .\" ISO/IEC TS 18661-1 technical specification. .\" snprintf and other man.3 pages. .\" -.TH strfromd 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strfromd 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strfromd, strfromf, strfroml \- convert a floating-point value into a string @@ -20,7 +20,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int strfromd(char " str "[restrict ." n "], size_t " n , .BI " const char *restrict " format ", double " fp ");" .BI "int strfromf(char " str "[restrict ." n "], size_t " n , @@ -28,12 +28,12 @@ Standard C library .BI "int strfroml(char " str "[restrict ." n "], size_t " n , .BI " const char *restrict " format ", long double " fp ");" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strfromd (), .BR strfromf (), .BR strfroml (): @@ -52,26 +52,26 @@ At most .I n characters are stored into .IR str . -.PP +.P The terminating null byte ('\e0') is written if and only if .I n is sufficiently large, otherwise the written string is truncated at .I n characters. -.PP +.P The .BR strfromd (), .BR strfromf (), and .BR strfroml () functions are equivalent to -.PP +.P .in +4n .EX snprintf(str, n, format, fp); .EE .in -.PP +.P except for the .I format string. @@ -93,7 +93,7 @@ Finally, the format string should have one of the conversion specifiers .BR g , or .BR G . -.PP +.P The conversion specifier is applied based on the floating-point type indicated by the function suffix. Therefore, unlike @@ -102,10 +102,10 @@ the format string does not have a length modifier character. See .BR snprintf (3) for a detailed description of these conversion specifiers. -.PP +.P The implementation conforms to the C99 standard on conversion of NaN and infinity values: -.PP +.P .RS If .I fp @@ -124,12 +124,12 @@ If .BR E , .BR G ) is the conversion specifier, the conversion is to "NAN" or "\-NAN". -.PP +.P Likewise if .I fp is infinity, it is converted to [\-]inf or [\-]INF. .RE -.PP +.P A malformed .I format string results in undefined behavior. @@ -154,7 +154,7 @@ For an explanation of the terms used in this section, see and the .B POSIX Safety Concepts section in GNU C Library manual. -.PP +.P .TS allbox; lbx lb lb @@ -170,7 +170,7 @@ T} Thread safety MT-Safe locale \^ Async-signal safety AS-Unsafe heap \^ Async-cancel safety AC-Unsafe mem .TE -.sp 1 +.P Note: these attributes are preliminary. .SH STANDARDS ISO/IEC TS 18661-1. @@ -189,7 +189,7 @@ category of the current locale. .SH EXAMPLES To convert the value 12.1 as a float type to a string using decimal notation, resulting in "12.100000": -.PP +.P .in +4n .EX #define __STDC_WANT_IEC_60559_BFP_EXT__ @@ -199,10 +199,10 @@ char s[ssize]; strfromf(s, ssize, "%f", 12.1); .EE .in -.PP +.P To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in "12.35": -.PP +.P .in +4n .EX #define __STDC_WANT_IEC_60559_BFP_EXT__ @@ -212,10 +212,10 @@ char s[ssize]; strfromf(s, ssize, "%.2f", 12.3456); .EE .in -.PP +.P To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in "1E+20": -.PP +.P .in +4n .EX #define __STDC_WANT_IEC_60559_BFP_EXT__ diff --git a/man3/strfry.3 b/man3/strfry.3 index 74a342b..9871249 100644 --- a/man3/strfry.3 +++ b/man3/strfry.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:39:43 1993 by Rik Faith (faith@cs.unc.edu) -.TH strfry 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strfry 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strfry \- randomize a string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "char *strfry(char *" string ); .fi .SH DESCRIPTION @@ -48,7 +48,6 @@ T{ .BR strfry () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH SEE ALSO diff --git a/man3/strftime.3 b/man3/strftime.3 index 412ba06..191c0f4 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -15,7 +15,7 @@ .\" 2005-11-22 mtk, added glibc Notes covering optional 'flag' and .\" 'width' components of conversion specifications. .\" -.TH strftime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strftime 3 2024-01-28 "Linux man-pages 6.7" .SH NAME strftime \- format date and time .SH LIBRARY @@ -24,11 +24,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BI "size_t strftime(char " s "[restrict ." max "], size_t " max , .BI " const char *restrict " format , .BI " const struct tm *restrict " tm ); -.PP +.P .BI "size_t strftime_l(char " s "[restrict ." max "], size_t " max , .BI " const char *restrict " format , .BI " const struct tm *restrict " tm , @@ -54,7 +54,7 @@ See also .BR ctime (3). .\" FIXME . POSIX says: Local timezone information is used as though .\" strftime() called tzset(). But this doesn't appear to be the case -.PP +.P The format specification is a null-terminated string and may contain special character sequences called .IR "conversion specifications", @@ -63,7 +63,7 @@ some other character known as a .IR "conversion specifier character". All other character sequences are .IR "ordinary character sequences". -.PP +.P The characters of ordinary character sequences (including the null byte) are copied verbatim from .I format @@ -168,10 +168,10 @@ Modifier: use alternative ("era-based") format, see below. (SU) .B %F Equivalent to .B %Y\-%m\-%d -(the ISO\ 8601 date format). (C99) +(the ISO\~8601 date format). (C99) .TP .B %G -The ISO\ 8601 week-based year (see NOTES) with century as a decimal number. +The ISO\~8601 week-based year (see NOTES) with century as a decimal number. The 4-digit year corresponding to the ISO week number (see .BR %V ). This has the same format and value as @@ -330,7 +330,7 @@ and .IR tm_wday .) .TP .B %V -The ISO\ 8601 week number (see NOTES) of the current year as a decimal number, +The ISO\~8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year. See also @@ -431,7 +431,7 @@ format. (TZ) .TP .B %% A literal \[aq]%\[aq] character. -.PP +.P Some conversion specifications can be modified by preceding the conversion specifier character by the .B E @@ -477,7 +477,7 @@ as an argument to a One example of such alternative forms is the Japanese era calendar scheme in the .B ja_JP glibc locale. -.PP +.P .BR strftime_l () is equivalent to .BR strftime (), @@ -508,7 +508,7 @@ returns 0, and the contents of the array are undefined. .\" would return .\" .I max .\" if the array was too small.) -.PP +.P Note that the return value 0 does not necessarily indicate an error. For example, in many locales .B %p @@ -537,7 +537,6 @@ T{ .BR strftime_l () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS .TP .BR strftime () @@ -555,7 +554,7 @@ SVr4, C89. .TP .BR strftime_l () POSIX.1-2008. -.PP +.P There are strict inclusions between the set of conversions given in ANSI C (unmarked), those given in the Single UNIX Specification (marked SU), those given in Olson's timezone package (marked TZ), @@ -571,7 +570,7 @@ as well. The .B %F conversion is in C99 and POSIX.1-2001. -.PP +.P In SUSv2, the .B %S specifier allowed a range of 00 to 61, @@ -579,13 +578,13 @@ to allow for the theoretical possibility of a minute that included a double leap second (there never has been such a minute). .SH NOTES -.SS ISO 8601 week dates +.SS ISO\~8601 week dates .BR %G , .BR %g , and .B %V yield values calculated from the week-based year defined by the -ISO\ 8601 standard. +ISO\~8601 standard. In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the @@ -594,16 +593,16 @@ the first week of the year that contains a Thursday; or, the week that has 4 January in it). When three or fewer days of the first calendar week of the new year fall within that year, -then the ISO 8601 week-based system counts those days as part of week 52 +then the ISO\~8601 week-based system counts those days as part of week 52 or 53 of the preceding year. For example, 1 January 2010 is a Friday, meaning that just three days of that calendar week fall in 2010. -Thus, the ISO\ 8601 week-based system considers these days to be part of +Thus, the ISO\~8601 week-based system considers these days to be part of week 53 .RB ( %V ) of the year 2009 .RB ( %G ); -week 01 of ISO\ 8601 year 2010 starts on Monday, 4 January 2010. +week 01 of ISO\~8601 year 2010 starts on Monday, 4 January 2010. Similarly, the first two days of January 2011 are considered to be part of week 52 of the year 2010. .SS glibc notes @@ -622,7 +621,7 @@ may be specified. or .B O modifiers, if present.) -.PP +.P The following flag characters are permitted: .TP .B _ @@ -645,7 +644,7 @@ Swap the case of the result string. (This flag works only with certain conversion specifier characters, and of these, it is only really useful with .BR %Z .) -.PP +.P An optional decimal width specifier may follow the (possibly absent) flag. If the natural size of the field is smaller than this width, then the result string is padded (on the left) to the specified width. @@ -667,7 +666,7 @@ specify any .I errno settings for .BR strftime (). -.PP +.P Some buggy versions of .BR gcc (1) complain about the use of @@ -682,7 +681,7 @@ to circumvent this problem. A relatively clean one is to add an intermediate function -.PP +.P .in +4n .EX size_t @@ -693,7 +692,7 @@ my_strftime(char *s, size_t max, const char *fmt, } .EE .in -.PP +.P Nowadays, .BR gcc (1) provides the @@ -703,16 +702,16 @@ so that the above workaround is no longer required. .SH EXAMPLES .B RFC\~2822-compliant date format (with an English locale for %a and %b) -.PP +.P .in +4n .EX "%a,\ %d\ %b\ %Y\ %T\ %z" .EE .in -.PP +.P .B RFC\~822-compliant date format (with an English locale for %a and %b) -.PP +.P .in +4n .EX "%a,\ %d\ %b\ %y\ %T\ %z" @@ -721,11 +720,11 @@ so that the above workaround is no longer required. .SS Example program The program below can be used to experiment with .BR strftime (). -.PP +.P Some examples of the result string produced by the glibc implementation of .BR strftime () are as follows: -.PP +.P .in +4n .EX .RB "$" " ./a.out \[aq]%m\[aq]" diff --git a/man3/string.3 b/man3/string.3 index dc1c415..e7fb777 100644 --- a/man3/string.3 +++ b/man3/string.3 @@ -7,7 +7,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:54:31 1993, Rik Faith (faith@cs.unc.edu) -.TH string 3 2023-01-22 "Linux man-pages 6.05.01" +.TH string 3 2023-11-14 "Linux man-pages 6.7" .SH NAME stpcpy, strcasecmp, strcat, strchr, strcmp, strcoll, strcpy, strcspn, strdup, strfry, strlen, strncat, strncmp, strncpy, strncasecmp, strpbrk, @@ -179,21 +179,14 @@ to the current locale and copies the first .I n bytes to .IR dest . -.SS Obsolete functions .TP .nf .BI "char *strncpy(char " dest "[restrict ." n "], \ const char " src "[restrict ." n ], .BI " size_t " n ); .fi -Copy at most -.I n -bytes from string -.I src -to -.IR dest , -returning a pointer to the start of -.IR dest . +Fill a fixed-size buffer with leading non-null bytes from a source array, +padding with null bytes as needed. .SH DESCRIPTION The string functions perform operations on null-terminated strings. diff --git a/man3/strlen.3 b/man3/strlen.3 index c5820ba..9b0ec8e 100644 --- a/man3/strlen.3 +++ b/man3/strlen.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:02:26 1993 by Rik Faith (faith@cs.unc.edu) -.TH strlen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strlen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strlen \- calculate the length of a string .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "size_t strlen(const char *" s ); .fi .SH DESCRIPTION @@ -45,7 +45,6 @@ T{ .BR strlen () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/strncat.3 b/man3/strncat.3 index f53c930..74848c9 100644 --- a/man3/strncat.3 +++ b/man3/strncat.3 @@ -3,43 +3,45 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH strncat 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strncat 3 2023-12-05 "Linux man-pages 6.7" .SH NAME -strncat \- concatenate a null-padded character sequence into a string +strncat +\- +append non-null bytes from a source array to a string, +and null-terminate the result .SH LIBRARY Standard C library .RI ( libc ", " \-lc ) .SH SYNOPSIS .nf .B #include <string.h> -.PP -.BI "char *strncat(char *restrict " dst ", const char " src "[restrict ." sz ], -.BI " size_t " sz ); +.P +.BI "char *strncat(char *restrict " dst ", const char " src "[restrict ." ssize ], +.BI " size_t " ssize ); .fi .SH DESCRIPTION -This function catenates the input character sequence -contained in a null-padded fixed-width buffer, -into a string at the buffer pointed to by +This function appends at most +.I ssize +non-null bytes from the array pointed to by +.IR src , +followed by a null character, +to the end of the string pointed to by .IR dst . -The programmer is responsible for allocating a destination buffer large enough, -that is, -.IR "strlen(dst) + strnlen(src, sz) + 1" . -.PP +.I dst +must point to a string contained in a buffer that is large enough, +that is, the buffer size must be at least +.IR "strlen(dst) + strnlen(src, ssize) + 1" . +.P An implementation of this function might be: -.PP +.P .in +4n .EX char * -strncat(char *restrict dst, const char *restrict src, size_t sz) +strncat(char *restrict dst, const char *restrict src, size_t ssize) { - int len; - char *p; -\& - len = strnlen(src, sz); - p = dst + strlen(dst); - p = mempcpy(p, src, len); - *p = \[aq]\e0\[aq]; + #define strnul(s) (s + strlen(s)) \& + stpcpy(mempcpy(strnul(dst), src, strnlen(src, ssize)), ""); return dst; } .EE @@ -62,17 +64,17 @@ T{ .BR strncat () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY POSIX.1-2001, C89, SVr4, 4.3BSD. .SH CAVEATS -The name of this function is confusing. -This function has no relation to +The name of this function is confusing; +it has no relation to .BR strncpy (3). -.PP -If the destination buffer is not large enough, +.P +If the destination buffer does not already contain a string, +or is not large enough, the behavior is undefined. See .B _FORTIFY_SOURCE @@ -82,7 +84,7 @@ in This function can be very inefficient. Read about .UR https://www.joelonsoftware.com/\:2001/12/11/\:back\-to\-basics/ -Shlemiel the painter +Shlemiel the painter .UE . .SH EXAMPLES .\" SRC BEGIN (strncat.c) @@ -97,9 +99,9 @@ Shlemiel the painter int main(void) { - size_t maxsize; + size_t n; \& - // Null-padded fixed-width character sequences + // Null-padded fixed-size character sequences char pre[4] = "pre."; char new_post[50] = ".foo.bar"; \& @@ -108,9 +110,8 @@ main(void) char src[] = "some_long_body.post"; char *dest; \& - maxsize = nitems(pre) + strlen(src) \- strlen(post) + - nitems(new_post) + 1; - dest = malloc(sizeof(*dest) * maxsize); + n = nitems(pre) + strlen(src) \- strlen(post) + nitems(new_post) + 1; + dest = malloc(sizeof(*dest) * n); if (dest == NULL) err(EXIT_FAILURE, "malloc()"); \& @@ -128,4 +129,4 @@ main(void) .in .SH SEE ALSO .BR string (3), -.BR string_copying (3) +.BR string_copying (7) diff --git a/man3/strnlen.3 b/man3/strnlen.3 index eeaf3c6..78e5c51 100644 --- a/man3/strnlen.3 +++ b/man3/strnlen.3 @@ -6,7 +6,7 @@ .\" References consulted: .\" GNU glibc-2 source code and manual .\" -.TH strnlen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strnlen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strnlen \- determine the length of a fixed-size string .SH LIBRARY @@ -15,15 +15,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "size_t strnlen(const char " s [. maxlen "], size_t " maxlen ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strnlen (): .nf Since glibc 2.10: @@ -75,7 +75,6 @@ T{ .BR strnlen () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/strpbrk.3 b/man3/strpbrk.3 index abdf5af..c8d71a8 100644 --- a/man3/strpbrk.3 +++ b/man3/strpbrk.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:01:24 1993 by Rik Faith (faith@cs.unc.edu) -.TH strpbrk 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strpbrk 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strpbrk \- search a string for any of a set of bytes .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strpbrk(const char *" s ", const char *" accept ); .fi .SH DESCRIPTION @@ -51,7 +51,6 @@ T{ .BR strpbrk () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/strptime.3 b/man3/strptime.3 index 6dd0590..9ccccfd 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -9,7 +9,7 @@ .\" Modified, aeb, 2001-08-31 .\" Modified, wharms 2001-11-12, remark on white space and example .\" -.TH strptime 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strptime 3 2024-01-28 "Linux man-pages 6.7" .SH NAME strptime \- convert a string representation of time to a time tm structure .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .nf .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <time.h> -.PP +.P .BI "char *strptime(const char *restrict " s ", const char *restrict " format , .BI " struct tm *restrict " tm ); .fi @@ -36,12 +36,12 @@ structure pointed to by .IR tm , using the format specified by .IR format . -.PP +.P The broken-down time structure .I tm is described in .BR tm (3type). -.PP +.P The .I format argument @@ -59,7 +59,7 @@ except for whitespace, which matches zero or more whitespace characters in the input string. There should be white\%space or other alphanumeric characters between any two field descriptors. -.PP +.P The .BR strptime () function processes the input string from left @@ -68,7 +68,7 @@ Each of the three possible input elements (whitespace, literal, or format) are handled one after the other. If the input cannot be matched to the format string, the function stops. The remainder of the format and input strings are not processed. -.PP +.P The supported input field descriptors are listed below. In case a text string (such as the name of a day of the week or a month name) is to be matched, the comparison is case insensitive. @@ -104,7 +104,7 @@ Equivalent to to non-Americans, especially since .B %d/%m/%y is widely used in Europe. -The ISO 8601 standard format is +The ISO\~8601 standard format is .BR %Y\-%m\-%d .) .TP .B %H @@ -180,13 +180,13 @@ range 00\[en]68 refer to years in the twenty-first century (2000\[en]2068). .TP .B %Y The year, including century (for example, 1991). -.PP +.P Some field descriptors can be modified by the E or O modifier characters to indicate that an alternative format or specification should be used. If the alternative format or specification does not exist in the current locale, the unmodified field descriptor is used. -.PP +.P The E modifier specifies that the input string may contain alternative locale-dependent versions of the date and time representation: .TP @@ -209,7 +209,7 @@ The offset from .TP .B %EY The full alternative year representation. -.PP +.P The O modifier specifies that the numerical input may be in an alternative locale-dependent format: .TP @@ -275,7 +275,6 @@ T{ .BR strptime () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -295,7 +294,7 @@ explicitly specified, except that it recomputes the and .I tm_yday field if any of the year, month, or day elements changed. -.\" .PP +.\" .P .\" This function is available since libc 4.6.8. .\" Linux libc4 and libc5 includes define the prototype unconditionally; .\" glibc2 includes provide a prototype only when @@ -303,12 +302,12 @@ field if any of the year, month, or day elements changed. .\" or .\" .B _GNU_SOURCE .\" are defined. -.\" .PP +.\" .P .\" Before libc 5.4.13 whitespace .\" (and the \[aq]n\[aq] and \[aq]t\[aq] specifications) was not handled, .\" no \[aq]E\[aq] and \[aq]O\[aq] locale modifier characters were accepted, .\" and the \[aq]C\[aq] specification was a synonym for the \[aq]c\[aq] specification. -.PP +.P The \[aq]y\[aq] (year in century) specification is taken to specify a year .\" in the 20th century by libc4 and libc5. .\" It is taken to be a year @@ -330,7 +329,7 @@ This leads to .B %F Equivalent to .BR %Y\-%m\-%d , -the ISO 8601 date format. +the ISO\~8601 date format. .TP .B %g The year corresponding to the ISO week number, but without the century @@ -344,18 +343,18 @@ The year corresponding to the ISO week number. The day of the week as a decimal number (1\[en]7, where Monday = 1). .TP .B %V -The ISO 8601:1988 week number as a decimal number (1\[en]53). +The ISO\~8601:1988 week number as a decimal number (1\[en]53). If the week (starting on Monday) containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. .TP .B %z -An RFC-822/ISO 8601 standard timezone specification. +An RFC-822/ISO\~8601 standard timezone specification. .TP .B %Z The timezone name. -.PP +.P Similarly, because of GNU extensions to .BR strftime (3), .B %k @@ -375,7 +374,7 @@ Finally .B %s The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). Leap seconds are not counted unless leap second support is available. -.PP +.P The glibc implementation does not require whitespace between two field descriptors. .SH EXAMPLES @@ -383,7 +382,7 @@ The following example demonstrates the use of .BR strptime () and .BR strftime (3). -.PP +.P .\" SRC BEGIN (strptime.c) .EX #define _XOPEN_SOURCE diff --git a/man3/strsep.3 b/man3/strsep.3 index bf86fcf..aac29b9 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -11,7 +11,7 @@ .\" Modified Mon Jan 20 12:04:18 1997 by Andries Brouwer (aeb@cwi.nl) .\" Modified Tue Jan 23 20:23:07 2001 by Andries Brouwer (aeb@cwi.nl) .\" -.TH strsep 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strsep 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strsep \- extract token from string .SH LIBRARY @@ -20,15 +20,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strsep(char **restrict " stringp ", const char *restrict " delim ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strsep (): .nf Since glibc 2.19: @@ -79,12 +79,11 @@ T{ .BR strsep () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY 4.4BSD. -.PP +.P The .BR strsep () function was introduced as a replacement for @@ -106,7 +105,7 @@ The identity of the delimiting character is lost. The program below is a port of the one found in .BR strtok (3), which, however, doesn't discard multiple delimiters or empty tokens: -.PP +.P .in +4n .EX .RB "$" " ./a.out \[aq]a/bbb///cc;xxx:yyy:\[aq] \[aq]:;\[aq] \[aq]/\[aq]" diff --git a/man3/strsignal.3 b/man3/strsignal.3 index 3aaacec..0d359d6 100644 --- a/man3/strsignal.3 +++ b/man3/strsignal.3 @@ -9,7 +9,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 17:59:03 1993 by Rik Faith (faith@cs.unc.edu) -.TH strsignal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strsignal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strsignal, sigabbrev_np, sigdescr_np, sys_siglist \- return string describing signal @@ -19,25 +19,25 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strsignal(int " sig ); .BI "const char *sigdescr_np(int " sig ); .BI "const char *sigabbrev_np(int " sig ); -.PP +.P .BI "[[deprecated]] extern const char *const " sys_siglist []; .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR sigabbrev_np (), .BR sigdescr_np (): .nf _GNU_SOURCE .fi -.PP +.P .BR strsignal (): .nf From glibc 2.10 to glibc 2.31: @@ -45,7 +45,7 @@ Feature Test Macro Requirements for glibc (see Before glibc 2.10: _GNU_SOURCE .fi -.PP +.P .IR sys_siglist : .nf Since glibc 2.19: @@ -66,7 +66,7 @@ The string returned by is localized according to the .B LC_MESSAGES category in the current locale. -.PP +.P The .BR sigdescr_np () function returns a string describing the signal @@ -75,7 +75,7 @@ number passed in the argument Unlike .BR strsignal () this string is not influenced by the current locale. -.PP +.P The .BR sigabbrev_np () function returns the abbreviated name of the signal, @@ -83,7 +83,7 @@ function returns the abbreviated name of the signal, For example, given the value .BR SIGINT , it returns the string "INT". -.PP +.P The (deprecated) array .I sys_siglist holds the signal description strings @@ -100,7 +100,7 @@ function returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), NULL may instead be returned for an invalid signal number. -.PP +.P The .BR sigdescr_np () and @@ -133,7 +133,6 @@ T{ .BR sigabbrev_np () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR strsignal () diff --git a/man3/strspn.3 b/man3/strspn.3 index 53e546d..b1398cf 100644 --- a/man3/strspn.3 +++ b/man3/strspn.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 17:57:50 1993 by Rik Faith (faith@cs.unc.edu) -.TH strspn 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strspn 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strspn, strcspn \- get length of a prefix substring .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "size_t strspn(const char *" s ", const char *" accept ); .BI "size_t strcspn(const char *" s ", const char *" reject ); .fi @@ -29,7 +29,7 @@ segment of .I s which consists entirely of bytes in .IR accept . -.PP +.P The .BR strcspn () function calculates the length of the initial @@ -46,7 +46,7 @@ the initial segment of which consist only of bytes from .IR accept . -.PP +.P The .BR strcspn () function returns the number of bytes in @@ -69,7 +69,6 @@ T{ .BR strcspn () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/strstr.3 b/man3/strstr.3 index d07c0f4..ef455cf 100644 --- a/man3/strstr.3 +++ b/man3/strstr.3 @@ -11,7 +11,7 @@ .\" Added history, aeb, 980113. .\" 2005-05-05 mtk: added strcasestr() .\" -.TH strstr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strstr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strstr, strcasestr \- locate a substring .SH LIBRARY @@ -20,12 +20,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strstr(const char *" haystack ", const char *" needle ); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "char *strcasestr(const char *" haystack ", const char *" needle ); .fi .SH DESCRIPTION @@ -36,7 +36,7 @@ function finds the first occurrence of the substring in the string .IR haystack . The terminating null bytes (\[aq]\e0\[aq]) are not compared. -.PP +.P The .BR strcasestr () function is like @@ -45,7 +45,7 @@ but ignores the case of both arguments. .SH RETURN VALUE These functions return a pointer to the beginning of the located substring, or NULL if the substring is not found. -.PP +.P If .I needle is the empty string, @@ -71,7 +71,6 @@ T{ .BR strcasestr () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS .TP .BR strstr () diff --git a/man3/strtod.3 b/man3/strtod.3 index 23e7578..5c650b1 100644 --- a/man3/strtod.3 +++ b/man3/strtod.3 @@ -15,7 +15,7 @@ .\" (michael@cantor.informatik.rwth-aachen.de) .\" Added strof, strtold, aeb, 2001-06-07 .\" -.TH strtod 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strtod 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strtod, strtof, strtold \- convert ASCII string to floating-point number .SH LIBRARY @@ -24,18 +24,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "double strtod(const char *restrict " nptr ", char **restrict " endptr ); .BI "float strtof(const char *restrict " nptr ", char **restrict " endptr ); .BI "long double strtold(const char *restrict " nptr \ ", char **restrict " endptr ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strtof (), .BR strtold (): .nf @@ -55,14 +55,14 @@ to and .I long double representation, respectively. -.PP +.P The expected form of the (initial portion of the) string is optional leading white space as recognized by .BR isspace (3), an optional plus (\[aq]+\[aq]) or minus sign (\[aq]\-\[aq]) and then either (i) a decimal number, or (ii) a hexadecimal number, or (iii) an infinity, or (iv) a NAN (not-a-number). -.PP +.P A .I "decimal number" consists of a nonempty sequence of decimal digits @@ -71,7 +71,7 @@ usually \[aq].\[aq]), optionally followed by a decimal exponent. A decimal exponent consists of an \[aq]E\[aq] or \[aq]e\[aq], followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 10. -.PP +.P A .I "hexadecimal number" consists of a "0x" or "0X" followed by a nonempty sequence of @@ -82,11 +82,11 @@ consists of a \[aq]P\[aq] or \[aq]p\[aq], followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 2. At least one of radix character and binary exponent must be present. -.PP +.P An .I infinity is either "INF" or "INFINITY", disregarding case. -.PP +.P A .I NAN is "NAN" (disregarding case) optionally followed by a string, @@ -97,21 +97,21 @@ specifies in an implementation-dependent way the type of NAN (see NOTES). .SH RETURN VALUE These functions return the converted value, if any. -.PP +.P If .I endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by .IR endptr . -.PP +.P If no conversion is performed, zero is returned and (unless .I endptr is null) the value of .I nptr is stored in the location referenced by .IR endptr . -.PP +.P If the correct value would cause overflow, plus or minus .BR HUGE_VAL , .BR HUGE_VALF , @@ -122,7 +122,7 @@ and .B ERANGE is stored in .IR errno . -.PP +.P If the correct value would cause underflow, a value with magnitude no larger than .BR DBL_MIN , @@ -153,7 +153,6 @@ T{ .BR strtold () T} Thread safety MT-Safe locale .TE -.sp 1 .SH VERSIONS In the glibc implementation, the .I n-char-sequence diff --git a/man3/strtoimax.3 b/man3/strtoimax.3 index 88ce973..1e73661 100644 --- a/man3/strtoimax.3 +++ b/man3/strtoimax.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH strtoimax 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strtoimax 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strtoimax, strtoumax \- convert string to integer .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <inttypes.h> -.PP +.P .BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr , .BI " int " base ); .BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr , @@ -56,7 +56,6 @@ T{ .BR strtoumax () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/strtok.3 b/man3/strtok.3 index 6f01530..8454776 100644 --- a/man3/strtok.3 +++ b/man3/strtok.3 @@ -10,7 +10,7 @@ .\" 2005-11-17, mtk: Substantial parts rewritten .\" 2013-05-19, mtk: added much further detail on the operation of strtok() .\" -.TH strtok 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strtok 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strtok, strtok_r \- extract tokens from strings .SH LIBRARY @@ -19,17 +19,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "char *strtok(char *restrict " str ", const char *restrict " delim ); .BI "char *strtok_r(char *restrict " str ", const char *restrict " delim , .BI " char **restrict " saveptr ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strtok_r (): .nf _POSIX_C_SOURCE @@ -47,7 +47,7 @@ specified in In each subsequent call that should parse the same string, .I str must be NULL. -.PP +.P The .I delim argument specifies a set of bytes that @@ -56,7 +56,7 @@ The caller may specify different strings in .I delim in successive calls that parse the same string. -.PP +.P Each call to .BR strtok () returns a pointer to a @@ -65,7 +65,7 @@ This string does not include the delimiting byte. If no more tokens are found, .BR strtok () returns NULL. -.PP +.P A sequence of calls to .BR strtok () that operate on the same string maintains a pointer @@ -85,7 +85,7 @@ returns NULL. will thus cause .BR strtok () to return NULL on the first call.) -.PP +.P The end of each token is found by scanning forward until either the next delimiter byte is found or until the terminating null byte (\[aq]\e0\[aq]) is encountered. @@ -98,7 +98,7 @@ when searching for the next token. In this case, .BR strtok () returns a pointer to the start of the found token. -.PP +.P From the above description, it follows that a sequence of two or more contiguous delimiter bytes in the parsed string is considered to be a single delimiter, and that @@ -112,7 +112,7 @@ successive calls to that specify the delimiter string "\fI;,\fP" would return the strings "\fIaaa\fP" and "\fIbbb\fP", and then a null pointer. -.PP +.P The .BR strtok_r () function is a reentrant version of @@ -125,7 +125,7 @@ variable that is used internally by .BR strtok_r () in order to maintain context between successive calls that parse the same string. -.PP +.P On the first call to .BR strtok_r (), .I str @@ -138,7 +138,7 @@ should be NULL, and .I saveptr (and the buffer that it points to) should be unchanged since the previous call. -.PP +.P Different strings may be parsed concurrently using sequences of calls to .BR strtok_r () that specify different @@ -170,7 +170,6 @@ T{ .BR strtok_r () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS On some implementations, .\" Tru64, according to its manual page @@ -218,9 +217,9 @@ The second argument specifies the delimiter byte(s) to be used to separate that string into "major" tokens. The third argument specifies the delimiter byte(s) to be used to separate the "major" tokens into subtokens. -.PP +.P An example of the output produced by this program is the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out \[aq]a/bbb///cc;xxx:yyy:\[aq] \[aq]:;\[aq] \[aq]/\[aq]" @@ -273,7 +272,7 @@ main(int argc, char *argv[]) } .EE .\" SRC END -.PP +.P Another example program using .BR strtok () can be found in diff --git a/man3/strtol.3 b/man3/strtol.3 index fe5555a..b6609b2 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -10,7 +10,7 @@ .\" 386BSD man pages .\" Modified Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu) .\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610 -.TH strtol 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strtol 3 2023-12-19 "Linux man-pages 6.7" .SH NAME strtol, strtoll, strtoq \- convert a string to a long integer .SH LIBRARY @@ -19,18 +19,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "long strtol(const char *restrict " nptr , .BI " char **restrict " endptr ", int " base ); .BI "long long strtoll(const char *restrict " nptr , .BI " char **restrict " endptr ", int " base ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strtoll (): .nf _ISOC99_SOURCE @@ -45,7 +45,7 @@ in to a long integer value according to the given .IR base , which must be between 2 and 36 inclusive, or be the special value 0. -.PP +.P The string may begin with an arbitrary amount of white space (as determined by .BR isspace (3)) @@ -58,7 +58,7 @@ zero .I base is taken as 10 (decimal) unless the next character is \[aq]0\[aq], in which case it is taken as 8 (octal). -.PP +.P The remainder of the string is converted to a .I long value @@ -67,10 +67,13 @@ valid digit in the given base. (In bases above 10, the letter \[aq]A\[aq] in either uppercase or lowercase represents 10, \[aq]B\[aq] represents 11, and so forth, with \[aq]Z\[aq] representing 35.) -.PP +.P If .I endptr is not NULL, +and the +.I base +is supported, .BR strtol () stores the address of the first invalid character in @@ -88,7 +91,7 @@ In particular, if is not \[aq]\e0\[aq] but .I **endptr is \[aq]\e0\[aq] on return, the entire string is valid. -.PP +.P The .BR strtoll () function works just like the @@ -124,6 +127,9 @@ instead of and .BR LONG_MAX ). .SH ERRORS +This function does not modify +.I errno +on success. .TP .B EINVAL (not in C99) @@ -133,7 +139,7 @@ contains an unsupported value. .TP .B ERANGE The resulting value was out of range. -.PP +.P The implementation may also set .I errno to @@ -156,7 +162,6 @@ T{ .BR strtoq () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -182,28 +187,43 @@ on both success and failure, the calling program should set .I errno to 0 before the call, and then determine if an error occurred by checking whether -.I errno -has a nonzero value after the call. -.PP +.I errno == ERANGE +after the call. +.P According to POSIX.1, in locales other than "C" and "POSIX", these functions may accept other, implementation-defined numeric strings. -.PP +.P BSD also has -.PP +.P .in +4n .EX .BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base ); .EE .in -.PP +.P with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to .BR strtoll () or to .BR strtol (). +.SH CAVEATS +If the +.I base +needs to be tested, +it should be tested in a call where the string is known to succeed. +Otherwise, it's impossible to portably differentiate the errors. +.P +.in +4n +.EX +errno = 0; +strtol("0", NULL, base); +if (errno == EINVAL) + goto unsupported_base; +.EE +.in .SH EXAMPLES The program shown below demonstrates the use of .BR strtol (). @@ -218,7 +238,7 @@ a function that performs no error checking and has a simpler interface than .BR strtol ().) Some examples of the results produced by this program are the following: -.PP +.P .in +4n .EX .RB "$" " ./a.out 123" @@ -241,7 +261,6 @@ strtol: Numerical result out of range .\" SRC BEGIN (strtol.c) .EX #include <errno.h> -#include <limits.h> #include <stdio.h> #include <stdlib.h> \& @@ -261,11 +280,18 @@ main(int argc, char *argv[]) base = (argc > 2) ? atoi(argv[2]) : 0; \& errno = 0; /* To distinguish success/failure after call */ + strtol("0", NULL, base); + if (errno == EINVAL) { + perror("strtol"); + exit(EXIT_FAILURE); + } +\& + errno = 0; /* To distinguish success/failure after call */ val = strtol(str, &endptr, base); \& /* Check for various possible errors. */ \& - if (errno != 0) { + if (errno == ERANGE) { perror("strtol"); exit(EXIT_FAILURE); } diff --git a/man3/strtoul.3 b/man3/strtoul.3 index a9a8d60..99b5a47 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -11,7 +11,7 @@ .\" Fixed typo, aeb, 950823 .\" 2002-02-22, joey, mihtjel: Added strtoull() .\" -.TH strtoul 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strtoul 3 2023-12-19 "Linux man-pages 6.7" .SH NAME strtoul, strtoull, strtouq \- convert a string to an unsigned long integer .SH LIBRARY @@ -20,18 +20,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "unsigned long strtoul(const char *restrict " nptr , .BI " char **restrict " endptr ", int " base ); .BI "unsigned long long strtoull(const char *restrict " nptr , .BI " char **restrict " endptr ", int " base ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR strtoull (): .nf _ISOC99_SOURCE @@ -50,7 +50,7 @@ given .IR base , which must be between 2 and 36 inclusive, or be the special value 0. -.PP +.P The string may begin with an arbitrary amount of white space (as determined by .BR isspace (3)) @@ -64,7 +64,7 @@ zero .I base is taken as 10 (decimal) unless the next character is \[aq]0\[aq], in which case it is taken as 8 (octal). -.PP +.P The remainder of the string is converted to an .I "unsigned long" value in the obvious manner, @@ -73,10 +73,13 @@ valid digit in the given base. (In bases above 10, the letter \[aq]A\[aq] in either uppercase or lowercase represents 10, \[aq]B\[aq] represents 11, and so forth, with \[aq]Z\[aq] representing 35.) -.PP +.P If .I endptr is not NULL, +and the +.I base +is supported, .BR strtoul () stores the address of the first invalid character in @@ -94,7 +97,7 @@ In particular, if is not \[aq]\e0\[aq] but .I **endptr is \[aq]\e0\[aq] on return, the entire string is valid. -.PP +.P The .BR strtoull () function works just like the @@ -124,6 +127,9 @@ Precisely the same holds for instead of .BR ULONG_MAX ). .SH ERRORS +This function does not modify +.I errno +on success. .TP .B EINVAL (not in C99) @@ -133,7 +139,7 @@ contains an unsupported value. .TP .B ERANGE The resulting value was out of range. -.PP +.P The implementation may also set .I errno to @@ -156,7 +162,6 @@ T{ .BR strtouq () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -180,26 +185,26 @@ to 0 before the call, and then determine if an error occurred by checking whether .I errno has a nonzero value after the call. -.PP +.P In locales other than the "C" locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.) -.PP +.P BSD also has -.PP +.P .in +4n .EX .BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base ); .EE .in -.PP +.P with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to .BR strtoull () or to .BR strtoul (). -.PP +.P Negative values are considered valid input and are silently converted to the equivalent .I "unsigned long" diff --git a/man3/strverscmp.3 b/man3/strverscmp.3 index e33a569..ad3ebeb 100644 --- a/man3/strverscmp.3 +++ b/man3/strverscmp.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH strverscmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strverscmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strverscmp \- compare two version strings .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <string.h> -.PP +.P .BI "int strverscmp(const char *" s1 ", const char *" s2 ); .fi .SH DESCRIPTION @@ -33,7 +33,7 @@ which is implemented using .BR versionsort (3), which again uses .BR strverscmp (). -.PP +.P Thus, the task of .BR strverscmp () is to compare two strings and find the "right" order, while @@ -44,7 +44,7 @@ the locale category .BR LC_COLLATE , so is meant mostly for situations where the strings are expected to be in ASCII. -.PP +.P What this function does is the following. If both strings are equal, return 0. Otherwise, find the position @@ -85,7 +85,6 @@ T{ .BR strverscmp () T} Thread safety MT-Safe .TE -.sp 1 .\" FIXME: The marking is different from that in the glibc manual, .\" which has: .\" @@ -105,7 +104,7 @@ It uses .BR strverscmp () to compare the two strings given as its command-line arguments. An example of its use is the following: -.PP +.P .in +4n .EX $ \fB./a.out jan1 jan10\fP diff --git a/man3/strxfrm.3 b/man3/strxfrm.3 index 03ff0a8..a646af0 100644 --- a/man3/strxfrm.3 +++ b/man3/strxfrm.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:41:28 1993 by Rik Faith (faith@cs.unc.edu) -.TH strxfrm 3 2023-07-20 "Linux man-pages 6.05.01" +.TH strxfrm 3 2023-10-31 "Linux man-pages 6.7" .SH NAME strxfrm \- string transformation .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <string.h> -.PP +.P .BI "size_t strxfrm(char " dest "[restrict ." n "], \ const char " src "[restrict ." n ], .BI " size_t " n ); @@ -73,7 +73,6 @@ T{ .BR strxfrm () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/swab.3 b/man3/swab.3 index 046c0f8..73c840f 100644 --- a/man3/swab.3 +++ b/man3/swab.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 17:52:15 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-12-15, aeb -.TH swab 3 2023-07-20 "Linux man-pages 6.05.01" +.TH swab 3 2023-10-31 "Linux man-pages 6.7" .SH NAME swab \- swap adjacent bytes .SH LIBRARY @@ -19,7 +19,7 @@ Standard C library .nf .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <unistd.h> -.PP +.P .BI "void swab(const void " from "[restrict ." n "], void " to "[restrict ." n ], .BI " ssize_t " n ); .fi @@ -37,7 +37,7 @@ exchanging adjacent even and odd bytes. This function is used to exchange data between machines that have different low/high byte ordering. -.PP +.P This function does nothing when .I n is negative. @@ -68,7 +68,6 @@ T{ .BR swab () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/sysconf.3 b/man3/sysconf.3 index a4d14d3..29ce6bd 100644 --- a/man3/sysconf.3 +++ b/man3/sysconf.3 @@ -5,7 +5,7 @@ .\" .\" Modified Sat Jul 24 17:51:42 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Tue Aug 17 11:42:20 1999 by Ariel Scolnicov (ariels@compugen.co.il) -.TH sysconf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sysconf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sysconf \- get configuration information at run time .SH LIBRARY @@ -14,20 +14,20 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "long sysconf(int " "name" ); .fi .SH DESCRIPTION POSIX allows an application to test at compile or run time whether certain options are supported, or what the value is of certain configurable constants or limits. -.PP +.P At compile time this is done by including .I <unistd.h> and/or .I <limits.h> and testing the value of certain macros. -.PP +.P At run time, one can ask for numerical values using the present function .BR sysconf (). One can ask for numerical values that may depend @@ -37,12 +37,12 @@ and .BR pathconf (3). One can ask for string values using .BR confstr (3). -.PP +.P The values obtained from these functions are system configuration constants. They do not change during the lifetime of a process. .\" except that sysconf(_SC_OPEN_MAX) may change answer after a call .\" to setrlimit( ) which changes the RLIMIT_NOFILE soft limit -.PP +.P For options, typically, there is a constant .B _POSIX_FOO that may be defined in @@ -65,7 +65,7 @@ argument will be .BR _SC_FOO . For a list of options, see .BR posixoptions (7). -.PP +.P For variables or limits, typically, there is a constant .BR _FOO , maybe defined in @@ -90,7 +90,7 @@ We give the name of the variable, the name of the .BR sysconf () argument used to inquire about its value, and a short description. -.PP +.P First, the POSIX.1 compatible values. .\" [for the moment: only the things that are unconditionally present] .\" .TP @@ -285,7 +285,7 @@ is supported. .BR POSIX2_SW_DEV " - " _SC_2_SW_DEV indicates whether the POSIX.2 software development utilities option is supported. -.PP +.P These values also exist, but may not be standard. .TP .BR "" " - " _SC_PHYS_PAGES @@ -366,7 +366,6 @@ T{ .BR sysconf () T} Thread safety MT-Safe env .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -377,7 +376,7 @@ It is difficult to use because it is not specified how much of the argument space for .BR exec (3) is consumed by the user's environment variables. -.PP +.P Some returned values may be huge; they are not suitable for allocating memory. .SH SEE ALSO diff --git a/man3/syslog.3 b/man3/syslog.3 index e8c9dc4..7b3c663 100644 --- a/man3/syslog.3 +++ b/man3/syslog.3 @@ -15,7 +15,7 @@ .\" Modified 13 Dec 2001, Martin Schulze <joey@infodrom.org> .\" Modified 3 Jan 2002, Michael Kerrisk <mtk.manpages@gmail.com> .\" -.TH syslog 3 2023-07-20 "Linux man-pages 6.05.01" +.TH syslog 3 2023-10-31 "Linux man-pages 6.7" .SH NAME closelog, openlog, syslog, vsyslog \- send messages to the system logger .SH LIBRARY @@ -24,19 +24,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <syslog.h> -.PP +.P .BI "void openlog(const char *" ident ", int " option ", int " facility ); .BI "void syslog(int " priority ", const char *" format ", ...);" .B "void closelog(void);" -.PP +.P .BI "void vsyslog(int " priority ", const char *" format ", va_list " ap ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR vsyslog (): .nf Since glibc 2.19: @@ -48,7 +48,7 @@ Feature Test Macro Requirements for glibc (see .SS openlog() .BR openlog () opens a connection to the system logger for a program. -.PP +.P The string pointed to by .I ident is prepended to every message, and is typically set to the program name. @@ -58,7 +58,7 @@ is NULL, the program name is used. (POSIX.1-2008 does not specify the behavior when .I ident is NULL.) -.PP +.P The .I option argument specifies flags which control the operation of @@ -75,7 +75,7 @@ The values that may be specified for and .I facility are described below. -.PP +.P The use of .BR openlog () is optional; it will automatically be called by @@ -88,7 +88,7 @@ will default to NULL. .BR syslog () generates a log message, which will be distributed by .BR syslogd (8). -.PP +.P The .I priority argument is formed by ORing together a @@ -107,7 +107,7 @@ is used, or, if there was no preceding call, a default of .B LOG_USER is employed. -.PP +.P The remaining arguments are a .IR format , as in @@ -120,7 +120,7 @@ will be replaced by the error message string .IR strerror ( errno ). The format string need not include a terminating newline character. -.PP +.P The function .BR vsyslog () performs the same task as @@ -254,7 +254,7 @@ informational message .TP .B LOG_DEBUG debug-level message -.PP +.P The function .BR setlogmask (3) can be used to restrict logging to specified levels only. @@ -279,7 +279,6 @@ T{ .BR vsyslog () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS .TP .BR syslog () @@ -310,7 +309,7 @@ None. .\" .I <varargs.h> .\" mechanism, which is not compatible with .\" .IR <stdarg.h> . -.PP +.P POSIX.1-2001 specifies only the .B LOG_USER and @@ -324,7 +323,7 @@ and the other .I facility values appear on most UNIX systems. -.PP +.P The .B LOG_PERROR value for @@ -343,10 +342,10 @@ is changed, may start prepending the changed string, and if the string it points to ceases to exist, the results are undefined. Most portable is to use a string constant. -.PP +.P Never pass a string with user-supplied data as a format, use the following instead: -.PP +.P .in +4n .EX syslog(priority, "%s", string); diff --git a/man3/system.3 b/man3/system.3 index 8615623..08ffb07 100644 --- a/man3/system.3 +++ b/man3/system.3 @@ -9,7 +9,7 @@ .\" Modified 14 May 2001, 23 Sep 2001 by aeb .\" 2004-12-20, mtk .\" -.TH system 3 2023-07-20 "Linux man-pages 6.05.01" +.TH system 3 2023-10-31 "Linux man-pages 6.7" .SH NAME system \- execute a shell command .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int system(const char *" "command" ); .fi .SH DESCRIPTION @@ -31,16 +31,16 @@ to create a child process that executed the shell command specified in using .BR execl (3) as follows: -.PP +.P .in +4n .EX execl("/bin/sh", "sh", "\-c", command, (char *) NULL); .EE .in -.PP +.P .BR system () returns after the command has been completed. -.PP +.P During execution of the command, .B SIGCHLD will be blocked, and @@ -52,7 +52,7 @@ will be ignored, in the process that calls (These signals will be handled according to their defaults inside the child process that executes .IR command .) -.PP +.P If .I command is NULL, then @@ -85,7 +85,7 @@ used to execute .IR command . (The termination status of a shell is the termination status of the last command it executes.) -.PP +.P In the last two cases, the return value is a "wait status" that can be examined using the macros described in @@ -94,7 +94,7 @@ the macros described in .BR WIFEXITED (), .BR WEXITSTATUS (), and so on). -.PP +.P .BR system () does not affect the wait status of any other children. .SH ERRORS @@ -115,7 +115,6 @@ T{ .BR system () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -137,7 +136,7 @@ The main cost of is inefficiency: additional system calls are required to create the process that runs the shell and to execute the shell. -.PP +.P If the .B _XOPEN_SOURCE feature test macro is defined @@ -149,7 +148,7 @@ then the macros described in .RB ( WEXITSTATUS (), etc.) are made available when including .IR <stdlib.h> . -.PP +.P As mentioned, .BR system () ignores @@ -160,7 +159,7 @@ This may make programs that call it from a loop uninterruptible, unless they take care themselves to check the exit status of the child. For example: -.PP +.P .in +4n .EX while (something) { @@ -172,13 +171,13 @@ while (something) { } .EE .in -.PP +.P According to POSIX.1, it is unspecified whether handlers registered using .BR pthread_atfork (3) are called during the execution of .BR system (). In the glibc implementation, such handlers are not called. -.PP +.P Before glibc 2.1.3, the check for the availability of .I /bin/sh was not actually performed if @@ -192,7 +191,7 @@ a shell, that shell may not be available or executable if the calling program has previously called .BR chroot (2) (which is not specified by POSIX.1-2001). -.PP +.P It is possible for the shell command to terminate with a status of 127, which yields a .BR system () @@ -219,7 +218,7 @@ or (which also use the .B PATH environment variable to search for an executable). -.PP +.P .BR system () will not, in fact, work properly from programs with set-user-ID or set-group-ID privileges on systems on which @@ -229,7 +228,7 @@ is bash version 2: as a security measure, bash 2 drops privileges on startup. .BR dash (1), which does not do this when invoked as .BR sh .) -.PP +.P Any user input that is employed as part of .I command should be @@ -253,7 +252,7 @@ option to .BR sh (1).) To work around this problem, prepend the command with a space as in the following call: -.PP +.P .in +4n .EX system(" \-unfortunate\-command\-name"); diff --git a/man3/sysv_signal.3 b/man3/sysv_signal.3 index 84d77fe..0c0c161 100644 --- a/man3/sysv_signal.3 +++ b/man3/sysv_signal.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH sysv_signal 3 2023-07-20 "Linux man-pages 6.05.01" +.TH sysv_signal 3 2023-10-31 "Linux man-pages 6.7" .SH NAME sysv_signal \- signal handling with System V semantics .SH LIBRARY @@ -13,9 +13,9 @@ Standard C library .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <signal.h> -.PP +.P .B typedef void (*sighandler_t)(int); -.PP +.P .BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler ); .fi .SH DESCRIPTION @@ -23,7 +23,7 @@ The .BR sysv_signal () function takes the same arguments, and performs the same task, as .BR signal (2). -.PP +.P However .BR sysv_signal () provides the System V unreliable signal semantics, that is: @@ -56,14 +56,13 @@ T{ .BR sysv_signal () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS Use of .BR sysv_signal () should be avoided; use .BR sigaction (2) instead. -.PP +.P On older Linux systems, .BR sysv_signal () and @@ -74,7 +73,7 @@ But on newer systems, provides reliable signal semantics; see .BR signal (2) for details. -.PP +.P The use of .I sighandler_t is a GNU extension; diff --git a/man3/tailq.3 b/man3/tailq.3 index 15f9203..5e24501 100644 --- a/man3/tailq.3 +++ b/man3/tailq.3 @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" -.TH TAILQ 3 2023-05-03 "Linux man-pages 6.05.01" +.TH TAILQ 3 2023-10-31 "Linux man-pages 6.7" .SH NAME TAILQ_CONCAT, TAILQ_EMPTY, @@ -38,15 +38,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/queue.h> -.PP +.P .B TAILQ_ENTRY(TYPE); -.PP +.P .B TAILQ_HEAD(HEADNAME, TYPE); .BI "TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD " head ); .BI "void TAILQ_INIT(TAILQ_HEAD *" head ); -.PP +.P .BI "int TAILQ_EMPTY(TAILQ_HEAD *" head ); -.PP +.P .BI "void TAILQ_INSERT_HEAD(TAILQ_HEAD *" head , .BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); .BI "void TAILQ_INSERT_TAIL(TAILQ_HEAD *" head , @@ -55,12 +55,12 @@ Standard C library .BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); .BI "void TAILQ_INSERT_AFTER(TAILQ_HEAD *" head ", struct TYPE *" listelm , .BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); -.PP +.P .BI "struct TYPE *TAILQ_FIRST(TAILQ_HEAD *" head ); .BI "struct TYPE *TAILQ_LAST(TAILQ_HEAD *" head ", HEADNAME);" .BI "struct TYPE *TAILQ_PREV(struct TYPE *" elm ", HEADNAME, TAILQ_ENTRY " NAME ); .BI "struct TYPE *TAILQ_NEXT(struct TYPE *" elm ", TAILQ_ENTRY " NAME ); -.PP +.P .BI "TAILQ_FOREACH(struct TYPE *" var ", TAILQ_HEAD *" head , .BI " TAILQ_ENTRY " NAME ); .\" .BI "TAILQ_FOREACH_FROM(struct TYPE *" var ", TAILQ_HEAD *" head , @@ -69,7 +69,7 @@ Standard C library .BI " TAILQ_ENTRY " NAME ); .\" .BI "TAILQ_FOREACH_REVERSE_FROM(struct TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME," .\" .BI " TAILQ_ENTRY " NAME ); -.\" .PP +.\" .P .\" .BI "TAILQ_FOREACH_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , .\" .BI " TAILQ_ENTRY " NAME , .\" .BI " struct TYPE *" temp_var ); @@ -82,10 +82,10 @@ Standard C library .\" .BI "TAILQ_FOREACH_REVERSE_FROM_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , .\" .BI " HEADNAME, TAILQ_ENTRY " NAME , .\" .BI " struct TYPE *" temp_var ); -.PP +.P .BI "void TAILQ_REMOVE(TAILQ_HEAD *" head ", struct TYPE *" elm , .BI " TAILQ_ENTRY " NAME ); -.PP +.P .BI "void TAILQ_CONCAT(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 , .BI " TAILQ_ENTRY " NAME ); .\" .BI "void TAILQ_SWAP(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ", TYPE," @@ -93,7 +93,7 @@ Standard C library .fi .SH DESCRIPTION These macros define and operate on doubly linked tail queues. -.PP +.P In the macro definitions, .I TYPE is the name of a user defined structure, @@ -123,42 +123,42 @@ or at the end of the queue. A .I TAILQ_HEAD structure is declared as follows: -.PP +.P .in +4 .EX TAILQ_HEAD(HEADNAME, TYPE) head; .EE .in -.PP +.P where .I struct HEADNAME is the structure to be defined, and .I struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as: -.PP +.P .in +4 .EX struct HEADNAME *headp; .EE .in -.PP +.P (The names .I head and .I headp are user selectable.) -.PP +.P .BR TAILQ_ENTRY () declares a structure that connects the elements in the queue. -.PP +.P .BR TAILQ_HEAD_INITIALIZER () evaluates to an initializer for the queue .IR head . -.PP +.P .BR TAILQ_INIT () initializes the queue referenced by -.PP +.P .BR TAILQ_EMPTY () evaluates to true if there are no items on the queue. .IR head . @@ -167,18 +167,18 @@ evaluates to true if there are no items on the queue. inserts the new element .I elm at the head of the queue. -.PP +.P .BR TAILQ_INSERT_TAIL () inserts the new element .I elm at the end of the queue. -.PP +.P .BR TAILQ_INSERT_BEFORE () inserts the new element .I elm before the element .IR listelm . -.PP +.P .BR TAILQ_INSERT_AFTER () inserts the new element .I elm @@ -187,17 +187,17 @@ after the element .SS Traversal .BR TAILQ_FIRST () returns the first item on the queue, or NULL if the queue is empty. -.PP +.P .BR TAILQ_LAST () returns the last item on the queue. If the queue is empty the return value is NULL. -.PP +.P .BR TAILQ_PREV () returns the previous item on the queue, or NULL if this item is the first. -.PP +.P .BR TAILQ_NEXT () returns the next item on the queue, or NULL if this item is the last. -.PP +.P .BR TAILQ_FOREACH () traverses the queue referenced by .I head @@ -207,7 +207,7 @@ assigning each element in turn to .I var is set to NULL if the loop completes normally, or if there were no elements. -.\" .PP +.\" .P .\" .BR TAILQ_FOREACH_FROM () .\" behaves identically to .\" .BR TAILQ_FOREACH () @@ -219,14 +219,14 @@ or if there were no elements. .\" .I var .\" instead of the first element in the TAILQ referenced by .\" .IR head . -.PP +.P .BR TAILQ_FOREACH_REVERSE () traverses the queue referenced by .I head in the reverse direction, assigning each element in turn to .IR var . -.\" .PP +.\" .P .\" .BR TAILQ_FOREACH_REVERSE_FROM () .\" behaves identically to .\" .BR TAILQ_FOREACH_REVERSE () @@ -238,7 +238,7 @@ assigning each element in turn to .\" .I var .\" instead of the last element in the TAILQ referenced by .\" .IR head . -.\" .PP +.\" .P .\" .BR TAILQ_FOREACH_SAFE () .\" and .\" .BR TAILQ_FOREACH_REVERSE_SAFE () @@ -255,7 +255,7 @@ assigning each element in turn to .\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .PP +.\" .P .\" .BR TAILQ_FOREACH_FROM_SAFE () .\" behaves identically to .\" .BR TAILQ_FOREACH_SAFE () @@ -267,7 +267,7 @@ assigning each element in turn to .\" .I var .\" instead of the first element in the TAILQ referenced by .\" .IR head . -.\" .PP +.\" .P .\" .BR TAILQ_FOREACH_REVERSE_FROM_SAFE () .\" behaves identically to .\" .BR TAILQ_FOREACH_REVERSE_SAFE () @@ -290,7 +290,7 @@ from the queue. .\" .I head1 .\" and .\" .IR head2 . -.\" .PP +.\" .P .BR TAILQ_CONCAT () concatenates the queue headed by .I head2 @@ -301,7 +301,7 @@ removing all entries from the former. .BR TAILQ_EMPTY () returns nonzero if the queue is empty, and zero if the queue contains at least one entry. -.PP +.P .BR TAILQ_FIRST (), .BR TAILQ_LAST (), .BR TAILQ_PREV (), @@ -310,7 +310,7 @@ and return a pointer to the first, last, previous, or next .I TYPE structure, respectively. -.PP +.P .BR TAILQ_HEAD_INITIALIZER () returns an initializer that can be assigned to the queue .IR head . @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH tan 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tan 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tan, tanf, tanl \- tangent function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double tan(double " x ); .BI "float tanf(float " x ); .BI "long double tanl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tanf (), .BR tanl (): .nf @@ -50,17 +50,17 @@ given in radians. .SH RETURN VALUE On success, these functions return the tangent of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned. -.PP +.P If the correct result would overflow, a range error occurs, and the functions return @@ -83,7 +83,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is an infinity @@ -120,12 +120,11 @@ T{ .BR tanl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/tanh.3 b/man3/tanh.3 index dc4d8fc..09d3e03 100644 --- a/man3/tanh.3 +++ b/man3/tanh.3 @@ -13,7 +13,7 @@ .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\" -.TH tanh 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tanh 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tanh, tanhf, tanhl \- hyperbolic tangent function .SH LIBRARY @@ -22,17 +22,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double tanh(double " x ); .BI "float tanhf(float " x ); .BI "long double tanhl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tanhf (), .BR tanhl (): .nf @@ -45,22 +45,22 @@ These functions return the hyperbolic tangent of .IR x , which is defined mathematically as: -.PP +.P .nf tanh(x) = sinh(x) / cosh(x) .fi .SH RETURN VALUE On success, these functions return the hyperbolic tangent of .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is +0 (\-0), +0 (\-0) is returned. -.PP +.P If .I x is positive infinity (negative infinity), @@ -87,12 +87,11 @@ T{ .BR tanhl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The variant returning .I double also conforms to diff --git a/man3/tcgetpgrp.3 b/man3/tcgetpgrp.3 index 494ed43..d80baed 100644 --- a/man3/tcgetpgrp.3 +++ b/man3/tcgetpgrp.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH tcgetpgrp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tcgetpgrp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tcgetpgrp, tcsetpgrp \- get and set terminal foreground process group .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <unistd.h>" -.PP +.P .BI "pid_t tcgetpgrp(int " fd ); .BI "int tcsetpgrp(int " fd ", pid_t " pgrp ); .fi @@ -24,7 +24,7 @@ terminal associated to .IR fd , which must be the controlling terminal of the calling process. .\" The process itself may be a background process. -.PP +.P The function .BR tcsetpgrp () makes the process group with process group ID @@ -37,7 +37,7 @@ Moreover, .I pgrp must be a (nonempty) process group belonging to the same session as the calling process. -.PP +.P If .BR tcsetpgrp () is called by a member of a background process group in its session, @@ -61,7 +61,7 @@ does not refer to the controlling terminal of the calling process, \-1 is returned, and .I errno is set to indicate the error. -.PP +.P When successful, .BR tcsetpgrp () returns 0. @@ -106,7 +106,6 @@ T{ .BR tcsetpgrp () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS These functions are implemented via the .B TIOCGPGRP @@ -117,7 +116,7 @@ ioctls. POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P The ioctls appeared in 4.2BSD. The functions are POSIX inventions. .SH SEE ALSO diff --git a/man3/tcgetsid.3 b/man3/tcgetsid.3 index 4fb349c..f727dfd 100644 --- a/man3/tcgetsid.3 +++ b/man3/tcgetsid.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH tcgetsid 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tcgetsid 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tcgetsid \- get session ID .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .BR "#define _XOPEN_SOURCE 500" " /* See feature_test_macros(7) */" .B "#include <termios.h>" -.PP +.P .BI "pid_t tcgetsid(int " fd ); .fi .SH DESCRIPTION @@ -58,13 +58,12 @@ T{ .BR tcgetsid () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY glibc 2.1. POSIX.1-2001. -.PP +.P This function is implemented via the .B TIOCGSID .BR ioctl (2), diff --git a/man3/telldir.3 b/man3/telldir.3 index 6bbd158..dbc5d9c 100644 --- a/man3/telldir.3 +++ b/man3/telldir.3 @@ -8,7 +8,7 @@ .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 17:48:42 1993 by Rik Faith (faith@cs.unc.edu) -.TH telldir 3 2023-07-20 "Linux man-pages 6.05.01" +.TH telldir 3 2023-10-31 "Linux man-pages 6.7" .SH NAME telldir \- return current location in directory stream .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <dirent.h> -.PP +.P .BI "long telldir(DIR *" dirp ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR telldir (): .nf _XOPEN_SOURCE @@ -63,12 +63,11 @@ T{ .BR telldir () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001, 4.3BSD. -.PP +.P Up to glibc 2.1.1, the return type of .BR telldir () was @@ -76,7 +75,7 @@ was POSIX.1-2001 specifies .IR long , and this is the type used since glibc 2.1.2. -.PP +.P In early filesystems, the value returned by .BR telldir () was a simple file offset within a directory. diff --git a/man3/tempnam.3 b/man3/tempnam.3 index fd68643..e1b7380 100644 --- a/man3/tempnam.3 +++ b/man3/tempnam.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH tempnam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tempnam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tempnam \- create a name for a temporary file .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "char *tempnam(const char *" dir ", const char *" pfx ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tempnam (): .nf Since glibc 2.19: @@ -35,7 +35,7 @@ Use or .BR tmpfile (3) instead. -.PP +.P The .BR tempnam () function returns a pointer to a string that is a valid filename, @@ -49,7 +49,7 @@ in case is a non-NULL string of at most five bytes. The directory prefix part of the pathname generated is required to be "appropriate" (often that at least implies writable). -.PP +.P Attempts to find an appropriate directory go through the following steps: .TP 3 @@ -73,7 +73,7 @@ is used when appropriate. .TP d) Finally an implementation-defined directory may be used. -.PP +.P The string returned by .BR tempnam () is allocated using @@ -105,7 +105,6 @@ T{ .BR tempnam () T} Thread safety MT-Safe env .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY @@ -130,7 +129,7 @@ Or better yet, use .BR mkstemp (3) or .BR tmpfile (3). -.PP +.P SUSv2 does not mention the use of .BR TMPDIR ; glibc will use it only @@ -138,12 +137,12 @@ when the program is not set-user-ID. On SVr4, the directory used under \fBd)\fP is .I /tmp (and this is what glibc does). -.PP +.P Because it dynamically allocates memory used to return the pathname, .BR tempnam () is reentrant, and thus thread safe, unlike .BR tmpnam (3). -.PP +.P The .BR tempnam () function generates a different string each time it is called, @@ -156,11 +155,11 @@ If it is called more than .B TMP_MAX times, the behavior is implementation defined. -.PP +.P .BR tempnam () uses at most the first five bytes from .IR pfx . -.PP +.P The glibc implementation of .BR tempnam () fails with the error diff --git a/man3/termios.3 b/man3/termios.3 index 9e015d1..28a5411 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -19,7 +19,7 @@ .\" Enhanced the discussion of "raw" mode for cfmakeraw(). .\" Document CMSPAR. .\" -.TH termios 3 2023-07-30 "Linux man-pages 6.05.01" +.TH termios 3 2023-10-31 "Linux man-pages 6.7" .SH NAME termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \- @@ -31,31 +31,31 @@ Standard C library .nf .B #include <termios.h> .B #include <unistd.h> -.PP +.P .BI "int tcgetattr(int " fd ", struct termios *" termios_p ); .BI "int tcsetattr(int " fd ", int " optional_actions , .BI " const struct termios *" termios_p ); -.PP +.P .BI "int tcsendbreak(int " fd ", int " duration ); .BI "int tcdrain(int " fd ); .BI "int tcflush(int " fd ", int " queue_selector ); .BI "int tcflow(int " fd ", int " action ); -.PP +.P .BI "void cfmakeraw(struct termios *" termios_p ); -.PP +.P .BI "speed_t cfgetispeed(const struct termios *" termios_p ); .BI "speed_t cfgetospeed(const struct termios *" termios_p ); -.PP +.P .BI "int cfsetispeed(struct termios *" termios_p ", speed_t " speed ); .BI "int cfsetospeed(struct termios *" termios_p ", speed_t " speed ); .BI "int cfsetspeed(struct termios *" termios_p ", speed_t " speed ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR cfsetspeed (), .BR cfmakeraw (): .nf @@ -71,7 +71,7 @@ provided to control asynchronous communications ports. Many of the functions described here have a \fItermios_p\fP argument that is a pointer to a \fItermios\fP structure. This structure contains at least the following members: -.PP +.P .in +4n .EX tcflag_t c_iflag; /* input modes */ @@ -81,19 +81,19 @@ tcflag_t c_lflag; /* local modes */ cc_t c_cc[NCCS]; /* special characters */ .EE .in -.PP +.P The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see .BR feature_test_macros (7)) is defined, as noted in brackets ("[]"). -.PP +.P In the descriptions below, "not in POSIX" means that the value is not specified in POSIX.1-2001, and "XSI" means that the value is specified in POSIX.1-2001 as part of the XSI extension. -.PP +.P \fIc_iflag\fP flag constants: .TP .B IGNBRK @@ -168,7 +168,7 @@ Linux does not implement this bit, and acts as if it is always set. .BR IUTF8 " (since Linux 2.6.4)" (not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode. -.PP +.P .I c_oflag flag constants: .TP @@ -259,7 +259,7 @@ or .B _SVID_SOURCE or .BR _XOPEN_SOURCE ] -.PP +.P \fIc_cflag\fP flag constants: .TP .B CBAUD @@ -361,7 +361,7 @@ or .B _BSD_SOURCE or .BR _SVID_SOURCE ] -.PP +.P \fIc_lflag\fP flag constants: .TP .B ISIG @@ -472,7 +472,7 @@ Enable implementation-defined input processing. This flag, as well as \fBICANON\fP must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the \fBIUCLC\fP flag to be effective. -.PP +.P The \fIc_cc\fP array defines the terminal special characters. The symbolic indices (initial values) and meaning are: .TP @@ -634,13 +634,13 @@ Recognized when and .B IEXTEN are set, and then not passed as input. -.PP +.P An individual terminal special character can be disabled by setting the value of the corresponding .I c_cc element to .BR _POSIX_VDISABLE . -.PP +.P The above symbolic subscript values are all different, except that .BR VTIME , .B VMIN @@ -664,7 +664,7 @@ stores them in the \fItermios\fP structure referenced by This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process. -.PP +.P .BR tcsetattr () sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the @@ -700,7 +700,7 @@ unset). By default, .B ICANON is set. -.PP +.P In canonical mode: .IP \[bu] 3 Input is made available line by line. @@ -734,7 +734,7 @@ processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read. -.PP +.P In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, @@ -806,7 +806,7 @@ becomes available, at least one byte will be read. If data is already available at the time of the call to .BR read (2), the call behaves as though the data was received immediately after the call. -.PP +.P POSIX .\" POSIX.1-2008 XBD 11.1.7 does not specify whether the setting of the @@ -833,7 +833,7 @@ input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows: -.PP +.P .in +4n .EX termios_p\->c_iflag &= \[ti](IGNBRK | BRKINT | PARMRK | ISTRIP @@ -854,16 +854,16 @@ If \fIduration\fP is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If \fIduration\fP is not zero, it sends zero-valued bits for some implementation-defined length of time. -.PP +.P If the terminal is not using asynchronous serial data transmission, .BR tcsendbreak () returns without taking any action. -.PP +.P .BR tcdrain () waits until all output written to the object referred to by .I fd has been transmitted. -.PP +.P .BR tcflush () discards data written to the object referred to by .I fd @@ -880,7 +880,7 @@ flushes data written but not transmitted. .B TCIOFLUSH flushes both data received but not read, and data written but not transmitted. -.PP +.P .BR tcflow () suspends transmission or reception of data on the object referred to by .IR fd , @@ -900,7 +900,7 @@ transmitting data to the system. .B TCION transmits a START character, which starts the terminal device transmitting data to the system. -.PP +.P The default on open of a terminal file is that neither its input nor its output is suspended. .SS Line speed @@ -910,19 +910,19 @@ The new values do not take effect until .BR tcsetattr () is successfully called. -.PP +.P Setting the speed to \fBB0\fP instructs the modem to "hang up". The actual bit rate corresponding to \fBB38400\fP may be altered with .BR setserial (8). -.PP +.P The input and output baud rates are stored in the \fItermios\fP structure. -.PP +.P .BR cfgetospeed () returns the output baud rate stored in the \fItermios\fP structure pointed to by .IR termios_p . -.PP +.P .BR cfsetospeed () sets the output baud rate stored in the \fItermios\fP structure pointed to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants: @@ -982,7 +982,7 @@ to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants: .TQ .B B2000000 .RE -.PP +.P These constants are additionally supported on the SPARC architecture: .RS .TP @@ -994,7 +994,7 @@ These constants are additionally supported on the SPARC architecture: .TQ .B B614400 .RE -.PP +.P These constants are additionally supported on non-SPARC architectures: .RS .TP @@ -1006,12 +1006,12 @@ These constants are additionally supported on non-SPARC architectures: .TQ .B B4000000 .RE -.PP +.P Due to differences between architectures, portable applications should check if a particular .BI B nnn constant is defined prior to using it. -.PP +.P The zero baud rate, .BR B0 , is used to terminate the connection. @@ -1025,19 +1025,19 @@ for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, .BR B57600 " & " CBAUDEX is nonzero. -.PP +.P Setting the baud rate to a value other than those defined by .BI B nnn constants is possible via the .B TCSETS2 ioctl; see .BR ioctl_tty (2). -.PP +.P .BR cfgetispeed () returns the input baud rate stored in the .I termios structure. -.PP +.P .BR cfsetispeed () sets the input baud rate stored in the .I termios @@ -1053,7 +1053,7 @@ If the input baud rate is set to the literal constant .BR B0 ), the input baud rate will be equal to the output baud rate. -.PP +.P .BR cfsetspeed () is a 4.4BSD extension. It takes the same arguments as @@ -1064,10 +1064,10 @@ and sets both input and output speed. returns the input baud rate stored in the \fItermios\fP structure. -.PP +.P .BR cfgetospeed () returns the output baud rate stored in the \fItermios\fP structure. -.PP +.P All other functions return: .TP .B 0 @@ -1077,7 +1077,7 @@ on success. on failure and set .I errno to indicate the error. -.PP +.P Note that .BR tcsetattr () returns success if \fIany\fP of the requested changes could be @@ -1111,7 +1111,6 @@ T{ .BR cfsetspeed () T} Thread safety MT-Safe .TE -.sp 1 .\" FIXME: The markings are different from that in the glibc manual. .\" markings in glibc manual are more detailed: .\" @@ -1186,7 +1185,7 @@ one finds the two constants .B EXTB ("External A" and "External B"). Many systems extend the list with much higher baud rates. -.PP +.P The effect of a nonzero \fIduration\fP with .BR tcsendbreak () varies. diff --git a/man3/tgamma.3 b/man3/tgamma.3 index d2c5969..e62069c 100644 --- a/man3/tgamma.3 +++ b/man3/tgamma.3 @@ -9,7 +9,7 @@ .\" Modified 2004-11-15, fixed error noted by Fabian Kreutz .\" <kreutz@dbs.uni-hannover.de> .\" -.TH tgamma 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tgamma 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tgamma, tgammaf, tgammal \- true gamma function .SH LIBRARY @@ -18,17 +18,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double tgamma(double " x ); .BI "float tgammaf(float " x ); .BI "long double tgammal(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tgamma (), .BR tgammaf (), .BR tgammal (): @@ -38,53 +38,53 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION These functions calculate the Gamma function of .IR x . -.PP +.P The Gamma function is defined by -.PP +.P .RS Gamma(x) = integral from 0 to infinity of t\[ha](x\-1) e\[ha]\-t dt .RE -.PP +.P It is defined for every real number except for nonpositive integers. For nonnegative integral .I m one has -.PP +.P .RS Gamma(m+1) = m! .RE -.PP +.P and, more generally, for all .IR x : -.PP +.P .RS Gamma(x+1) = x * Gamma(x) .RE -.PP +.P Furthermore, the following is valid for all values of .I x outside the poles: -.PP +.P .RS Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x) .RE .SH RETURN VALUE On success, these functions return Gamma(x). -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is positive infinity, positive infinity is returned. -.PP +.P If .I x is a negative integer, or is negative infinity, a domain error occurs, and a NaN is returned. -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -93,11 +93,11 @@ and the functions return or .BR HUGE_VALL , respectively, with the correct mathematical sign. -.PP +.P If the result underflows, a range error occurs, and the functions return 0, with the correct mathematical sign. -.PP +.P If .I x is \-0 or +0, @@ -113,7 +113,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is a negative integer, or negative infinity @@ -139,7 +139,7 @@ is set to An overflow floating-point exception .RB ( FE_OVERFLOW ) is raised. -.PP +.P glibc also gives the following error which is not specified in C99 or POSIX.1-2001. .TP @@ -172,7 +172,6 @@ T{ .BR tgammal () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -194,7 +193,7 @@ to when .I x is negative infinity. -.PP +.P Before glibc 2.19, .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6810 the glibc implementation of these functions did not set @@ -202,7 +201,7 @@ the glibc implementation of these functions did not set to .B ERANGE on an underflow range error. -.PP +.P .\" In glibc versions 2.3.3 and earlier, an argument of +0 or \-0 incorrectly produced a domain error diff --git a/man3/timegm.3 b/man3/timegm.3 index 659fc8a..ab21d77 100644 --- a/man3/timegm.3 +++ b/man3/timegm.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH timegm 3 2023-07-20 "Linux man-pages 6.05.01" +.TH timegm 3 2023-10-31 "Linux man-pages 6.7" .SH NAME timegm, timelocal \- inverses of gmtime and localtime .SH LIBRARY @@ -12,16 +12,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BI "[[deprecated]] time_t timelocal(struct tm *" tm ); .BI "time_t timegm(struct tm *" tm ); -.PP +.P .fi .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR timelocal (), .BR timegm (): .nf @@ -75,12 +75,11 @@ T{ .BR timegm () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS BSD. .SH HISTORY GNU, BSD. -.PP +.P The .BR timelocal () function is equivalent to the POSIX standard function diff --git a/man3/timeradd.3 b/man3/timeradd.3 index d64f5b4..aba49a3 100644 --- a/man3/timeradd.3 +++ b/man3/timeradd.3 @@ -4,7 +4,7 @@ .\" .\" 2007-07-31, mtk, Created .\" -.TH timeradd 3 2023-03-30 "Linux man-pages 6.05.01" +.TH timeradd 3 2023-10-31 "Linux man-pages 6.7" .SH NAME timeradd, timersub, timercmp, timerclear, timerisset \- timeval operations .SH LIBRARY @@ -13,23 +13,23 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/time.h> -.PP +.P .BI "void timeradd(struct timeval *" a ", struct timeval *" b , .BI " struct timeval *" res ); .BI "void timersub(struct timeval *" a ", struct timeval *" b , .BI " struct timeval *" res ); -.PP +.P .BI "void timerclear(struct timeval *" tvp ); .BI "int timerisset(struct timeval *" tvp ); -.PP +.P .BI "int timercmp(struct timeval *" a ", struct timeval *" b ", " CMP ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .nf Since glibc 2.19: @@ -43,7 +43,7 @@ The macros are provided to operate on structures, defined in .I <sys/time.h> as: -.PP +.P .in +4n .EX struct timeval { @@ -52,7 +52,7 @@ struct timeval { }; .EE .in -.PP +.P .BR timeradd () adds the time values in .I a @@ -65,7 +65,7 @@ pointed to by The result is normalized such that .I res\->tv_usec has a value in the range 0 to 999,999. -.PP +.P .BR timersub () subtracts the time value in .I b @@ -78,21 +78,21 @@ pointed to by The result is normalized such that .I res\->tv_usec has a value in the range 0 to 999,999. -.PP +.P .BR timerclear () zeros out the .I timeval structure pointed to by .IR tvp , so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC). -.PP +.P .BR timerisset () returns true (nonzero) if either field of the .I timeval structure pointed to by .I tvp contains a nonzero value. -.PP +.P .BR timercmp () compares the timer values in .I a @@ -119,7 +119,7 @@ and .I == do not work; portable applications can instead use -.PP +.P .in +4n .EX !timercmp(..., <) diff --git a/man3/tmpfile.3 b/man3/tmpfile.3 index 41999f5..d45202b 100644 --- a/man3/tmpfile.3 +++ b/man3/tmpfile.3 @@ -9,7 +9,7 @@ .\" 386BSD man pages .\" Modified Sat Jul 24 17:46:57 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-11-17, aeb -.TH tmpfile 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tmpfile 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tmpfile \- create a temporary file .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .B FILE *tmpfile(void); .fi .SH DESCRIPTION @@ -74,7 +74,6 @@ T{ .BR tmpfile () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The standard does not specify the directory that .BR tmpfile () diff --git a/man3/tmpnam.3 b/man3/tmpnam.3 index 5798faa..157c9a7 100644 --- a/man3/tmpnam.3 +++ b/man3/tmpnam.3 @@ -5,7 +5,7 @@ .\" .\" 2003-11-15, aeb, added tmpnam_r .\" -.TH tmpnam 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tmpnam 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tmpnam, tmpnam_r \- create a name for a temporary file .SH LIBRARY @@ -14,16 +14,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "[[deprecated]] char *tmpnam(char *" s ); .BI "[[deprecated]] char *tmpnam_r(char *" s ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tmpnam_r () .nf Since glibc 2.19: @@ -38,7 +38,7 @@ avoid using these functions; use or .BR tmpfile (3) instead. -.PP +.P The .BR tmpnam () function returns a pointer to a string that is a valid filename, @@ -60,7 +60,7 @@ pointed to by and the value .I s is returned in case of success. -.PP +.P The created pathname has a directory prefix .IR P_tmpdir . (Both @@ -72,7 +72,7 @@ are defined in just like the .B TMP_MAX mentioned below.) -.PP +.P The .BR tmpnam_r () function performs the same task as @@ -104,7 +104,6 @@ T{ .BR tmpnam_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR tmpnam () @@ -131,7 +130,7 @@ If it is called more than .B TMP_MAX times, the behavior is implementation defined. -.PP +.P Although these functions generate names that are difficult to guess, it is nevertheless possible that between the time that the pathname is returned and the time that the program opens it, @@ -147,7 +146,7 @@ Or better yet, use .BR mkstemp (3) or .BR tmpfile (3). -.PP +.P Portable applications that use threads cannot call .BR tmpnam () with a NULL argument if either diff --git a/man3/toascii.3 b/man3/toascii.3 index 4e64cb0..20b91cd 100644 --- a/man3/toascii.3 +++ b/man3/toascii.3 @@ -5,7 +5,7 @@ .\" .\" Added BUGS section, aeb, 950919 .\" -.TH toascii 3 2023-07-20 "Linux man-pages 6.05.01" +.TH toascii 3 2023-10-31 "Linux man-pages 6.7" .SH NAME toascii \- convert character to ASCII .SH LIBRARY @@ -14,15 +14,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <ctype.h> -.PP +.P .BI "[[deprecated]] int toascii(int " c ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR toascii (): .nf _XOPEN_SOURCE @@ -53,7 +53,6 @@ T{ .BR toascii () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/toupper.3 b/man3/toupper.3 index 0eaa693..84500c2 100644 --- a/man3/toupper.3 +++ b/man3/toupper.3 @@ -6,7 +6,7 @@ .\" .\" Modified Sat Jul 24 17:45:39 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 2000-02-13 by Nicolás Lichtmaier <nick@debian.org> -.TH toupper 3 2023-07-20 "Linux man-pages 6.05.01" +.TH toupper 3 2024-02-25 "Linux man-pages 6.7" .SH NAME toupper, tolower, toupper_l, tolower_l \- convert uppercase or lowercase .SH LIBRARY @@ -15,19 +15,19 @@ Standard C library .SH SYNOPSIS .nf .B #include <ctype.h> -.PP +.P .BI "int toupper(int " "c" ); .BI "int tolower(int " "c" ); -.PP +.P .BI "int toupper_l(int " c ", locale_t " locale ); .BI "int tolower_l(int " c ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR toupper_l (), .BR tolower_l (): .nf @@ -38,7 +38,7 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION These functions convert lowercase letters to uppercase, and vice versa. -.PP +.P If .I c is a lowercase letter, @@ -52,7 +52,7 @@ The function performs the same task, but uses the locale referred to by the locale handle .IR locale . -.PP +.P If .I c is an uppercase letter, @@ -66,7 +66,7 @@ The function performs the same task, but uses the locale referred to by the locale handle .IR locale . -.PP +.P If .I c is neither an @@ -75,7 +75,7 @@ value nor .BR EOF , the behavior of these functions is undefined. -.PP +.P The behavior of .BR toupper_l () and @@ -108,7 +108,6 @@ T{ .BR tolower_l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR toupper () @@ -145,7 +144,7 @@ is of type it must be cast to .IR "unsigned char" , as in the following example: -.PP +.P .in +4n .EX char c; @@ -153,7 +152,7 @@ char c; res = toupper((unsigned char) c); .EE .in -.PP +.P This is necessary because .I char may be the equivalent @@ -163,13 +162,13 @@ converting to .IR int , yielding a value that is outside the range of .IR "unsigned char" . -.PP +.P The details of what constitutes an uppercase or lowercase letter depend on the locale. For example, the default -.B """C""" +.B \[dq]C\[dq] locale does not know about umlauts, so no conversion is done for them. -.PP +.P In some non-English locales, there are lowercase letters with no corresponding uppercase equivalent; .\" FIXME One day the statement about "sharp s" needs to be reworked, diff --git a/man3/towctrans.3 b/man3/towctrans.3 index bf507fa..7e30c87 100644 --- a/man3/towctrans.3 +++ b/man3/towctrans.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH towctrans 3 2023-07-20 "Linux man-pages 6.05.01" +.TH towctrans 3 2023-10-31 "Linux man-pages 6.7" .SH NAME towctrans \- wide-character transliteration .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "wint_t towctrans(wint_t " wc ", wctrans_t " desc ); .fi .SH DESCRIPTION @@ -35,7 +35,7 @@ is .BR WEOF , .B WEOF is returned. -.PP +.P .I desc must be a transliteration descriptor returned by the @@ -65,7 +65,6 @@ T{ .BR towctrans () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/towlower.3 b/man3/towlower.3 index 9748303..3a5f203 100644 --- a/man3/towlower.3 +++ b/man3/towlower.3 @@ -10,7 +10,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH towlower 3 2023-07-20 "Linux man-pages 6.05.01" +.TH towlower 3 2023-10-31 "Linux man-pages 6.7" .SH NAME towlower, towlower_l \- convert a wide character to lowercase .SH LIBRARY @@ -19,16 +19,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "wint_t towlower(wint_t " wc ); .BI "wint_t towlower_l(wint_t " wc ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR towlower_l (): .nf Since glibc 2.10: @@ -51,7 +51,7 @@ it returns the lowercase equivalent of In all other cases, .I wc is returned unchanged. -.PP +.P The .BR towlower_l () function performs the same task, @@ -67,7 +67,7 @@ is the special locale object (see .BR duplocale (3)) or is not a valid locale object handle. -.PP +.P The argument .I wc must be representable as a @@ -101,7 +101,6 @@ T{ .BR towlower_l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR towlower () @@ -122,7 +121,7 @@ POSIX.1-2008. The behavior of these functions depends on the .B LC_CTYPE category of the locale. -.PP +.P These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. .SH SEE ALSO diff --git a/man3/towupper.3 b/man3/towupper.3 index 0a9c1dd..fe3d609 100644 --- a/man3/towupper.3 +++ b/man3/towupper.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH towupper 3 2023-07-20 "Linux man-pages 6.05.01" +.TH towupper 3 2023-10-31 "Linux man-pages 6.7" .SH NAME towupper, towupper_l \- convert a wide character to uppercase .SH LIBRARY @@ -18,16 +18,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "wint_t towupper(wint_t " wc ); .BI "wint_t towupper_l(wint_t " wc ", locale_t " locale ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR towupper_l (): .nf Since glibc 2.10: @@ -50,7 +50,7 @@ it returns the uppercase equivalent of In all other cases, .I wc is returned unchanged. -.PP +.P The .BR towupper_l () function performs the same task, @@ -66,7 +66,7 @@ is the special locale object (see .BR duplocale (3)) or is not a valid locale object handle. -.PP +.P The argument .I wc must be representable as a @@ -100,7 +100,6 @@ T{ .BR towupper_l () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR towupper () @@ -121,7 +120,7 @@ glibc 2.3. The behavior of these functions depends on the .B LC_CTYPE category of the locale. -.PP +.P These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. .SH SEE ALSO diff --git a/man3/trunc.3 b/man3/trunc.3 index 4670f03..1c90c81 100644 --- a/man3/trunc.3 +++ b/man3/trunc.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH trunc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH trunc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME trunc, truncf, truncl \- round to integer, toward zero .SH LIBRARY @@ -12,17 +12,17 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double trunc(double " x ); .BI "float truncf(float " x ); .BI "long double truncl(long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR trunc (), .BR truncf (), .BR truncl (): @@ -36,7 +36,7 @@ to the nearest integer value that is not larger in magnitude than .IR x . .SH RETURN VALUE These functions return the rounded integer value, in floating format. -.PP +.P If .I x is integral, infinite, or NaN, @@ -60,7 +60,6 @@ T{ .BR truncl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/tsearch.3 b/man3/tsearch.3 index ff20302..1343cbe 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH tsearch 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tsearch 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tsearch, tfind, tdelete, twalk, twalk_r, tdestroy \- manage a binary search tree .SH LIBRARY @@ -12,9 +12,9 @@ Standard C library .SH SYNOPSIS .nf .B #include <search.h> -.PP +.P .B typedef enum { preorder, postorder, endorder, leaf } VISIT; -.PP +.P .BI "void *tsearch(const void *" key ", void **" rootp , .BI " int (*" compar ")(const void *, const void *));" .BI "void *tfind(const void *" key ", void *const *" rootp , @@ -24,10 +24,10 @@ Standard C library .BI "void twalk(const void *" root , .BI " void (*" action ")(const void *" nodep ", VISIT " which , .BI " int " depth )); -.PP +.P .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <search.h> -.PP +.P .BI "void twalk_r(const void *" root , .BI " void (*" action ")(const void *" nodep ", VISIT " which , .BI " void *" closure ), @@ -52,7 +52,7 @@ pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second. -.PP +.P .BR tsearch () searches the tree for an item. .I key @@ -74,7 +74,7 @@ If the item is not found, then .BR tsearch () adds it, and returns a pointer to the corresponding tree node. -.PP +.P .BR tfind () is like .BR tsearch (), @@ -82,12 +82,12 @@ except that if the item is not found, then .BR tfind () returns NULL. -.PP +.P .BR tdelete () deletes an item from the tree. Its arguments are the same as for .BR tsearch (). -.PP +.P .BR twalk () performs depth-first, left-to-right traversal of a binary tree. @@ -122,7 +122,7 @@ if this is the single visit to a leaf node. .IR <search.h> .) The third argument is the depth of the node; the root node has depth zero. -.PP +.P (More commonly, .BR preorder , .BR postorder , @@ -138,7 +138,7 @@ and after visiting the children. Thus, the choice of name .B post\%order is rather confusing.) -.PP +.P .BR twalk_r () is similar to .BR twalk (), @@ -151,7 +151,7 @@ unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables. -.PP +.P .BR tdestroy () removes the whole tree pointed to by .IR root , @@ -176,14 +176,14 @@ returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified. -.PP +.P .BR tdelete () returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, .BR tdelete () returns a dangling pointer that must not be accessed. -.PP +.P .BR tsearch (), .BR tfind (), and @@ -223,7 +223,6 @@ T{ .BR tdestroy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR tsearch () @@ -256,12 +255,12 @@ glibc 2.30. .BR twalk () takes a pointer to the root, while the other functions take a pointer to a variable which points to the root. -.PP +.P .BR tdelete () frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data. -.PP +.P The example program depends on the fact that .BR twalk () makes no @@ -273,7 +272,7 @@ implementation, but is not in the System V documentation. The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order. -.PP +.P .\" SRC BEGIN (tsearch.c) .EX #define _GNU_SOURCE /* Expose declaration of tdestroy() */ diff --git a/man3/ttyname.3 b/man3/ttyname.3 index cfdbb22..ca12a14 100644 --- a/man3/ttyname.3 +++ b/man3/ttyname.3 @@ -6,7 +6,7 @@ .\" Modified 2001-12-13, Martin Schulze <joey@infodrom.org> .\" Added ttyname_r, aeb, 2002-07-20 .\" -.TH ttyname 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ttyname 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ttyname, ttyname_r \- return name of a terminal .SH LIBRARY @@ -15,7 +15,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <unistd.h> -.PP +.P .BI "char *ttyname(int " fd ); .BI "int ttyname_r(int " fd ", char " buf [. buflen "], size_t " buflen ); .fi @@ -81,7 +81,6 @@ T{ .BR ttyname_r () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/ttyslot.3 b/man3/ttyslot.3 index d50af49..f4eaa7f 100644 --- a/man3/ttyslot.3 +++ b/man3/ttyslot.3 @@ -6,7 +6,7 @@ .\" This replaces an earlier man page written by Walter Harms .\" <walter.harms@informatik.uni-oldenburg.de>. .\" -.TH ttyslot 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ttyslot 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ttyslot \- find the slot of the current user's terminal in some file .SH LIBRARY @@ -15,15 +15,15 @@ Standard C library .SH SYNOPSIS .nf .BR "#include <unistd.h>" " /* See NOTES */" -.PP +.P .B "int ttyslot(void);" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ttyslot (): .nf Since glibc 2.24: @@ -37,7 +37,7 @@ Feature Test Macro Requirements for glibc (see The legacy function .BR ttyslot () returns the index of the current user's entry in some file. -.PP +.P Now "What file?" you ask. Well, let's first look at some history. .SS Ancient history @@ -57,7 +57,7 @@ indicating the sequence of line speeds to try (\[aq]\-\[aq] was: start trying Thus a typical line was "18\-". A hang on some line was solved by changing the \[aq]1\[aq] to a \[aq]0\[aq], signaling init, changing back again, and signaling init again. -.PP +.P In UNIX\ V7 the format was changed: here the second character was the argument to .BR getty (8) @@ -65,7 +65,7 @@ indicating the sequence of line speeds to try (\[aq]0\[aq] was: cycle through 300-1200-150-110 baud; \[aq]4\[aq] was for the on-line console DECwriter) while the rest of the line contained the name of the tty. Thus a typical line was "14console". -.PP +.P Later systems have more elaborate syntax. System V-like systems have .I /etc/inittab @@ -119,7 +119,6 @@ T{ .BR ttyslot () T} Thread safety MT-Unsafe .TE -.sp 1 .SH VERSIONS The utmp file is found in various places on various systems, such as .IR /etc/utmp , @@ -130,7 +129,7 @@ None. .SH HISTORY SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001. SUSv2 requires \-1 on error. -.PP +.P The glibc2 implementation of this function reads the file .BR _PATH_TTYS , defined in @@ -139,7 +138,7 @@ as "/etc/ttys". It returns 0 on error. Since Linux systems do not usually have "/etc/ttys", it will always return 0. -.PP +.P On BSD-like systems and Linux, the declaration of .BR ttyslot () is provided by @@ -150,7 +149,7 @@ Since glibc 2.24, .I <stdlib.h> also provides the declaration with the following feature test macro definitions: -.PP +.P .in +4n .EX (_XOPEN_SOURCE >= 500 || @@ -158,7 +157,7 @@ feature test macro definitions: && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) .EE .in -.PP +.P Minix also has .IR fttyslot ( fd ). .\" .SH HISTORY diff --git a/man3/tzset.3 b/man3/tzset.3 index 4027bb3..3c97684 100644 --- a/man3/tzset.3 +++ b/man3/tzset.3 @@ -11,7 +11,7 @@ .\" Modified 2001-11-13, aeb .\" Modified 2004-12-01 mtk and Martin Schulze <joey@infodrom.org> .\" -.TH tzset 3 2023-07-20 "Linux man-pages 6.05.01" +.TH tzset 3 2023-10-31 "Linux man-pages 6.7" .SH NAME tzset, tzname, timezone, daylight \- initialize time conversion information .SH LIBRARY @@ -20,29 +20,29 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .B void tzset(void); -.PP +.P .BI "extern char *" tzname [2]; .BI "extern long " timezone ; .BI "extern int " daylight ; .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR tzset (): .nf _POSIX_C_SOURCE .fi -.PP +.P .IR tzname : .nf _POSIX_C_SOURCE .fi -.PP +.P .IR timezone , .IR daylight : .nf @@ -62,7 +62,7 @@ In a System-V-like environment, it will also set the variables \fItimezone\fP (seconds West of UTC) and \fIdaylight\fP (to 0 if this timezone does not have any daylight saving time rules, or to nonzero if there is a time, past, present, or future when daylight saving time applies). -.PP +.P If the .B TZ variable does not appear in the environment, the system timezone is used. @@ -72,25 +72,25 @@ format to .IR /etc/localtime . A timezone database of these files may be located in the system timezone directory (see the \fBFILES\fP section below). -.PP +.P If the .B TZ variable does appear in the environment, but its value is empty, or its value cannot be interpreted using any of the formats specified below, then Coordinated Universal Time (UTC) is used. -.PP +.P The value of .B TZ can be one of two formats. The first format is a string of characters that directly represent the timezone to be used: -.PP +.P .in +4n .EX .IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]] .EE .in -.PP +.P There are no spaces in the specification. The \fIstd\fP string specifies an abbreviation for the timezone and must be three or more alphabetic characters. @@ -104,18 +104,18 @@ The \fIoffset\fP is positive if the local timezone is west of the Prime Meridian and negative if it is east. The hour must be between 0 and 24, and the minutes and seconds 00 and 59: -.PP +.P .in +4n .EX .RI [ + | \- ] hh [ :mm [ :ss ]] .EE .in -.PP +.P The \fIdst\fP string and \fIoffset\fP specify the name and offset for the corresponding daylight saving timezone. If the offset is omitted, it defaults to one hour ahead of standard time. -.PP +.P The \fIstart\fP field specifies when daylight saving time goes into effect and the \fIend\fP field specifies when the change is made back to standard time. @@ -138,32 +138,32 @@ Week 1 is the first week in which day \fId\fP occurs and week 5 is the last week in which day \fId\fP occurs. Day 0 is a Sunday. -.PP +.P The \fItime\fP fields specify when, in the local time currently in effect, the change to the other time occurs. If omitted, the default is 02:00:00. -.PP +.P Here is an example for New Zealand, where the standard time (NZST) is 12 hours ahead of UTC, and daylight saving time (NZDT), 13 hours ahead of UTC, runs from the first Sunday in October to the third Sunday in March, and the changeovers happen at the default time of 02:00:00: -.PP +.P .in +4n .EX TZ="NZST\-12:00:00NZDT\-13:00:00,M10.1.0,M3.3.0" .EE .in -.PP +.P The second format specifies that the timezone information should be read from a file: -.PP +.P .in +4n .EX :[filespec] .EE .in -.PP +.P If the file specification \fIfilespec\fP is omitted, or its value cannot be interpreted, then Coordinated Universal Time (UTC) is used. If \fIfilespec\fP is given, it specifies another @@ -173,9 +173,9 @@ If \fIfilespec\fP does not begin with a \[aq]/\[aq], the file specification is relative to the system timezone directory. If the colon is omitted each of the above \fBTZ\fP formats will be tried. -.PP +.P Here's an example, once more for New Zealand: -.PP +.P .in +4n .EX TZ=":Pacific/Auckland" @@ -206,7 +206,7 @@ It is in the format. By default, the zoneinfo Makefile hard links it to the .IR America/New_York " tzfile." -.PP +.P Above are the current standard file locations, but they are configurable when glibc is compiled. .SH ATTRIBUTES @@ -223,12 +223,11 @@ T{ .BR tzset () T} Thread safety MT-Safe env locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001, SVr4, 4.3BSD. -.PP +.P 4.3BSD had a function .BI "char *timezone(" zone ", " dst ) that returned the diff --git a/man3/ualarm.3 b/man3/ualarm.3 index 55ca2d7..0d4275c 100644 --- a/man3/ualarm.3 +++ b/man3/ualarm.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH ualarm 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ualarm 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ualarm \- schedule signal after given number of microseconds .SH LIBRARY @@ -12,15 +12,15 @@ Standard C library .SH SYNOPSIS .nf .B "#include <unistd.h>" -.PP +.P .BI "useconds_t ualarm(useconds_t " usecs ", useconds_t " interval ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR ualarm (): .nf Since glibc 2.12: @@ -42,11 +42,11 @@ microseconds. The delay may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers. -.PP +.P Unless caught or ignored, the .B SIGALRM signal will terminate the process. -.PP +.P If the .I interval argument is nonzero, further @@ -80,23 +80,22 @@ T{ .BR ualarm () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY 4.3BSD, POSIX.1-2001. POSIX.1-2001 marks it as obsolete. Removed in POSIX.1-2008. -.PP +.P 4.3BSD, SUSv2, and POSIX do not define any errors. -.PP +.P POSIX.1-2001 does not specify what happens if the .I usecs argument is 0. .\" This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD! On Linux (and probably most other systems), the effect is to cancel any pending alarm. -.PP +.P The type .I useconds_t is an unsigned integer type capable of holding integers @@ -109,7 +108,7 @@ were instead typed as Programs will be more portable if they never mention .I useconds_t explicitly. -.PP +.P The interaction of this function with other timer functions such as .BR alarm (2), @@ -123,7 +122,7 @@ other timer functions such as .BR timer_settime (2), .BR usleep (3) is unspecified. -.PP +.P This function is obsolete. Use .BR setitimer (2) diff --git a/man3/ulimit.3 b/man3/ulimit.3 index 8cd8f6d..f003482 100644 --- a/man3/ulimit.3 +++ b/man3/ulimit.3 @@ -5,7 +5,7 @@ .\" .\" Moved to man3, aeb, 980612 .\" -.TH ulimit 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ulimit 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ulimit \- get and set user limits .SH LIBRARY @@ -14,7 +14,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <ulimit.h> -.PP +.P .BI "[[deprecated]] long ulimit(int " cmd ", long " newlimit ); .fi .SH DESCRIPTION @@ -29,7 +29,7 @@ For the shell command .BR ulimit , see .BR bash (1). -.PP +.P The .BR ulimit () call will get or set some limit for the calling process. @@ -75,7 +75,6 @@ T{ .BR ulimit () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/undocumented.3 b/man3/undocumented.3 index 8ee3484..b67b9f0 100644 --- a/man3/undocumented.3 +++ b/man3/undocumented.3 @@ -7,7 +7,7 @@ .\" 2004-10-31, aeb, changed maintainer address, updated list .\" 2015-04-20, william@tuffbizz.com, updated list .\" -.TH undocumented 3 2022-10-30 "Linux man-pages 6.05.01" +.TH undocumented 3 2022-10-30 "Linux man-pages 6.7" .SH NAME undocumented \- undocumented library functions .SH SYNOPSIS diff --git a/man3/ungetwc.3 b/man3/ungetwc.3 index 04d5563..2b16322 100644 --- a/man3/ungetwc.3 +++ b/man3/ungetwc.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH ungetwc 3 2023-07-20 "Linux man-pages 6.05.01" +.TH ungetwc 3 2023-10-31 "Linux man-pages 6.7" .SH NAME ungetwc \- push back a wide character onto a FILE stream .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wint_t ungetwc(wint_t " wc ", FILE *" stream ); .fi .SH DESCRIPTION @@ -30,7 +30,7 @@ function. It pushes back a wide character onto .I stream and returns it. -.PP +.P If .I wc is @@ -46,7 +46,7 @@ to .B EILSEQ and returns .BR WEOF . -.PP +.P If .I wc is a valid wide character, it is pushed back onto the stream @@ -55,12 +55,12 @@ The file-position indicator is decremented by one or more. The end-of-file indicator is cleared. The backing storage of the file is not affected. -.PP +.P Note: .I wc need not be the last wide-character read from the stream; it can be any other valid wide character. -.PP +.P If the implementation supports multiple push-back operations in a row, the pushed-back wide characters will be read in reverse order; however, only one level of push-back is guaranteed. @@ -87,7 +87,6 @@ T{ .BR ungetwc () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/unlocked_stdio.3 b/man3/unlocked_stdio.3 index a74e6b2..627bfbc 100644 --- a/man3/unlocked_stdio.3 +++ b/man3/unlocked_stdio.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH unlocked_stdio 3 2023-07-30 "Linux man-pages 6.05.01" +.TH unlocked_stdio 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked \- nonlocking stdio functions @@ -13,53 +13,53 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BI "int getc_unlocked(FILE *" stream ); .B "int getchar_unlocked(void);" .BI "int putc_unlocked(int " c ", FILE *" stream ); .BI "int putchar_unlocked(int " c ); -.PP +.P .BI "void clearerr_unlocked(FILE *" stream ); .BI "int feof_unlocked(FILE *" stream ); .BI "int ferror_unlocked(FILE *" stream ); .BI "int fileno_unlocked(FILE *" stream ); .BI "int fflush_unlocked(FILE *_Nullable " stream ); -.PP +.P .BI "int fgetc_unlocked(FILE *" stream ); .BI "int fputc_unlocked(int " c ", FILE *" stream ); -.PP +.P .BI "size_t fread_unlocked(void " ptr "[restrict ." size " * ." n ], .BI " size_t " size ", size_t " n , .BI " FILE *restrict " stream ); .BI "size_t fwrite_unlocked(const void " ptr "[restrict ." size " * ." n ], .BI " size_t " size ", size_t " n , .BI " FILE *restrict " stream ); -.PP +.P .BI "char *fgets_unlocked(char " s "[restrict ." n "], int " n \ ", FILE *restrict " stream ); .BI "int fputs_unlocked(const char *restrict " s ", FILE *restrict " stream ); -.PP +.P .B #include <wchar.h> -.PP +.P .BI "wint_t getwc_unlocked(FILE *" stream ); .B "wint_t getwchar_unlocked(void);" .BI "wint_t fgetwc_unlocked(FILE *" stream ); -.PP +.P .BI "wint_t fputwc_unlocked(wchar_t " wc ", FILE *" stream ); .BI "wint_t putwc_unlocked(wchar_t " wc ", FILE *" stream ); .BI "wint_t putwchar_unlocked(wchar_t " wc ); -.PP +.P .BI "wchar_t *fgetws_unlocked(wchar_t " ws "[restrict ." n "], int " n , .BI " FILE *restrict " stream ); .BI "int fputws_unlocked(const wchar_t *restrict " ws , .BI " FILE *restrict " stream ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR \%getc_unlocked (), .BR \%getchar_unlocked (), .BR \%putc_unlocked (), @@ -69,7 +69,7 @@ Feature Test Macro Requirements for glibc (see || /* glibc <= 2.23: */ _POSIX_C_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR \%clearerr_unlocked (), .BR \%feof_unlocked (), .BR \%ferror_unlocked (), @@ -83,7 +83,7 @@ Feature Test Macro Requirements for glibc (see /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR \%fgets_unlocked (), .BR \%fputs_unlocked (), .BR \%getwc_unlocked (), @@ -163,7 +163,6 @@ T{ .BR fileno_unlocked () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR getc_unlocked () diff --git a/man3/unlockpt.3 b/man3/unlockpt.3 index 1ed2ad9..8760870 100644 --- a/man3/unlockpt.3 +++ b/man3/unlockpt.3 @@ -3,7 +3,7 @@ .\" This page is in the public domain. - aeb .\" %%%LICENSE_END .\" -.TH unlockpt 3 2023-07-20 "Linux man-pages 6.05.01" +.TH unlockpt 3 2023-10-31 "Linux man-pages 6.7" .SH NAME unlockpt \- unlock a pseudoterminal master/slave pair .SH LIBRARY @@ -13,15 +13,15 @@ Standard C library .nf .B #define _XOPEN_SOURCE .B #include <stdlib.h> -.PP +.P .BI "int unlockpt(int " fd ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR unlockpt (): .nf Since glibc 2.24: @@ -36,7 +36,7 @@ The function unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by the file descriptor .IR fd . -.PP +.P .BR unlockpt () should be called before opening the slave side of a pseudoterminal. .SH RETURN VALUE @@ -71,7 +71,6 @@ T{ .BR unlockpt () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/updwtmp.3 b/man3/updwtmp.3 index 99113e8..6548393 100644 --- a/man3/updwtmp.3 +++ b/man3/updwtmp.3 @@ -8,7 +8,7 @@ .\" Added -lutil remark, 030718 .\" 2008-07-02, mtk, document updwtmpx() .\" -.TH updwtmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH updwtmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME updwtmp, logwtmp \- append an entry to the wtmp file .SH LIBRARY @@ -17,7 +17,7 @@ System utilities library .SH SYNOPSIS .nf .B #include <utmp.h> -.PP +.P .BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut ); .BI "void logwtmp(const char *" line ", const char *" name \ ", const char *" host ); @@ -27,7 +27,7 @@ System utilities library appends the utmp structure .I ut to the wtmp file. -.PP +.P .BR logwtmp () constructs a utmp structure using .IR line ", " name ", " host , @@ -54,12 +54,11 @@ T{ .BR logwtmp () T} Thread safety MT-Unsafe sig:ALRM timer .TE -.sp 1 .SH VERSIONS For consistency with the other "utmpx" functions (see .BR getutxent (3)), glibc provides (since glibc 2.1): -.PP +.P .in +4n .EX .BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */" @@ -67,7 +66,7 @@ glibc provides (since glibc 2.1): .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); .EE .in -.PP +.P This function performs the same task as .BR updwtmp (), but differs in that it takes a diff --git a/man3/uselocale.3 b/man3/uselocale.3 index 19995c3..6e97649 100644 --- a/man3/uselocale.3 +++ b/man3/uselocale.3 @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH uselocale 3 2023-03-30 "Linux man-pages 6.05.01" +.TH uselocale 3 2023-10-31 "Linux man-pages 6.7" .SH NAME uselocale \- set/get the locale for the calling thread .SH LIBRARY @@ -11,15 +11,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <locale.h> -.PP +.P .BI "locale_t uselocale(locale_t " newloc ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR uselocale (): .nf Since glibc 2.10: @@ -37,7 +37,7 @@ After a successful call to any calls by this thread to functions that depend on the locale will operate as though the locale has been set to .IR newloc . -.PP +.P The .I newloc argument can have one of the following values: diff --git a/man3/usleep.3 b/man3/usleep.3 index a05472d..cb3ee05 100644 --- a/man3/usleep.3 +++ b/man3/usleep.3 @@ -11,7 +11,7 @@ .\" Modified 2001-04-01 by aeb .\" Modified 2003-07-23 by aeb .\" -.TH usleep 3 2023-07-20 "Linux man-pages 6.05.01" +.TH usleep 3 2023-10-31 "Linux man-pages 6.7" .SH NAME usleep \- suspend execution for microsecond intervals .SH LIBRARY @@ -20,15 +20,15 @@ Standard C library .SH SYNOPSIS .nf .B "#include <unistd.h>" -.PP +.P .BI "int usleep(useconds_t " usec ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR usleep (): .nf Since glibc 2.12: @@ -77,7 +77,6 @@ T{ .BR usleep () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -86,14 +85,14 @@ POSIX.1-2001 declares it obsolete, suggesting .BR nanosleep (2) instead. Removed in POSIX.1-2008. -.PP +.P On the original BSD implementation, and before glibc 2.2.2, the return type of this function is .IR void . The POSIX version returns .IR int , and this is also the prototype used since glibc 2.2.2. -.PP +.P Only the .B EINVAL error return is documented by SUSv2 and POSIX.1-2001. diff --git a/man3/ustpcpy.3 b/man3/ustpcpy.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/ustpcpy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3/ustr2stp.3 b/man3/ustr2stp.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/ustr2stp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3/wcpcpy.3 b/man3/wcpcpy.3 index dfdc079..ea83da8 100644 --- a/man3/wcpcpy.3 +++ b/man3/wcpcpy.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcpcpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcpcpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcpcpy \- copy a wide-character string, returning a pointer to its end .SH LIBRARY @@ -17,16 +17,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcpcpy(wchar_t *restrict " dest \ ", const wchar_t *restrict " src ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcpcpy (): .nf Since glibc 2.10: @@ -45,9 +45,9 @@ It copies the wide-character string pointed to by including the terminating null wide character (L\[aq]\e0\[aq]), to the array pointed to by .IR dest . -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .I wcslen(src)+1 @@ -72,7 +72,6 @@ T{ .BR wcpcpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH SEE ALSO diff --git a/man3/wcpncpy.3 b/man3/wcpncpy.3 index 40538d0..dcb3911 100644 --- a/man3/wcpncpy.3 +++ b/man3/wcpncpy.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcpncpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcpncpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcpncpy \- copy a fixed-size string of wide characters, returning a pointer to its end @@ -18,17 +18,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcpncpy(wchar_t " dest "[restrict ." n ], .BI " const wchar_t " src "[restrict ." n ], .BI " size_t " n ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcpncpy (): .nf Since glibc 2.10: @@ -73,9 +73,9 @@ the string pointed to by .I dest will not be L\[aq]\e0\[aq] terminated. -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .I n wide @@ -99,7 +99,6 @@ T{ .BR wcpncpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH SEE ALSO diff --git a/man3/wcrtomb.3 b/man3/wcrtomb.3 index 2732832..9957bd0 100644 --- a/man3/wcrtomb.3 +++ b/man3/wcrtomb.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcrtomb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcrtomb 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcrtomb \- convert a wide character to a multibyte sequence .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcrtomb(char *restrict " s ", wchar_t " wc \ ", mbstate_t *restrict " ps ); .fi @@ -45,7 +45,7 @@ returns the length of said multibyte representation, that is, the number of bytes written at .IR s . -.PP +.P A different case is when .I s is not NULL, @@ -69,7 +69,7 @@ it into the initial state), and returns the length of the shift sequence plus one, that is, the number of bytes written at .IR s . -.PP +.P A third case is when .I s is NULL. @@ -77,17 +77,17 @@ In this case, .I wc is ignored, and the function effectively returns -.PP +.P .in +4n .EX wcrtomb(buf, L\[aq]\e0\[aq], ps) .EE .in -.PP +.P where .I buf is an internal anonymous buffer. -.PP +.P In all of the above cases, if .I ps is NULL, a static anonymous @@ -124,7 +124,6 @@ T{ .BR wcrtomb () T} Thread safety MT-Unsafe race:wcrtomb/!ps .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -136,7 +135,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P Passing NULL as .I ps is not multithread safe. diff --git a/man3/wcscasecmp.3 b/man3/wcscasecmp.3 index 252228c..121fa45 100644 --- a/man3/wcscasecmp.3 +++ b/man3/wcscasecmp.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcscasecmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcscasecmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcscasecmp \- compare two wide-character strings, ignoring case .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wcscasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcscasecmp (): .nf Since glibc 2.10: @@ -83,7 +83,6 @@ T{ .BR wcscasecmp () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/wcscat.3 b/man3/wcscat.3 index 6f3e539..36c8fc9 100644 --- a/man3/wcscat.3 +++ b/man3/wcscat.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcscat 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcscat 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcscat \- concatenate two wide-character strings .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcscat(wchar_t *restrict " dest \ ", const wchar_t *restrict " src ); .fi @@ -34,9 +34,9 @@ It copies the wide-character string pointed to by including the terminating null wide character (L\[aq]\e0\[aq]), to the end of the wide-character string pointed to by .IR dest . -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .IR wcslen(dest) + wcslen(src) +1 wide characters at @@ -59,7 +59,6 @@ T{ .BR wcscat () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcschr.3 b/man3/wcschr.3 index e4c1d76..e8f017e 100644 --- a/man3/wcschr.3 +++ b/man3/wcschr.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcschr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcschr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcschr \- search a wide character in a wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcschr(const wchar_t *" wcs ", wchar_t " wc ); .fi .SH DESCRIPTION @@ -57,7 +57,6 @@ T{ .BR wcschr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcscmp.3 b/man3/wcscmp.3 index 264bb09..04d1eb5 100644 --- a/man3/wcscmp.3 +++ b/man3/wcscmp.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcscmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcscmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcscmp \- compare two wide-character strings .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wcscmp(const wchar_t *" s1 ", const wchar_t *" s2 ); .fi .SH DESCRIPTION @@ -69,7 +69,6 @@ T{ .BR wcscmp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcscpy.3 b/man3/wcscpy.3 index 76882b5..cdb33a0 100644 --- a/man3/wcscpy.3 +++ b/man3/wcscpy.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcscpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcscpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcscpy \- copy a wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcscpy(wchar_t *restrict " dest \ ", const wchar_t *restrict " src ); .fi @@ -34,9 +34,9 @@ It copies the wide-character string pointed to by including the terminating null wide character (L\[aq]\e0\[aq]), to the array pointed to by .IR dest . -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .I wcslen(src)+1 @@ -60,7 +60,6 @@ T{ .BR wcscpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcscspn.3 b/man3/wcscspn.3 index 20fe000..d427a4c 100644 --- a/man3/wcscspn.3 +++ b/man3/wcscspn.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcscspn 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcscspn 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcscspn \- search a wide-character string for any of a set of wide characters .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcscspn(const wchar_t *" wcs ", const wchar_t *" reject ); .fi .SH DESCRIPTION @@ -71,7 +71,6 @@ T{ .BR wcscspn () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsdup.3 b/man3/wcsdup.3 index 8e7c71b..58dc92c 100644 --- a/man3/wcsdup.3 +++ b/man3/wcsdup.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcsdup 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsdup 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsdup \- duplicate a wide-character string .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcsdup(const wchar_t *" s ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcsdup (): .nf Since glibc 2.10: @@ -43,7 +43,7 @@ function. It allocates and returns a new wide-character string whose initial contents is a duplicate of the wide-character string pointed to by .IR s . -.PP +.P Memory for the new wide-character string is obtained with .BR malloc (3), @@ -74,7 +74,6 @@ T{ .BR wcsdup () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/wcslen.3 b/man3/wcslen.3 index e716484..223c274 100644 --- a/man3/wcslen.3 +++ b/man3/wcslen.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcslen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcslen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcslen \- determine the length of a wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcslen(const wchar_t *" s ); .fi .SH DESCRIPTION @@ -52,7 +52,6 @@ T{ .BR wcslen () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsncasecmp.3 b/man3/wcsncasecmp.3 index ad233b4..b4d0ea6 100644 --- a/man3/wcsncasecmp.3 +++ b/man3/wcsncasecmp.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcsncasecmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsncasecmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case .SH LIBRARY @@ -17,16 +17,16 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wcsncasecmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], s\ ize_t " n ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcsncasecmp (): .nf Since glibc 2.10: @@ -89,7 +89,6 @@ T{ .BR wcsncasecmp () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsncat.3 b/man3/wcsncat.3 index 73ff7e8..131b8b6 100644 --- a/man3/wcsncat.3 +++ b/man3/wcsncat.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsncat 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsncat 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsncat \- concatenate two wide-character strings .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcsncat(wchar_t " dest "[restrict ." n ], .BI " const wchar_t " src "[restrict ." n ], .BI " size_t " n ); @@ -38,9 +38,9 @@ to the end of the wide-character string pointed to by .IR dest , and adds a terminating null wide character (L\[aq]\e0\[aq]). -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .IR wcslen(dest) + n +1 wide characters at @@ -63,7 +63,6 @@ T{ .BR wcsncat () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsncmp.3 b/man3/wcsncmp.3 index 8e53bf2..bbf490d 100644 --- a/man3/wcsncmp.3 +++ b/man3/wcsncmp.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsncmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsncmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsncmp \- compare two fixed-size wide-character strings .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wcsncmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \ size_t " n ); .fi @@ -84,7 +84,6 @@ T{ .BR wcsncmp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsncpy.3 b/man3/wcsncpy.3 index ee04677..82bdbef 100644 --- a/man3/wcsncpy.3 +++ b/man3/wcsncpy.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsncpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsncpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsncpy \- copy a fixed-size string of wide characters .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcsncpy(wchar_t " dest "[restrict ." n ], .BI " const wchar_t " src "[restrict ." n ], .BI " size_t " n ); @@ -55,9 +55,9 @@ to the string pointed to by .I dest will not be terminated by a null wide character. -.PP +.P The strings may not overlap. -.PP +.P The programmer must ensure that there is room for at least .I n wide @@ -81,7 +81,6 @@ T{ .BR wcsncpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsnlen.3 b/man3/wcsnlen.3 index 8e2426d..3f846e4 100644 --- a/man3/wcsnlen.3 +++ b/man3/wcsnlen.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcsnlen 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsnlen 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsnlen \- determine the length of a fixed-size wide-character string .SH LIBRARY @@ -17,15 +17,15 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcsnlen(const wchar_t " s [. maxlen "], size_t " maxlen ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcsnlen (): .nf Since glibc 2.10: @@ -82,7 +82,6 @@ T{ .BR wcsnlen () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsnrtombs.3 b/man3/wcsnrtombs.3 index 21ad0fa..787d56f 100644 --- a/man3/wcsnrtombs.3 +++ b/man3/wcsnrtombs.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcsnrtombs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsnrtombs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsnrtombs \- convert a wide-character string to a multibyte string .SH LIBRARY @@ -17,18 +17,18 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcsnrtombs(char " dest "[restrict ." len "], \ const wchar_t **restrict " src , .BI " size_t " nwc ", size_t " len ", \ mbstate_t *restrict " ps ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wcsnrtombs (): .nf Since glibc 2.10: @@ -47,7 +47,7 @@ starting at .IR *src , is limited to .IR nwc . -.PP +.P If .I dest is not NULL, @@ -115,7 +115,7 @@ of bytes written to .IR dest , excluding the terminating null byte (\[aq]\e0\[aq]), is returned. -.PP +.P If .I dest is NULL, @@ -124,7 +124,7 @@ is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no destination length limit exists. -.PP +.P In both of the above cases, if .I ps @@ -132,7 +132,7 @@ is NULL, a static anonymous state known only to the .BR wcsnrtombs () function is used instead. -.PP +.P The programmer must ensure that there is room for at least .I len bytes @@ -170,7 +170,6 @@ T} Thread safety T{ MT-Unsafe race:wcsnrtombs/!ps T} .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH NOTES @@ -180,7 +179,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P Passing NULL as .I ps is not multithread safe. diff --git a/man3/wcspbrk.3 b/man3/wcspbrk.3 index 539d881..ec76fd6 100644 --- a/man3/wcspbrk.3 +++ b/man3/wcspbrk.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcspbrk 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcspbrk 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcspbrk \- search a wide-character string for any of a set of wide characters .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcspbrk(const wchar_t *" wcs ", const wchar_t *" accept ); .fi .SH DESCRIPTION @@ -59,7 +59,6 @@ T{ .BR wcspbrk () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsrchr.3 b/man3/wcsrchr.3 index beae570..59b2476 100644 --- a/man3/wcsrchr.3 +++ b/man3/wcsrchr.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsrchr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsrchr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsrchr \- search a wide character in a wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcsrchr(const wchar_t *" wcs ", wchar_t " wc ); .fi .SH DESCRIPTION @@ -57,7 +57,6 @@ T{ .BR wcsrchr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsrtombs.3 b/man3/wcsrtombs.3 index 99304e4..49a581f 100644 --- a/man3/wcsrtombs.3 +++ b/man3/wcsrtombs.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsrtombs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsrtombs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsrtombs \- convert a wide-character string to a multibyte string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcsrtombs(char " dest "[restrict ." len "], \ const wchar_t **restrict " src , .BI " size_t " len ", mbstate_t *restrict " ps ); @@ -86,7 +86,7 @@ of bytes written to .IR dest , excluding the terminating null byte (\[aq]\e0\[aq]), is returned. -.PP +.P If .I dest is NULL, @@ -95,7 +95,7 @@ is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no length limit exists. -.PP +.P In both of the above cases, if .I ps @@ -103,7 +103,7 @@ is NULL, a static anonymous state known only to the .BR wcsrtombs () function is used instead. -.PP +.P The programmer must ensure that there is room for at least .I len bytes @@ -141,7 +141,6 @@ T} Thread safety T{ MT-Unsafe race:wcsrtombs/!ps T} .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -153,7 +152,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P Passing NULL as .I ps is not multithread safe. diff --git a/man3/wcsspn.3 b/man3/wcsspn.3 index aa9e265..b7b571a 100644 --- a/man3/wcsspn.3 +++ b/man3/wcsspn.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsspn 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsspn 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsspn \- get length of a prefix wide-character substring .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "size_t wcsspn(const wchar_t *" wcs ", const wchar_t *" accept ); .fi .SH DESCRIPTION @@ -69,7 +69,6 @@ T{ .BR wcsspn () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcsstr.3 b/man3/wcsstr.3 index 75b3d3b..ae3746a 100644 --- a/man3/wcsstr.3 +++ b/man3/wcsstr.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcsstr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcsstr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcsstr \- locate a substring in a wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcsstr(const wchar_t *" haystack ", const wchar_t *" needle ); .fi .SH DESCRIPTION @@ -44,7 +44,7 @@ It returns NULL if does not occur as a substring in .IR haystack . -.PP +.P Note the special case: If .I needle @@ -66,7 +66,6 @@ T{ .BR wcsstr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcstoimax.3 b/man3/wcstoimax.3 index e3e5ed1..82dea8e 100644 --- a/man3/wcstoimax.3 +++ b/man3/wcstoimax.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH wcstoimax 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcstoimax 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcstoimax, wcstoumax \- convert wide-character string to integer .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .nf .B #include <stddef.h> .B #include <inttypes.h> -.PP +.P .BI "intmax_t wcstoimax(const wchar_t *restrict " nptr , .BI " wchar_t **restrict " endptr ", int " base ); .BI "uintmax_t wcstoumax(const wchar_t *restrict " nptr , @@ -44,7 +44,6 @@ T{ .BR wcstoumax () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcstok.3 b/man3/wcstok.3 index b63789c..26f18db 100644 --- a/man3/wcstok.3 +++ b/man3/wcstok.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcstok 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcstok 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcstok \- split wide-character string into tokens .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wcstok(wchar_t *restrict " wcs \ ", const wchar_t *restrict " delim , .BI " wchar_t **restrict " ptr ); @@ -36,7 +36,7 @@ to split a wide-character string into tokens, where a token is defined as a substring not containing any wide-characters from .IR delim . -.PP +.P The search starts at .IR wcs , if @@ -90,7 +90,6 @@ T{ .BR wcstok () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -102,7 +101,7 @@ wide-character string is destructively modified during the operation. .SH EXAMPLES The following code loops over the tokens contained in a wide-character string. -.PP +.P .EX wchar_t *wcs = ...; wchar_t *token; diff --git a/man3/wcstombs.3 b/man3/wcstombs.3 index a813615..85a6ae2 100644 --- a/man3/wcstombs.3 +++ b/man3/wcstombs.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wcstombs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcstombs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcstombs \- convert a wide-character string to a multibyte string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "size_t wcstombs(char " dest "[restrict ." n "], \ const wchar_t *restrict " src , .BI " size_t " n ); @@ -59,13 +59,13 @@ In this case, the conversion ends in the initial shift state. The number of bytes written to .IR dest , excluding the terminating null byte (\[aq]\e0\[aq]), is returned. -.PP +.P The programmer must ensure that there is room for at least .I n bytes at .IR dest . -.PP +.P If .I dest is NULL, @@ -73,7 +73,7 @@ is NULL, is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and no length limit exists. -.PP +.P In order to avoid the case 2 above, the programmer should make sure .I n is greater than or equal to @@ -102,7 +102,6 @@ T{ .BR wcstombs () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS The function .BR wcsrtombs (3) diff --git a/man3/wcswidth.3 b/man3/wcswidth.3 index a85254a..2f5c148 100644 --- a/man3/wcswidth.3 +++ b/man3/wcswidth.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcswidth 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcswidth 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcswidth \- determine columns needed for a fixed-size wide-character string .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <wchar.h> -.PP +.P .BI "int wcswidth(const wchar_t *" s ", size_t " n ); .fi .SH DESCRIPTION @@ -57,7 +57,6 @@ T{ .BR wcswidth () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY diff --git a/man3/wctob.3 b/man3/wctob.3 index c8a669d..ff38a40 100644 --- a/man3/wctob.3 +++ b/man3/wctob.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wctob 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wctob 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wctob \- try to represent a wide character as a single byte .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wctob(wint_t " c ); .fi .SH DESCRIPTION @@ -32,7 +32,7 @@ starting in the initial state, consists of a single byte. If so, it is returned as an .IR "unsigned char" . -.PP +.P Never use this function. It cannot help you in writing internationalized programs. @@ -60,7 +60,6 @@ T{ .BR wctob () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -72,7 +71,7 @@ depends on the .B LC_CTYPE category of the current locale. -.PP +.P This function should never be used. Internationalized programs must never distinguish single-byte and multibyte characters. diff --git a/man3/wctomb.3 b/man3/wctomb.3 index 70ddb28..9606dc8 100644 --- a/man3/wctomb.3 +++ b/man3/wctomb.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wctomb 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wctomb 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wctomb \- convert a wide character to a multibyte sequence .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BI "int wctomb(char *" s ", wchar_t " wc ); .fi .SH DESCRIPTION @@ -41,13 +41,13 @@ and returns the length of said multibyte representation, that is, the number of bytes written at .IR s . -.PP +.P The programmer must ensure that there is room for at least .B MB_CUR_MAX bytes at .IR s . -.PP +.P If .I s is NULL, the @@ -73,7 +73,7 @@ If can not be represented as a multibyte sequence (according to the current locale), \-1 is returned. -.PP +.P If .I s is NULL, the @@ -94,7 +94,6 @@ T{ .BR wctomb () T} Thread safety MT-Unsafe race .TE -.sp 1 .SH VERSIONS The function .BR wcrtomb (3) diff --git a/man3/wctrans.3 b/man3/wctrans.3 index ae17629..f7832ee 100644 --- a/man3/wctrans.3 +++ b/man3/wctrans.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wctrans 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wctrans 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wctrans \- wide-character translation mapping .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "wctrans_t wctrans(const char *" name ); .fi .SH DESCRIPTION @@ -37,7 +37,7 @@ values can be passed to the .BR towctrans (3) function to actually perform the wide-character mapping. -.PP +.P The .BR wctrans () function returns a mapping, given by its name. @@ -46,7 +46,7 @@ valid names depends on the .B LC_CTYPE category of the current locale, but the following names are valid in all locales. -.PP +.P .nf "tolower" \- realizes the \fBtolower\fP(3) mapping "toupper" \- realizes the \fBtoupper\fP(3) mapping @@ -73,7 +73,6 @@ T{ .BR wctrans () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wctype.3 b/man3/wctype.3 index 21de442..48257b7 100644 --- a/man3/wctype.3 +++ b/man3/wctype.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wctype 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wctype 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wctype \- wide-character classification .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wctype.h> -.PP +.P .BI "wctype_t wctype(const char *" name ); .fi .SH DESCRIPTION @@ -38,7 +38,7 @@ can be passed to the function to actually test whether a given wide character has the property. -.PP +.P The .BR wctype () function returns a property, given by its name. @@ -47,7 +47,7 @@ valid names depends on the .B LC_CTYPE category of the current locale, but the following names are valid in all locales. -.PP +.P .nf "alnum" \- realizes the \fBisalnum\fP(3) classification function "alpha" \- realizes the \fBisalpha\fP(3) classification function @@ -85,7 +85,6 @@ T{ .BR wctype () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wcwidth.3 b/man3/wcwidth.3 index 127b3ed..6942179 100644 --- a/man3/wcwidth.3 +++ b/man3/wcwidth.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wcwidth 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wcwidth 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wcwidth \- determine columns needed for a wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .nf .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" .B #include <wchar.h> -.PP +.P .BI "int wcwidth(wchar_t " c ); .fi .SH DESCRIPTION @@ -55,14 +55,13 @@ T{ .BR wcwidth () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Note that before glibc 2.2.5, glibc used the prototype -.PP +.P .nf .BI "int wcwidth(wint_t " c ); .fi diff --git a/man3/wmemchr.3 b/man3/wmemchr.3 index 15cc1cf..059e2c0 100644 --- a/man3/wmemchr.3 +++ b/man3/wmemchr.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wmemchr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wmemchr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wmemchr \- search a wide character in a wide-character array .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wmemchr(const wchar_t " s [. n "], wchar_t " c ", size_t " n ); .fi .SH DESCRIPTION @@ -61,7 +61,6 @@ T{ .BR wmemchr () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wmemcmp.3 b/man3/wmemcmp.3 index ebc9cef..c3d9ebd 100644 --- a/man3/wmemcmp.3 +++ b/man3/wmemcmp.3 @@ -8,7 +8,7 @@ .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" -.TH wmemcmp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wmemcmp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wmemcmp \- compare two arrays of wide-characters .SH LIBRARY @@ -17,7 +17,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "int wmemcmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \ size_t " n ); .fi @@ -81,7 +81,6 @@ T{ .BR wmemcmp () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wmemcpy.3 b/man3/wmemcpy.3 index 155a3d5..781502e 100644 --- a/man3/wmemcpy.3 +++ b/man3/wmemcpy.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wmemcpy 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wmemcpy 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wmemcpy \- copy an array of wide-characters .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wmemcpy(wchar_t " dest "[restrict ." n ], .BI " const wchar_t " src "[restrict ." n ], .BI " size_t " n ); @@ -35,12 +35,12 @@ wide characters from the array starting at .I src to the array starting at .IR dest . -.PP +.P The arrays may not overlap; use .BR wmemmove (3) to copy between overlapping arrays. -.PP +.P The programmer must ensure that there is room for at least .I n wide @@ -64,7 +64,6 @@ T{ .BR wmemcpy () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wmemmove.3 b/man3/wmemmove.3 index ff518ad..2d01143 100644 --- a/man3/wmemmove.3 +++ b/man3/wmemmove.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wmemmove 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wmemmove 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wmemmove \- copy an array of wide-characters .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wmemmove(wchar_t " dest [. n "], const wchar_t " src [. n "], \ size_t " n ); .fi @@ -37,7 +37,7 @@ to the array starting at .IR dest . The arrays may overlap. -.PP +.P The programmer must ensure that there is room for at least .I n wide @@ -61,7 +61,6 @@ T{ .BR wmemmove () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wmemset.3 b/man3/wmemset.3 index 4ef4cf9..3331d42 100644 --- a/man3/wmemset.3 +++ b/man3/wmemset.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wmemset 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wmemset 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wmemset \- fill an array of wide-characters with a constant wide character .SH LIBRARY @@ -18,7 +18,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <wchar.h> -.PP +.P .BI "wchar_t *wmemset(wchar_t " wcs [. n "], wchar_t " wc ", size_t " n ); .fi .SH DESCRIPTION @@ -53,7 +53,6 @@ T{ .BR wmemset () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY diff --git a/man3/wordexp.3 b/man3/wordexp.3 index 554c266..b078707 100644 --- a/man3/wordexp.3 +++ b/man3/wordexp.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH wordexp 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wordexp 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wordexp, wordfree \- perform word expansion like a posix-shell .SH LIBRARY @@ -12,17 +12,17 @@ Standard C library .SH SYNOPSIS .nf .B "#include <wordexp.h>" -.PP +.P .BI "int wordexp(const char *restrict " s ", wordexp_t *restrict " p \ ", int " flags ); .BI "void wordfree(wordexp_t *" p ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR wordexp (), .BR wordfree (): .nf @@ -62,7 +62,7 @@ is sometimes (depending on see below) used to indicate the number of initial elements in the .I we_wordv array that should be filled with NULLs. -.PP +.P The function .BR wordfree () frees the allocated memory again. @@ -80,7 +80,7 @@ parameters. In particular, there must not be any unescaped newline or |, &, ;, <, >, (, ), {, } characters outside a command substitution or parameter substitution context. -.PP +.P If the argument .I s contains a word that starts with an unquoted comment character #, @@ -93,10 +93,10 @@ variable substitution (replacing $FOO by the value of the environment variable FOO), command substitution (replacing $(command) or \`command\` by the output of command), arithmetic expansion, field splitting, wildcard expansion, quote removal. -.PP +.P The result of expansion of special parameters ($@, $*, $#, $?, $\-, $$, $!, $0) is unspecified. -.PP +.P Field splitting is done using the environment variable $IFS. If it is not set, the field separators are space, tab, and newline. .SS The output array @@ -195,7 +195,7 @@ T{ .BR wordfree () T} Thread safety MT-Safe .TE -.sp 1 +.P In the above table, .I utent in @@ -218,7 +218,7 @@ glibc 2.1. .SH EXAMPLES The output of the following example program is approximately that of "ls [a-c]*.c". -.PP +.P .\" SRC BEGIN (wordexp.c) .EX #include <stdio.h> diff --git a/man3/wprintf.3 b/man3/wprintf.3 index 95854a3..4140496 100644 --- a/man3/wprintf.3 +++ b/man3/wprintf.3 @@ -9,7 +9,7 @@ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" -.TH wprintf 3 2023-07-20 "Linux man-pages 6.05.01" +.TH wprintf 3 2023-10-31 "Linux man-pages 6.7" .SH NAME wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- formatted wide-character output conversion @@ -20,25 +20,25 @@ Standard C library .nf .B #include <stdio.h> .B #include <wchar.h> -.PP +.P .BI "int wprintf(const wchar_t *restrict " format ", ...);" .BI "int fwprintf(FILE *restrict " stream , .BI " const wchar_t *restrict " format ", ...);" .BI "int swprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen , .BI " const wchar_t *restrict " format ", ...);" -.PP +.P .BI "int vwprintf(const wchar_t *restrict " format ", va_list " args ); .BI "int vfwprintf(FILE *restrict " stream , .BI " const wchar_t *restrict " format ", va_list " args ); .BI "int vswprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen , .BI " const wchar_t *restrict " format ", va_list " args ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P All functions shown above: .\" .BR wprintf (), .\" .BR fwprintf (), @@ -59,7 +59,7 @@ the wide-character equivalent of the family of functions. It performs formatted output of wide characters. -.PP +.P The .BR wprintf () and @@ -71,7 +71,7 @@ perform wide-character output to must not be byte oriented; see .BR fwide (3) for more information. -.PP +.P The .BR fwprintf () and @@ -83,7 +83,7 @@ perform wide-character output to must not be byte oriented; see .BR fwide (3) for more information. -.PP +.P The .BR swprintf () and @@ -97,7 +97,7 @@ room for at least wide characters at .IR wcs . -.PP +.P These functions are like the .BR printf (3), @@ -135,7 +135,7 @@ take a .I maxlen argument, but these functions do not return \-1 upon buffer overflow on Linux.) -.PP +.P The treatment of the conversion characters .B c and @@ -222,7 +222,6 @@ T{ .BR vswprintf () T} Thread safety MT-Safe locale .TE -.sp 1 .SH STANDARDS C11, POSIX.1-2008. .SH HISTORY @@ -235,7 +234,7 @@ on the .B LC_CTYPE category of the current locale. -.PP +.P If the .I format string contains non-ASCII wide characters, the program diff --git a/man3/xcrypt.3 b/man3/xcrypt.3 index 1a60327..320523f 100644 --- a/man3/xcrypt.3 +++ b/man3/xcrypt.3 @@ -9,7 +9,7 @@ .\" 3. xencrypt() a hexstring .\" to bad to be true :( .\" -.TH XCRYPT 3 2023-07-20 "Linux man-pages 6.05.01" +.TH XCRYPT 3 2023-10-31 "Linux man-pages 6.7" .SH NAME xencrypt, xdecrypt, passwd2des \- RFS password encryption .SH LIBRARY @@ -18,9 +18,9 @@ Standard C library .SH SYNOPSIS .nf .B "#include <rpc/des_crypt.h>" -.PP +.P .BI "void passwd2des(char " *passwd ", char *" key ");" -.PP +.P .BI "int xencrypt(char *" secret ", char *" passwd ");" .BI "int xdecrypt(char *" secret ", char *" passwd ");" .fi @@ -28,7 +28,7 @@ Standard C library .BR WARNING : Do not use these functions in new code. They do not achieve any type of acceptable cryptographic security guarantees. -.PP +.P The function .BR passwd2des () takes a character string @@ -44,7 +44,7 @@ Both other functions described here use this function to turn their argument .I passwd into a DES key. -.PP +.P The .BR xencrypt () function takes the ASCII character string @@ -61,7 +61,7 @@ and outputs the result again in as a hex string .\" (over the alphabet 0123456789abcdef) of the same length. -.PP +.P The .BR xdecrypt () function performs the converse operation. @@ -87,7 +87,6 @@ T{ .BR xdecrypt () T} Thread safety MT-Safe .TE -.sp 1 .SH VERSIONS These functions are available since glibc 2.1. .SH BUGS @@ -9,7 +9,7 @@ .\" .\" 2007-12-30, mtk, Convert function prototypes to modern C syntax .\" -.TH xdr 3 2023-07-20 "Linux man-pages 6.05.01" +.TH xdr 3 2023-10-31 "Linux man-pages 6.7" .SH NAME xdr \- library routines for external data representation .SH LIBRARY @@ -20,24 +20,24 @@ These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines. -.PP +.P The prototypes below are declared in .I <rpc/xdr.h> and make use of the following types: -.PP +.P .RS 4 .EX .BI "typedef int " bool_t ; -.PP +.P .BI "typedef bool_t (*" xdrproc_t ")(XDR *, void *,...);" .EE .RE -.PP +.P For the declaration of the .I XDR type, see .IR <rpc/xdr.h> . -.PP +.P .nf .BI "bool_t xdr_array(XDR *" xdrs ", char **" arrp ", unsigned int *" sizep , .BI " unsigned int " maxsize ", unsigned int " elsize , @@ -63,7 +63,7 @@ is an XDR filter that translates between the array elements' C form, and their external representation. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_bool(XDR *" xdrs ", bool_t *" bp ); .fi @@ -74,7 +74,7 @@ and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_bytes(XDR *" xdrs ", char **" sp ", unsigned int *" sizep , .BI " unsigned int " maxsize ); @@ -91,7 +91,7 @@ string is located at address strings cannot be longer than .IR maxsize . This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_char(XDR *" xdrs ", char *" cp ); .fi @@ -106,7 +106,7 @@ consider .BR xdr_opaque (), or .BR xdr_string (). -.PP +.P .nf .BI "void xdr_destroy(XDR *" xdrs ); .fi @@ -120,7 +120,7 @@ Using after invoking .BR xdr_destroy () is undefined. -.PP +.P .nf .BI "bool_t xdr_double(XDR *" xdrs ", double *" dp ); .fi @@ -129,7 +129,7 @@ A filter primitive that translates between C .I double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_enum(XDR *" xdrs ", enum_t *" ep ); .fi @@ -138,7 +138,7 @@ A filter primitive that translates between C .IR enum s (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_float(XDR *" xdrs ", float *" fp ); .fi @@ -147,7 +147,7 @@ A filter primitive that translates between C .IR float s and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "void xdr_free(xdrproc_t " proc ", char *" objp ); .fi @@ -160,7 +160,7 @@ Note: the pointer passed to this routine is freed, but what it points to .I is freed (recursively). -.PP +.P .nf .BI "unsigned int xdr_getpos(XDR *" xdrs ); .fi @@ -173,7 +173,7 @@ which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this. -.PP +.P .nf .BI "long *xdr_inline(XDR *" xdrs ", int " len ); .fi @@ -193,7 +193,7 @@ may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency. -.PP +.P .nf .BI "bool_t xdr_int(XDR *" xdrs ", int *" ip ); .fi @@ -201,7 +201,7 @@ it exists for the sake of efficiency. A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_long(XDR *" xdrs ", long *" lp ); .fi @@ -210,7 +210,7 @@ A filter primitive that translates between C .I long integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "void xdrmem_create(XDR *" xdrs ", char *" addr ", unsigned int " size , .BI " enum xdr_op " op ); @@ -231,7 +231,7 @@ determines the direction of the XDR stream (either .BR XDR_DECODE , or .BR XDR_FREE ). -.PP +.P .nf .BI "bool_t xdr_opaque(XDR *" xdrs ", char *" cp ", unsigned int " cnt ); .fi @@ -244,7 +244,7 @@ is the address of the opaque object, and .I cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_pointer(XDR *" xdrs ", char **" objpp , .BI " unsigned int " objsize ", xdrproc_t " xdrobj ); @@ -260,7 +260,7 @@ Thus, can represent recursive data structures, such as binary trees or linked lists. -.PP +.P .nf .BI "void xdrrec_create(XDR *" xdrs ", unsigned int " sendsize , .BI " unsigned int " recvsize ", char *" handle , @@ -303,7 +303,7 @@ record boundary information. Also, XDR streams created with different .B xdr*_create APIs are not compatible for the same reason. -.PP +.P .nf .BI "bool_t xdrrec_endofrecord(XDR *" xdrs ", int " sendnow ); .fi @@ -315,7 +315,7 @@ and the output buffer is optionally written out if .I sendnow is nonzero. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdrrec_eof(XDR *" xdrs ); .fi @@ -325,7 +325,7 @@ This routine can be invoked only on streams created by After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise. -.PP +.P .nf .BI "bool_t xdrrec_skiprecord(XDR *" xdrs ); .fi @@ -336,7 +336,7 @@ streams created by It tells the XDR implementation that the rest of the current record in the stream's input buffer should be discarded. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_reference(XDR *" xdrs ", char **" pp ", unsigned int " size , .BI " xdrproc_t " proc ); @@ -361,7 +361,7 @@ Warning: this routine does not understand null pointers. Use .BR xdr_pointer () instead. -.PP +.P .nf .BI "xdr_setpos(XDR *" xdrs ", unsigned int " pos ); .fi @@ -379,7 +379,7 @@ and zero otherwise. Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another. -.PP +.P .nf .BI "bool_t xdr_short(XDR *" xdrs ", short *" sp ); .fi @@ -388,7 +388,7 @@ A filter primitive that translates between C .I short integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "void xdrstdio_create(XDR *" xdrs ", FILE *" file ", enum xdr_op " op ); .fi @@ -413,7 +413,7 @@ on the .I file stream, but never .BR fclose (3). -.PP +.P .nf .BI "bool_t xdr_string(XDR *" xdrs ", char **" sp ", unsigned int " maxsize ); .fi @@ -426,7 +426,7 @@ Note: .I sp is the address of the string's pointer. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_u_char(XDR *" xdrs ", unsigned char *" ucp ); .fi @@ -435,7 +435,7 @@ A filter primitive that translates between .I unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_u_int(XDR *" xdrs ", unsigned int *" up ); .fi @@ -444,7 +444,7 @@ A filter primitive that translates between C .I unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_u_long(XDR *" xdrs ", unsigned long *" ulp ); .fi @@ -453,7 +453,7 @@ A filter primitive that translates between C .I "unsigned long" integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_u_short(XDR *" xdrs ", unsigned short *" usp ); .fi @@ -462,7 +462,7 @@ A filter primitive that translates between C .I "unsigned short" integers and their external representations. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_union(XDR *" xdrs ", enum_t *" dscmp ", char *" unp , .BI " const struct xdr_discrim *" choices , @@ -501,7 +501,7 @@ array, then the .I defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise. -.PP +.P .nf .BI "bool_t xdr_vector(XDR *" xdrs ", char *" arrp ", unsigned int " size , .BI " unsigned int " elsize ", xdrproc_t " elproc ); @@ -524,7 +524,7 @@ is an XDR filter that translates between the array elements' C form, and their external representation. This routine returns one if it succeeds, zero otherwise. -.PP +.P .nf .B bool_t xdr_void(void); .fi @@ -532,7 +532,7 @@ This routine returns one if it succeeds, zero otherwise. This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done. -.PP +.P .nf .BI "bool_t xdr_wrapstring(XDR *" xdrs ", char **" sp ); .fi @@ -594,10 +594,9 @@ T{ .BR xdr_wrapstring () T} Thread safety MT-Safe .TE -.sp 1 .SH SEE ALSO .BR rpc (3) -.PP +.P The following manuals: .RS eXternal Data Representation Standard: Protocol Specification @@ -14,7 +14,7 @@ .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB .\" 2008-07-24, mtk, created this page, based on material from j0.3. .\" -.TH y0 3 2023-07-20 "Linux man-pages 6.05.01" +.TH y0 3 2023-10-31 "Linux man-pages 6.7" .SH NAME y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- Bessel functions of the second kind @@ -24,25 +24,25 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BI "double y0(double " x ); .BI "double y1(double " x ); .BI "double yn(int " n ", double " x ); -.PP +.P .BI "float y0f(float " x ); .BI "float y1f(float " x ); .BI "float ynf(int " n ", float " x ); -.PP +.P .BI "long double y0l(long double " x ); .BI "long double y1l(long double " x ); .BI "long double ynl(int " n ", long double " x ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR y0 (), .BR y1 (), .BR yn (): @@ -51,7 +51,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .fi -.PP +.P .BR y0f (), .BR y0l (), .BR y1f (), @@ -79,11 +79,11 @@ returns the Bessel function of .I x of the second kind of order .IR n . -.PP +.P The value of .I x must be positive. -.PP +.P The .BR y0f (), .BR y1f (), @@ -104,11 +104,11 @@ values. On success, these functions return the appropriate Bessel value of the second kind for .IR x . -.PP +.P If .I x is a NaN, a NaN is returned. -.PP +.P If .I x is negative, @@ -120,7 +120,7 @@ or .RB \- HUGE_VALL , respectively. (POSIX.1-2001 also allows a NaN return for this case.) -.PP +.P If .I x is 0.0, @@ -131,11 +131,11 @@ and the functions return or .RB \- HUGE_VALL , respectively. -.PP +.P If the result underflows, a range error occurs, and the functions return 0.0 -.PP +.P If the result overflows, a range error occurs, and the functions return @@ -150,7 +150,7 @@ See .BR math_error (7) for information on how to determine whether an error has occurred when calling these functions. -.PP +.P The following errors can occur: .TP Domain error: \fIx\fP is negative @@ -224,7 +224,6 @@ T{ .BR ynl () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS .TP .BR y0 () @@ -260,13 +259,13 @@ instead of and no .B FE_DIVBYZERO exception was raised. -.PP +.P Before glibc 2.17, .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6808 did not set .I errno for "range error: result underflow". -.PP +.P In glibc 2.3.2 and earlier, .\" Actually, 2.3.2 is the earliest test result I have; so yet .\" to confirm if this error occurs only in glibc 2.3.2. diff --git a/man3/zustr2stp.3 b/man3/zustr2stp.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/zustr2stp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3/zustr2ustp.3 b/man3/zustr2ustp.3 deleted file mode 100644 index beb8507..0000000 --- a/man3/zustr2ustp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man7/string_copying.7 diff --git a/man3const/EOF.3const b/man3const/EOF.3const index ae64401..5b961a4 100644 --- a/man3const/EOF.3const +++ b/man3const/EOF.3const @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH EOF 3const 2023-02-05 "Linux man-pages 6.05.01" +.TH EOF 3const 2023-10-31 "Linux man-pages 6.7" .SH NAME EOF \- end of file or error indicator .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BR "#define EOF " "/* ... */" .fi .SH DESCRIPTION @@ -20,7 +20,7 @@ Standard C library represents the end of an input file, or an error indication. It is a negative value, of type .IR int . -.PP +.P .B EOF is not a character (it can't be represented by diff --git a/man3const/EXIT_SUCCESS.3const b/man3const/EXIT_SUCCESS.3const index b9e4c9a..515305f 100644 --- a/man3const/EXIT_SUCCESS.3const +++ b/man3const/EXIT_SUCCESS.3const @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH EXIT_SUCCESS 3const 2023-05-03 "Linux man-pages 6.05.01" +.TH EXIT_SUCCESS 3const 2023-10-31 "Linux man-pages 6.7" .SH NAME EXIT_SUCCESS, EXIT_FAILURE \- termination status constants .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdlib.h> -.PP +.P .BR "#define EXIT_SUCCESS " 0 .BR "#define EXIT_FAILURE " "/* nonzero */" .fi diff --git a/man3const/NULL.3const b/man3const/NULL.3const index e043c1e..c88bbe0 100644 --- a/man3const/NULL.3const +++ b/man3const/NULL.3const @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH NULL 3const 2023-02-05 "Linux man-pages 6.05.01" +.TH NULL 3const 2023-10-31 "Linux man-pages 6.7" .SH NAME NULL \- null pointer constant .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stddef.h> -.PP +.P .B "#define NULL ((void *) 0)" .fi .SH DESCRIPTION @@ -36,12 +36,12 @@ and .SH CAVEATS It is undefined behavior to dereference a null pointer, and that usually causes a segmentation fault in practice. -.PP +.P It is also undefined behavior to perform pointer arithmetic on it. -.PP +.P .I NULL \- NULL is undefined behavior, according to ISO C, but is defined to be 0 in C++. -.PP +.P To avoid confusing human readers of the code, do not compare pointer variables to .BR 0 , @@ -50,7 +50,7 @@ and do not assign to them. Instead, always use .BR NULL . -.PP +.P .B NULL shouldn't be confused with .BR NUL , diff --git a/man3head/printf.h.3head b/man3head/printf.h.3head index 1c6ad32..8f1b9a0 100644 --- a/man3head/printf.h.3head +++ b/man3head/printf.h.3head @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH printf.h 3head 2022-09-18 "Linux man-pages 6.05.01" +.TH printf.h 3head 2024-03-14 "Linux man-pages 6.7" .SH NAME printf.h, \%register_printf_specifier, @@ -33,7 +33,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <printf.h> -.PP +.P .BI "int register_printf_specifier(int " spec ", printf_function " func , .BI " printf_arginfo_size_function " arginfo ); .BI "int register_printf_modifier(const wchar_t *" str ); @@ -148,7 +148,7 @@ or a custom one, and optionally ORed with an appropriate length modifier .RB ( PA_FLAG_ *). .RS -.PP +.P The type is determined by using one of the following constants: .TP .B PA_INT @@ -188,7 +188,7 @@ For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused. .RE -.PP +.P .I arginfo is called before .IR func , @@ -209,7 +209,7 @@ The callback of type .I printf_function should return the number of characters written, or \-1 on error. -.PP +.P The callback of type .I \%printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. @@ -229,16 +229,16 @@ is an older function similar to .BR \%register_printf_specifier (), and is now deprecated. That function can't handle user-defined types. -.PP +.P .BR \%register_printf_specifier () -superseeds +supersedes .BR \%register_printf_function (3). .SH EXAMPLES The following example program registers the 'b' and 'B' specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like 'x' and 'u'. This can be used to print in binary prior to C23. -.PP +.P .\" SRC BEGIN (register_printf_specifier.c) .EX /* This code is in the public domain */ diff --git a/man3head/sysexits.h.3head b/man3head/sysexits.h.3head index a1b8d08..f373234 100644 --- a/man3head/sysexits.h.3head +++ b/man3head/sysexits.h.3head @@ -8,7 +8,7 @@ .\" .\" Rewritten for the Linux man-pages by Alejandro Colomar .\" -.TH sysexits.h 3head 2023-03-30 "Linux man-pages 6.05.01" +.TH sysexits.h 3head 2023-10-31 "Linux man-pages 6.7" .SH NAME sysexits.h \- exit codes for programs .SH LIBRARY @@ -23,11 +23,11 @@ lB2 lB2 l1 lX. #define EX_OK 0 /* T{ successful termination */ T} -.PP +.P #define EX__BASE 64 /* T{ base value for error messages */ T} -.PP +.P #define EX_USAGE 64 /* T{ command line usage error */ T} @@ -73,7 +73,7 @@ T} #define EX_CONFIG 78 /* T{ configuration error */ T} -.PP +.P .T& lB2 l2 l1 lX. #define EX__MAX ... /* T{ @@ -82,7 +82,7 @@ T} .TE .SH DESCRIPTION A few programs exit with the following error codes. -.PP +.P The successful exit is always indicated by a status of .BR 0 , or @@ -181,7 +181,7 @@ but rather for higher level permissions. .TP .B EX_CONFIG Something was found in an unconfigured or misconfigured state. -.PP +.P The numerical values corresponding to the symbolical ones are given in parenthesis for easy reference. .SH STANDARDS diff --git a/man3type/FILE.3type b/man3type/FILE.3type index 6edeeb4..3e8ea24 100644 --- a/man3type/FILE.3type +++ b/man3type/FILE.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH FILE 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH FILE 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME FILE \- input/output stream .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdio.h> -.PP +.P .BR typedef " /* ... */ " FILE; .fi .SH DESCRIPTION diff --git a/man3type/aiocb.3type b/man3type/aiocb.3type index 45739e2..5daec06 100644 --- a/man3type/aiocb.3type +++ b/man3type/aiocb.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH aiocb 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH aiocb 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME aiocb \- asynchronous I/O control block .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <aio.h> -.PP +.P .B struct aiocb { .BR " int aio_fildes;" " /* File descriptor */" .BR " off_t aio_offset;" " /* File offset */" diff --git a/man3type/blkcnt_t.3type b/man3type/blkcnt_t.3type index 5cdacdc..d5b2e44 100644 --- a/man3type/blkcnt_t.3type +++ b/man3type/blkcnt_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH blkcnt_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH blkcnt_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME blkcnt_t \- file block counts .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " blkcnt_t; .fi .SH DESCRIPTION diff --git a/man3type/blksize_t.3type b/man3type/blksize_t.3type index 5406a88..00f341c 100644 --- a/man3type/blksize_t.3type +++ b/man3type/blksize_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH blksize_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH blksize_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME blksize_t \- file block sizes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " blksize_t; .fi .SH DESCRIPTION diff --git a/man3type/cc_t.3type b/man3type/cc_t.3type index 33d5829..c7b4021 100644 --- a/man3type/cc_t.3type +++ b/man3type/cc_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH cc_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH cc_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME cc_t, speed_t, tcflag_t \- terminal special characters, baud rates, modes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <termios.h> -.PP +.P .BR typedef " /* ... */ " cc_t; .BR typedef " /* ... */ " speed_t; .BR typedef " /* ... */ " tcflag_t; @@ -25,7 +25,7 @@ is used for terminal special characters, for baud rates, and .I tcflag_t for modes. -.PP +.P All are unsigned integer types. .SH STANDARDS POSIX.1-2008. diff --git a/man3type/clock_t.3type b/man3type/clock_t.3type index e1346e3..aa061b0 100644 --- a/man3type/clock_t.3type +++ b/man3type/clock_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH clock_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH clock_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME clock_t \- system time .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BR typedef " /* ... */ " clock_t; .fi .SH DESCRIPTION @@ -31,7 +31,7 @@ C89, POSIX.1-2001. The following headers also provide this type: .I <sys/types.h> and -.IR <sys/time.h> . +.IR <sys/times.h> . .SH SEE ALSO .BR times (2), .BR clock (3) diff --git a/man3type/clockid_t.3type b/man3type/clockid_t.3type index bc9a3b8..a28c065 100644 --- a/man3type/clockid_t.3type +++ b/man3type/clockid_t.3type @@ -1,4 +1,4 @@ -.TH clockid_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH clockid_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME clockid_t \- clock ID for the clock and timer functions .SH LIBRARY @@ -7,7 +7,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " clockid_t; .fi .SH DESCRIPTION diff --git a/man3type/dev_t.3type b/man3type/dev_t.3type index e4c4ae9..d30803b 100644 --- a/man3type/dev_t.3type +++ b/man3type/dev_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH dev_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH dev_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME dev_t \- device ID .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " dev_t; .fi .SH DESCRIPTION diff --git a/man3type/div_t.3type b/man3type/div_t.3type index f0bce13..977d5af 100644 --- a/man3type/div_t.3type +++ b/man3type/div_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH div_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH div_t 3type 2024-01-16 "Linux man-pages 6.7" .SH NAME div_t, ldiv_t, lldiv_t, imaxdiv_t \- quotient and remainder of an integer division @@ -14,24 +14,24 @@ Standard C library .SH SYNOPSIS .EX .B #include <stdlib.h> -.PP +.P .B typedef struct { .BR " int quot;" " /* Quotient */" .BR " int rem;" " /* Remainder */" .B } div_t; -.PP +.P .B typedef struct { .BR " long quot;" " /* Quotient */" .BR " long rem;" " /* Remainder */" .B } ldiv_t; -.PP +.P .B typedef struct { .BR " long long quot;" " /* Quotient */" .BR " long long rem;" " /* Remainder */" .B } lldiv_t; -.PP +.P .B #include <inttypes.h> -.PP +.P .B typedef struct { .BR " intmax_t quot;" " /* Quotient */" .BR " intmax_t rem;" " /* Remainder */" @@ -40,9 +40,10 @@ Standard C library .SH DESCRIPTION .RI [[ l ] l ] div_t is the type of the value returned by the -.RB [[ l ] l ] div (3) +.RB [[ l ] l ]\c +.BR div (3) function. -.PP +.P .I imaxdiv_t is the type of the value returned by the .BR imaxdiv (3) diff --git a/man3type/double_t.3type b/man3type/double_t.3type index ca200af..06c7699 100644 --- a/man3type/double_t.3type +++ b/man3type/double_t.3type @@ -5,7 +5,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH double_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH double_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME float_t, double_t \- most efficient floating types .SH LIBRARY @@ -14,7 +14,7 @@ Math library .SH SYNOPSIS .nf .B #include <math.h> -.PP +.P .BR typedef " /* ... */ " float_t; .BR typedef " /* ... */ " double_t; .fi @@ -28,7 +28,7 @@ Their type depends on the value of the macro .B FLT_EVAL_METHOD (defined in .IR <float.h> ): -.PP +.P .TS lB rI rI. FLT_EVAL_METHOD float_t double_t @@ -39,7 +39,7 @@ _ 1 double double 2 long double long double .TE -.PP +.P For other values of .BR FLT_EVAL_METHOD , the types of diff --git a/man3type/epoll_event.3type b/man3type/epoll_event.3type index 0a9fa74..1ba679d 100644 --- a/man3type/epoll_event.3type +++ b/man3type/epoll_event.3type @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH epoll_event 3type 2023-07-08 "Linux man-pages 6.05.01" +.TH epoll_event 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME epoll_event, epoll_data, epoll_data_t \- epoll event @@ -13,19 +13,19 @@ Standard C library .SH SYNOPSIS .EX .B #include <sys/epoll.h> -.PP +.P .B struct epoll_event { .BR " uint32_t events;" " /* Epoll events */" .BR " epoll_data_t data;" " /* User data variable */" .B }; -.PP +.P .B union epoll_data { .B " void *ptr;" .B " int fd;" .B " uint32_t u32;" .B " uint64_t u64;" .B }; -.PP +.P .B "typedef union epoll_data epoll_data_t;" .EE .SH DESCRIPTION @@ -37,7 +37,7 @@ return when the corresponding file descriptor becomes ready. .SS C library/kernel differences The Linux kernel headers also provide this type, with a slightly different definition: -.PP +.P .in +4n .EX #include <linux/eventpoll.h> diff --git a/man3type/fenv_t.3type b/man3type/fenv_t.3type index 95e036e..bc430b0 100644 --- a/man3type/fenv_t.3type +++ b/man3type/fenv_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH fenv_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH fenv_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME fenv_t, fexcept_t \- floating-point environment .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <fenv.h> -.PP +.P .BR typedef " /* ... */ " fenv_t; .BR typedef " /* ... */ " fexcept_t; .fi @@ -21,10 +21,10 @@ Standard C library .I fenv_t represents the entire floating-point environment, including control modes and status flags. -.PP +.P .I fexcept_t represents the floating-point status flags collectively. -.PP +.P For further details see .BR fenv (3). .SH STANDARDS diff --git a/man3type/id_t.3type b/man3type/id_t.3type index 9b30e47..23c130c 100644 --- a/man3type/id_t.3type +++ b/man3type/id_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH id_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH id_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME pid_t, uid_t, gid_t, id_t \- process/user/group identifier .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " pid_t; .BR typedef " /* ... */ " uid_t; .BR typedef " /* ... */ " gid_t; @@ -23,15 +23,15 @@ Standard C library .I pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type. -.PP +.P .I uid_t is a type used to hold user IDs. It is an integer type. -.PP +.P .I gid_t is a type used to hold group IDs. It is an integer type. -.PP +.P .I id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a @@ -59,7 +59,7 @@ The following headers also provide .IR <unistd.h> , and .IR <utmpx.h> . -.PP +.P The following headers also provide .IR uid_t : .IR <pwd.h> , @@ -69,7 +69,7 @@ The following headers also provide .IR <sys/stat.h> , and .IR <unistd.h> . -.PP +.P The following headers also provide .IR gid_t : .IR <grp.h> , @@ -80,7 +80,7 @@ The following headers also provide .IR <sys/stat.h> , and .IR <unistd.h> . -.PP +.P The following header also provides .IR id_t : .IR <sys/resource.h> . diff --git a/man3type/intN_t.3type b/man3type/intN_t.3type index 56cd445..dc42042 100644 --- a/man3type/intN_t.3type +++ b/man3type/intN_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH intN_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH intN_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME intN_t, int8_t, int16_t, int32_t, int64_t, uintN_t, uint8_t, uint16_t, uint32_t, uint64_t @@ -15,47 +15,47 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdint.h> -.PP +.P .BR typedef " /* ... */ " int8_t; .BR typedef " /* ... */ " int16_t; .BR typedef " /* ... */ " int32_t; .BR typedef " /* ... */ " int64_t; -.PP +.P .BR typedef " /* ... */ " uint8_t; .BR typedef " /* ... */ " uint16_t; .BR typedef " /* ... */ " uint32_t; .BR typedef " /* ... */ " uint64_t; -.PP +.P .B "#define INT8_WIDTH 8" .B "#define INT16_WIDTH 16" .B "#define INT32_WIDTH 32" .B "#define INT64_WIDTH 64" -.PP +.P .B "#define UINT8_WIDTH 8" .B "#define UINT16_WIDTH 16" .B "#define UINT32_WIDTH 32" .B "#define UINT64_WIDTH 64" -.PP +.P .BR "#define INT8_MAX " "/* 2**(INT8_WIDTH - 1) - 1 */" .BR "#define INT16_MAX " "/* 2**(INT16_WIDTH - 1) - 1 */" .BR "#define INT32_MAX " "/* 2**(INT32_WIDTH - 1) - 1 */" .BR "#define INT64_MAX " "/* 2**(INT64_WIDTH - 1) - 1 */" -.PP +.P .BR "#define INT8_MIN " "/* - 2**(INT8_WIDTH - 1) */" .BR "#define INT16_MIN " "/* - 2**(INT16_WIDTH - 1) */" .BR "#define INT32_MIN " "/* - 2**(INT32_WIDTH - 1) */" .BR "#define INT64_MIN " "/* - 2**(INT64_WIDTH - 1) */" -.PP +.P .BR "#define UINT8_MAX " "/* 2**INT8_WIDTH - 1 */" .BR "#define UINT16_MAX " "/* 2**INT16_WIDTH - 1 */" .BR "#define UINT32_MAX " "/* 2**INT32_WIDTH - 1 */" .BR "#define UINT64_MAX " "/* 2**INT64_WIDTH - 1 */" -.PP +.P .BI "#define INT8_C(" c ") " c " ## " "\fR/* ... */\fP" .BI "#define INT16_C(" c ") " c " ## " "\fR/* ... */\fP" .BI "#define INT32_C(" c ") " c " ## " "\fR/* ... */\fP" .BI "#define INT64_C(" c ") " c " ## " "\fR/* ... */\fP" -.PP +.P .BI "#define UINT8_C(" c ") " c " ## " "\fR/* ... */\fP" .BI "#define UINT16_C(" c ") " c " ## " "\fR/* ... */\fP" .BI "#define UINT32_C(" c ") " c " ## " "\fR/* ... */\fP" @@ -74,7 +74,7 @@ They are be capable of storing values in the range substituting .I N by the appropriate number. -.PP +.P .IR uint N _t are unsigned integer types @@ -86,7 +86,7 @@ They are capable of storing values in the range substituting .I N by the appropriate number. -.PP +.P According to POSIX, .RI [ u ] int8_t , .RI [ u ] int16_t , @@ -96,25 +96,25 @@ are required; .RI [ u ] int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional. -.PP +.P The macros .RB [ U ] INT \fIN\fP _WIDTH expand to the width in bits of these types .RI ( N ). -.PP +.P The macros .RB [ U ] INT \fIN\fP _MAX expand to the maximum value that these types can hold. -.PP +.P The macros .BI INT N _MIN expand to the minimum value that these types can hold. -.PP +.P The macros .RB [ U ] INT \fIN\fP _C () expand their argument to an integer constant of type .RI [ u ] int N _t . -.PP +.P The length modifiers for the .RI [ u ] int N _t types for the @@ -159,7 +159,7 @@ values. C11, POSIX.1-2008. .SH HISTORY C99, POSIX.1-2001. -.PP +.P The .RB [ U ] INT \fIN\fP _WIDTH macros were added in C23. diff --git a/man3type/intmax_t.3type b/man3type/intmax_t.3type index 9048e63..846c5cc 100644 --- a/man3type/intmax_t.3type +++ b/man3type/intmax_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH intmax_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH intmax_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME intmax_t, uintmax_t \- greatest-width basic integer types .SH LIBRARY @@ -13,17 +13,17 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdint.h> -.PP +.P .BR typedef " /* ... */ " intmax_t; .BR typedef " /* ... */ " uintmax_t; -.PP +.P .BR "#define INTMAX_WIDTH " "/* ... */" .B "#define UINTMAX_WIDTH INTMAX_WIDTH" -.PP +.P .BR "#define INTMAX_MAX " "/* 2**(INTMAX_WIDTH - 1) - 1 */" .BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */" .BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */" -.PP +.P .BI "#define INTMAX_C(" c ) " c " ## " \fR/* ... */\fP" .BI "#define UINTMAX_C(" c ) " c " ## " \fR/* ... */\fP" .fi @@ -35,7 +35,7 @@ supported by the implementation. It is capable of storing values in the range .RB [ INTMAX_MIN , .BR INTMAX_MAX ]. -.PP +.P .I uintmax_t is an unsigned integer type capable of representing any value of any basic unsigned integer type @@ -43,26 +43,26 @@ supported by the implementation. It is capable of storing values in the range .RB [ 0 , .BR UINTMAX_MAX ]. -.PP +.P The macros .RB [ U ] INTMAX_WIDTH expand to the width in bits of these types. -.PP +.P The macros .RB [ U ] INTMAX_MAX expand to the maximum value that these types can hold. -.PP +.P The macro .B INTMAX_MIN expands to the minimum value that .I intmax_t can hold. -.PP +.P The macros .RB [ U ] INTMAX_C () expand their argument to an integer constant of type .RI [ u ] intmax_t . -.PP +.P The length modifier for .RI [ u ] intmax_t for the diff --git a/man3type/intptr_t.3type b/man3type/intptr_t.3type index 1bec12f..4ee3291 100644 --- a/man3type/intptr_t.3type +++ b/man3type/intptr_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH intptr_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH intptr_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME intptr_t, uintptr_t \- integer types wide enough to hold pointers .SH LIBRARY @@ -13,13 +13,13 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdint.h> -.PP +.P .BR typedef " /* ... */ " intptr_t; .BR typedef " /* ... */ " uintptr_t; -.PP +.P .BR "#define INTPTR_WIDTH" " /* ... */" .B #define UINTPTR_WIDTH INTPTR_WIDTH -.PP +.P .BR "#define INTPTR_MAX" " /* 2**(INTPTR_WIDTH \- 1) \- 1 */" .BR "#define INTPTR_MIN" " /* \- 2**(INTPTR_WIDTH \- 1) */" .BR "#define UINTPTR_MAX" " /* 2**UINTPTR_WIDTH \- 1 */" @@ -33,7 +33,7 @@ value can be converted to this type and then converted back. It is capable of storing values in the range .RB [ INTPTR_MIN , .BR INTPTR_MAX ]. -.PP +.P .I uintptr_t is an unsigned integer type such that any valid @@ -42,21 +42,21 @@ value can be converted to this type and then converted back. It is capable of storing values in the range .RB [ 0 , .BR INTPTR_MAX ]. -.PP +.P The macros .RB [ U ] INTPTR_WIDTH expand to the width in bits of these types. -.PP +.P The macros .RB [ U ] INTPTR_MAX expand to the maximum value that these types can hold. -.PP +.P The macro .B INTPTR_MIN expands to the minimum value that .I intptr_t can hold. -.PP +.P The length modifiers for the .RI [ u ] intptr_t types diff --git a/man3type/iovec.3type b/man3type/iovec.3type index c2786f5..4d5c9ec 100644 --- a/man3type/iovec.3type +++ b/man3type/iovec.3type @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH iovec 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH iovec 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME iovec \- Vector I/O data structure .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <sys/uio.h> -.PP +.P .B struct iovec { .BR " void *iov_base;" " /* Starting address */" .BR " size_t iov_len;" " /* Size of the memory pointed to by "\c diff --git a/man3type/itimerspec.3type b/man3type/itimerspec.3type index 7def422..1650e0a 100644 --- a/man3type/itimerspec.3type +++ b/man3type/itimerspec.3type @@ -3,16 +3,16 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH itimerspec 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH itimerspec 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME -timespec \- interval for a timer with nanosecond precision +itimerspec \- interval for a timer with nanosecond precision .SH LIBRARY Standard C library .RI ( libc ) .SH SYNOPSIS .EX .B #include <time.h> -.PP +.P .B struct itimerspec { .BR " struct timespec it_interval;" " /* Interval for periodic timer */" .BR " struct timespec it_value;" " /* Initial expiration */" @@ -23,10 +23,9 @@ Describes the initial expiration of a timer, and its interval, in seconds and nanoseconds. .SH STANDARDS -Linux. -.SH NOTES -The following header also provides this type: -.IR <sys/timerfd.h> . +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. .SH SEE ALSO .BR timerfd_create (2), .BR timer_settime (2), diff --git a/man3type/lconv.3type b/man3type/lconv.3type index f36522c..5fe2e74 100644 --- a/man3type/lconv.3type +++ b/man3type/lconv.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH lconv 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH lconv 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME lconv \- numeric formatting information .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <locale.h> -.PP +.P .BR "struct lconv {" " /* Values in the \[dq]C\[dq] locale: */" .BR " char *decimal_point;" " /* \[dq].\[dq] */" .BR " char *thousands_sep;" " /* \[dq]\[dq] */" diff --git a/man3type/mode_t.3type b/man3type/mode_t.3type index 7d56100..36f4bb8 100644 --- a/man3type/mode_t.3type +++ b/man3type/mode_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH mode_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH mode_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME mode_t \- file attributes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " mode_t; .fi .SH DESCRIPTION diff --git a/man3type/off_t.3type b/man3type/off_t.3type index b544f66..95193d2 100644 --- a/man3type/off_t.3type +++ b/man3type/off_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH off_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH off_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME off_t, off64_t, loff_t \- file sizes .SH LIBRARY @@ -13,28 +13,28 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " off_t; -.PP +.P .B #define _LARGEFILE64_SOURCE .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " off64_t; -.PP +.P .B #define _GNU_SOURCE .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " loff_t; .fi .SH DESCRIPTION .I off_t is used for describing file sizes. It is a signed integer type. -.PP +.P .I off64_t is a 64-bit version of the type, used in glibc. -.PP +.P .I loff_t is a 64-bit version of the type, introduced by the Linux kernel. @@ -52,7 +52,7 @@ Linux. .TP .I off_t POSIX.1-2001. -.PP +.P .I <aio.h> and .I <stdio.h> @@ -65,7 +65,7 @@ the width of .I off_t can be controlled with the feature test macro .BR _FILE_OFFSET_BITS . -.PP +.P The following headers also provide .IR off_t : .IR <aio.h> , diff --git a/man3type/ptrdiff_t.3type b/man3type/ptrdiff_t.3type index bb6b404..7e1ce76 100644 --- a/man3type/ptrdiff_t.3type +++ b/man3type/ptrdiff_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH ptrdiff_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH ptrdiff_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME ptrdiff_t \- count of elements or array index .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stddef.h> -.PP +.P .BR typedef " /* ... */ " ptrdiff_t; .fi .SH DESCRIPTION @@ -21,9 +21,9 @@ Used for a count of elements, or an array index. It is the result of subtracting two pointers. It is a signed integer type capable of storing values in the range -.RB [ PTRDIFF_MAX , +.RB [ PTRDIFF_MIN , .BR PTRDIFF_MAX ]. -.PP +.P The length modifier for .I ptrdiff_t for the diff --git a/man3type/sigevent.3type b/man3type/sigevent.3type index db50c0f..4f1cb71 100644 --- a/man3type/sigevent.3type +++ b/man3type/sigevent.3type @@ -1 +1,142 @@ -.so man7/system_data_types.7 +.\" Copyright (c) 2006, 2010, 2020, Michael Kerrisk <mtk.manpages@gmail.com> +.\" Copyright (C) 2009 Petr Baudis <pasky@suse.cz> +.\" Copyright (c) 2020-2023, Alejandro Colomar <alx@kernel.org> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sigevent 3type 2023-10-31 "Linux man-pages 6.7" +.SH NAME +sigevent, sigval \- structure for notification from asynchronous routines +.SH SYNOPSIS +.EX +.B #include <signal.h> +.P +.B struct sigevent { +.BR " int sigev_notify;" " /* Notification type */" +.BR " int sigev_signo;" " /* Signal number */" +.BR " union sigval sigev_value;" " /* Data passed with notification */" +\& +.B " void (*sigev_notify_function)(union sigval);" +.BR " " " /* Notification function" +.BR " " " (SIGEV_THREAD) */" +.B " pthread_attr_t *sigev_notify_attributes;" +.BR " " " /* Notification attributes */" +\& +.BR " " "/* Linux only: */" +.B " pid_t sigev_notify_thread_id;" +.BR " " " /* ID of thread to signal" +.BR " " " (SIGEV_THREAD_ID) */" +.B }; +.P +.BR "union sigval {" " /* Data passed with notification */" +.BR " int sival_int;" " /* Integer value */" +.BR " void *sival_ptr;" " /* Pointer value */" +.B }; +.EE +.SH DESCRIPTION +.SS sigevent +The +.I sigevent +structure is used by various APIs +to describe the way a process is to be notified about an event +(e.g., completion of an asynchronous request, expiration of a timer, +or the arrival of a message). +.P +The definition shown in the SYNOPSIS is approximate: +some of the fields in the +.I sigevent +structure may be defined as part of a union. +Programs should employ only those fields relevant +to the value specified in +.IR sigev_notify . +.P +The +.I sigev_notify +field specifies how notification is to be performed. +This field can have one of the following values: +.TP +.B SIGEV_NONE +A "null" notification: don't do anything when the event occurs. +.TP +.B SIGEV_SIGNAL +Notify the process by sending the signal specified in +.IR sigev_signo . +.IP +If the signal is caught with a signal handler that was registered using the +.BR sigaction (2) +.B SA_SIGINFO +flag, then the following fields are set in the +.I siginfo_t +structure that is passed as the second argument of the handler: +.RS +.TP 10 +.I si_code +This field is set to a value that depends on the API +delivering the notification. +.TP +.I si_signo +This field is set to the signal number (i.e., the same value as in +.IR sigev_signo ). +.TP +.I si_value +This field is set to the value specified in +.IR sigev_value . +.RE +.IP +Depending on the API, other fields may also be set in the +.I siginfo_t +structure. +.IP +The same information is also available if the signal is accepted using +.BR sigwaitinfo (2). +.TP +.B SIGEV_THREAD +Notify the process by invoking +.I sigev_notify_function +"as if" it were the start function of a new thread. +(Among the implementation possibilities here are that +each timer notification could result in the creation of a new thread, +or that a single thread is created to receive all notifications.) +The function is invoked with +.I sigev_value +as its sole argument. +If +.I sigev_notify_attributes +is not NULL, it should point to a +.I pthread_attr_t +structure that defines attributes for the new thread (see +.BR pthread_attr_init (3)). +.TP +.BR SIGEV_THREAD_ID " (Linux-specific)" +.\" | SIGEV_SIGNAL vs not? +Currently used only by POSIX timers; see +.BR timer_create (2). +.SS sigval +Data passed with a signal. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.P +.I <aio.h> +and +.I <time.h> +define +.I sigevent +since POSIX.1-2008. +.SH NOTES +The following headers also provide +.IR sigevent : +.IR <aio.h> , +.IR <mqueue.h> , +and +.IR <time.h> . +.SH SEE ALSO +.BR timer_create (2), +.BR getaddrinfo_a (3), +.BR lio_listio (3), +.BR mq_notify (3), +.BR pthread_sigqueue (3), +.BR sigqueue (3), +.BR aiocb (3type), +.BR siginfo_t (3type) diff --git a/man3type/sigval.3type b/man3type/sigval.3type index db50c0f..b43f1bb 100644 --- a/man3type/sigval.3type +++ b/man3type/sigval.3type @@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3type/sigevent.3type diff --git a/man3type/size_t.3type b/man3type/size_t.3type index 9df433a..c9ac9c2 100644 --- a/man3type/size_t.3type +++ b/man3type/size_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH size_t 3type 2023-03-31 "Linux man-pages 6.05.01" +.TH size_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME size_t, ssize_t \- count of bytes .SH LIBRARY @@ -13,11 +13,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <stddef.h> -.PP +.P .BR typedef " /* ... */ " size_t; -.PP +.P .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " ssize_t; .fi .SH DESCRIPTION @@ -99,7 +99,7 @@ C89, POSIX.1-2001. .TP .I ssize_t POSIX.1-2001. -.PP +.P .IR <aio.h> , .IR <glob.h> , .IR <grp.h> , @@ -112,7 +112,7 @@ and define .I size_t since POSIX.1-2008. -.PP +.P .IR <aio.h> , .IR <mqueue.h> , and diff --git a/man3type/sockaddr.3type b/man3type/sockaddr.3type index dacc9ad..2ca69c8 100644 --- a/man3type/sockaddr.3type +++ b/man3type/sockaddr.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH sockaddr 3type 2023-04-22 "Linux man-pages 6.05.01" +.TH sockaddr 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME sockaddr, sockaddr_storage, sockaddr_in, sockaddr_in6, sockaddr_un, socklen_t, in_addr, in6_addr, in_addr_t, in_port_t, @@ -15,30 +15,30 @@ Standard C library .SH SYNOPSIS .EX .B #include <sys/socket.h> -.PP +.P .B struct sockaddr { .BR " sa_family_t sa_family;" " /* Address family */" .BR " char sa_data[];" " /* Socket address */" .B }; -.PP +.P .B struct sockaddr_storage { .BR " sa_family_t ss_family;" " /* Address family */" .B }; -.PP +.P .BR typedef " /* ... */ " socklen_t; .BR typedef " /* ... */ " sa_family_t; -.PP +.P .EE .SS Internet domain sockets .EX .B #include <netinet/in.h> -.PP +.P .B struct sockaddr_in { .BR " sa_family_t sin_family;" " /* " AF_INET " */" .BR " in_port_t sin_port;" " /* Port number */" .BR " struct in_addr sin_addr;" " /* IPv4 address */" .B }; -.PP +.P .B struct sockaddr_in6 { .BR " sa_family_t sin6_family;" " /* " AF_INET6 " */" .BR " in_port_t sin6_port;" " /* Port number */" @@ -46,22 +46,22 @@ Standard C library .BR " struct in6_addr sin6_addr;" " /* IPv6 address */" .BR " uint32_t sin6_scope_id;" " /* Set of interfaces for a scope */" .B }; -.PP +.P .B struct in_addr { .B " in_addr_t s_addr;" .B }; -.PP +.P .B struct in6_addr { .B " uint8_t s6_addr[16];" .B }; -.PP +.P .B typedef uint32_t in_addr_t; .B typedef uint16_t in_port_t; .EE .SS UNIX domain sockets .EX .B #include <sys/un.h> -.PP +.P .B struct sockaddr_un { .BR " sa_family_t sun_family;" " /* Address family */" .BR " char sun_path[];" " /* Socket pathname */" @@ -112,12 +112,12 @@ Describes a UNIX domain socket address. POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P .I socklen_t was invented by POSIX. See also .BR accept (2). -.PP +.P These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use @@ -129,7 +129,7 @@ can be safely used as they were designed. .I socklen_t is also defined in .IR <netdb.h> . -.PP +.P .I sa_family_t is also defined in .I <netinet/in.h> diff --git a/man3type/stat.3type b/man3type/stat.3type index 6630641..71b850e 100644 --- a/man3type/stat.3type +++ b/man3type/stat.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH stat 3type 2023-05-03 "Linux man-pages 6.05.01" +.TH stat 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME stat \- file status .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <sys/stat.h> -.PP +.P .B struct stat { .BR " dev_t st_dev;" " /* ID of device containing file */" .BR " ino_t st_ino;" " /* Inode number */" @@ -39,12 +39,12 @@ Standard C library .B "#define st_ctime st_ctim.tv_sec" .B }; .EE -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .IR st_atim , .IR st_mtim , .IR st_ctim : @@ -56,7 +56,7 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION Describes information about a file. -.PP +.P The fields are as follows: .TP .I st_dev @@ -113,14 +113,14 @@ This is the time of last modification of file data. .I st_ctime This is the file's last status change timestamp (time of last change to the inode). -.PP +.P For further information on the above fields, see .BR inode (7). .SH STANDARDS POSIX.1-2008. .SH HISTORY POSIX.1-2001. -.PP +.P Old kernels and old standards did not support nanosecond timestamp fields. Instead, there were three timestamp .RI fields\[em] st_atime , @@ -130,7 +130,7 @@ and as .I time_t that recorded timestamps with one-second precision. -.PP +.P Since Linux 2.5.48, the .I stat structure supports nanosecond resolution for the three file timestamp fields. diff --git a/man3type/time_t.3type b/man3type/time_t.3type index 2b087e5..d528ad3 100644 --- a/man3type/time_t.3type +++ b/man3type/time_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH time_t 3type 2023-03-31 "Linux man-pages 6.05.01" +.TH time_t 3type 2023-11-11 "Linux man-pages 6.7" .SH NAME time_t, suseconds_t, useconds_t \- integer time .SH LIBRARY @@ -13,11 +13,11 @@ Standard C library .SH SYNOPSIS .nf .B #include <time.h> -.PP +.P .BR typedef " /* ... */ " time_t; -.PP +.P .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " suseconds_t; .BR typedef " /* ... */ " useconds_t; .fi @@ -64,12 +64,12 @@ C89, POSIX.1-2001. .TQ .I useconds_t POSIX.1-2001. -.PP +.P .I <sched.h> defines .I time_t since POSIX.1-2008. -.PP +.P POSIX.1-2001 defined .I useconds_t in @@ -81,7 +81,9 @@ the width of .I time_t can be controlled with the feature test macro .BR _TIME_BITS . -.PP +See +.BR feature_test_macros (7). +.P The following headers also provide .IR time_t : .IR <sched.h> , @@ -94,7 +96,7 @@ The following headers also provide .IR <sys/types.h> , and .IR <utime.h> . -.PP +.P The following headers also provide .IR suseconds_t : .I <sys/select.h> diff --git a/man3type/timer_t.3type b/man3type/timer_t.3type index 8341ec1..a14dc1e 100644 --- a/man3type/timer_t.3type +++ b/man3type/timer_t.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH timer_t 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH timer_t 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME timer_t \- timer ID .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/types.h> -.PP +.P .BR typedef " /* ... */ " timer_t; .fi .SH DESCRIPTION diff --git a/man3type/timespec.3type b/man3type/timespec.3type index 213c131..8e18d2e 100644 --- a/man3type/timespec.3type +++ b/man3type/timespec.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH timespec 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH timespec 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME timespec \- time in seconds and nanoseconds .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <time.h> -.PP +.P .B struct timespec { .BR " time_t tv_sec;" " /* Seconds */" .RB " /* ... */" " tv_nsec;" \ @@ -22,7 +22,7 @@ Standard C library .EE .SH DESCRIPTION Describes times in seconds and nanoseconds. -.PP +.P .I tv_nsec is of an implementation-defined signed type capable of holding the specified range. diff --git a/man3type/timeval.3type b/man3type/timeval.3type index 97f450d..9724029 100644 --- a/man3type/timeval.3type +++ b/man3type/timeval.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH timeval 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH timeval 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME timeval \- time in seconds and microseconds .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <sys/time.h> -.PP +.P .B struct timeval { .BR " time_t tv_sec;" " /* Seconds */" .BR " suseconds_t tv_usec;" " /* Microseconds */" diff --git a/man3type/tm.3type b/man3type/tm.3type index 42cd1e3..721a5aa 100644 --- a/man3type/tm.3type +++ b/man3type/tm.3type @@ -3,7 +3,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH tm 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH tm 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME tm \- broken-down time .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .EX .B #include <time.h> -.PP +.P .B struct tm { .BR " int tm_sec;" " /* Seconds [" 0 ", " 60 "] */" .BR " int tm_min;" " /* Minutes [" 0 ", " 59 "] */" @@ -26,17 +26,17 @@ Standard C library .BR " int tm_yday;" \ " /* Day of the year [" 0 ", " 365 "] (Jan/01 = " 0 ") */" .BR " int tm_isdst;" " /* Daylight savings flag */" -.PP +.P .BR " long tm_gmtoff;" " /* Seconds East of UTC */" .BR " const char *tm_zone;" " /* Timezone abbreviation */" .B }; .EE -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .IR tm_gmtoff , .IR tm_zone : .nf @@ -48,19 +48,19 @@ Feature Test Macro Requirements for glibc (see .fi .SH DESCRIPTION Describes time, broken down into distinct components. -.PP +.P .I tm_isdst describes whether daylight saving time is in effect at the time described. The value is positive if daylight saving time is in effect, zero if it is not, and negative if the information is not available. -.PP +.P .I tm_gmtoff is the difference, in seconds, of the timezone represented by this broken-down time and UTC (this is the additive inverse of .BR timezone (3)). -.PP +.P .I tm_zone is the equivalent of .BR tzname (3) @@ -75,7 +75,7 @@ UTC doesn't permit double leap seconds, so it was limited to .B 60 in C99. -.PP +.P .BR timezone (3), as a variable, is an XSI extension: some systems provide the V7-compatible .\" FreeBSD @@ -84,7 +84,7 @@ function. The .I tm_gmtoff field provides an alternative (with the opposite sign) for those systems. -.PP +.P .I tm_zone points to static storage and may be overridden on subsequent calls to .BR localtime (3) @@ -93,7 +93,7 @@ and similar functions (however, this never happens under glibc). C11, POSIX.1-2008. .SH HISTORY C89, POSIX.1-2001. -.PP +.P .I tm_gmtoff and .I tm_zone diff --git a/man3type/va_list.3type b/man3type/va_list.3type index 3549829..d520594 100644 --- a/man3type/va_list.3type +++ b/man3type/va_list.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH va_list 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH va_list 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME va_list \- variable argument list .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <stdarg.h> -.PP +.P .BR typedef " /* ... */ " va_list; .fi .SH DESCRIPTION diff --git a/man3type/void.3type b/man3type/void.3type index 45907e9..4174f5f 100644 --- a/man3type/void.3type +++ b/man3type/void.3type @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" -.TH void 3type 2023-03-30 "Linux man-pages 6.05.01" +.TH void 3type 2023-10-31 "Linux man-pages 6.7" .SH NAME void \- abstract type .SH SYNOPSIS @@ -20,7 +20,7 @@ including pointers to functions, may be converted to a pointer to .I void and back. -.PP +.P Conversions from and to any other pointer type are done implicitly, not requiring casts at all. Note that this feature prevents any kind of type checking: @@ -28,13 +28,13 @@ the programmer should be careful not to convert a .I void * value to a type incompatible to that of the underlying data, because that would result in undefined behavior. -.PP +.P This type is useful in function parameters and return value to allow passing values of any type. The function will typically use some mechanism to know the real type of the data being passed via a pointer to .IR void . -.PP +.P A value of this type can't be dereferenced, as it would give a value of type .IR void , |