[PATCH 2/6] psql: Add table formats for ASCII and UTF-8
Roger Leigh <rleigh@debian.org>
From: Roger Leigh <rleigh@debian.org>
To: pgsql-hackers@postgresql.org
Cc: Roger Leigh <rleigh@debian.org>
Date: 2009-08-22T15:59:46Z
Lists: pgsql-hackers
Signed-off-by: Roger Leigh <rleigh@debian.org>
---
src/bin/psql/print.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c
index 7505cd4..9dec77d 100644
--- a/src/bin/psql/print.c
+++ b/src/bin/psql/print.c
@@ -356,6 +356,30 @@ print_unaligned_vertical(const printTableContent *cont, FILE *fout)
/* Aligned text */
/********************/
+static const printTextFormat asciiformat =
+{
+ {
+ { "+", "+", "+" },
+ { "+", "+", "+" },
+ { "+", "+", "+" }
+ },
+ "-",
+ "|"
+};
+
+static const struct printTextFormat utf8format =
+{
+ {
+ /* , , */
+ { "\342\224\214", "\342\224\254", "\342\224\220" },
+ /* , , */
+ { "\342\224\234", "\342\224\274", "\342\224\244" },
+ /* , , */
+ { "\342\224\224", "\342\224\264", "\342\224\230" }
+ },
+ "\342\224\200", /* */
+ "\342\224\202" /* */
+};
/* draw "line" */
static void
--
1.6.3.3