[F] Fixed building

This commit is contained in:
seleznevae 2018-03-09 12:53:03 +03:00
parent 5cf1e0e207
commit da8072a8ef

View File

@ -154,10 +154,11 @@ int print_row_separator(char *buffer, size_t buffer_sz,
const char *IV = NULL; const char *IV = NULL;
const char *R = NULL; const char *R = NULL;
typedef const char (*border_chars_point_t)[BorderItemPosSize];
const char (*border_chars)[BorderItemPosSize] = NULL; const char (*border_chars)[BorderItemPosSize] = NULL;
border_chars = &context->table_options->border_chars; border_chars = (border_chars_point_t)&context->table_options->border_chars;
if (upper_row_type == Header || lower_row_type == Header) { if (upper_row_type == Header || lower_row_type == Header) {
border_chars = &context->table_options->header_border_chars; border_chars = (border_chars_point_t)&context->table_options->header_border_chars;
} }
if (sep && sep->enabled) { if (sep && sep->enabled) {
@ -259,10 +260,11 @@ int wprint_row_separator(wchar_t *buffer, size_t buffer_sz,
const char *IV = NULL; const char *IV = NULL;
const char *R = NULL; const char *R = NULL;
typedef const char (*border_chars_point_t)[BorderItemPosSize];
const char (*border_chars)[BorderItemPosSize] = NULL; const char (*border_chars)[BorderItemPosSize] = NULL;
border_chars = &context->table_options->border_chars; border_chars = (border_chars_point_t)&context->table_options->border_chars;
if (upper_row_type == Header || lower_row_type == Header) { if (upper_row_type == Header || lower_row_type == Header) {
border_chars = &context->table_options->header_border_chars; border_chars = (border_chars_point_t)&context->table_options->header_border_chars;
} }
@ -470,10 +472,11 @@ int snprintf_row(const fort_row_t *row, char *buffer, size_t buf_sz, size_t *col
* L data IV data IV data R * L data IV data IV data R
*/ */
typedef const char (*border_chars_point_t)[BorderItemPosSize];
enum RowType row_type = get_cell_opt_value_hierarcial(context->table_options, context->row, FT_ANY_COLUMN, FT_OPT_ROW_TYPE); enum RowType row_type = get_cell_opt_value_hierarcial(context->table_options, context->row, FT_ANY_COLUMN, FT_OPT_ROW_TYPE);
const char (*bord_chars)[BorderItemPosSize] = (row_type == Header) const char (*bord_chars)[BorderItemPosSize] = (row_type == Header)
? (&context->table_options->header_border_chars) ? (border_chars_point_t) (&context->table_options->header_border_chars)
: (&context->table_options->border_chars); : (border_chars_point_t) (&context->table_options->border_chars);
const char *L = &(*bord_chars)[LL_bip]; const char *L = &(*bord_chars)[LL_bip];
const char *IV = &(*bord_chars)[IV_bip]; const char *IV = &(*bord_chars)[IV_bip];
const char *R = &(*bord_chars)[RR_bip]; const char *R = &(*bord_chars)[RR_bip];
@ -528,10 +531,11 @@ int wsnprintf_row(const fort_row_t *row, wchar_t *buffer, size_t buf_sz, size_t
* L data IV data IV data R * L data IV data IV data R
*/ */
typedef const char (*border_chars_point_t)[BorderItemPosSize];
enum RowType row_type = get_cell_opt_value_hierarcial(context->table_options, context->row, FT_ANY_COLUMN, FT_OPT_ROW_TYPE); enum RowType row_type = get_cell_opt_value_hierarcial(context->table_options, context->row, FT_ANY_COLUMN, FT_OPT_ROW_TYPE);
const char (*bord_chars)[BorderItemPosSize] = (row_type) const char (*bord_chars)[BorderItemPosSize] = (row_type)
? (&context->table_options->header_border_chars) ? (border_chars_point_t) (&context->table_options->header_border_chars)
: (&context->table_options->border_chars); : (border_chars_point_t) (&context->table_options->border_chars);
const char *L = &(*bord_chars)[LL_bip]; const char *L = &(*bord_chars)[LL_bip];
const char *IV = &(*bord_chars)[IV_bip]; const char *IV = &(*bord_chars)[IV_bip];
const char *R = &(*bord_chars)[RR_bip]; const char *R = &(*bord_chars)[RR_bip];