From owner-freebsd-standards Fri Feb 8 18:36: 3 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id EC7D137B419 for ; Fri, 8 Feb 2002 18:36:01 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g192VwW48852; Fri, 8 Feb 2002 21:31:58 -0500 (EST) (envelope-from mike) Date: Fri, 8 Feb 2002 21:31:58 -0500 From: Mike Barcroft To: "M. Warner Losh" Cc: standards@FreeBSD.ORG Subject: Re: diff problem Message-ID: <20020208213158.D73757@espresso.q9media.com> References: <20020208.183640.89249665.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020208.183640.89249665.imp@village.org>; from imp@village.org on Fri, Feb 08, 2002 at 06:36:40PM -0700 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG M. Warner Losh writes: > We have a problem with out diff. Given file foo1 and foo2. foo1 has > a newline at the end, while foo2 doesn't. Diff produces: > > % diff -c ~/foo[12] > *** /dell/imp/foo1 Fri Feb 8 18:05:26 2002 > --- /dell/imp/foo2 Fri Feb 8 18:05:31 2002 > *************** > *** 1 **** > ! this is a test > --- 1 ---- > ! this is a test > % > > It should produce a warning about no newline at the end of the file, > but doesn't. At least that's my take. What do standards have to say? SUSv3 doesn't specificly mention this case. Since text files always end with a newline, I think we should treat these types of files the same way we do binary files. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message