[A] Added more symbols to border char set

This commit is contained in:
seleznevae
2018-11-02 16:00:58 +03:00
parent c45abff7c3
commit c89587b5aa
7 changed files with 248 additions and 74 deletions

View File

@@ -846,6 +846,8 @@ static void set_border_options_for_options(fort_table_options_t *options, const
BOR_CHARS[BL_bip] = BOR_CHARS[BV_bip] = BOR_CHARS[BR_bip] = border_chs->out_intersect_ch;
BOR_CHARS[II_bip] = border_chs->in_intersect_ch;
BOR_CHARS[LI_bip] = BOR_CHARS[TI_bip] = BOR_CHARS[RI_bip] = BOR_CHARS[BI_bip] = border_chs->in_intersect_ch;
// if (border_chs->separator_ch == '\0' && border_chs->in_intersect_ch == '\0') {
// BOR_CHARS[LH_bip] = BOR_CHARS[RH_bip] = '\0';
// }
@@ -864,6 +866,8 @@ static void set_border_options_for_options(fort_table_options_t *options, const
H_BOR_CHARS[BL_bip] = H_BOR_CHARS[BV_bip] = H_BOR_CHARS[BR_bip] = header_border_chs->out_intersect_ch;
H_BOR_CHARS[II_bip] = header_border_chs->in_intersect_ch;
H_BOR_CHARS[LI_bip] = H_BOR_CHARS[TI_bip] = H_BOR_CHARS[RI_bip] = H_BOR_CHARS[BI_bip] = header_border_chs->in_intersect_ch;
// if (header_border_chs->separator_ch == '\0' && header_border_chs->in_intersect_ch == '\0') {
// H_BOR_CHARS[LH_bip] = H_BOR_CHARS[RH_bip] = '\0';
// }

View File

@@ -214,14 +214,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"+", "-", "+", "+", \
"|", "|", "|", \
"\0", "\0", "\0", "\0", \
"+", "-", "+", "+" \
"+", "-", "+", "+", \
"+", "+", "+", "+", \
}, \
/* header_border_chars */ \
{ \
"+", "-", "+", "+", \
"|", "|", "|", \
"+", "-", "+", "+", \
"+", "-", "+", "+" \
"+", "-", "+", "+", \
"+", "+", "+", "+", \
}, \
/* separator_chars */ \
{ \
@@ -229,20 +231,22 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
}, \
}
#define BASIC2_STYLE { \
#define BASIC2_STYLE { \
/* border_chars */ \
{ \
"+", "-", "+", "+", \
"|", "|", "|", \
"+", "-", "+", "+", \
"+", "-", "+", "+" \
"+", "-", "+", "+", \
"+", "-", "+", "+", \
"+", "+", "+", "+", \
}, \
/* header_border_chars */ \
{ \
"+", "-", "+", "+", \
"|", "|", "|", \
"+", "-", "+", "+", \
"+", "-", "+", "+" \
"+", "-", "+", "+", \
"+", "+", "+", "+", \
}, \
/* separator_chars */ \
{ \
@@ -256,14 +260,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
" ", " ", " ", " ", \
" ", " ", " ", \
"\0", "\0", "\0", "\0", \
" ", " ", " ", " " \
" ", " ", " ", " ", \
" ", " ", " ", " ", \
}, \
/* header_border_chars */ \
{ \
" ", " ", " ", " ", \
" ", " ", " ", \
" ", "-", " ", " ", \
" ", " ", " ", " " \
" ", " ", " ", " ", \
" ", " ", " ", " ", \
}, \
/* separator_chars */ \
{ \
@@ -277,14 +283,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
" ", " ", " ", " ", \
" ", " ", " ", \
"\0", "\0", "\0", "\0", \
" ", " ", " ", " " \
" ", " ", " ", " ", \
" ", " ", " ", " ", \
}, \
/* header_border_chars */ \
{ \
" ", "-", "-", " ", \
" ", " ", " ", \
" ", "-", "-", " ", \
" ", "-", "-", " " \
" ", "-", "-", " ", \
" ", " ", " ", " ", \
}, \
/* separator_chars */ \
{ \
@@ -298,14 +306,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
".", ".", ".", ".", \
":", ":", ":", \
"\0", "\0", "\0", "\0", \
":", ".", ":", ":" \
":", ".", ":", ":", \
"+", "+", "+", "+", \
}, \
/* header_border_chars */ \
{ \
".", ".", ".", ".", \
":", ":", ":", \
":", ".", ":", ":", \
":", ".", ":", ":" \
":", ".", ":", ":", \
"+", "+", "+", "+", \
}, \
/* separator_chars */ \
{ \
@@ -319,14 +329,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
" ", " ", " ", " ", \
" ", " ", " ", \
"\0", "\0", "\0", "\0", \
" ", " ", " ", " " \
" ", " ", " ", " ", \
" ", " ", " ", " ", \
}, \
/* header_border_chars */ \
{ \
" ", " ", " ", " ", \
" ", " ", " ", \
"\0", "\0", "\0", "\0", \
" ", " ", " ", " " \
" ", " ", " ", " ", \
" ", " ", " ", " ", \
}, \
/* separator_chars */ \
{ \
@@ -335,20 +347,22 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
}
#define SOLID_STYLE { \
#define SOLID_STYLE { \
/* border_chars */ \
{ \
"┌", "─", "┬", "┐", \
"│", "│", "│", \
"", "", "", "", \
"└", "─", "┴", "╯" \
"└", "─", "┴", "╯", \
"┼", "┼", "┼", "┼", \
}, \
/* header_border_chars */ \
{ \
"┌", "─", "┬", "┐", \
"│", "│", "│", \
"├", "─", "┼", "┤", \
"└", "─", "┴", "┘" \
"└", "─", "┴", "┘", \
"┼", "┼", "┼", "┼", \
}, \
/* separator_chars */ \
{ \
@@ -362,14 +376,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"╭", "─", "┬", "╮", \
"│", "│", "│", \
"", "", "", "", \
"╰", "─", "┴", "╯" \
"╰", "─", "┴", "╯", \
"┼", "┼", "┼", "┼", \
}, \
/* header_border_chars */ \
{ \
"╭", "─", "┬", "╮", \
"│", "│", "│", \
"├", "─", "┼", "┤", \
"╰", "─", "┴", "╯" \
"╰", "─", "┴", "╯", \
"┼", "┼", "┼", "┼", \
}, \
/* separator_chars */ \
{ \
@@ -384,14 +400,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"╔", "═", "╦", "╗", \
"║", "║", "║", \
"", "", "", "", \
"╚", "═", "╩", "╝" \
"╚", "═", "╩", "╝", \
"┣", "┻", "┣", "┳", \
}, \
/* header_border_chars */ \
{ \
"╔", "═", "╦", "╗", \
"║", "║", "║", \
"╠", "═", "╬", "╣", \
"╚", "═", "╩", "╝" \
"╚", "═", "╩", "╝", \
"┣", "┻", "┣", "┳", \
}, \
/* separator_chars */ \
{ \
@@ -400,20 +418,22 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
}
#define DOUBLE2_STYLE { \
#define DOUBLE2_STYLE { \
/* border_chars */ \
{ \
"╔", "═", "╤", "╗", \
"║", "│", "║", \
"╟", "─", "┼", "╢", \
"╚", "═", "╧", "╝" \
"╚", "═", "╧", "╝", \
"├", "┬", "┤", "┴", \
}, \
/* header_border_chars */ \
{ \
"╔", "═", "╤", "╗", \
"║", "│", "║", \
"╠", "═", "╪", "╣", \
"╚", "═", "╧", "╝" \
"╚", "═", "╧", "╝", \
"├", "╤", "┤", "╧", \
}, \
/* separator_chars */ \
{ \
@@ -428,14 +448,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"┏", "━", "┳", "┓", \
"┃", "┃", "┃", \
"", "", "", "", \
"┗", "━", "┻", "┛" \
"┗", "━", "┻", "┛", \
"┣", "┻", "┣", "┳", \
}, \
/* header_border_chars */ \
{ \
"┏", "━", "┳", "┓", \
"┃", "┃", "┃", \
"┣", "━", "╋", "┫", \
"┗", "━", "┻", "┛" \
"┗", "━", "┻", "┛", \
"┣", "┻", "┣", "┳", \
}, \
/* separator_chars */ \
{ \
@@ -449,14 +471,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"┏", "━", "┯", "┓", \
"┃", "│", "┃", \
"┠", "─", "┼", "┨", \
"┗", "━", "┷", "┛" \
"┗", "━", "┷", "┛", \
"┣", "┻", "┣", "┳", \
}, \
/* header_border_chars */ \
{ \
"┏", "━", "┯", "┓", \
"┃", "│", "┃", \
"┣", "━", "┿", "┫", \
"┗", "━", "┷", "┛" \
"┗", "━", "┷", "┛", \
"┣", "┻", "┣", "┳", \
}, \
/* separator_chars */ \
{ \
@@ -470,14 +494,16 @@ fort_status_t set_default_cell_option(uint32_t option, int value)
"▛", "▀", "▀", "▜", \
"▌", "┃", "▐", \
"", "", "", "", \
"▙", "▄", "▄", "▟" \
"▙", "▄", "▄", "▟", \
"┣", "┻", "┣", "┳" \
}, \
/* header_border_chars */ \
{ \
"▛", "▀", "▀", "▜", \
"▌", "┃", "▐", \
"▌", "━", "╋", "▐", \
"▙", "▄", "▄", "▟" \
"▙", "▄", "▄", "▟", \
"┣", "┻", "┣", "┳", \
}, \
/* separator_chars */ \
{ \

View File

@@ -52,7 +52,25 @@ fort_status_t set_default_cell_option(uint32_t option, int value);
*****************************************************************************/
/*
* TL TT TT TT TV TT TT TT TV TB TB TB TR <----- TopSeparator
* TL TT TT TT TV TT TT TT TT TT TT TT TR
* LL IV RR
* LL IV RR
* LH IH IH IH II IH IH IH TI IH IH IH RH
* LL IV IV RR
* LL IV IV RR
* LL LI IH IH IH RI RH
* LL IV IV RR
* LL IV IV RR
* LH IH IH IH BI IH IH IH II IH IH IH RH
* LL IV RR
* LL IV RR
* BL BB BB BB BV BB BB BB BV BB BB BB BR
*/
/*
* TL TT TT TT TV TT TT TT TV TT TT TT TR <----- TopSeparator
* LL IV IV RR
* LH IH IH IH II IH IH IH II IH IH IH RH <----- InsideSeparator
* LL IV IV RR
@@ -85,6 +103,11 @@ enum BorderItemPos {
BV_bip = 13,
BR_bip = 14,
LI_bip = 15,
TI_bip = 16,
RI_bip = 17,
BI_bip = 18,
BorderItemPosSize
};

View File

@@ -306,8 +306,10 @@ int print_row_separator(char *buffer, size_t buffer_sz,
IV = &(*border_chars)[II_bip];
R = &(*border_chars)[RH_bip];
IT = &(*border_chars)[TV_bip];
IB = &(*border_chars)[BV_bip];
// IT = &(*border_chars)[TV_bip];
// IB = &(*border_chars)[BV_bip];
IT = &(*border_chars)[TI_bip];
IB = &(*border_chars)[BI_bip];
II = &(*border_chars)[IH_bip];
break;
case BottomSeparator:
@@ -479,8 +481,10 @@ int wprint_row_separator(wchar_t *buffer, size_t buffer_sz,
IV = &(*border_chars)[II_bip];
R = &(*border_chars)[RH_bip];
IT = &(*border_chars)[TV_bip];
IB = &(*border_chars)[BV_bip];
// IT = &(*border_chars)[TV_bip];
// IB = &(*border_chars)[BV_bip];
IT = &(*border_chars)[TI_bip];
IB = &(*border_chars)[BI_bip];
II = &(*border_chars)[IH_bip];
break;
case BottomSeparator: