]> granicus.if.org Git - postgresql/blob - src/include/utils/cash.h
Another PGINDENT run that changes variable indenting and case label indenting. Also...
[postgresql] / src / include / utils / cash.h
1 /*
2  * cash.h
3  * Written by D'Arcy J.M. Cain
4  *
5  * Functions to allow input and output of money normally but store
6  *      and handle it as int4.
7  */
8
9 #ifndef CASH_H
10 #define CASH_H
11
12 /* if we store this as 4 bytes, we better make it int, not long, bjm */
13 typedef signed int Cash;
14
15 extern const char *cash_out(Cash * value);
16 extern Cash *cash_in(const char *str);
17
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);
24
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);
29
30 extern Cash *cashlarger(Cash * c1, Cash * c2);
31 extern Cash *cashsmaller(Cash * c1, Cash * c2);
32
33 extern const char *cash_words_out(Cash * value);
34
35 #endif                                                  /* CASH_H */