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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit c77265b4ea89359c164346e400914bb24a3716d1
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxx>

diff --git a/ChangeLog b/ChangeLog
index 2155764..46ef4c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-27  Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
+
+	* Add printf support for format string a, A, and F.
+
 2014-10-13  Eric Blake <eblake@xxxxxxxxxx>
 
 	* 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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux