All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: script bug
Date: Sun, 7 May 2006 16:58:14 +0200	[thread overview]
Message-ID: <200605071658.14644.okuji@enbug.org> (raw)
In-Reply-To: <87lktenjvu.fsf@xs4all.nl>

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



      reply	other threads:[~2006-05-07 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-07  5:42 script bug Yoshinori K. Okuji
2006-05-07 11:40 ` Marco Gerards
2006-05-07 14:58   ` Yoshinori K. Okuji [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605071658.14644.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.