From bc97905a156af70da8baedad2db48f8c38616d5e Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Thu, 10 Apr 1997 20:51:13 +0000 Subject: [PATCH] Finish removing the TEST_MAIN stuff, which was mean for standalone testing --- src/backend/utils/adt/cash.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index 9c58f1bc6a..5ef92c295b 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -11,6 +11,7 @@ A slightly modified version of this file and a discussion of the 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.3 1997/04/10 20:51:13 scrappy Exp $ */ #include @@ -271,32 +272,3 @@ cash_words_out(long value) *buf = toupper(*buf); return(buf); } - -#include - -#ifdef TEST_MAIN -int -main(void) -{ - char p[64], *q; - long v; /* the long value representing the amount */ - int d; /* number of decimal places - default 2 */ - - while (fgets(p, sizeof(p), stdin) != NULL) - { - if ((q = strchr(p, '\n')) != NULL) - *q = 0; - - for (q = p; *q && !isspace(*q); q++) - ; - - v = cash_in(p); - d = *q ? atoi(q) : 2; - - printf("%12.12s %10ld ", p, v); - printf("%12s %s\n", cash_out(v), cash_words_out(v)); - } - - return(0); -} -#endif /* TEST_MAIN */ -- 2.40.0