X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_cgi.c;h=3fe7e183f264b787b90469fe87fa82178255af09;hb=3925c2e224943b71f22ad9805fcc394c8ba18f26;hp=b96e15aeb53340c14918184cbfe1bdfd26d0ea5d;hpb=a4e9deec494b308387b3f29b8ee8fc2aa934d4c2;p=collection4.git diff --git a/src/utils_cgi.c b/src/utils_cgi.c index b96e15a..3fe7e18 100644 --- a/src/utils_cgi.c +++ b/src/utils_cgi.c @@ -1,3 +1,28 @@ +/** + * collection4 - utils_cgi.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + * + * Authors: + * Florian octo Forster + **/ + +#include "config.h" + #include #include #include @@ -344,7 +369,7 @@ int param_set (param_list_t *pl, const char *name, /* {{{ */ return (0); } /* }}} int param_set */ -const char *param_as_string (param_list_t *pl) /* {{{ */ +char *param_as_string (param_list_t *pl) /* {{{ */ { char buffer[4096]; char key[2048]; @@ -549,7 +574,9 @@ int html_print_page (const char *title, /* {{{ */ { char *title_html; - printf ("Content-Type: text/html\n\n"); + printf ("Content-Type: text/html\n" + "X-Generator: "PACKAGE_STRING"\n" + "\n\n"); if (title == NULL) title = "c4: collection4 graph interface"; @@ -573,6 +600,8 @@ int html_print_page (const char *title, /* {{{ */ " "); if (cb->top_left != NULL) (*cb->top_left) (user_data); + else + html_print_logo (NULL); printf ("\n" " "); if (cb->top_center != NULL) @@ -614,6 +643,7 @@ int html_print_page (const char *title, /* {{{ */ printf ("\n" " \n" " \n" + "
"PACKAGE_STRING"
\n" " \n" "\n"); @@ -621,6 +651,16 @@ int html_print_page (const char *title, /* {{{ */ return (0); } /* }}} int html_print_page */ +int html_print_logo (__attribute__((unused)) void *user_data) /* {{{ */ +{ + printf ("\n" + "

c4

\n" + "
collection 4
\n" + "
\n"); + + return (0); +} /* }}} int html_print_search_box */ + int html_print_search_box (__attribute__((unused)) void *user_data) /* {{{ */ { char *term_html;