=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/read.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- src/usr.bin/mandoc/read.c 2014/09/06 22:38:35 1.59 +++ src/usr.bin/mandoc/read.c 2014/09/06 23:24:27 1.60 @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.59 2014/09/06 22:38:35 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.60 2014/09/06 23:24:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -63,9 +63,9 @@ int line; /* line number in the file */ }; +static void choose_parser(struct mparse *); static void resize_buf(struct buf *, size_t); static void mparse_buf_r(struct mparse *, struct buf, int); -static void pset(const char *, int, struct mparse *); static int read_whole_file(struct mparse *, const char *, int, struct buf *, int *); static void mparse_end(struct mparse *); @@ -241,20 +241,11 @@ } static void -pset(const char *buf, int pos, struct mparse *curp) +choose_parser(struct mparse *curp) { char *cp, *ep; int format; - int i; - if ('.' == buf[0] || '\'' == buf[0]) { - for (i = 1; buf[i]; i++) - if (' ' != buf[i] && '\t' != buf[i]) - break; - if ('\0' == buf[i]) - return; - } - /* * If neither command line arguments -mdoc or -man select * a parser nor the roff parser found a .Dd or .TH macro @@ -544,12 +535,10 @@ */ if ( ! (curp->man || curp->mdoc)) - pset(ln.buf + of, pos - of, curp); + choose_parser(curp); /* - * Lastly, push down into the parsers themselves. One - * of these will have already been set in the pset() - * routine. + * Lastly, push down into the parsers themselves. * If libroff returns ROFF_TBL, then add it to the * currently open parse. Since we only get here if * there does exist data (see tbl_data.c), we're