From: Bruce Momjian Date: Tue, 7 Feb 2006 00:26:38 +0000 (+0000) Subject: Fix HTML alignment in PQprint. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0cdb5d0762397b8f415ed8b1ab5c3dbca425bc03;p=users%2Fbernd%2Fpostgres.git Fix HTML alignment in PQprint. Christoph Zwerschke --- diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 4286c77700..8fc0bde0cc 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -256,7 +256,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) { if (po->html3) fprintf(fout, - "\n", + "
%d
\n", po->tableOpt ? po->tableOpt : "", i); else fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i); @@ -276,12 +276,12 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) { if (po->caption) fprintf(fout, - "
%d
\n", + "
%s
\n", po->tableOpt ? po->tableOpt : "", po->caption); else fprintf(fout, - "
%s
" + "\n", po->tableOpt ? po->tableOpt : "", nTups, nFields); @@ -406,8 +406,8 @@ do_field(const PQprintOpt *po, const PGresult *res, { if (po->html3) fprintf(fout, - "" - "\n", + "" + "\n", fieldNames[j], fieldNotNum[j] ? "left" : "right", pval); @@ -502,7 +502,7 @@ do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax, if (po->html3) { - fprintf(fout, "", + fprintf(fout, "", fieldNotNum[j] ? "left" : "right", fieldNames[j]); } else @@ -546,7 +546,7 @@ output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields, char *p = fields[row_index * nFields + field_index]; if (po->html3) - fprintf(fout, "", + fprintf(fout, "", fieldNotNum[field_index] ? "left" : "right", p ? p : ""); else {
" "Retrieved %d rows * %d fields" "
%s%s
%s%s
%s%s%s%s