From owner-cvs-all@FreeBSD.ORG Mon Apr 11 07:40:27 2005 Return-Path: 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 3AF6616A4CE; Mon, 11 Apr 2005 07:40:27 +0000 (GMT) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.194.102.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4665643D3F; Mon, 11 Apr 2005 07:40:26 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 45B54514FE; Mon, 11 Apr 2005 00:40:21 -0700 (PDT) Date: Mon, 11 Apr 2005 00:40:21 -0700 From: Kris Kennaway To: Hartmut Brandt Message-ID: <20050411074021.GA85675@xor.obsecurity.org> References: <200504110720.j3B7KAIx034955@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <200504110720.j3B7KAIx034955@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/make cond.c cond.h for.c for.h parse.c parse.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 07:40:27 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2005 at 07:20:10AM +0000, Hartmut Brandt wrote: > harti 2005-04-11 07:20:10 UTC >=20 > FreeBSD src repository >=20 > Modified files: > usr.bin/make cond.c cond.h for.c for.h parse.c parse.h=20 > Log: > Rework the directive parsing code. Instead of using a lot of strcmp()s > on every line that starts with a dot use a minimal perfect hash > function and a single strcmp() on the first word after the dot > to find out whether it is really a directive call and, if yes, which > one. Then directly dispatch to a handler function for that directive > (or fall through to the dependency handling code). This makes the > directive parse a little bit more strict about the syntax: the directive > word must be followed by a character that is not alphanumerical and not > an underline (making .undefFOO illegal); .endif and .else can only be > followed by comments. I assume you've tested that this doesn't cause problems for anything in the ports collection? Kris --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCWinkWry0BWjoQKURAsG+AKDCa8MAzW1GHrXfqY0udrsvj9XvdwCfXzaJ TU9QdUdBvkL1I5+K0FwzvwY= =6Bdl -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--