dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUILTIN] Add printf support for format string a, A, and F
@ 2014-10-27  3:46 Herbert Xu
  0 siblings, 0 replies; only message in thread
From: Herbert Xu @ 2014-10-27  3:46 UTC (permalink / raw)
  To: dash

commit c77265b4ea89359c164346e400914bb24a3716d1
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Mon Oct 27 11:45:01 2014 +0800

    [BUILTIN] Add printf support for format string a, A, and F
    
    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@gondor.apana.org.au>

diff --git a/ChangeLog b/ChangeLog
index 2155764..46ef4c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-27  Herbert Xu <herbert@gondor.apana.org.au>
+
+	* Add printf support for format string a, A, and F.
+
 2014-10-13  Eric Blake <eblake@redhat.com>
 
 	* cd: support drive letters on Cygwin.
diff --git a/src/bltin/printf.c b/src/bltin/printf.c
index 5f9e81c..e0ef912 100644
--- a/src/bltin/printf.c
+++ b/src/bltin/printf.c
@@ -191,9 +191,12 @@ pc:
 				PF(f, p);
 				break;
 			}
+			case 'a':
+			case 'A':
 			case 'e':
 			case 'E':
 			case 'f':
+			case 'F':
 			case 'g':
 			case 'G': {
 				double p = getdouble();

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-27  3:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-27  3:46 [BUILTIN] Add printf support for format string a, A, and F Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).