-enum mdoc_type {
- MDOC_TEXT,
- MDOC_ELEM,
- MDOC_HEAD,
- MDOC_TAIL,
- MDOC_BODY,
- MDOC_BLOCK,
- MDOC_TBL,
- MDOC_EQN,
- 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
- * to other sections.
- */
-enum mdoc_sec {
- SEC_NONE = 0,
- SEC_NAME, /* NAME */
- SEC_LIBRARY, /* LIBRARY */
- SEC_SYNOPSIS, /* SYNOPSIS */
- SEC_DESCRIPTION, /* DESCRIPTION */
- SEC_CONTEXT, /* CONTEXT */
- SEC_IMPLEMENTATION, /* IMPLEMENTATION NOTES */
- SEC_RETURN_VALUES, /* RETURN VALUES */
- SEC_ENVIRONMENT, /* ENVIRONMENT */
- SEC_FILES, /* FILES */
- SEC_EXIT_STATUS, /* EXIT STATUS */
- SEC_EXAMPLES, /* EXAMPLES */
- SEC_DIAGNOSTICS, /* DIAGNOSTICS */
- SEC_COMPATIBILITY, /* COMPATIBILITY */
- SEC_ERRORS, /* ERRORS */
- SEC_SEE_ALSO, /* SEE ALSO */
- SEC_STANDARDS, /* STANDARDS */
- SEC_HISTORY, /* HISTORY */
- SEC_AUTHORS, /* AUTHORS */
- SEC_CAVEATS, /* CAVEATS */
- SEC_BUGS, /* BUGS */
- SEC_SECURITY, /* SECURITY */
- SEC_CUSTOM,
- SEC__MAX
-};
-
-struct mdoc_meta {
- char *msec; /* `Dt' section (1, 3p, etc.) */
- char *vol; /* `Dt' volume (implied) */
- char *arch; /* `Dt' arch (i386, etc.) */
- char *date; /* `Dd' normalised date */
- char *title; /* `Dt' title (FOO, etc.) */
- char *os; /* `Os' system (OpenBSD, etc.) */
- char *name; /* leading `Nm' name */
-};
-
-/*
- * An argument to a macro (multiple values = `-column xxx yyy').