summaryrefslogtreecommitdiff
path: root/src/bin/psql/print.h
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2014-09-12 12:04:37 -0400
committerStephen Frost <sfrost@snowman.net>2014-09-12 12:04:37 -0400
commita2dabf0e1dda93c860b10bff7b73617e7b090108 (patch)
tree9f53e54cfd0537dae516d792504d467fa30d4ab2 /src/bin/psql/print.h
parent82962838d4bea2a20babbd2efacb48b268b4a689 (diff)
Add unicode_{column|header|border}_style to psql
With the unicode linestyle, this adds support to control if the column, header, or border style should be single or double line unicode characters. The default remains 'single'. In passing, clean up the border documentation and address some minor formatting/spelling issues. Pavel Stehule, with some additional changes by me.
Diffstat (limited to 'src/bin/psql/print.h')
-rw-r--r--src/bin/psql/print.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h
index 87b28562821..f668b232952 100644
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
@@ -68,6 +68,12 @@ typedef struct printTextFormat
* marks when border=0? */
} printTextFormat;
+typedef enum unicode_linestyle
+{
+ UNICODE_LINESTYLE_SINGLE = 0,
+ UNICODE_LINESTYLE_DOUBLE
+} unicode_linestyle;
+
struct separator
{
char *separator;
@@ -97,6 +103,9 @@ typedef struct printTableOpt
int encoding; /* character encoding */
int env_columns; /* $COLUMNS on psql start, 0 is unset */
int columns; /* target width for wrapped format */
+ unicode_linestyle unicode_border_linestyle;
+ unicode_linestyle unicode_column_linestyle;
+ unicode_linestyle unicode_header_linestyle;
} printTableOpt;
/*
@@ -178,6 +187,7 @@ extern void printQuery(const PGresult *result, const printQueryOpt *opt,
extern void setDecimalLocale(void);
extern const printTextFormat *get_line_style(const printTableOpt *opt);
+extern void refresh_utf8format(const printTableOpt *opt);
#ifndef __CYGWIN__
#define DEFAULT_PAGER "more"