3 * Written by D'Arcy J.M. Cain
5 * Functions to allow input and output of money normally but store
6 * and handle it as int4.
12 /* if we store this as 4 bytes, we better make it int, not long, bjm */
13 typedef signed int Cash;
15 extern const char *cash_out(Cash * value);
16 extern Cash *cash_in(const char *str);
18 extern bool cash_eq(Cash * c1, Cash * c2);
19 extern bool cash_ne(Cash * c1, Cash * c2);
20 extern bool cash_lt(Cash * c1, Cash * c2);
21 extern bool cash_le(Cash * c1, Cash * c2);
22 extern bool cash_gt(Cash * c1, Cash * c2);
23 extern bool cash_ge(Cash * c1, Cash * c2);
25 extern Cash *cash_pl(Cash * c1, Cash * c2);
26 extern Cash *cash_mi(Cash * c1, Cash * c2);
27 extern Cash *cash_mul(Cash * c, float8 * f);
28 extern Cash *cash_div(Cash * c, float8 * f);
30 extern Cash *cashlarger(Cash * c1, Cash * c2);
31 extern Cash *cashsmaller(Cash * c1, Cash * c2);
33 extern const char *cash_words_out(Cash * value);