=================================================================== RCS file: /cvs/mandoc/term.h,v retrieving revision 1.5 retrieving revision 1.9 diff -u -p -r1.5 -r1.9 --- mandoc/term.h 2009/02/24 16:16:45 1.5 +++ mandoc/term.h 2009/02/25 15:12:26 1.9 @@ -1,4 +1,4 @@ -/* $Id: term.h,v 1.5 2009/02/24 16:16:45 kristaps Exp $ */ +/* $Id: term.h,v 1.9 2009/02/25 15:12:26 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -40,11 +40,30 @@ struct termp { char *buf; }; +struct termpair { + struct termpair *ppair; + int type; +#define TERMPAIR_FLAG (1 << 0) + int flag; + size_t offset; + size_t rmargin; + int count; +}; + +#define TERMPAIR_SETFLAG(p, fl) \ + do { \ + assert(! (TERMPAIR_FLAG & (p)->type)); \ + (p)->flag = (fl); \ + (p)->type |= TERMPAIR_FLAG; \ + } while (0) + struct termact { int (*pre)(struct termp *, + struct termpair *, const struct mdoc_meta *, const struct mdoc_node *); void (*post)(struct termp *, + struct termpair *, const struct mdoc_meta *, const struct mdoc_node *); };