Print this page
Update to 1.12.3.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mandoc/libroff.h
+++ new/usr/src/cmd/mandoc/libroff.h
1 -/* $Id: libroff.h,v 1.27 2011/07/25 15:37:00 kristaps Exp $ */
1 +/* $Id: libroff.h,v 1.28 2013/05/31 21:37:17 schwarze Exp $ */
2 2 /*
3 3 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 4 *
5 5 * Permission to use, copy, modify, and distribute this software for any
6 6 * purpose with or without fee is hereby granted, provided that the above
7 7 * copyright notice and this permission notice appear in all copies.
8 8 *
9 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16 */
17 17 #ifndef LIBROFF_H
18 18 #define LIBROFF_H
19 19
20 20 __BEGIN_DECLS
21 21
22 22 enum tbl_part {
23 23 TBL_PART_OPTS, /* in options (first line) */
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
24 24 TBL_PART_LAYOUT, /* describing layout */
25 25 TBL_PART_DATA, /* creating data rows */
26 26 TBL_PART_CDATA /* continue previous row */
27 27 };
28 28
29 29 struct tbl_node {
30 30 struct mparse *parse; /* parse point */
31 31 int pos; /* invocation column */
32 32 int line; /* invocation line */
33 33 enum tbl_part part;
34 - struct tbl opts;
34 + struct tbl_opts opts;
35 35 struct tbl_row *first_row;
36 36 struct tbl_row *last_row;
37 37 struct tbl_span *first_span;
38 38 struct tbl_span *current_span;
39 39 struct tbl_span *last_span;
40 40 struct tbl_head *first_head;
41 41 struct tbl_head *last_head;
42 42 struct tbl_node *next;
43 43 };
44 44
45 45 struct eqn_node {
46 46 struct eqn_def *defs;
47 47 size_t defsz;
48 48 char *data;
49 49 size_t rew;
50 50 size_t cur;
51 51 size_t sz;
52 52 int gsize;
53 53 struct eqn eqn;
54 54 struct mparse *parse;
55 55 struct eqn_node *next;
56 56 };
57 57
58 58 struct eqn_def {
59 59 char *key;
60 60 size_t keysz;
61 61 char *val;
62 62 size_t valsz;
63 63 };
64 64
65 65 struct tbl_node *tbl_alloc(int, int, struct mparse *);
66 66 void tbl_restart(int, int, struct tbl_node *);
67 67 void tbl_free(struct tbl_node *);
68 68 void tbl_reset(struct tbl_node *);
69 69 enum rofferr tbl_read(struct tbl_node *, int, const char *, int);
70 70 int tbl_option(struct tbl_node *, int, const char *);
71 71 int tbl_layout(struct tbl_node *, int, const char *);
72 72 int tbl_data(struct tbl_node *, int, const char *);
73 73 int tbl_cdata(struct tbl_node *, int, const char *);
74 74 const struct tbl_span *tbl_span(struct tbl_node *);
75 75 void tbl_end(struct tbl_node **);
76 76 struct eqn_node *eqn_alloc(const char *, int, int, struct mparse *);
77 77 enum rofferr eqn_end(struct eqn_node **);
78 78 void eqn_free(struct eqn_node *);
79 79 enum rofferr eqn_read(struct eqn_node **, int,
80 80 const char *, int, int *);
81 81
82 82 __END_DECLS
83 83
84 84 #endif /*LIBROFF_H*/
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX