[PATCH 2/6] psql: Add table formats for ASCII and UTF-8

Поиск
Список
Период
Сортировка
От Roger Leigh
Тема [PATCH 2/6] psql: Add table formats for ASCII and UTF-8
Дата
Msg-id 1250956790-18404-3-git-send-email-rleigh@debian.org
обсуждение исходный текст
Ответ на [PATCH 1/6] psql: Abstract table formatting characters used for different line types.  (Roger Leigh <rleigh@debian.org>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Roger Leigh
Дата:
Сообщение: [PATCH 9/9] psql: print_aligned_vertical: Correct indentation
Следующее
От: Roger Leigh
Дата:
Сообщение: [PATCH 8/9] psql: print_aligned_vertical_line: Correct alignment