From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p02LguBb014544 for ; Sun, 2 Jan 2011 16:42:56 -0500 (EST) Received: from smtp-1.sys.kth.se (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 000AF15587F for ; Sun, 2 Jan 2011 22:42:50 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by smtp-1.sys.kth.se (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Q+dL5ojDx6+h for ; Sun, 2 Jan 2011 22:42:49 +0100 (CET) X-KTH-Auth: kristaps [85.8.61.101] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from h85-8-61-101.dynamic.se.alltele.net (h85-8-61-101.dynamic.se.alltele.net [85.8.61.101]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 7EFB2154129 for ; Sun, 2 Jan 2011 22:42:49 +0100 (CET) Message-ID: <4D20F159.1090500@bsd.lv> Date: Sun, 02 Jan 2011 22:42:49 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: Fwd: mandoc rendering of perl pod C<< >> References: <4D17CB61.3080106@bsd.lv> <20101227030415.GP23914@iris.usta.de> <20110101165211.GC23694@iris.usta.de> In-Reply-To: <20110101165211.GC23694@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> Andreas Voegele wrote: > >>> =head1 CONTRIBUTORS >>> >>> =over 4 >>> >>> =item Andrew Moore - C<< >> > >> The problem is that man_args() simply doesn't implement >> double-quote double escaping, so no wonder it doesn't work. >> >> I have recently implemented double-quote double escaping for roff(7) >> in roff_userdef(). The context is a bit different, and i'm not sure >> how disrupting it would be to the mdocml library concept to have >> a common utility function to be called both from libman and libroff; >> in the long run, we should definitely do that, but for now, i have >> just copied the code from roff.c to man_argv.c and adapted it to the >> slightly different needs over there. > > Kristaps liked my plan to move this to libmandoc, > so here we go. > > This patch (against OpenBSD) fixes the following bugs as well: > > * Escaped blanks (i.e. those preceded by an odd number of backslashes) > were mishandled as argument separators in unquoted arguments to > user-defined roff macros. > > * Escaped backslashes (i.e. pairs of backslashes) were not reduced > to single backslashes both in unquoted and quoted arguments both > to user-defined roff macros and to man macros. > > OK? Ok by me. Can you please add some documentation bits, if they don't already exist, in {mdoc,man}.7 that describe the quoting? > P.S. >> Oh, and i have a feeling libmdoc will probably suffer from the same >> bugs as well. Meh... > I don't attempt to fix mdoc(7) argument handling right now > because in mdoc_argv.c, basic argument handling (which probably > needs the same fixes applied here to roff(7) and man(7) is > intricately entangled with lots of unrelated high-level mdoc(7) > functionality, like delimiter handling and column list phrase > handling, to just name two examples. Ok, let's keep this for the future. Thanks, Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv