Commit bc97905a authored by Marc G. Fournier's avatar Marc G. Fournier

Finish removing the TEST_MAIN stuff, which was mean for standalone

testing
parent fac81b44
...@@ -11,6 +11,7 @@ A slightly modified version of this file and a discussion of the ...@@ -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 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.3 1997/04/10 20:51:13 scrappy Exp $
*/ */
#include <stdio.h> #include <stdio.h>
...@@ -271,32 +272,3 @@ cash_words_out(long value) ...@@ -271,32 +272,3 @@ cash_words_out(long value)
*buf = toupper(*buf); *buf = toupper(*buf);
return(buf); return(buf);
} }
#include <stdlib.h>
#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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment