X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fhtml.c;h=b2e9e340e7e9cebbf9030eefb47aeafe05d4105c;hb=cb642aa184b4975dceb8cb596a3285d0e3a91e55;hp=b3f61757d731f7df065883de193d6e8e1bedc29c;hpb=5fd162d56d63c2c2829db25f88574962797efe87;p=ppastats.git diff --git a/src/html.c b/src/html.c index b3f6175..b2e9e34 100644 --- a/src/html.c +++ b/src/html.c @@ -1,21 +1,24 @@ /* - 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 +#define _(String) gettext(String) #include #include @@ -28,32 +31,14 @@ #include "html.h" #include "io.h" +#include "log.h" #include "lp.h" #include "lp_ws.h" #include "ppastats.h" -#define HTML_FOOTER \ -"
Generated by \ -ppastats
\n\ - \n\ -" - -#define HTML_PKG_TEMPLATE \ -"

N/A

\n\ -
\n\ -
\n\ -
\n\ -
\n\ -
\n\ - PPA: \n\ - \n\ - N/A/\n\ - N/A\n\ - \n\ -\n\ -
Distros:
\n\ -
Versions:
\n\ -
" +static char *footer; +static char *ppa_body; +static char *pkg_body; #define HTML_VERSION_TEMPLATE \ "\n\ @@ -65,6 +50,10 @@ \n\ \n\ +\n\ \n\ \n\ @@ -90,8 +79,7 @@ Distros:\n\
    \n\ \n\ - \n\ -%s" + \n" #define HTML_HEADER \ "\n\ @@ -105,6 +93,10 @@ rel=\"stylesheet\"/>\n\ \n\ +\n\ \n\