=================================================================== RCS file: /cvs/mandoc/Attic/macro.c,v retrieving revision 1.31 retrieving revision 1.33 diff -u -p -r1.31 -r1.33 --- mandoc/Attic/macro.c 2009/01/12 10:31:53 1.31 +++ mandoc/Attic/macro.c 2009/01/12 16:39:57 1.33 @@ -1,4 +1,4 @@ -/* $Id: macro.c,v 1.31 2009/01/12 10:31:53 kristaps Exp $ */ +/* $Id: macro.c,v 1.33 2009/01/12 16:39:57 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -93,7 +93,7 @@ rewind_elem(struct mdoc *mdoc, int tok) if (MDOC_ELEM != n->type) n = n->parent; assert(MDOC_ELEM == n->type); - assert(tok == n->data.elem.tok); + assert(tok == n->tok); return(rewind_last(mdoc, n)); } @@ -111,7 +111,7 @@ rewind_body(struct mdoc *mdoc, int tok) for (n = mdoc->last; n; n = n->parent) { if (MDOC_BODY != n->type) continue; - if (tok == (t = n->data.head.tok)) + if (tok == (t = n->tok)) break; if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags)) continue; @@ -135,7 +135,7 @@ rewind_head(struct mdoc *mdoc, int tok) for (n = mdoc->last; n; n = n->parent) { if (MDOC_HEAD != n->type) continue; - if (tok == (t = n->data.head.tok)) + if (tok == (t = n->tok)) break; if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags)) continue; @@ -159,7 +159,7 @@ rewind_expblock(struct mdoc *mdoc, int tok) for ( ; n; n = n->parent) { if (MDOC_BLOCK != n->type) continue; - if (tok == (t = n->data.block.tok)) + if (tok == (t = n->tok)) break; if (MDOC_NESTED & mdoc_macros[t].flags) continue; @@ -183,7 +183,7 @@ rewind_impblock(struct mdoc *mdoc, int tok) for ( ; n; n = n->parent) { if (MDOC_BLOCK != n->type) continue; - if (tok == (t = n->data.block.tok)) + if (tok == (t = n->tok)) break; if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags)) continue; @@ -479,7 +479,7 @@ macro_text(MACRO_PROT_ARGS) int macro_scoped(MACRO_PROT_ARGS) { - int c, lastarg, argc, j; + int c, lastarg, argc, j, fl; struct mdoc_arg argv[MDOC_LINEARG_MAX]; char *p; @@ -529,9 +529,13 @@ macro_scoped(MACRO_PROT_ARGS) return(0); mdoc->next = MDOC_NEXT_CHILD; + fl = ARGS_DELIM; + if (MDOC_TABSEP & mdoc_macros[tok].flags) + fl |= ARGS_TABSEP; + for (j = 0; j < MDOC_LINEARG_MAX; j++) { lastarg = *pos; - c = mdoc_args(mdoc, line, pos, buf, ARGS_DELIM, &p); + c = mdoc_args(mdoc, line, pos, buf, fl, &p); if (ARGS_ERROR == c) return(0);