From da8072a8ef0c37c9c1b04b851e31fe18cbd996f9 Mon Sep 17 00:00:00 2001 From: seleznevae Date: Fri, 9 Mar 2018 12:53:03 +0300 Subject: [PATCH] [F] Fixed building --- src/row.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/row.c b/src/row.c index 642621f..c6c4699 100644 --- a/src/row.c +++ b/src/row.c @@ -154,10 +154,11 @@ int print_row_separator(char *buffer, size_t buffer_sz, const char *IV = NULL; const char *R = NULL; + typedef const char (*border_chars_point_t)[BorderItemPosSize]; 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) { - border_chars = &context->table_options->header_border_chars; + border_chars = (border_chars_point_t)&context->table_options->header_border_chars; } 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 *R = NULL; + typedef const char (*border_chars_point_t)[BorderItemPosSize]; 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) { - 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 */ + 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); const char (*bord_chars)[BorderItemPosSize] = (row_type == Header) - ? (&context->table_options->header_border_chars) - : (&context->table_options->border_chars); + ? (border_chars_point_t) (&context->table_options->header_border_chars) + : (border_chars_point_t) (&context->table_options->border_chars); const char *L = &(*bord_chars)[LL_bip]; const char *IV = &(*bord_chars)[IV_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 */ + 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); const char (*bord_chars)[BorderItemPosSize] = (row_type) - ? (&context->table_options->header_border_chars) - : (&context->table_options->border_chars); + ? (border_chars_point_t) (&context->table_options->header_border_chars) + : (border_chars_point_t) (&context->table_options->border_chars); const char *L = &(*bord_chars)[LL_bip]; const char *IV = &(*bord_chars)[IV_bip]; const char *R = &(*bord_chars)[RR_bip];