From owner-cvs-src@FreeBSD.ORG Wed Mar 30 15:18:59 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C3A616A4CE; Wed, 30 Mar 2005 15:18:59 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4D7F43D3F; Wed, 30 Mar 2005 15:18:58 +0000 (GMT) (envelope-from harti@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j2UFIwhK042068; Wed, 30 Mar 2005 15:18:58 GMT (envelope-from harti@repoman.freebsd.org) Received: (from harti@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2UFIwtp042067; Wed, 30 Mar 2005 15:18:58 GMT (envelope-from harti) Message-Id: <200503301518.j2UFIwtp042067@repoman.freebsd.org> From: Hartmut Brandt Date: Wed, 30 Mar 2005 15:18:58 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/make cond.c cond.h globals.h parse.c parse.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 15:18:59 -0000 harti 2005-03-30 15:18:58 UTC FreeBSD src repository Modified files: usr.bin/make cond.c cond.h globals.h parse.c parse.h Log: Make the structure for handling the input stack local to the parse module. The only module accessing it (the current line number) was the condition module, so pass the current line number as a function argument. Centralize the pushing of new input sources into one function ParsePushInput() and rename the function handling the popping from ParseEOF() to ParsePopInput(). Make the entire thing a little bit clearer, by holding the current input source in the top element of the stack instead of using extra variables for this. Use a type-safe intrusive list for the input stack. Revision Changes Path 1.44 +1 -3 src/usr.bin/make/cond.c 1.2 +1 -1 src/usr.bin/make/cond.h 1.3 +0 -3 src/usr.bin/make/globals.h 1.91 +124 -143 src/usr.bin/make/parse.c 1.2 +1 -15 src/usr.bin/make/parse.h