bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug#146890: diff: cmp output different to documented behavior (fwd)


From: Paul Eggert
Subject: Re: Bug#146890: diff: cmp output different to documented behavior (fwd)
Date: Sun, 26 May 2002 03:23:18 -0700 (PDT)

> The version of cmp on other linux distributions has this same incorrect
> behavior or incorrect man page. The man pages all claim cmp complies with
> posix so I guess upstream should ensure they also comply.

The man page is incorrect; the program is correct.  POSIX requires
that the EOF message be sent to stderr, and that the "files differ"
message be sent to stdout.

In diffutils 2.8.1 the man page does not say anything about this
issue, so I assume that you're talking about a Debian man page.

> Personally I think it is important that the behavior be documented.

I agree.  I'll add the following text to the diffutils manual, and
it should appear in the next diffutils release.

-----

By default, @command{cmp} outputs nothing if the two files have the
same contents.  If one file is a prefix of the other, @command{cmp}
prints to standard error a message of the following form:

@example
cmp: EOF on @var{shorter-file}
@end example

Otherwise, @command{cmp} prints to standard output a message of the
following form:

@example
@var{from-file} @var{to-file} differ: char @var{byte-number}, line 
@var{line-number}
@end example

The message formats can differ outside the @acronym{POSIX} locale.
Also, @acronym{POSIX} allows the @acronym{EOF} message to be followed
by a blank and some additional information.



reply via email to

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