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];