On Tue, May 21, 2019 at 05:37:27AM +0100, Richard Ipsum wrote: > On Mon, May 20, 2019 at 07:06:04PM -0700, Michael Forney wrote: > > On 2019-05-20, Laslo Hunhold <d...@frign.de> wrote: > > > On Mon, 20 May 2019 09:36:32 +0100 > > > Richard Ipsum <richardip...@fastmail.co.uk> wrote: > > > > > > Dear Richard, > > > > > >> - weprintf("cmp: EOF on %s\n", > > >> argv[(b[0] != EOF)]); > > >> + fprintf(stderr, "cmp: EOF on %s\n", > > > > > > maybe I am missing something, but weprintf() already does print to > > > stderr. What does this patch change? > > > > weprintf also adds a prefix "%s: ", argv0, so we end up with a double prefix > > > > cmp: cmp: EOF on ... > > > > I think Richard is using fprintf directly since POSIX specifies that > > the message should be exactly > > > > "cmp: EOF on %s%s\n", <name of shorter file>, <additional info> > > > > which might not be the case if cmp is called by its absolute path. > > > > Exactly > > Thanks, > Richard >
Have you compared it to other implementations? I think it should output to stdout. I'd also prefer to use the exact line format because POSIX specifies it. I think many understand the difference between char and wchar anyway. -- Kind regards, Hiltjo