| 3567 | } |
| 3568 | |
| 3569 | void |
| 3570 | refresh_utf8format(const printTableOpt *opt) |
| 3571 | { |
| 3572 | printTextFormat *popt = &pg_utf8format; |
| 3573 | |
| 3574 | const unicodeStyleBorderFormat *border; |
| 3575 | const unicodeStyleRowFormat *header; |
| 3576 | const unicodeStyleColumnFormat *column; |
| 3577 | |
| 3578 | popt->name = "unicode"; |
| 3579 | |
| 3580 | border = &unicode_style.border_style[opt->unicode_border_linestyle]; |
| 3581 | header = &unicode_style.row_style[opt->unicode_header_linestyle]; |
| 3582 | column = &unicode_style.column_style[opt->unicode_column_linestyle]; |
| 3583 | |
| 3584 | popt->lrule[PRINT_RULE_TOP].hrule = border->horizontal; |
| 3585 | popt->lrule[PRINT_RULE_TOP].leftvrule = border->down_and_right; |
| 3586 | popt->lrule[PRINT_RULE_TOP].midvrule = column->down_and_horizontal[opt->unicode_border_linestyle]; |
| 3587 | popt->lrule[PRINT_RULE_TOP].rightvrule = border->down_and_left; |
| 3588 | |
| 3589 | popt->lrule[PRINT_RULE_MIDDLE].hrule = header->horizontal; |
| 3590 | popt->lrule[PRINT_RULE_MIDDLE].leftvrule = header->vertical_and_right[opt->unicode_border_linestyle]; |
| 3591 | popt->lrule[PRINT_RULE_MIDDLE].midvrule = column->vertical_and_horizontal[opt->unicode_header_linestyle]; |
| 3592 | popt->lrule[PRINT_RULE_MIDDLE].rightvrule = header->vertical_and_left[opt->unicode_border_linestyle]; |
| 3593 | |
| 3594 | popt->lrule[PRINT_RULE_BOTTOM].hrule = border->horizontal; |
| 3595 | popt->lrule[PRINT_RULE_BOTTOM].leftvrule = border->up_and_right; |
| 3596 | popt->lrule[PRINT_RULE_BOTTOM].midvrule = column->up_and_horizontal[opt->unicode_border_linestyle]; |
| 3597 | popt->lrule[PRINT_RULE_BOTTOM].rightvrule = border->left_and_right; |
| 3598 | |
| 3599 | /* N/A */ |
| 3600 | popt->lrule[PRINT_RULE_DATA].hrule = ""; |
| 3601 | popt->lrule[PRINT_RULE_DATA].leftvrule = border->vertical; |
| 3602 | popt->lrule[PRINT_RULE_DATA].midvrule = column->vertical; |
| 3603 | popt->lrule[PRINT_RULE_DATA].rightvrule = border->vertical; |
| 3604 | |
| 3605 | popt->midvrule_nl = column->vertical; |
| 3606 | popt->midvrule_wrap = column->vertical; |
| 3607 | popt->midvrule_blank = column->vertical; |
| 3608 | |
| 3609 | /* Same for all unicode today */ |
| 3610 | popt->header_nl_left = unicode_style.header_nl_left; |
| 3611 | popt->header_nl_right = unicode_style.header_nl_right; |
| 3612 | popt->nl_left = unicode_style.nl_left; |
| 3613 | popt->nl_right = unicode_style.nl_right; |
| 3614 | popt->wrap_left = unicode_style.wrap_left; |
| 3615 | popt->wrap_right = unicode_style.wrap_right; |
| 3616 | popt->wrap_right_border = unicode_style.wrap_right_border; |
| 3617 | } |
| 3618 | |
| 3619 | /* |
| 3620 | * Compute the byte distance to the end of the string or *target_width |