diff options
author | kvik <kvik@a-b.xyz> | 2021-02-19 23:04:09 +0100 |
---|---|---|
committer | kvik <kvik@a-b.xyz> | 2021-02-19 23:04:09 +0100 |
commit | bc1cc79225f0b006dd66d4fd81030d06f83bfca2 (patch) | |
tree | ae537e5a96031a355e0f294bbecd114f9c248880 /sys/man/2 | |
parent | 1ce6f0f2ab1896e35869f0e9e5079fc20dd981fc (diff) |
libstdio: sync bits of vfprintf from APE
* Add the %ll length modifier,
* Convert nil to "<nil>" under %s (not in APE),
* Cast void* to uintptr under %p,
* Use "0x" hex prefix under %p,
* Fix manual page mentions of %P to %p,
* Fix empty result for fp conversions,
* Fix zero padding of left-aligned fp conversions,
* Remove deprecated #pragma ref uses.
Most of these were introduced in APE prior to 9front.
I've omitted the %z conversion specifier since Plan 9 code
rarely uses the usize type. This may need to be added later
for the benefit of native ports of alien code.
Diffstat (limited to 'sys/man/2')
-rw-r--r-- | sys/man/2/fprintf | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/sys/man/2/fprintf b/sys/man/2/fprintf index b7f616c33..abd7687f4 100644 --- a/sys/man/2/fprintf +++ b/sys/man/2/fprintf @@ -200,6 +200,22 @@ or .B long argument; an optional +.B ll +specifying that a following +.BR d , +.BR i , +.BR o , +.BR u , +.BR x , +or +.B X +conversion character applies to a +.B long long +or +.B unsigned +.B long long +argument; +an optional .B l specifying that a following .B n @@ -207,6 +223,14 @@ conversion specifier applies to a pointer to a .B long .B int argument; +an optional +.B ll +specifying that a following +.B n +conversion specifier applies to a pointer to a +.B long long +.B int +argument; or an optional .B L specifying that a following @@ -222,6 +246,7 @@ argument. If an .BR h , .BR l , +.BR ll , or .B L appears with any other conversion specifier, the behavior is undefined. @@ -459,7 +484,7 @@ zero value for the argument yields undefined results. .TP -.B P +.B p The .B void* argument is printed in an implementation-defined way (for Plan 9: @@ -487,7 +512,7 @@ If any argument is, or points to, a union or an aggregate conversion, or a pointer cast to be a pointer to .B void using -.B %P +.B %p conversion), the behavior is undefined. .PP In no case does a nonexistent or small field width cause truncation |