X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flp.c;h=b8c24f17f98e5e4faa121b812a3fd4bb224385d4;hb=60892f2ef45fa1ee656e1a00cac0578f9d6f9536;hp=adb1e2b162ce34c60e63c6260f403851cf5cfbc3;hpb=05efb0b6dfba33b3dc441b4bbb795d056d404399;p=ppastats.git diff --git a/src/lp.c b/src/lp.c index adb1e2b..b8c24f1 100644 --- a/src/lp.c +++ b/src/lp.c @@ -1,22 +1,21 @@ /* - Copyright (C) 2011 jeanfi@gmail.com - - This program 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. - - This program 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - + * Copyright (C) 2011-2012 jeanfi@gmail.com + * + * This program 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. + * + * This program 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #include #include @@ -53,9 +52,7 @@ void distro_series_free(struct distro_series *d) } } -void -binary_package_publishing_history_free \ -(struct binary_package_publishing_history *b) +void bpph_free(struct bpph *b) { if (b) { free(b->binary_package_name); @@ -66,32 +63,31 @@ binary_package_publishing_history_free \ } } -struct binary_package_publishing_history * -binary_package_publishing_history_new(const char *binary_package_name, - const char *binary_package_version, - const char *distro_arch_series_link, - const char *self_link) +struct bpph *bpph_new(const char *binary_package_name, + const char *binary_package_version, + const char *distro_arch_series_link, + const char *self_link, + int architecture_specific) { - struct binary_package_publishing_history *b; + struct bpph *h; - b = malloc(sizeof(struct binary_package_publishing_history)); + h = malloc(sizeof(struct bpph)); - b->binary_package_name = strdup(binary_package_name); - b->binary_package_version = strdup(binary_package_version); - b->distro_arch_series_link = strdup(distro_arch_series_link); - b->self_link = strdup(self_link); + h->binary_package_name = strdup(binary_package_name); + h->binary_package_version = strdup(binary_package_version); + h->distro_arch_series_link = strdup(distro_arch_series_link); + h->self_link = strdup(self_link); + h->architecture_specific = architecture_specific; - return b; + return h; } -void -binary_package_publishing_history_list_free\ -(struct binary_package_publishing_history **list) +void bpph_list_free(struct bpph **list) { - struct binary_package_publishing_history **l_cur = list; + struct bpph **l_cur = list; while (*l_cur) { - binary_package_publishing_history_free(*l_cur); + bpph_free(*l_cur); l_cur++; }