]> Dogcows Code - chaz/homebank/blob - src/hb-report.c
Merge branch 'upstream'
[chaz/homebank] / src / hb-report.c
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2016 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "homebank.h"
21 #include "hb-report.h"
22
23 /****************************************************************************/
24 /* Debug macros */
25 /****************************************************************************/
26 #define MYDEBUG 0
27
28 #if MYDEBUG
29 #define DB(x) (x);
30 #else
31 #define DB(x);
32 #endif
33
34 /* our global datas */
35 extern struct HomeBank *GLOBALS;
36
37
38
39 /* = = = = = = = = = = = = = = = = = = = = */
40 /* CarCost */
41
42 CarCost *da_vehiclecost_malloc(void)
43 {
44 return g_malloc0(sizeof(CarCost));
45 }
46
47 void da_vehiclecost_free(CarCost *item)
48 {
49 if(item != NULL)
50 {
51 g_free(item);
52 }
53 }
54
55 void da_vehiclecost_destroy(GList *list)
56 {
57 GList *tmplist = g_list_first(list);
58
59 while (tmplist != NULL)
60 {
61 CarCost *item = tmplist->data;
62 da_vehiclecost_free(item);
63 tmplist = g_list_next(tmplist);
64 }
65 g_list_free(list);
66 }
67
68
This page took 0.03329 seconds and 4 git commands to generate.