aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-10 15:31:00 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-10 15:31:00 +0000
commit8532b513ad046c8c7407add6f29b742c717bb60e (patch)
tree2588a006e07be8d5cf42947d412dfab7d92ac586 /mandoc.h
parentbf4bddcd274b710f5c5b77eb76f1d129507f43de (diff)
downloadmandoc-8532b513ad046c8c7407add6f29b742c717bb60e.tar.gz
mandoc-8532b513ad046c8c7407add6f29b742c717bb60e.tar.zst
mandoc-8532b513ad046c8c7407add6f29b742c717bb60e.zip
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.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/mandoc.h b/mandoc.h
index 260ce40a..e7c0e96a 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.50 2011/01/10 14:40:30 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.51 2011/01/10 15:31:00 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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;