device/lib/pic16/libc/stdio/vsprintf.c: enlarge buffer for x_ftoa()
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Feb 2009 22:47:27 +0000 (22:47 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Feb 2009 22:47:27 +0000 (22:47 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5373 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
device/lib/pic16/libc/stdio/vfprintf.c

index 7b016c58bed42bc6192dc2b45a676dc77f4d5535..ee45364baf80c8bd37416a5d341560c3bcf60bdb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
 
        * support/regression/tests/float_single.c: added regression 
          test. Some testpoints for probably rarely used functions
-          (acosf, sinhf, tanf, expf) disabled for some targets
+         (acosf, sinhf, tanf, expf) disabled for some targets
 
 2008-02-10 Raphael Neider <rneider AT web.de>
 
@@ -27,7 +27,7 @@
 
        * device/lib/pic16/libc/stdio/sprintf.c,
          device/lib/pic16/libc/stdio/vsprintf.c: do not mess up the user's
-         pointer to the string buffer
+         pointer to the string buffer, enlarge buffer for x_ftoa()
 
 2008-02-10 Borut Razem <borut.razem AT siol.net>
 
index fc2433434d9b40e1ac7c2bc05672d451808357e6..3d3137cc285b0428741a798f94bd44a589fbee1f 100644 (file)
  */
 #define EXTRA_INTEGER
 
-#ifdef BINARY_SPECIFIER
+#if defined(USE_FLOATS)
+/* x_ftoa requires up to 8 digits (integral part) + '.' + 24 digits
+ * (fractional part). Adding a sign and a NUL byte yields 35 byte. */
+# define BUF_SIZE       36
+#elif defined(BINARY_SPECIFIER)
 /* "%lb" = "0" - "11111111111111111111111111111111" */
 # define BUF_SIZE       33
 #else