| From: | Roger Leigh <rleigh(at)debian(dot)org> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | Roger Leigh <rleigh(at)debian(dot)org> |
| Subject: | [PATCH 2/6] psql: Add table formats for ASCII and UTF-8 |
| Date: | 2009-08-22 15:59:46 |
| Message-ID: | 1250956790-18404-3-git-send-email-rleigh@debian.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Signed-off-by: Roger Leigh <rleigh(at)debian(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roger Leigh | 2009-08-22 15:59:47 | [PATCH 3/6] psql: Create table format |
| Previous Message | Roger Leigh | 2009-08-22 15:59:45 | [PATCH 1/6] psql: Abstract table formatting characters used for different line types. |