summaryrefslogtreecommitdiffstats
path: root/libroff.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-29 16:44:23 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-29 16:44:23 +0000
commite51d77577562e615c4d649d25b45dad6b6e81ac1 (patch)
treee7a812b4c396352451fed757dfc926b729fdcf1e /libroff.h
parent20a8ad68cff60805c5af1a8fb2d0685e853faf5b (diff)
downloadmandoc-e51d77577562e615c4d649d25b45dad6b6e81ac1.tar.gz
Initial check-in of table data-row processing. For the time being, this
parses table data then throws it away immediately. It does not yet try to cross-check data rows against layout or anything. This copied more or less completely from tbl.bsd.lv.
Diffstat (limited to 'libroff.h')
-rw-r--r--libroff.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libroff.h b/libroff.h
index 05889954..3a7275c3 100644
--- a/libroff.h
+++ b/libroff.h
@@ -60,6 +60,24 @@ struct tbl_row {
struct tbl_cell *last;
};
+struct tbl_dat {
+ struct tbl_dat *next;
+ char *string;
+ int flags;
+#define TBL_DATA_HORIZ (1 << 0)
+#define TBL_DATA_DHORIZ (1 << 1)
+#define TBL_DATA_NHORIZ (1 << 2)
+#define TBL_DATA_NDHORIZ (1 << 3)
+};
+
+struct tbl_span {
+ struct tbl_dat *first;
+ struct tbl_dat *last;
+ int flags;
+#define TBL_SPAN_HORIZ (1 << 0)
+#define TBL_SPAN_DHORIZ (1 << 1)
+};
+
struct tbl {
mandocmsg msg; /* status messages */
void *data; /* privdata for messages */
@@ -90,6 +108,7 @@ void tbl_reset(struct tbl *);
enum rofferr tbl_read(struct tbl *, int, const char *, int);
int tbl_option(struct tbl *, int, const char *);
int tbl_layout(struct tbl *, int, const char *);
+struct tbl_span *tbl_data(struct tbl *, int, const char *);
__END_DECLS