]>
git.cameronkatri.com Git - mandoc.git/blob - eqn.h
1 /* $Id: eqn.h,v 1.1 2018/12/13 05:23:38 schwarze Exp $ */
3 * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * Public data types for eqn(7) syntax trees.
21 EQN_TEXT
, /* Text, e.g. number, variable, operator, ... */
22 EQN_SUBEXPR
, /* Nested eqn(7) subexpression. */
23 EQN_LIST
, /* List, for example in braces. */
24 EQN_PILE
, /* Vertical pile. */
25 EQN_MATRIX
/* List of columns. */
51 * A "box" is a parsed mathematical expression as defined by the eqn.7
55 struct eqn_box
*parent
;
58 struct eqn_box
*first
; /* First child node. */
59 struct eqn_box
*last
; /* Last child node. */
60 char *text
; /* Text (or NULL). */
61 char *left
; /* Left-hand fence. */
62 char *right
; /* Right-hand fence. */
63 char *top
; /* Symbol above. */
64 char *bottom
; /* Symbol below. */
65 size_t expectargs
; /* Maximal number of arguments. */
66 size_t args
; /* Actual number of arguments. */
67 int size
; /* Font size. */
68 #define EQN_DEFSIZE INT_MIN
69 enum eqn_boxt type
; /* Type of node. */
70 enum eqn_fontt font
; /* Font in this box. */
71 enum eqn_post pos
; /* Position of the next box. */