about summary refs log tree commit diff
path: root/lib/libpm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-11-22 18:41:45 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-11-22 18:41:45 +0000
commitf3316d36985ad16f1d82aea44eddc311cb739d6d (patch)
tree82f3a6c450ec8394baa9b588962d4497e7a704a4 /lib/libpm.c
parent09bcfca6b8a98a40a1895ae8a66dd3fc1344a966 (diff)
downloadnetpbm-mirror-f3316d36985ad16f1d82aea44eddc311cb739d6d.tar.gz
netpbm-mirror-f3316d36985ad16f1d82aea44eddc311cb739d6d.tar.xz
netpbm-mirror-f3316d36985ad16f1d82aea44eddc311cb739d6d.zip
Fix %g for platform without vasprintf (but scores of %f still exist)
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2320 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpm.c')
-rw-r--r--lib/libpm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libpm.c b/lib/libpm.c
index 228f42c6..fa8ae4db 100644
--- a/lib/libpm.c
+++ b/lib/libpm.c
@@ -278,6 +278,19 @@ pm_error(const char format[], ...) {
 
 
 
+bool
+pm_have_float_format(void) {
+/*----------------------------------------------------------------------------
+  Return true iff %f, %e, and %g work in format strings for pm_message, etc.
+
+  Where they don't "work," that means the specifier just appears itself in
+  the formatted strings, e.g. "the number is g".
+-----------------------------------------------------------------------------*/
+    return pm_vasprintf_knows_float();
+}
+
+
+
 static void *
 mallocz(size_t const size) {