=================================================================== RCS file: /cvs/mandoc/eqn_parse.h,v retrieving revision 1.1 retrieving revision 1.4 diff -u -p -r1.1 -r1.4 --- mandoc/eqn_parse.h 2018/12/13 03:40:13 1.1 +++ mandoc/eqn_parse.h 2022/04/13 20:26:19 1.4 @@ -1,7 +1,7 @@ -/* $Id: eqn_parse.h,v 1.1 2018/12/13 03:40:13 schwarze Exp $ */ +/* $Id: eqn_parse.h,v 1.4 2022/04/13 20:26:19 schwarze Exp $ */ /* + * Copyright (c) 2014, 2017, 2018, 2022 Ingo Schwarze * Copyright (c) 2011 Kristaps Dzonsons - * Copyright (c) 2014, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -19,13 +19,11 @@ * For use in the roff(7) and eqn(7) parsers only. */ -struct mparse; struct roff_node; struct eqn_box; struct eqn_def; struct eqn_node { - struct mparse *parse; /* Main parser, for error reporting. */ struct roff_node *node; /* Syntax tree of this equation. */ struct eqn_def *defs; /* Array of definitions. */ char *data; /* Source code of this equation. */ @@ -34,6 +32,8 @@ struct eqn_node { size_t defsz; /* Number of definitions. */ size_t sz; /* Length of the source code. */ size_t toksz; /* Length of the current token. */ + int sublen; /* End of rightmost substitution, so far. */ + int subcnt; /* Number of recursive substitutions. */ int gsize; /* Default point size. */ int delim; /* In-line delimiters enabled. */ char odelim; /* In-line opening delimiter. */ @@ -41,7 +41,8 @@ struct eqn_node { }; -struct eqn_node *eqn_alloc(struct mparse *); +struct eqn_node *eqn_alloc(void); +struct eqn_box *eqn_box_new(void); void eqn_box_free(struct eqn_box *); void eqn_free(struct eqn_node *); void eqn_parse(struct eqn_node *);