aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-06-03 01:24:54 +0000
committerdrh <drh@noemail.net>2009-06-03 01:24:54 +0000
commit50d654da3b6768d4ec65e54405fc9763ff3a58d4 (patch)
tree430016c42e2c66a6ae293c5dd0bff48a66da8cf0 /src/printf.c
parente98c9049a0a56ea8c3a704a986298f1dc5a9af2f (diff)
downloadsqlite-50d654da3b6768d4ec65e54405fc9763ff3a58d4.tar.gz
sqlite-50d654da3b6768d4ec65e54405fc9763ff3a58d4.zip
Additional changes to reduce stack usage. The SQLITE_SMALL_STACK compile-time
option is now available. (CVS 6708) FossilOrigin-Name: baea79fd0cfeb860973846c3f2776776c87f0ae3
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/printf.c b/src/printf.c
index a2c79c5b5..d8d838693 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -5,7 +5,7 @@
** an historical reference. Most of the "enhancements" have been backed
** out so that the functionality is now the same as standard printf().
**
-** $Id: printf.c,v 1.103 2009/05/04 20:20:16 drh Exp $
+** $Id: printf.c,v 1.104 2009/06/03 01:24:54 drh Exp $
**
**************************************************************************
**
@@ -189,11 +189,14 @@ static void appendSpace(StrAccum *pAccum, int N){
/*
** On machines with a small stack size, you can redefine the
-** SQLITE_PRINT_BUF_SIZE to be less than 350. But beware - for
-** smaller values some %f conversions may go into an infinite loop.
+** SQLITE_PRINT_BUF_SIZE to be less than 350.
*/
#ifndef SQLITE_PRINT_BUF_SIZE
-# define SQLITE_PRINT_BUF_SIZE 350
+# if defined(SQLITE_SMALL_STACK)
+# define SQLITE_PRINT_BUF_SIZE 50
+# else
+# define SQLITE_PRINT_BUF_SIZE 350
+# endif
#endif
#define etBUFSIZE SQLITE_PRINT_BUF_SIZE /* Size of the output buffer */