Re: [Groff] [groff] 01/01: tmac/strip.sed: Explain operations.

2017-11-07 Thread Werner LEMBERG
>> Unfortunately, this is problematic. Portable sed scripts shouldn't >> have comments at all... Have a look into the `autoconf' manual >> (type `i sed RET') for limitations of `sed' on various platforms – >> maybe this is no longer of relevance today, but there are high >> chances that groff ge

Re: [Groff] problem with preconv and sample_docs.mom

2017-11-07 Thread James K. Lowden
On Sun, 05 Nov 2017 15:09:41 +0100 Bertrand Garrigues wrote: > + /* uchardet 0.0.1 could return an empty string instead of NULL */ > + if (charset && *charset) { > ret = (char *)calloc(strlen(charset) + 1, 1); > strcpy(ret, charset); >} As a logical matter, the calloc call should

Re: [Groff] [groff] 01/01: tmac/strip.sed: Explain operations.

2017-11-07 Thread G. Branden Robinson
At 2017-11-07T22:21:30+0100, Werner LEMBERG wrote: > > tmac/strip.sed: Explain operations. > > > > +# > > +# 1. Strip whitespace after a leading ".". > > ... > > Unfortunately, this is problematic. Portable sed scripts shouldn't > have comments at all... Have a look into the `autoconf' manua

Re: [Groff] [groff] 01/01: tmac/strip.sed: Explain operations.

2017-11-07 Thread Werner LEMBERG
> tmac/strip.sed: Explain operations. > > +# > +# 1. Strip whitespace after a leading ".". > ... Unfortunately, this is problematic. Portable sed scripts shouldn't have comments at all... Have a look into the `autoconf' manual (type `i sed RET') for limitations of `sed' on various platforms

Re: [Groff] Unintended impact of strip.sed on om.tmac-u?

2017-11-07 Thread Peter Schaffter
On Tue, Nov 07, 2017, G. Branden Robinson wrote: > Hi folks, > > I've been inspecting the operation of tmac/strip.sed, and > > I noticed that the following substitution: > > s/\([^/]\)doc-/\1/g > > has an impact outside what I presume is its intension to shorten mdoc > symbol names. It also

[Groff] Unintended impact of strip.sed on om.tmac-u?

2017-11-07 Thread G. Branden Robinson
Hi folks, I've been inspecting the operation of tmac/strip.sed, and I noticed that the following substitution: s/\([^/]\)doc-/\1/g has an impact outside what I presume is its intension to shorten mdoc symbol names. It also does this: diff -urN STOCK/om.tmac HACKED2/om.tmac --- STOCK/om.tmac

[Groff] [PATCH] groff_tmac(5): Discuss stripping macros.

2017-11-07 Thread G. Branden Robinson
Since the tmac-u discussion turned out to be a FAQ, I thought I'd do something about it. Comments and especially corrections welcome. My explanation of groff's input handling is partly based on Werner's explanation and partly guesswork. I confess I didn't attempt a deep comprehension of src/roff