=================================================================== RCS file: /cvs/mandoc/mdoc.h,v retrieving revision 1.125 retrieving revision 1.129 diff -u -p -r1.125 -r1.129 --- mandoc/mdoc.h 2013/12/24 19:11:45 1.125 +++ mandoc/mdoc.h 2014/04/20 16:46:05 1.129 @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.125 2013/12/24 19:11:45 schwarze Exp $ */ +/* $Id: mdoc.h,v 1.129 2014/04/20 16:46:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -140,6 +140,7 @@ enum mdoct { MDOC_sp, MDOC__U, MDOC_Ta, + MDOC_ll, MDOC_MAX }; @@ -186,7 +187,7 @@ enum mdoc_type { MDOC_ROOT }; -/* +/* * Section (named/unnamed) of `Sh'. Note that these appear in the * conventional order imposed by mdoc.7. In the case of SEC_NONE, no * section has been invoked (this shouldn't happen). SEC_CUSTOM refers @@ -198,6 +199,7 @@ enum mdoc_sec { SEC_LIBRARY, /* LIBRARY */ SEC_SYNOPSIS, /* SYNOPSIS */ SEC_DESCRIPTION, /* DESCRIPTION */ + SEC_CONTEXT, /* CONTEXT */ SEC_IMPLEMENTATION, /* IMPLEMENTATION NOTES */ SEC_RETURN_VALUES, /* RETURN VALUES */ SEC_ENVIRONMENT, /* ENVIRONMENT */ @@ -214,7 +216,7 @@ enum mdoc_sec { SEC_CAVEATS, /* CAVEATS */ SEC_BUGS, /* BUGS */ SEC_SECURITY, /* SECURITY */ - SEC_CUSTOM, + SEC_CUSTOM, SEC__MAX }; @@ -228,11 +230,11 @@ struct mdoc_meta { char *name; /* leading `Nm' name */ }; -/* - * An argument to a macro (multiple values = `-column xxx yyy'). +/* + * An argument to a macro (multiple values = `-column xxx yyy'). */ struct mdoc_argv { - enum mdocargt arg; /* type of argument */ + enum mdocargt arg; /* type of argument */ int line; int pos; size_t sz; /* elements in "value" */ @@ -244,7 +246,7 @@ struct mdoc_argv { * blocks have multiple instances of the same arguments spread across * the HEAD, BODY, TAIL, and BLOCK node types. */ -struct mdoc_arg { +struct mdoc_arg { size_t argc; struct mdoc_argv *argv; unsigned int refcnt; @@ -332,15 +334,15 @@ struct mdoc_rs { * provided, etc. */ union mdoc_data { - struct mdoc_an An; + struct mdoc_an An; struct mdoc_bd Bd; struct mdoc_bf Bf; struct mdoc_bl Bl; struct mdoc_rs Rs; }; -/* - * Single node in tree-linked AST. +/* + * Single node in tree-linked AST. */ struct mdoc_node { struct mdoc_node *parent; /* parent AST node */ @@ -389,6 +391,7 @@ struct mdoc; const struct mdoc_node *mdoc_node(const struct mdoc *); const struct mdoc_meta *mdoc_meta(const struct mdoc *); +void mdoc_deroff(char **, const struct mdoc_node *); __END_DECLS