=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.197 retrieving revision 1.201 diff -u -p -r1.197 -r1.201 --- mandoc/mdoc.c 2012/05/27 17:48:57 1.197 +++ mandoc/mdoc.c 2012/07/18 11:11:12 1.201 @@ -1,7 +1,7 @@ -/* $Id: mdoc.c,v 1.197 2012/05/27 17:48:57 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.201 2012/07/18 11:11:12 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010 Ingo Schwarze + * Copyright (c) 2010, 2012 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -302,7 +302,7 @@ mdoc_parseln(struct mdoc *m, int ln, char *buf, int of m->flags &= ~MDOC_SYNOPSIS; } - return(mandoc_getcontrol(buf, &offs) ? + return(roff_getcontrol(m->roff, buf, &offs) ? mdoc_pmacro(m, ln, buf, offs) : mdoc_ptext(m, ln, buf, offs)); } @@ -648,6 +648,14 @@ mdoc_node_delete(struct mdoc *m, struct mdoc_node *p) mdoc_node_free(p); } +int +mdoc_node_relink(struct mdoc *m, struct mdoc_node *p) +{ + + mdoc_node_unlink(m, p); + return(node_append(m, p)); +} + #if 0 /* * Pre-treat a text line. @@ -801,7 +809,8 @@ mdoc_ptext(struct mdoc *m, int line, char *buf, int of return(0); m->next = MDOC_NEXT_SIBLING; - return(1); + + return(mdoc_valid_post(m)); } if ( ! mdoc_word_alloc(m, line, offs, buf+offs)) @@ -981,7 +990,7 @@ mdoc_isdelim(const char *p) if (0 == strcmp(p + 1, ".")) return(DELIM_CLOSE); - if (0 == strcmp(p + 1, "*(Ba")) + if (0 == strcmp(p + 1, "fR|\\fP")) return(DELIM_MIDDLE); return(DELIM_NONE);