bug-texinfo
[Top][All Lists]
Advanced

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

Re: mingw-w64 CR handling


From: Eli Zaretskii
Subject: Re: mingw-w64 CR handling
Date: Sun, 23 Oct 2022 13:04:36 +0300

> From: Gavin Smith <gavinsmith0123@gmail.com>
> Date: Sun, 23 Oct 2022 10:52:19 +0100
> Cc: bug-texinfo@gnu.org, eliz@gnu.org
> 
> In info.c the file name is printed with a simple printf:
> 
>             printf ("%s\n", ref_list[i]->filename);
> 
> We don't deal with line endings or "text mode" at all here - just
> printing a string to stdout in the most straightforward way.

The default mode on MS-Windows is text mode, so the Windows runtime
converts \n into a CR-LF pair when it outputs the string.

> It appears that there is some disconnect between the compiler and
> grep on mingw-w64.

When running the test suite, Grep usually comes from MSYS, which is a
Cygwin fork, and those work like on Unix: they don't convert CR-LF to
newlines on input, like native Windows programs do.

> > A possible fix is to replace
> >   grep 't/infodir/file1.info$'
> > with
> >   tr -d '\r' | grep 't/infodir/file1.info$'
> > Then the test passes.
> > 
> 
> Yes but I'd rather not complicate the code to deal with <CR>s.

Would it be possible to use 't/infodir/file1.info\r\?$' instead?



reply via email to

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