bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange warnings when building with uchardet


From: Eli Zaretskii
Subject: Re: Strange warnings when building with uchardet
Date: Sun, 30 Dec 2018 17:58:01 +0200

> From: Bertrand Garrigues <address@hidden>
> Cc: address@hidden
> Date: Sat, 29 Dec 2018 01:18:11 +0100
> 
> >        GROFF    doc/meref.ps
> >      troff: <standard input>:6: warning: macro 'NR' not defined
> >      troff: <standard input>:28: warning: macro 'TL' not defined
> [...]
> Presumably, the doc/meref.ps and doc/meintro.ps files are not correctly
> generated?

Yes.

> doc/meref.ps and doc/meintro.ps are generated with flag -k, which means
> that 'preconv' is used, and preconv is the program that will use
> uchardet if available.

I wasn't aware that preconv is involved, as the input is plain ASCII.
Thank you for pointing me in the right direction.  Just looking at
preconv.cpp, the problem is acutely evident: it calls 'fstat' and
'fseek' on stdin, which is non-portable when stdin is not a disk file.

> Could you please call:
> 
>   preconv -d doc/meref.ps > preconv_output.txt

I guess you meant doc/meref.me, the source file?  When I do that, I
see that the initial portion of the file is not written to the output,
because 'fseek' called after encoding detection fails.  This is, of
course, the direct cause of the warning messages: the part of the
input where the macros are defined is missing from the output.

> > Should I file a bug report?
> 
> Yes please,

Done, with a patch that fixes the problem for me.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]