From 84f883bb74a6a6773a9f49f3ed8100c8bd215223 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 12 Dec 2001 14:53:51 +0000 Subject: mdoc(7) police: fix markup, bump document date. --- lib/libc/stdlib/strtol.3 | 33 ++++++++++++++++++--------------- lib/libc/stdlib/strtoul.3 | 35 ++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 30 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3 index c5eb2c8..7c610f7 100644 --- a/lib/libc/stdlib/strtol.3 +++ b/lib/libc/stdlib/strtol.3 @@ -36,12 +36,16 @@ .\" @(#)strtol.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd November 28, 2001 .Dt STRTOL 3 .Os .Sh NAME .Nm strtol , strtoll , strtoimax , strtoq -.Nd "convert a string value to a long, long long, intmax_t or quad_t integer" +.Nd "convert a string value to a" +.Vt long , "long long" , intmax_t +or +.Vt quad_t +integer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -66,7 +70,7 @@ function converts the string in .Fa nptr to a -.Em long +.Vt long value. The .Fn strtoll @@ -74,7 +78,7 @@ function converts the string in .Fa nptr to a -.Em long long +.Vt "long long" value. The .Fn strtoimax @@ -82,7 +86,7 @@ function converts the string in .Fa nptr to an -.Em intmax_t +.Vt intmax_t value. The .Fn strtoq @@ -90,7 +94,7 @@ function converts the string in .Fa nptr to a -.Em quad_t +.Vt quad_t value. The conversion is done according to the given .Fa base , @@ -109,7 +113,7 @@ If .Fa base is zero or 16, the string may then include a -.Ql 0x +.Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero .Fa base @@ -118,11 +122,9 @@ is taken as 10 (decimal) unless the next character is in which case it is taken as 8 (octal). .Pp The remainder of the string is converted to a -.Em long , -.Em long long , -.Em intmax_t +.Vt long , "long long" , intmax_t or -.Em quad_t +.Vt quad_t value in the obvious manner, stopping at the first character which is not a valid digit in the given base. @@ -137,7 +139,8 @@ representing 35.) .Pp If .Fa endptr -is non nil, +is not +.Dv NULL , .Fn strtol stores the address of the first invalid character in .Fa *endptr . @@ -161,10 +164,10 @@ The .Fn strtol , .Fn strtoll , .Fn strtoimax -or +and .Fn strtoq -function -returns the result of the conversion, +functions +return the result of the conversion, unless the value would underflow or overflow. If no conversion could be performed, 0 is returned and the global variable diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3 index 00be953..9fa9539 100644 --- a/lib/libc/stdlib/strtoul.3 +++ b/lib/libc/stdlib/strtoul.3 @@ -36,20 +36,24 @@ .\" @(#)strtoul.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd November 28, 2001 .Dt STRTOUL 3 .Os .Sh NAME .Nm strtoul , strtoull , strtoumax , strtouq -.Nd "convert a string to an unsigned long, unsigned long long, uintmax_t, or uquad_t integer" +.Nd "convert a string to an" +.Vt "unsigned long" , "unsigned long long" , uintmax_t , +or +.Vt uquad_t +integer .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In stdlib.h .In limits.h -.Ft unsigned long +.Ft "unsigned long" .Fn strtoul "const char *nptr" "char **endptr" "int base" -.Ft unsigned long long +.Ft "unsigned long long" .Fn strtoull "const char *nptr" "char **endptr" "int base" .In inttypes.h .Ft uintmax_t @@ -66,7 +70,7 @@ function converts the string in .Fa nptr to an -.Em unsigned long +.Vt "unsigned long" value. The .Fn strtoull @@ -74,7 +78,7 @@ function converts the string in .Fa nptr to an -.Em unsigned long long +.Vt "unsigned long long" value. The .Fn strtoumax @@ -82,7 +86,7 @@ function converts the string in .Fa nptr to an -.Em uintmax_t +.Vt uintmax_t value. The .Fn strtouq @@ -90,7 +94,7 @@ function converts the string in .Fa nptr to a -.Em u_quad_t +.Vt u_quad_t value. The conversion is done according to the given .Fa base , @@ -109,7 +113,7 @@ If .Fa base is zero or 16, the string may then include a -.Ql 0x +.Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero .Fa base @@ -118,7 +122,7 @@ is taken as 10 (decimal) unless the next character is in which case it is taken as 8 (octal). .Pp The remainder of the string is converted to an -.Em unsigned long +.Vt "unsigned long" value in the obvious manner, stopping at the end of the string or at the first character that does not produce a valid digit @@ -134,7 +138,8 @@ representing 35.) .Pp If .Fa endptr -is non nil, +is not +.Dv NULL , .Fn strtoul stores the address of the first invalid character in .Fa *endptr . @@ -158,10 +163,10 @@ The .Fn strtoul , .Fn strtoull , .Fn strtoumax -or +and .Fn strtouq -function -returns either the result of the conversion +functions +return either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion, unless the original (non-negated) value would overflow; @@ -174,7 +179,7 @@ returns .Dv ULLONG_MAX , .Fn strtoumax returns -.Dv UINTMAX_MAX +.Dv UINTMAX_MAX , and .Fn strtouq returns -- cgit v1.1