diff --git a/src/lib/libc/stdlib/Makefile.inc b/src/lib/libc/stdlib/Makefile.inc index ab8bd39f..c149aeef 100644 --- a/src/lib/libc/stdlib/Makefile.inc +++ b/src/lib/libc/stdlib/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.40 2008/09/07 20:36:08 martynas Exp $ +# $OpenBSD: Makefile.inc,v 1.41 2008/09/13 22:48:45 martynas Exp $ # stdlib sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/stdlib ${LIBCSRCDIR}/stdlib @@ -64,7 +64,7 @@ MLINKS+=random.3 srandom.3 random.3 srandomdev.3 MLINKS+=rand48.3 drand48.3 rand48.3 erand48.3 rand48.3 lrand48.3 MLINKS+=rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 jrand48.3 MLINKS+=rand48.3 srand48.3 rand48.3 seed48.3 rand48.3 lcong48.3 -MLINKS+=strtod.3 strtof.3 +MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3 MLINKS+=tsearch.3 tfind.3 diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3 index 5f97639d..f1fc781f 100644 --- a/src/lib/libc/stdlib/strtod.3 +++ b/src/lib/libc/stdlib/strtod.3 @@ -29,17 +29,18 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: strtod.3,v 1.13 2008/09/13 22:25:49 martynas Exp $ +.\" $OpenBSD: strtod.3,v 1.14 2008/09/13 22:48:45 martynas Exp $ .\" .Dd $Mdocdate: September 13 2008 $ .Dt STRTOD 3 .Os .Sh NAME .Nm strtod , -.Nm strtof +.Nm strtof , +.Nm strtold .Nd convert .Tn ASCII -string to double or float +string to double, float or long double .Sh SYNOPSIS .Fd #include .Fd #include @@ -48,6 +49,9 @@ string to double or float .Pp .Ft float .Fn strtof "const char *nptr" "char **endptr" +.Pp +.Ft long double +.Fn strtold "const char *nptr" "char **endptr" .Sh DESCRIPTION The .Fn strtod @@ -63,6 +67,13 @@ function converts the initial portion of the string pointed to by to .Li float representation. +The +.Fn strtold +function converts the initial portion of the string pointed to by +.Fa nptr +to +.Li long double +representation. .Pp The expected form of the string is an optional plus .Pq Ql + @@ -81,9 +92,10 @@ Leading whitespace characters in the string (as defined by the function) are skipped. .Sh RETURN VALUES The -.Fn strtod -and +.Fn strtod , .Fn strtof +and +.Fn strtold functions return the converted value, if any. .Pp If @@ -123,9 +135,11 @@ Overflow or underflow occurred. .Sh STANDARDS The .Fn strtod -function conform to -.St -ansiC-89 -and +function conforms to +.St -ansiC-89 . +The .Fn strtof -conform to +and +.Fn strtold +functions conform to .St -ansiC-99 .