From owner-cvs-all Wed Dec 18 12:50:46 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A45B37B401; Wed, 18 Dec 2002 12:50:45 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29D6943ED8; Wed, 18 Dec 2002 12:50:45 -0800 (PST) (envelope-from fanf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gBIKoimV007431; Wed, 18 Dec 2002 12:50:44 -0800 (PST) (envelope-from fanf@repoman.freebsd.org) Received: (from fanf@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gBIKoiZK007427; Wed, 18 Dec 2002 12:50:44 -0800 (PST) Message-Id: <200212182050.gBIKoiZK007427@repoman.freebsd.org> From: Tony Finch Date: Wed, 18 Dec 2002 12:50:44 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/unifdef unifdef.1 unifdef.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG fanf 2002/12/18 12:50:44 PST Modified files: usr.bin/unifdef unifdef.1 unifdef.c Log: Sync with up-stream version, including a number of bug-fixes: * The partial-evaluation of #elif sequences was broken and the spaghetti logic of its implementation was too hard to understand. I've re-done it using a straight-forward table-driven push-down automaton. * The pre-processor line parser did not allow for all of the weird places that people might put comments, which could have caused it to add syntax-errors to the output by removing a #if line containing the start- or end-marker of a comment. * The lexer didn't need to special-case the handling of string-literals or character-constants, but it did need to learn about line-continuations (backslash-newline). * The input routine was buggy and bit-rotten and trivially replacable with fgets(). I've also made the program static- and const-safe and improved the presentation-order. The formatting of the state-transition tables remains non-stylish. This commit-messsage was brought to you by code-point 45. MFC-after: one-week Revision Changes Path 1.17 +38 -14 src/usr.bin/unifdef/unifdef.1 1.12 +476 -594 src/usr.bin/unifdef/unifdef.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message