Skip to content

Commit bc97905

Browse files
committed
Finish removing the TEST_MAIN stuff, which was mean for standalone
testing
1 parent fac81b4 commit bc97905

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

src/backend/utils/adt/cash.c

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A slightly modified version of this file and a discussion of the
1111
workings can be found in the book "Software Solutions in C" by
1212
Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
1313
14+
$Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.3 1997/04/10 20:51:13 scrappy Exp $
1415
*/
1516

1617
#include <stdio.h>
@@ -271,32 +272,3 @@ cash_words_out(long value)
271272
*buf = toupper(*buf);
272273
return(buf);
273274
}
274-
275-
#include <stdlib.h>
276-
277-
#ifdef TEST_MAIN
278-
int
279-
main(void)
280-
{
281-
char p[64], *q;
282-
long v; /* the long value representing the amount */
283-
int d; /* number of decimal places - default 2 */
284-
285-
while (fgets(p, sizeof(p), stdin) != NULL)
286-
{
287-
if ((q = strchr(p, '\n')) != NULL)
288-
*q = 0;
289-
290-
for (q = p; *q && !isspace(*q); q++)
291-
;
292-
293-
v = cash_in(p);
294-
d = *q ? atoi(q) : 2;
295-
296-
printf("%12.12s %10ld ", p, v);
297-
printf("%12s %s\n", cash_out(v), cash_words_out(v));
298-
}
299-
300-
return(0);
301-
}
302-
#endif /* TEST_MAIN */

0 commit comments

Comments
 (0)