From 5c564bae0a7655b1a517f322ad410a743e98e8d2 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 18 Dec 2002 13:33:04 +0000 Subject: mdoc(7) police: Fixed abuses of the .Ar and .Em macros. --- lib/libc/stdlib/abs.3 | 2 +- lib/libc/stdlib/atexit.3 | 4 ++-- lib/libc/stdlib/atof.3 | 4 ++-- lib/libc/stdlib/atoi.3 | 4 ++-- lib/libc/stdlib/div.3 | 6 +++--- lib/libc/stdlib/getenv.3 | 27 ++++++++++++++------------- lib/libc/stdlib/labs.3 | 2 +- lib/libc/stdlib/ldiv.3 | 10 +++++----- lib/libc/stdlib/malloc.3 | 2 +- lib/libc/stdlib/strtod.3 | 2 +- 10 files changed, 32 insertions(+), 31 deletions(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/abs.3 b/lib/libc/stdlib/abs.3 index 9dee8ed2d2ed..d9296ef6c571 100644 --- a/lib/libc/stdlib/abs.3 +++ b/lib/libc/stdlib/abs.3 @@ -54,7 +54,7 @@ The function computes the absolute value of the integer -.Ar j . +.Fa j . .Sh RETURN VALUES The .Fn abs diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3 index 9aae7af92a9b..b3dec68bc0b4 100644 --- a/lib/libc/stdlib/atexit.3 +++ b/lib/libc/stdlib/atexit.3 @@ -53,11 +53,11 @@ The .Fn atexit function registers the given -.Ar function +.Fa function to be called at program exit, whether via .Xr exit 3 or via return from the program's -.Em main . +.Fn main . Functions so registered are called in reverse order; no arguments are passed. .Pp diff --git a/lib/libc/stdlib/atof.3 b/lib/libc/stdlib/atof.3 index 10fcf491ab33..d338e3d9766a 100644 --- a/lib/libc/stdlib/atof.3 +++ b/lib/libc/stdlib/atof.3 @@ -54,9 +54,9 @@ string to double The .Fn atof function converts the initial portion of the string pointed to by -.Ar nptr +.Fa nptr to -.Ar double +.Vt double representation. .Pp It is equivalent to: diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3 index 19269a5ca15a..34a1b2d5216a 100644 --- a/lib/libc/stdlib/atoi.3 +++ b/lib/libc/stdlib/atoi.3 @@ -54,9 +54,9 @@ string to integer The .Fn atoi function converts the initial portion of the string pointed to by -.Em nptr +.Fa nptr to -.Em integer +.Vt int representation. .Pp It is equivalent to: diff --git a/lib/libc/stdlib/div.3 b/lib/libc/stdlib/div.3 index 31fc7424cca6..05567fbd3949 100644 --- a/lib/libc/stdlib/div.3 +++ b/lib/libc/stdlib/div.3 @@ -55,11 +55,11 @@ computes the value and returns the quotient and remainder in a structure named .Fa div_t that contains two -.Em int +.Vt int members named -.Fa quot +.Va quot and -.Fa rem . +.Va rem . .Sh SEE ALSO .Xr imaxdiv 3 , .Xr ldiv 3 , diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index 2b46e520b722..269fecbc6060 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -63,9 +63,9 @@ host .Em environment list . For compatibility with differing environment conventions, the given arguments -.Ar name +.Fa name and -.Ar value +.Fa value may be appended and prepended, respectively, with an equal sign @@ -74,30 +74,31 @@ with an equal sign The .Fn getenv function obtains the current value of the environment variable, -.Ar name . +.Fa name . If the variable -.Ar name +.Fa name is not in the current environment, a null pointer is returned. .Pp The .Fn setenv function inserts or resets the environment variable -.Ar name +.Fa name in the current environment list. If the variable -.Ar name +.Fa name does not exist in the list, it is inserted with the given -.Ar value . +.Fa value . If the variable does exist, the argument -.Ar overwrite +.Fa overwrite is tested; if -.Ar overwrite is +.Fa overwrite +is zero, the variable is not reset, otherwise it is reset to the given -.Ar value . +.Fa value . .Pp The .Fn putenv @@ -140,14 +141,14 @@ Successive calls to or .Fn putenv assigning a differently sized -.Ar value +.Fa value to the same -.Ar name +.Fa name will result in a memory leak. The .Fx semantics for these functions (namely, that the contents of -.Ar value +.Fa value are copied and that old values remain accessible indefinitely) make this bug unavoidable. Future versions may eliminate one or both of these semantic guarantees in order to fix the bug. diff --git a/lib/libc/stdlib/labs.3 b/lib/libc/stdlib/labs.3 index 9831bdbdbb7b..2c8db6e89109 100644 --- a/lib/libc/stdlib/labs.3 +++ b/lib/libc/stdlib/labs.3 @@ -53,7 +53,7 @@ The .Fn labs function returns the absolute value of the long integer -.Ar j . +.Fa j . .Sh SEE ALSO .Xr abs 3 , .Xr cabs 3 , diff --git a/lib/libc/stdlib/ldiv.3 b/lib/libc/stdlib/ldiv.3 index 8e09cdf3dde1..eddf9db07ae3 100644 --- a/lib/libc/stdlib/ldiv.3 +++ b/lib/libc/stdlib/ldiv.3 @@ -53,15 +53,15 @@ The .Fn ldiv function computes the value -.Ar num/denom +.Fa num Ns / Ns Fa denom and returns the quotient and remainder in a structure named -.Ar ldiv_t +.Vt ldiv_t that contains two -.Em long integer +.Vt long members named -.Ar quot +.Va quot and -.Ar rem . +.Va rem . .Sh SEE ALSO .Xr div 3 , .Xr imaxdiv 3 , diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 6c11ea7c437c..8fa0326cae22 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -69,7 +69,7 @@ bytes of memory. The allocated space is suitably aligned (after possible pointer coercion) for storage of any type of object. If the space is at least -.Em pagesize +.Va pagesize bytes in length (see .Xr getpagesize 3 ) , the returned memory will be page boundary aligned as well. diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3 index e26145570d73..ab78083ca5e7 100644 --- a/lib/libc/stdlib/strtod.3 +++ b/lib/libc/stdlib/strtod.3 @@ -57,7 +57,7 @@ function converts the initial portion of the string pointed to by .Fa nptr to -.Em double +.Vt double representation. .Pp The expected form of the string is an optional plus (``+'') or minus -- cgit v1.3