=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.71 retrieving revision 1.74 diff -u -p -r1.71 -r1.74 --- mandoc/term.c 2009/03/31 13:50:19 1.71 +++ mandoc/term.c 2009/04/12 19:45:26 1.74 @@ -1,20 +1,18 @@ -/* $Id: term.c,v 1.71 2009/03/31 13:50:19 kristaps Exp $ */ +/* $Id: term.c,v 1.74 2009/04/12 19:45:26 kristaps Exp $ */ /* * 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 copyright notice and this permission notice appear in all - * copies. + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include @@ -54,22 +52,28 @@ ascii_alloc(void) int -terminal_run(void *arg, const struct man *man, - const struct mdoc *mdoc) +terminal_man(void *arg, const struct man *man) { struct termp *p; p = (struct termp *)arg; - if (NULL == p->symtab) p->symtab = term_ascii2htab(); - if (man) - return(man_run(p, man)); - if (mdoc) - return(mdoc_run(p, mdoc)); + return(man_run(p, man)); +} - return(1); + +int +terminal_mdoc(void *arg, const struct mdoc *mdoc) +{ + struct termp *p; + + p = (struct termp *)arg; + if (NULL == p->symtab) + p->symtab = term_ascii2htab(); + + return(mdoc_run(p, mdoc)); }