Skip to content

Commit 8bf47f4

Browse files
committed
Fix HTML alignment in PQprint.
Christoph Zwerschke
1 parent 72153c0 commit 8bf47f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/interfaces/libpq/fe-print.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* didn't really belong there.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.65 2006/02/06 02:23:07 momjian Exp $
13+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.66 2006/02/07 00:26:15 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -256,7 +256,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
256256
{
257257
if (po->html3)
258258
fprintf(fout,
259-
"<table %s><caption align=high>%d</caption>\n",
259+
"<table %s><caption align=\"top\">%d</caption>\n",
260260
po->tableOpt ? po->tableOpt : "", i);
261261
else
262262
fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i);
@@ -276,12 +276,12 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
276276
{
277277
if (po->caption)
278278
fprintf(fout,
279-
"<table %s><caption align=high>%s</caption>\n",
279+
"<table %s><caption align=\"top\">%s</caption>\n",
280280
po->tableOpt ? po->tableOpt : "",
281281
po->caption);
282282
else
283283
fprintf(fout,
284-
"<table %s><caption align=high>"
284+
"<table %s><caption align=\"top\">"
285285
"Retrieved %d rows * %d fields"
286286
"</caption>\n",
287287
po->tableOpt ? po->tableOpt : "", nTups, nFields);
@@ -406,8 +406,8 @@ do_field(const PQprintOpt *po, const PGresult *res,
406406
{
407407
if (po->html3)
408408
fprintf(fout,
409-
"<tr><td align=left><b>%s</b></td>"
410-
"<td align=%s>%s</td></tr>\n",
409+
"<tr><td align=\"left\"><b>%s</b></td>"
410+
"<td align=\"%s\">%s</td></tr>\n",
411411
fieldNames[j],
412412
fieldNotNum[j] ? "left" : "right",
413413
pval);
@@ -502,7 +502,7 @@ do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
502502

503503
if (po->html3)
504504
{
505-
fprintf(fout, "<th align=%s>%s</th>",
505+
fprintf(fout, "<th align=\"%s\">%s</th>",
506506
fieldNotNum[j] ? "left" : "right", fieldNames[j]);
507507
}
508508
else
@@ -546,7 +546,7 @@ output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
546546
char *p = fields[row_index * nFields + field_index];
547547

548548
if (po->html3)
549-
fprintf(fout, "<td align=%s>%s</td>",
549+
fprintf(fout, "<td align=\"%s\">%s</td>",
550550
fieldNotNum[field_index] ? "left" : "right", p ? p : "");
551551
else
552552
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy