From owner-cvs-all Wed May 15 9:30:38 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2A6C437B404; Wed, 15 May 2002 09:30:29 -0700 (PDT) Received: (from fanf@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4FGUTk62458; Wed, 15 May 2002 09:30:29 -0700 (PDT) (envelope-from fanf) Message-Id: <200205151630.g4FGUTk62458@freefall.freebsd.org> From: Tony Finch Date: Wed, 15 May 2002 09:30:29 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/unifdef Makefile unifdef.1 unifdef.c unifdefall.sh 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/05/15 09:30:29 PDT Modified files: usr.bin/unifdef Makefile unifdef.1 unifdef.c Added files: usr.bin/unifdef unifdefall.sh Log: Upgrade unifdef: * It now knows about the existence of #elif which would have caused it to produce incorrect results in some situations. * It can now process #if and #elif lines according to the values of symbols that are specified on the command line. The expression parser is only a simple subset of what C allows but it should be sufficient for most real-world code (it can cope with everything it finds in xterm). * It has an option for printing all of the symbols that might control #if processing. The unifdefall script uses this option along with cpp -dM to strip all #ifs from a file. * It has much larger static limits. * It handles nested #ifs much more completely. There have also been many style improvements: KNF; ANSI function definitions; all global stuff moved to the top of the file; use stdbool instead of h0h0bool; const-correctness; err(3) instead of fprintf(stderr, ...); enum instead of #define; commentary. I used NetBSD's unifdef as the basis of this since it has received the most attention over the years. PR: 37454 Reviewed by: markm, dwmalone Approved by: dwmalone (mentor) MFC after: 3 weeks Revision Changes Path 1.2 +5 -0 src/usr.bin/unifdef/Makefile 1.11 +131 -37 src/usr.bin/unifdef/unifdef.1 1.8 +839 -515 src/usr.bin/unifdef/unifdef.c 1.1 +29 -0 src/usr.bin/unifdef/unifdefall.sh (new) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message