Skip to content

Commit 4677f0a

Browse files
author
Thomas G. Lockhart
committed
Add debugging statement enabled by CASHDEBUG symbol definition.
1 parent 3eb1bc6 commit 4677f0a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/backend/utils/adt/cash.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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)
6464
csymbol;
6565

6666
#ifdef USE_LOCALE
67+
#ifdef CASHDEBUG
68+
setlocale(LC_ALL, "");
69+
lconvert = localeconv();
70+
#endif
6771
if (lconvert == NULL)
6872
lconvert = localeconv();
6973

@@ -85,6 +89,11 @@ cash_in(const char *str)
8589
nsymbol = '-';
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 */
9099
while (isspace(*s) || *s == csymbol)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy