[PATCH 1/6] psql: Abstract table formatting characters used for different line types. - Mailing list pgsql-hackers

From Roger Leigh
Subject [PATCH 1/6] psql: Abstract table formatting characters used for different line types.
Date
Msg-id 1250956790-18404-2-git-send-email-rleigh@debian.org
Whole thread Raw
Responses [PATCH 2/6] psql: Add table formats for ASCII and UTF-8  (Roger Leigh <rleigh@debian.org>)
List 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 by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Index-only quals
Next
From: Roger Leigh
Date:
Subject: Unicode UTF-8 table formatting for psql text output