/* $Id: mandoc.h,v 1.209 2016/01/08 02:53:13 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Status level. This refers to both internal status (i.e., whilst
* threshold of when to halt (when said internal state exceeds the
* threshold).
*/
enum mandoclevel {
MANDOCLEVEL_OK = 0,
};
/*
* All possible things that can go wrong within a parse, be it libroff,
* libmdoc, or libman.
*/
enum mandocerr {
/* related to the prologue */
/* related to document structure */
/* related to macros and nesting */
/* related to missing arguments */
/* related to bad arguments */
/* related to plain text */
/* related to tables */
/* related to tables */
/* related to document structure and macros */
/* related to request and macro arguments */
};
struct tbl_opts {
int opts;
};
enum tbl_cellt {
};
/*
* A cell in a layout row.
*/
struct tbl_cell {
int flags;
};
/*
* A layout row.
*/
struct tbl_row {
};
enum tbl_datt {
};
/*
* A cell within a row of data. The "string" field contains the actual
* string value that's in the cell. The rest is layout.
*/
struct tbl_dat {
};
enum tbl_spant {
};
/*
* A row of data in a table.
*/
struct tbl_span {
};
enum eqn_boxt {
};
enum eqn_fontt {
EQNFONT_NONE = 0,
};
enum eqn_post {
EQNPOS_NONE = 0,
};
enum eqn_pilet {
EQNPILE_NONE = 0,
};
/*
* A "box" is a parsed mathematical expression as defined by the eqn.7
* grammar.
*/
struct eqn_box {
};
/*
* An equation consists of a tree of expressions starting at a given
* line and position.
*/
struct eqn {
};
/*
* Parse options.
*/
enum mandoc_esc {
};
const char *, int, int, const char *);
struct mparse;
struct roff_man;
enum mandoc_esc mandoc_escape(const char **, const char **, int *);
void mchars_alloc(void);
void mchars_free(void);
int mchars_num2char(const char *, size_t);
const char *mchars_uc2str(int);
int mchars_num2uc(const char *, size_t);
int mchars_spec2cp(const char *, size_t);
void mparse_free(struct mparse *);
void mparse_keep(struct mparse *);
int mparse_open(struct mparse *, const char *);
const char *);
void mparse_reset(struct mparse *);
void mparse_result(struct mparse *,
struct roff_man **, char **);
const char *mparse_getkeep(const struct mparse *);
const char *mparse_strerror(enum mandocerr);
const char *mparse_strlevel(enum mandoclevel);