Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2015-11-12 16:11:07 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2015-11-19 14:39:52 +0300
commitbdc616938151be67ad286748bd382d068ca80ef2 (patch)
tree87cce2315a4fab6b5307b4121edf06d264dd7d0a /newlib
parent21e6ba20ae08ca0b54e3e10f9ad09572ed9e587a (diff)
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>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/sprintf.c67
-rw-r--r--newlib/libc/stdio/swprintf.c68
3 files changed, 76 insertions, 64 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 070622b8f..b56fc0674 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,10 @@
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>
+
* libc/stdio/sscanf.c: Improve documentation markup.
* libc/stdio/swscanf.c: Ditto.
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index c3be9b1d2..d74c6f891 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -199,38 +199,41 @@ DESCRIPTION
o #
The result is to be converted to an
alternative form, according to 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-
+ character.
+ 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]>
diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c
index 60178e52d..2233b3ba7 100644
--- a/newlib/libc/stdio/swprintf.c
+++ b/newlib/libc/stdio/swprintf.c
@@ -167,40 +167,44 @@ DESCRIPTION
o #
The result is to be converted to an
alternative form, according to 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-
+ character.
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]>
<[width]> is an optional minimum field width. You can