Re: [Groff] Strange error messages from Groff 1.22.3

2014-11-22 Thread Eli Zaretskii
> Date: Thu, 20 Nov 2014 19:47:19 +0100 (CET) > Cc: groff@gnu.org > From: Werner LEMBERG > > >> Sorry for the delayed answer. Your patch looks fine, and I'm going > >> to apply it soon. Thanks a lot. > > > > Great, thanks. Now I can publish the binary with that patch and > > claim that it was

Re: [Groff] Strange error messages from Groff 1.22.3

2014-11-22 Thread Werner LEMBERG
> Out of curiosity, why did you prefer this: > > +#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN__)) > +void normalize_for_lf (string &fn) > +{ > + int fnlen = fn.length(); > + for (int i = 0; i < fnlen; i++) { > +if (fn[i] == '\\') > + fn[i] = '/'; > +

Re: [Groff] Strange error messages from Groff 1.22.3

2014-11-22 Thread Eli Zaretskii
> Date: Sat, 22 Nov 2014 11:47:12 +0100 (CET) > Cc: groff@gnu.org > From: Werner LEMBERG > > With your version, I get a warning about an unused variable `fn' if > not compiling for MS. Got it, thanks.

Re: [Groff] Strange error messages from Groff 1.22.3

2014-11-22 Thread Keith Marshall
On 22/11/14 10:47, Werner LEMBERG wrote: > >> Out of curiosity, why did you prefer this: >> >> +#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN__)) >> +void normalize_for_lf (string &fn) >> +{ >> + int fnlen = fn.length(); >> + for (int i = 0; i < fnlen; i++) { >> +

Re: [Groff] condition: OR of two string comparisons

2014-11-22 Thread Ralph Corderoy
Hi Carsten, > (It was unfair to put the .ds after .if !\w and .if d ... :-) I didn't write it; it's real code from groff's distributed macros. :-) > > Whitespace aids grokking expressions. > > Are whitespace not already allowed in groff? Only if the whole expression is surrounded by paren

Re: [Groff] condition: OR of two string comparisons

2014-11-22 Thread Carsten Kunze
Hi Ralph, > > (It was unfair to put the .ds after .if !\w and .if d ... :-) > > I didn't write it; it's real code from groff's distributed macros. :-) I meant that there was the condition *and* the conditional statement on the same line which has made this example looking more complicated tha

Re: [Groff] Question about .substring

2014-11-22 Thread Steffen Nurpmeso
Ingo Schwarze wrote: |Steffen Nurpmeso wrote on Thu, Nov 20, 2014 at 11:45:04AM +0100: |> Ingo Schwarze wrote: |>> Steffen Nurpmeso wrote on Wed, Nov 19, 2014 at 06:09:08PM +0100: | |>>> For S-roff i will add a .substr request which takes an index and | |>> Please don't. That is completel

Re: [Groff] condition: OR of two string comparisons

2014-11-22 Thread Steffen Nurpmeso
Ralph Corderoy wrote: |I'm interested in better expressions, string and numeric. It's poor |string expressions that got us into this via 'c'a'b'c'd'e'. I'm wondering a bit since your current interim and part-time favorite Python supports ask-me-the-name-for-it sequences: elif o in ('-