From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FckiF-0000BX-VC for mharc-grub-devel@gnu.org; Sun, 07 May 2006 10:58:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FckiE-00009m-71 for grub-devel@gnu.org; Sun, 07 May 2006 10:58:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FckiB-00009B-Va for grub-devel@gnu.org; Sun, 07 May 2006 10:58:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FckiB-000098-Qt for grub-devel@gnu.org; Sun, 07 May 2006 10:58:19 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fckio-0008Kt-NH for grub-devel@gnu.org; Sun, 07 May 2006 10:58:58 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 944103C92DEE7 for ; Sun, 7 May 2006 18:22:27 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 04F663C92DEE6 for ; Sun, 7 May 2006 18:22:27 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 7 May 2006 16:58:14 +0200 User-Agent: KMail/1.8.2 References: <200605070742.15975.okuji@enbug.org> <87lktenjvu.fsf@xs4all.nl> In-Reply-To: <87lktenjvu.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605071658.14644.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.000546, version=0.17.2 Subject: Re: script bug X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2006 14:58:22 -0000 On Sunday 07 May 2006 13:40, Marco Gerards wrote: > Yeah, the get_line was broken from the beginning... I think it should > be even possible to remove this function because we do not really need > it. I believe that get_line should be kept. Suppose that you have this kind of config file: 1: do something 2: do another thing 3: do yet another thing To execute these lines, it is not necessary to keep all the three lines in memory, since they can be executed line by line. You can say that the consumed memory is not that much, but I don't think this is a good way of programming. Whenever possible, I think it is better to save memory. BTW, could you describe how the scripting engine is supposed to work? For example, suppose that you have this (the syntax is not very important here): if test -f /boot/kernel; then kernel /boot/kernel fi Is it possible to tell a line at a time to the scripting engine, and let it execute this code block once "fi" is inputted? BASH deals with command lines in this way. Okuji