From owner-freebsd-hackers Wed Dec 11 12:17:46 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D7B137B401 for ; Wed, 11 Dec 2002 12:17:45 -0800 (PST) Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [193.201.200.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D0AC43EC5 for ; Wed, 11 Dec 2002 12:17:44 -0800 (PST) (envelope-from fanf@chiark.greenend.org.uk) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 18MDIa-0000Sf-00 (Debian); Wed, 11 Dec 2002 20:17:40 +0000 Date: Wed, 11 Dec 2002 20:17:40 +0000 From: Tony Finch To: Ian Dowse , Mark Murray , hackers@FreeBSD.org Cc: dot@dotat.at Subject: New version of unifdef(1) Message-ID: <20021211201740.D18609@chiark.greenend.org.uk> References: <200212101508.aa21707@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200212101508.aa21707@salmon.maths.tcd.ie>; from iedowse@maths.tcd.ie on Tue, Dec 10, 2002 at 03:08:06PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Following a bug spotted by Ian Dowse, I have hacked a bit more on unifdef(). This version has a much more ANSI-like lexical parser which should fix the zero byte in input problem as well as the handling of files that don't end with a newline. The bogus string parsing has been killed. The other main change is that the broken hand-coded #if processing state machine has been replaced with a table-driven one. I think I have all the state transitions right, but if people could bang on it a bit that would be good. The new code can be obtained from http://dotat.at/prog/misc/unifdef.c Tony. -- f.a.n.finch http://dotat.at/ MULL OF KINTYRE TO ARDNAMURCHAN POINT: EAST TO SOUTHEAST 5 LOCALLY 6. FAIR. GOOD. SLIGHT TO MODERATE. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message