[BACK]Return to libroff.h CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/libroff.h, Revision 1.43

1.43    ! schwarze    1: /*     $Id: libroff.h,v 1.42 2017/07/08 17:52:49 schwarze Exp $ */
1.1       kristaps    2: /*
1.43    ! schwarze    3:  * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
        !             4:  * Copyright (c) 2014, 2017 Ingo Schwarze <schwarze@openbsd.org>
1.1       kristaps    5:  *
                      6:  * Permission to use, copy, modify, and distribute this software for any
                      7:  * purpose with or without fee is hereby granted, provided that the above
                      8:  * copyright notice and this permission notice appear in all copies.
                      9:  *
                     10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     11:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     12:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     13:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     14:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     15:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     16:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     17:  */
                     18:
1.18      kristaps   19: struct eqn_node {
1.30      schwarze   20:        struct mparse    *parse;  /* main parser, for error reporting */
1.41      schwarze   21:        struct roff_node *node;   /* syntax tree of this equation */
1.30      schwarze   22:        struct eqn_def   *defs;   /* array of definitions */
                     23:        char             *data;   /* source code of this equation */
1.40      schwarze   24:        char             *start;  /* first byte of the current token */
                     25:        char             *end;    /* first byte of the next token */
1.30      schwarze   26:        size_t            defsz;  /* number of definitions */
                     27:        size_t            sz;     /* length of the source code */
1.40      schwarze   28:        size_t            toksz;  /* length of the current token */
1.30      schwarze   29:        int               gsize;  /* default point size */
                     30:        int               delim;  /* in-line delimiters enabled */
                     31:        char              odelim; /* in-line opening delimiter */
                     32:        char              cdelim; /* in-line closing delimiter */
1.18      kristaps   33: };
                     34:
1.23      kristaps   35: struct eqn_def {
                     36:        char             *key;
                     37:        size_t            keysz;
                     38:        char             *val;
                     39:        size_t            valsz;
                     40: };
1.33      schwarze   41:
1.23      kristaps   42:
1.41      schwarze   43: struct eqn_node        *eqn_alloc(struct mparse *);
                     44: void            eqn_box_free(struct eqn_box *);
1.18      kristaps   45: void            eqn_free(struct eqn_node *);
1.41      schwarze   46: void            eqn_parse(struct eqn_node *);
                     47: void            eqn_read(struct eqn_node *, const char *);
                     48: void            eqn_reset(struct eqn_node *);

CVSweb