From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IH1OE-0002m9-QU for mharc-grub-devel@gnu.org; Fri, 03 Aug 2007 13:56:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IH1OC-0002m1-E6 for grub-devel@gnu.org; Fri, 03 Aug 2007 13:56:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IH1O5-0002kE-VW for grub-devel@gnu.org; Fri, 03 Aug 2007 13:56:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IH1O5-0002kB-P9 for grub-devel@gnu.org; Fri, 03 Aug 2007 13:56:33 -0400 Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IH1O3-0000y2-Qk for grub-devel@gnu.org; Fri, 03 Aug 2007 13:56:32 -0400 Received: by ug-out-1314.google.com with SMTP id 34so594140ugf for ; Fri, 03 Aug 2007 10:55:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=glXi18wcFsDjDwVSar4tDHCVHYpDDHizqvrMKnKFv8ASOpBdBhmAxQ5o74VvleuMqjqLPcqzZa66YeB4POdmcTX6mLMklgCDFDH0s8LATSbS8NhTry/kE0yAirJuafgtk1v4acvviZY+WDcl6sf5s0TchIgeWYymJld2QK/xoYk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=mLCJoWtawBCB3cFHSoLDJ5YxqkUEmOktlIEXvZUuH+5GlrOXBISXCH0NSBFvGUyw/lkvN4cwazt0Md4NHl50206DdCxacZyIH/52foX8pJ6x13j5vTfjyP3hk/kaxl7pMfbcLjeYE9pHDOZ4+nKLJPMHa13amWuZpnUK8rQz7EM= Received: by 10.67.22.2 with SMTP id z2mr3090114ugi.1186163718043; Fri, 03 Aug 2007 10:55:18 -0700 (PDT) Received: from ?192.168.1.7? ( [83.45.59.128]) by mx.google.com with ESMTPS id k30sm3448483ugc.2007.08.03.10.55.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Aug 2007 10:55:17 -0700 (PDT) Message-ID: <46B36C04.6070101@gmail.com> Date: Fri, 03 Aug 2007 19:55:16 +0200 From: adrian15 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <46751770.4080807@gmail.com> <878x98fu19.fsf@xs4all.nl> In-Reply-To: <878x98fu19.fsf@xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Detected-Kernel: Linux 2.4-2.6 (Google crawlbot) Subject: Re: echo gives internal error with \n 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: Fri, 03 Aug 2007 17:56:41 -0000 Marco Gerards escribió: > adrian15 writes: > >> I've activated the echo command (also the pause command) which it is >> equivalent to the echo command... and have done some tests: > > The problem is in the parser. I see. >> Two conclusions from these tests: >> >> 1) When you use \n in string that does not begin with " then it gives an >> internal error. I do not see anything special on echo.c so I suppose >> it's the fault of the parser, however I have not studied the parser >> yet... so marco_g what's your opinnion? > > True, Bean sent in a patch to fix this. :) I knew this already. > >> 2) The -e option is not implemented. :) I've checked the code and it is >> not. However I doubt if it's going to work... I ask myself if the grub> >> string always appears at the beginning of the line. > > Do you want to implement this? ;-) > > This should not be hard to do. Implementation is easy but what's difficult for me is the design decision. Here there are three possible scenarios: 1a) When grub> is showed it does begin in the last character position (not in a new line). This might imply rewriting the end of the programs so that they end with something similar to: grub_printf("\n"); 1b) Same than 1a but the execution of the last grub_printf("\n"); is automatically run from the "program than runs one command after another one. (I do not know the name in grub2.)" depending on a new special flag of the program. 2) The echo command with a -e option sets a variable which is checked each time the grub> line is going to be written. Depending on the variable grub_printf("\ngrub>"); or grub_printf("grub>"); is run. At what implementation were you thinking to issue this problem? > >> pause is equivalent to echo command but if you want to check what I am >> saying check my other email that contains a patch for having both echo >> and pause commands. Well... I think you do not need to check my patch... the idea is that pause command is the echo command plus a pause. Something like: pause.sh: echo $@ ; read exit So the pause command can have all the echo command power. I also might work in the read command although I have to think more about it. adrian15