From 0b20ee1ae342d058c3e78b46ba69335c80addfda Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 12 Jun 2010 10:09:19 +0000 Subject: Added enum mdoc_disp (similar to enum mdoc_list). Display types are now only calculated once in mdoc_validate.c. Noted that `Bd -file xxx' is not supported: it now raises a fatal warning. This is noted in mdoc.7. Empty `Bd' now defaults to LIST_ragged, which is not quite what groff does, but close enough (gross just throws away the `Bd' and gets upset when it encounters an `Ed'). --- mdoc.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mdoc.h') diff --git a/mdoc.h b/mdoc.h index 92d775b7..3027400b 100644 --- a/mdoc.h +++ b/mdoc.h @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.83 2010/05/31 10:28:04 kristaps Exp $ */ +/* $Id: mdoc.h,v 1.84 2010/06/12 10:09:19 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -263,6 +263,15 @@ enum mdoc_list { LIST_tag }; +enum mdoc_disp { + DISP__NONE = 0, + DISP_centred, + DISP_ragged, + DISP_unfilled, + DISP_filled, + DISP_literal +}; + /* Node in AST. */ struct mdoc_node { struct mdoc_node *parent; /* parent AST node */ @@ -290,7 +299,8 @@ struct mdoc_node { char *string; /* TEXT */ union { - enum mdoc_list list; /* for `Bl' nodes */ + enum mdoc_list list; /* `Bl' nodes */ + enum mdoc_disp disp; /* `Bd' nodes */ } data; }; -- cgit v1.2.3