Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: standard error codes Date: Thu, 12 Jan 2017 13:03:37 -0800 Organization: None to speak of Lines: 26 Message-ID: References: <96e16709-18eb-4399-86c4-a6f30a767df3@googlegroups.com> <11823fb6-613e-4283-95e8-dd930e152418@googlegroups.com> <546841f1-b478-44dc-abc0-22ca4f46e553@googlegroups.com> <87o9zdtgzo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="768745921b79448f5a531b86aeb60d71"; logging-data="31379"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+BxZwpoJXv2GmuDnP4Ui8" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:UhqWkIiZ7lLsXpa5l6n+jS6Ltrg= sha1:LrO31qOcFd+6b9yRIq/50vJXmlw= Xref: csiph.com comp.lang.c:101554 Richard Heathfield writes: [...] > Sure. But ALMOST without exception, when I call diff, I'm using it to > determine whether a difference exists between two files that I expect to > be the same. Thus, a difference would count as failure. No difference > would count as success, and by a happy coincidence 0 (success) is what > is returned when there is no difference between the two files. This is a > perfectly reasonable way to justify the choices that the diff writers > made... OK. I usually want to see how two files (often two versions of the same file) differ, and I usually expect them to differ. If all I care about is whether they differ or not, "cmp" is likely to be faster (perhaps not significantly so). [...] > Anyway... back to C? By all means. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"