From owner-cvs-src-old@FreeBSD.ORG Thu Nov 26 19:08:46 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50C98106568B for ; Thu, 26 Nov 2009 19:08:46 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5C28FC17 for ; Thu, 26 Nov 2009 19:08:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAQJ8kqK011305 for ; Thu, 26 Nov 2009 19:08:46 GMT (envelope-from fanf@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAQJ8k8A011304 for cvs-src-old@freebsd.org; Thu, 26 Nov 2009 19:08:46 GMT (envelope-from fanf@repoman.freebsd.org) Message-Id: <200911261908.nAQJ8k8A011304@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to fanf@repoman.freebsd.org using -f From: Tony Finch Date: Thu, 26 Nov 2009 19:08:33 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/unifdef unifdefall.sh X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 19:08:46 -0000 fanf 2009-11-26 19:08:33 UTC FreeBSD src repository Modified files: usr.bin/unifdef unifdefall.sh Log: SVN rev 199842 on 2009-11-26 19:08:33Z by fanf unifdefall: optimise the loop that builds the unifdef command. The old code used a shell loop to convert each controlling macro definition into a command-line argument, reading the macro definitions file each time. The new code converts the list of controlling macros into a sed script which can run through the list of macro definitions in one go. Add some explanatory comments, since the code is quite meta. Use {} instead of () for redirecting a group of commands. Submitted by: Jonathan Nieder Revision Changes Path 1.5 +17 -9 src/usr.bin/unifdef/unifdefall.sh