Change Details
b2/db.c |
168 | 168 | } |
169 | 169 | |
170 | 170 | |
| 171 | /* ----- Dumping ----------------------------------------------------------- */ |
| 172 | |
| 173 | |
171 | 174 | static void dump_stock(FILE *file, const struct stock *s) |
172 | 175 | { |
173 | 176 | const struct price *p; |
... | ... | |
199 | 202 | } |
200 | 203 | |
201 | 204 | |
| 205 | static gboolean dump_prm_traverse(gpointer key, gpointer value, gpointer data) |
| 206 | { |
| 207 | struct part *p = key; |
| 208 | FILE *file = data; |
| 209 | |
| 210 | (void) value; |
| 211 | part_dump(file, p); |
| 212 | return FALSE; |
| 213 | } |
| 214 | |
| 215 | |
| 216 | void parts_dump(FILE *file) |
| 217 | { |
| 218 | g_tree_foreach(tree, dump_prm_traverse, (void *) file); |
| 219 | } |
| 220 | |
| 221 | |
202 | 222 | /* ----- Currencies -------------------------------------------------------- */ |
203 | 223 | |
204 | 224 | |
b2/db.h |
98 | 98 | void part_finalize(struct part *part, const struct action *act); |
99 | 99 | void part_add_stock(struct part *part, struct stock *s); |
100 | 100 | void part_dump(FILE *file, const struct part *part); |
| 101 | void parts_dump(FILE *file); |
101 | 102 | |
102 | 103 | const struct currency *currency_lookup(const char *name); |
103 | 104 | double currency_convert(const struct currency *from, const struct currency *to, |
Download the corresponding diff file