diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 15:31:00 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 15:31:00 +0000 |
commit | ed5e3c51cf000a55a9774ad85994aa7c35abc0df (patch) | |
tree | 3038b4cd4495d286fb7980c27cff8a70b29e27f5 /mandoc.h | |
parent | 8a26b665a342bbb1c095e7556e69d0995f952fe8 (diff) | |
download | mandoc-ed5e3c51cf000a55a9774ad85994aa7c35abc0df.tar.gz |
Clarify what members may be NULL or not in calculating widths. Make
sure signedness is correct. Verify that layouts MUST exit for data
cells.
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -200,7 +200,7 @@ enum tbl_cellt { struct tbl_cell { struct tbl_cell *next; enum tbl_cellt pos; - int spacing; + size_t spacing; int flags; #define TBL_CELL_TALIGN (1 << 0) /* t, T */ #define TBL_CELL_BALIGN (1 << 1) /* d, D */ @@ -222,12 +222,12 @@ struct tbl_row { }; enum tbl_datt { - TBL_DATA_NONE, - TBL_DATA_DATA, - TBL_DATA_HORIZ, - TBL_DATA_DHORIZ, - TBL_DATA_NHORIZ, - TBL_DATA_NDHORIZ + TBL_DATA_NONE, /* has no data */ + TBL_DATA_DATA, /* consists of data/string */ + TBL_DATA_HORIZ, /* horizontal line */ + TBL_DATA_DHORIZ, /* double-horizontal line */ + TBL_DATA_NHORIZ, /* squeezed horizontal line */ + TBL_DATA_NDHORIZ /* squeezed double-horizontal line */ }; /* @@ -235,10 +235,10 @@ enum tbl_datt { * string value that's in the cell. The rest is layout. */ struct tbl_dat { - struct tbl_cell *layout; /* layout cell: CAN BE NULL */ + struct tbl_cell *layout; /* layout cell */ int spans; /* how many spans follow */ struct tbl_dat *next; - char *string; + char *string; /* data (NULL if not TBL_DATA_DATA) */ enum tbl_datt pos; }; @@ -254,7 +254,7 @@ enum tbl_spant { struct tbl_span { struct tbl *tbl; struct tbl_head *head; - struct tbl_row *layout; /* layout row: CAN BE NULL */ + struct tbl_row *layout; /* layout row */ struct tbl_dat *first; struct tbl_dat *last; int flags; |