diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 1997-10-25 05:11:06 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 1997-10-25 05:11:06 +0000 |
commit | 4677f0a255194f2644e86da95b5855ffe055614a (patch) | |
tree | d34f62bd7eb6b7ede719a1e165ef1630f7a4492d | |
parent | 3eb1bc67b1ef4efe7e9f53549b33158c1e3e94a8 (diff) | |
download | postgresql-4677f0a255194f2644e86da95b5855ffe055614a.tar.gz postgresql-4677f0a255194f2644e86da95b5855ffe055614a.zip |
Add debugging statement enabled by CASHDEBUG symbol definition.
-rw-r--r-- | src/backend/utils/adt/cash.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index 7b1a00e9f27..bec369d0fb4 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -9,7 +9,7 @@ * workings can be found in the book "Software Solutions in C" by * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.17 1997/10/03 13:10:06 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.18 1997/10/25 05:11:06 thomas Exp $ */ #include <stdio.h> @@ -64,6 +64,10 @@ cash_in(const char *str) csymbol; #ifdef USE_LOCALE +#ifdef CASHDEBUG + setlocale(LC_ALL, ""); + lconvert = localeconv(); +#endif if (lconvert == NULL) lconvert = localeconv(); @@ -85,6 +89,11 @@ cash_in(const char *str) nsymbol = '-'; #endif +#ifdef CASHDEBUG +printf( "cashin- precision %d; decimal %c; thousands %c; currency %c; positive %c; negative %c\n", + fpoint, dsymbol, ssymbol, csymbol, psymbol, nsymbol); +#endif + /* we need to add all sorts of checking here. For now just */ /* strip all leading whitespace and any leading dollar sign */ while (isspace(*s) || *s == csymbol) |