X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftable.h;h=1fe78d8e767ab2e69bd636a643cfb3737d76b439;hb=df1d194af32e35739355981252785e768f21ebb0;hp=a5d294a5167d1718b7ec4580b246657945ff7bc3;hpb=660d222c1c6e484e5887ac9920d095ea7aaa0e38;p=pspp diff --git a/src/output/table.h b/src/output/table.h index a5d294a516..1fe78d8e76 100644 --- a/src/output/table.h +++ b/src/output/table.h @@ -68,16 +68,16 @@ struct cell_color #define CELL_COLOR_WHITE CELL_COLOR (255, 255, 255) static inline bool -cell_color_equal (const struct cell_color *a, const struct cell_color *b) +cell_color_equal (const struct cell_color a, const struct cell_color b) { - return a->alpha == b->alpha && a->r == b->r && a->g == b->g && a->b == b->b; + return a.alpha == b.alpha && a.r == b.r && a.g == b.g && a.b == b.b; } void cell_color_dump (const struct cell_color *); enum table_stroke { - TABLE_STROKE_NONE, + TABLE_STROKE_NONE = 0, /* Must be zero. */ TABLE_STROKE_SOLID, TABLE_STROKE_DASHED, TABLE_STROKE_THICK, @@ -229,7 +229,8 @@ struct table /* Rules. */ unsigned char *rh; /* Horiz rules; unsigned char[nr+1][nc]. */ unsigned char *rv; /* Vert rules; unsigned char[nr][nc+1]. */ - struct cell_color *rule_colors[32]; + struct table_border_style *borders; + size_t n_borders; }; /* Reference counting. */ @@ -237,12 +238,6 @@ struct table *table_ref (const struct table *); void table_unref (struct table *); bool table_is_shared (const struct table *); -/* Rule masks. */ -#define TAB_RULE_TYPE_MASK 7 -#define TAB_RULE_TYPE_SHIFT 0 -#define TAB_RULE_STYLE_MASK (31 << TAB_RULE_STYLE_SHIFT) -#define TAB_RULE_STYLE_SHIFT 3 - /* Tables. */ struct table *table_create (int nc, int nr, int hl, int hr, int ht, int hb);