[klibc] [klibc:update-dash] dash: [BUILTIN] Add printf support for format string a, A, and F

klibc-bot for Herbert Xu herbert at gondor.apana.org.au
Sat Mar 28 14:48:26 PDT 2020


Commit-ID:  70012a3955fec1faf78d59c69c57b6db584843cb
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=70012a3955fec1faf78d59c69c57b6db584843cb
Author:     Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Mon, 27 Oct 2014 11:45:01 +0800
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000

[klibc] dash: [BUILTIN] Add printf support for format string a, A, and F

[ dash commit c77265b4ea89359c164346e400914bb24a3716d1 ]

This patch adds the format string characters a, A and F to the
supported set of the built-in printf command.  They're already
supported by the underlying printf function.

Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
[bwh: Adjust context for klibc]
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/dash/bltin/printf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c
index add89095..a1c1e918 100644
--- a/usr/dash/bltin/printf.c
+++ b/usr/dash/bltin/printf.c
@@ -194,9 +194,12 @@ pc:
 				break;
 			}
 #ifdef HAVE_STRTOD
+			case 'a':
+			case 'A':
 			case 'e':
 			case 'E':
 			case 'f':
+			case 'F':
 			case 'g':
 			case 'G': {
 				double p = getdouble();


More information about the klibc mailing list