=================================================================== RCS file: /cvs/mandoc/mdoc.h,v retrieving revision 1.85 retrieving revision 1.92 diff -u -p -r1.85 -r1.92 --- mandoc/mdoc.h 2010/06/12 11:21:44 1.85 +++ mandoc/mdoc.h 2010/06/26 15:36:37 1.92 @@ -1,6 +1,6 @@ -/* $Id: mdoc.h,v 1.85 2010/06/12 11:21:44 kristaps Exp $ */ +/* $Id: mdoc.h,v 1.92 2010/06/26 15:36:37 kristaps Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -155,6 +155,7 @@ enum mdoct { /* What follows is a list of ALL possible macro arguments. */ +/* FIXME: make this into an enum. */ #define MDOC_Split 0 #define MDOC_Nosplit 1 #define MDOC_Ragged 2 @@ -273,11 +274,18 @@ enum mdoc_disp { }; struct mdoc_bd { - const char *offs; - enum mdoc_disp type; - int comp; + const char *offs; /* -offset */ + enum mdoc_disp type; /* -ragged, etc. */ + int comp; /* -compact */ }; +struct mdoc_bl { + const char *width; /* -width */ + const char *offs; /* -offset */ + enum mdoc_list type; /* -tag, -enum, etc. */ + int comp; /* -compact */ +}; + /* Node in AST. */ struct mdoc_node { struct mdoc_node *parent; /* parent AST node */ @@ -305,7 +313,7 @@ struct mdoc_node { char *string; /* TEXT */ union { - enum mdoc_list list; /* `Bl' nodes */ + struct mdoc_bl Bl; struct mdoc_bd Bd; } data; }; @@ -328,7 +336,9 @@ struct mdoc; void mdoc_free(struct mdoc *); struct mdoc *mdoc_alloc(void *, int, mandocmsg); void mdoc_reset(struct mdoc *); -int mdoc_parseln(struct mdoc *, int, char *, int); +int mdoc_parseln(struct mdoc *, + const struct regset *, + int, char *, int); const struct mdoc_node *mdoc_node(const struct mdoc *); const struct mdoc_meta *mdoc_meta(const struct mdoc *); int mdoc_endparse(struct mdoc *);