[PATCH 1/6] psql: Abstract table formatting characters used for different line types.

Поиск
Список
Период
Сортировка
От Roger Leigh
Тема [PATCH 1/6] psql: Abstract table formatting characters used for different line types.
Дата
Msg-id 1250956790-18404-2-git-send-email-rleigh@debian.org
обсуждение исходный текст
Ответы [PATCH 2/6] psql: Add table formats for ASCII and UTF-8  (Roger Leigh <rleigh@debian.org>)
Список pgsql-hackers
printTextLineFormat describes the characters used to draw vertical
lines across a horizontal rule at the left side, middle and right hand
side. These are included in the formatting for an entire table
(printTextFormat).  The printTextRule enum is used as an offset into
the printTextFormat line rules (lrule), allowing specification of line
styles for the top, middle and bottom horizontal lines in a table.
The other printTextFormat members, hrule and vrule define the
formatting needed to draw horizontal and vertical rules.

Signed-off-by: Roger Leigh <rleigh@debian.org>
---src/bin/psql/print.h |   21 +++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h
index 55122d7..ffca5d4 100644
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
@@ -95,6 +95,27 @@ typedef struct printQueryOpt                                         * gettext on col i */}
printQueryOpt;
+typedef struct printTextLineFormat
+{
+    const char *leftvrule;
+    const char *midvrule;
+    const char *rightvrule;
+} printTextLineFormat;
+
+typedef struct printTextFormat
+{
+    printTextLineFormat    lrule[3];
+    const char        *hrule;
+    const char        *vrule;
+} printTextFormat;
+
+typedef enum printTextRule
+{
+    PRINT_RULE_TOP,
+    PRINT_RULE_MIDDLE,
+    PRINT_RULE_BOTTOM
+} printTextRule;
+extern FILE *PageOutput(int lines, unsigned short int pager);extern void ClosePager(FILE *pagerpipe);
-- 
1.6.3.3



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Index-only quals
Следующее
От: Roger Leigh
Дата:
Сообщение: Unicode UTF-8 table formatting for psql text output