From 8ec19d5954cee09794f1ab630da0c50591b5ba4b Mon Sep 17 00:00:00 2001 From: das Date: Sat, 28 Jun 2003 09:03:25 +0000 Subject: Update to reflect changes in vfscanf.c,v 1.32. Remove bogus documentation for %a, and document it correctly instead. s/one of aefg/one of a, e, f, or g/ Reviewed by: standards@ --- lib/libc/stdio/scanf.3 | 49 ++++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index a325f37..4b74826 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -172,7 +172,9 @@ and the next pointer is a pointer to a (rather than .Vt int ) , that the conversion will be one of -.Cm aefg +.Cm a , e , f , +or +.Cm g and the next pointer is a pointer to .Vt double (rather than @@ -197,15 +199,11 @@ and the next pointer is a pointer to a .Vt int ) . .It Cm L Indicates that the conversion will be one of -.Cm aef +.Cm a , e , f , or .Cm g and the next pointer is a pointer to .Vt "long double" . -(This type is not implemented; although the argument is -required to be a pointer to -.Vt "long double" , -no additional precision is used in the conversion.) .It Cm j Indicates that the conversion will be one of .Cm dioux @@ -309,29 +307,16 @@ the next pointer must be a pointer to Matches an optionally signed hexadecimal integer; the next pointer must be a pointer to .Vt "unsigned int" . -.It Cm e , E , f , F , g , G -Matches an optionally signed floating-point number; -the next pointer must be a pointer to -.Vt float . -.It Cm a , A -Matches a hexadecimal number represented in the style -.Sm off -.Oo \- Oc Li 0x Ar h Li \&. Ar hhh Cm p Oo \\*[Pm] Oc Ar d . -.Sm on -This is an exact conversion of the sign, exponent, mantissa internal -floating point representation; the -.Sm off -.Oo \- Oc Li 0x Ar h Li \&. Ar hhh -.Sm on -portion represents exactly the mantissa; only denormalized -mantissas have a zero value to the left of the hexadecimal -point. -The -.Cm p -is a literal character -.Ql p ; -the exponent is preceded by a positive or negative sign -and is represented in decimal. +.It Cm a , A , e , E , f , F , g , G +Matches a floating-point number in the style of +.Xr strtod 3 . +The next pointer must be a pointer to +.Vt float +(unless +.Cm l +or +.Cm L +is specified.) .It Cm s Matches a sequence of non-white-space characters; the next pointer must be a pointer to @@ -526,12 +511,6 @@ The modifiers for positional arguments are not implemented. .Pp The -.Cm \&%a -and -.Cm \&%A -floating-point formats are not implemented. -.Pp -The .Nm family of functions do not correctly handle multibyte characters in the .Fa format -- cgit v1.1