/* HomeBank -- Free, easy, personal accounting for everyone. * Copyright (C) 1995-2014 Maxime DOYEN * * This file is part of HomeBank. * * HomeBank is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * HomeBank is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "homebank.h" #include "hb-report.h" /****************************************************************************/ /* Debug macros */ /****************************************************************************/ #define MYDEBUG 0 #if MYDEBUG #define DB(x) (x); #else #define DB(x); #endif /* our global datas */ extern struct HomeBank *GLOBALS; /* = = = = = = = = = = = = = = = = = = = = */ /* CarCost */ CarCost *da_vehiclecost_malloc(void) { return g_malloc0(sizeof(CarCost)); } void da_vehiclecost_free(CarCost *item) { if(item != NULL) { g_free(item); } } void da_vehiclecost_destroy(GList *list) { GList *tmplist = g_list_first(list); while (tmplist != NULL) { CarCost *item = tmplist->data; da_vehiclecost_free(item); tmplist = g_list_next(tmplist); } g_list_free(list); }