=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.5 retrieving revision 1.7 diff -u -p -r1.5 -r1.7 --- mandoc/mdoc_macro.c 2009/03/31 13:50:19 1.5 +++ mandoc/mdoc_macro.c 2009/04/12 19:19:57 1.7 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.5 2009/03/31 13:50:19 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.7 2009/04/12 19:19:57 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -328,7 +328,7 @@ lookup(struct mdoc *mdoc, int line, int pos, int from, { int res; - res = mdoc_tokhash_find(mdoc->htab, p); + res = mdoc_hash_find(mdoc->htab, p); if (MDOC_PARSED & mdoc_macros[from].flags) return(res); if (MDOC_MAX == res) @@ -871,9 +871,11 @@ in_line(MACRO_PROT_ARGS) tok, arg)) return(0); mdoc->next = MDOC_NEXT_SIBLING; - } else if ( ! nc && 0 == cnt) + } else if ( ! nc && 0 == cnt) { + mdoc_argv_free(arg); if ( ! pwarn(mdoc, line, ppos, WIGNE)) return(0); + } c = mdoc_macro(mdoc, c, line, la, pos, buf); if (0 == c) return(0); @@ -924,9 +926,11 @@ in_line(MACRO_PROT_ARGS) if (0 == c) return(0); mdoc->next = MDOC_NEXT_SIBLING; - } else if ( ! nc && 0 == cnt) + } else if ( ! nc && 0 == cnt) { + mdoc_argv_free(arg); if ( ! pwarn(mdoc, line, ppos, WIGNE)) return(0); + } if (ppos > 1) return(1); @@ -1473,7 +1477,7 @@ phrase(struct mdoc *mdoc, int line, int ppos, char *bu */ c = quoted ? MDOC_MAX : - mdoc_tokhash_find(mdoc->htab, &buf[la]); + mdoc_hash_find(mdoc->htab, &buf[la]); if (MDOC_MAX != c) { if ( ! mdoc_macro(mdoc, c, line, la, &i, buf))