Re: [PATCH] Test command

2009-04-25 Thread Vladimir Serbinenko
commited On Thu, Apr 16, 2009 at 3:15 PM, phcoder wrote: > BTW, I think you can simplify test_parse. For example, you write "if (*argn >> + 2 < argc ...)" many times, but it should be possible to test this >> condition only once per loop. >> > Optimised. Perhaps compiler optimised this anyway bu

Re: [PATCH] Test command

2009-04-16 Thread phcoder
BTW, I think you can simplify test_parse. For example, you write "if (*argn + 2 < argc ...)" many times, but it should be possible to test this condition only once per loop. Optimised. Perhaps compiler optimised this anyway but it made code more readable Regards, Okuji __

Re: [PATCH] Test command

2009-04-14 Thread Yoshinori K. Okuji
On Sunday 12 April 2009 00:11:45 phcoder wrote: > Updated. Same changelog > > >> + { > >> + update_val (grub_strcmp (args[*argn], args[*argn + 2]) == 0); > >> + (*argn) += 3; > > > > I myself feel that these parentheses are redundant, but I don't know how > > others think. For

Re: [PATCH] Test command

2009-04-11 Thread phcoder
Updated. Same changelog + { + update_val (grub_strcmp (args[*argn], args[*argn + 2]) == 0); + (*argn) += 3; I myself feel that these parentheses are redundant, but I don't know how others think. For C programmers, it is well known that * has a very high priority. These

Re: [PATCH] Test command

2009-04-11 Thread Yoshinori K. Okuji
On Saturday 11 April 2009 07:18:59 phcoder wrote: > Rediffed. New changelog This time, I comment on all style problems. > diff --git a/commands/test.c b/commands/test.c > index a9c8281..2d8dedd 100644 > --- a/commands/test.c > +++ b/commands/test.c > @@ -21,33 +21,385 @@ > #include > #include

Re: [PATCH] Test command

2009-04-10 Thread phcoder
Rediffed. New changelog 2009-04-11 Vladimir Serbinenko Test command * commands/test.c: rewritten to use bash-like test phcoder wrote: Sorry forgot to attach the file phcoder wrote: Hello. Here is an implementation of bash-like "test" command. Many file tests are omitted bec