Skip to content
Snippets Groups Projects
Commit 4677f0a2 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart
Browse files

Add debugging statement enabled by CASHDEBUG symbol definition.

parent 3eb1bc67
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by * workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7. * 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> #include <stdio.h>
...@@ -64,6 +64,10 @@ cash_in(const char *str) ...@@ -64,6 +64,10 @@ cash_in(const char *str)
csymbol; csymbol;
#ifdef USE_LOCALE #ifdef USE_LOCALE
#ifdef CASHDEBUG
setlocale(LC_ALL, "");
lconvert = localeconv();
#endif
if (lconvert == NULL) if (lconvert == NULL)
lconvert = localeconv(); lconvert = localeconv();
...@@ -85,6 +89,11 @@ cash_in(const char *str) ...@@ -85,6 +89,11 @@ cash_in(const char *str)
nsymbol = '-'; nsymbol = '-';
#endif #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 */ /* we need to add all sorts of checking here. For now just */
/* strip all leading whitespace and any leading dollar sign */ /* strip all leading whitespace and any leading dollar sign */
while (isspace(*s) || *s == csymbol) while (isspace(*s) || *s == csymbol)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment