Simplify the markup for sprintf and swprintf documentation

- move the description of the alternative form produced with the # flag from a
nested table to an additional table

2015-11-12  Jon Turney  <jon.turney@dronecode.org.uk>

	* libc/stdio/sprintf.c: Simplify documentation markup.
	* libc/stdio/swprintf.c: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon Turney 2015-11-12 13:11:07 +00:00
parent 21e6ba20ae
commit bdc6169381
3 changed files with 69 additions and 57 deletions

View File

@ -1,3 +1,8 @@
2015-11-12 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdio/sprintf.c: Simplify documentation markup.
* libc/stdio/swprintf.c: Ditto.
2015-11-12 Jon Turney <jon.turney@dronecode.org.uk> 2015-11-12 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdio/sscanf.c: Improve documentation markup. * libc/stdio/sscanf.c: Improve documentation markup.

View File

@ -199,38 +199,41 @@ DESCRIPTION
o # o #
The result is to be converted to an The result is to be converted to an
alternative form, according to the <[type]> alternative form, according to the <[type]>
character: character.
o-
o+ The alternative form output with the # flag depends on the <[type]>
o o character:
Increases precision to force the first
digit of the result to be a zero.
o x o+
A non-zero result will have a <<0x>> o o
prefix. Increases precision to force the first
digit of the result to be a zero.
o X o x
A non-zero result will have a <<0X>> A non-zero result will have a <<0x>>
prefix. prefix.
o a, A, e, E, f, or F o X
The result will always contain a A non-zero result will have a <<0X>>
decimal point even if no digits follow prefix.
the point. (Normally, a decimal point
appears only if a digit follows it.)
Trailing zeros are removed.
o g or G o a, A, e, E, f, or F
The result will always contain a The result will always contain a
decimal point even if no digits follow decimal point even if no digits follow
the point. Trailing zeros are not the point. (Normally, a decimal point
removed. appears only if a digit follows it.)
Trailing zeros are removed.
o all others o g or G
Undefined. The result will always contain a
decimal point even if no digits follow
the point. Trailing zeros are not
removed.
o all others
Undefined.
o-
o- o-
o <[width]> o <[width]>

View File

@ -167,40 +167,44 @@ DESCRIPTION
o # o #
The result is to be converted to an The result is to be converted to an
alternative form, according to the <[type]> alternative form, according to the <[type]>
character: character.
o+
o o
Increases precision to force the first
digit of the result to be a zero.
o x
A non-zero result will have a <<0x>>
prefix.
o X
A non-zero result will have a <<0X>>
prefix.
o a, A, e, E, f, or F
The result will always contain a
decimal point even if no digits follow
the point. (Normally, a decimal point
appears only if a digit follows it.)
Trailing zeros are removed.
o g or G
The result will always contain a
decimal point even if no digits follow
the point. Trailing zeros are not
removed.
o all others
Undefined.
o-
o- o-
The alternative form output with the # flag depends on the <[type]>
character:
o+
o o
Increases precision to force the first
digit of the result to be a zero.
o x
A non-zero result will have a <<0x>>
prefix.
o X
A non-zero result will have a <<0X>>
prefix.
o a, A, e, E, f, or F
The result will always contain a
decimal point even if no digits follow
the point. (Normally, a decimal point
appears only if a digit follows it.)
Trailing zeros are removed.
o g or G
The result will always contain a
decimal point even if no digits follow
the point. Trailing zeros are not
removed.
o all others
Undefined.
o-
o <[width]> o <[width]>
<[width]> is an optional minimum field width. You can <[width]> is an optional minimum field width. You can