99 * workings can be found in the book "Software Solutions in C" by
1010 * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
1111 *
12- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.17 1997/10/03 13:10 :06 thomas Exp $
12+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.18 1997/10/25 05:11 :06 thomas Exp $
1313 */
1414
1515#include <stdio.h>
@@ -64,6 +64,10 @@ cash_in(const char *str)
6464csymbol ;
6565
6666#ifdef USE_LOCALE
67+ #ifdef CASHDEBUG
68+ setlocale (LC_ALL ,"" );
69+ lconvert = localeconv ();
70+ #endif
6771if (lconvert == NULL )
6872lconvert = localeconv ();
6973
@@ -85,6 +89,11 @@ cash_in(const char *str)
8589nsymbol = '-' ;
8690#endif
8791
92+ #ifdef CASHDEBUG
93+ printf ("cashin- precision %d; decimal %c; thousands %c; currency %c; positive %c; negative %c\n" ,
94+ fpoint ,dsymbol ,ssymbol ,csymbol ,psymbol ,nsymbol );
95+ #endif
96+
8897/* we need to add all sorts of checking here. For now just */
8998/* strip all leading whitespace and any leading dollar sign */
9099while (isspace (* s )|| * s == csymbol )