From 714aba96fd529ec57c470e0900d829c1edb03af0 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 16 Nov 2014 15:46:05 +0100 Subject: [PATCH] distroquery: fix width tag in img entries and add some css classes --- src/distroquery.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/distroquery.c b/src/distroquery.c index f137c66..45a486b 100644 --- a/src/distroquery.c +++ b/src/distroquery.c @@ -1,7 +1,7 @@ /* * distroquery - tool for querying data generated by distromatic * - * Copyright (C) 2013 by Silvan Calarco + * Copyright (C) 2013-2014 by Silvan Calarco * * This program is free software; you can redistribute it and/or modify it under * the terms of version 2 of the GNU General Public License as published by the @@ -152,7 +152,7 @@ char *url_decode(char *str) { int sqlite3_find_column_id(sqlite3_stmt *stmt, const char* table, const char* name) { const char* colname; int id = 0; - + while ((colname = sqlite3_column_name(stmt, id))) { if (!strcmp(colname, name)) { if (table) { @@ -569,14 +569,14 @@ void printQueryResponse() { sqlite3_step(stmt1); get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX); if (query_compact) - printf("
"); + printf("
"); else printf("


"); printTagsLine(query_repositories[i]->arch[a], query_repositories[i]->tag, (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")), (const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "license"))); - printf("
 ", buffer); + printf("
 ", buffer); sqlite3_finalize(stmt1); } if (query_compact) { @@ -768,7 +768,7 @@ void printQueryResponse() { (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")), (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "license"))); - printf("
 ", buffer); + printf("
 ", buffer); if (query_compact) { printf("" @@ -996,10 +996,10 @@ void printSpecialQueryResponse() { get_favicon_from_url((const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX); if (is_update) { - printf(" ", + printf(" ", ct->configdefaults->url_dir, updates); } else { - printf(" ", ct->configdefaults->url_dir); + printf(" ", ct->configdefaults->url_dir); } buildtime = sqlite3_column_int(statement,sqlite3_find_column_id(statement, NULL, "buildtime")); @@ -1009,7 +1009,7 @@ void printSpecialQueryResponse() { simpleTimeToTemplate(buildtime,"%m/%d",&strdate); } - printf("%s  ", strdate, buffer); + printf("%s  ", strdate, buffer); printf("" "%s %s-%s", @@ -1020,7 +1020,7 @@ void printSpecialQueryResponse() { (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")), (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release"))); if (warning[0] != 0) { - printf("", + printf("", ct->configdefaults->url_dir, warning); } @@ -1098,7 +1098,7 @@ void printPackageData() { get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX); printf("

" - "

 " + "

 " "%s - %s

%s: %s-%s
URL: %s
%s: %s", buffer, (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")), @@ -1362,7 +1362,7 @@ void printSourcePackageData() { get_favicon_from_url((char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX); printf("

" - "

 " + "

 " "%s - %s

%s: %s-%s
URL: %s
Size: %s", buffer, (char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),