From 632038c8c98f1c408bb368edf910b849f186dc8a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 16 Jun 2009 19:13:28 +0000 Subject: Modernised comment handling: text following \" is thrown away before either parser is invoked. Single-dot lines correctly handled. This confirms with both new- and old-groff. "Comment" subsection added to mdoc.7 and man.7. --- mdoc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mdoc.c') diff --git a/mdoc.c b/mdoc.c index c1d07afa..3808f144 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.80 2009/06/15 10:36:01 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.81 2009/06/16 19:13:28 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -657,7 +657,7 @@ parsemacro(struct mdoc *m, int ln, char *buf) int i, c; char mac[5]; - /* Comments and empties are quickly ignored. */ + /* Empty lines are ignored. */ if (0 == buf[1]) return(1); @@ -671,10 +671,6 @@ parsemacro(struct mdoc *m, int ln, char *buf) return(perr(m, ln, 1, ESPACE)); } - if (buf[1] && '\\' == buf[1]) - if (buf[2] && '\"' == buf[2]) - return(1); - /* Copy the first word into a nil-terminated buffer. */ for (i = 1; i < 5; i++) { -- cgit v1.2.3