On Apr 14, 2005, at 9:08 AM, Vincent Pelletier wrote:
Here is a clean diff with that new grub_strword version.
Thanks Vincent! I've just checked this in (with a slight tweak: needed
to add ## to the macro to allow passing no arguments).
Now what do we think of this patch? It adds output like this
Here is a clean diff with that new grub_strword version.
Vincent Pelletier
2005-04-14 Vincent Pelletier <[EMAIL PROTECTED]>
* include/grub/misc.h (grub_dprintf): New macro.
(grub_real_dprintf): New prototype.
(grub_strword): Likewise.
(grub_iswordseparator): Likewise.
* ker
On Thursday 14 April 2005 05:31 am, Hollis Blanchard wrote:
> I would like to make sure Vincent's patch gets in soon, so that as I
> debug I can leave conditional debug printfs in the code where they're
> needed. I believe grub_strword was the only subject of conversation in
> his patch; are there
Hollis Blanchard wrote:
> int
> grub_strword(const char *haystack, const char *needle)
> {
> char *match;
> char *end;
>
> match = strstr (haystack, needle);
>
> if (match == NULL)
> return 0;
> if ((match > haystack) && (!grub_iswordseparator (match[-1])))
> r
On Feb 25, 2005, at 11:12 AM, Yoshinori K. Okuji wrote:
grub_strword ("filesystem", "file") returns 0 in your implementation.
If I write this function, I use grub_strstr and check if the previous
character and the next character are boundaries.
This is a very good idea. The standalone testcase belo
On Friday 25 February 2005 19:04, Vincent Pelletier wrote:
> > grub_strword ("filesystem", "file") returns 0 in your
> > implementation.
>
> Isn't it what should happen ?
s/returns 0/returns 1/;
Okuji
___
Grub-devel mailing list
Grub-devel@gnu.org
htt
Yoshinori K. Okuji wrote:
On Friday 25 February 2005 17:02, Hollis Blanchard wrote:
int
grub_strword (const char *haystack, const char *needle)
{
int pos = 0;
int found = 0;
while (haystack[pos]) {
/* Advance to next word. */
while (grub_iswordseparator (haystack[pos]))
On Friday 25 February 2005 17:02, Hollis Blanchard wrote:
> int
> grub_strword (const char *haystack, const char *needle)
> {
> int pos = 0;
> int found = 0;
>
> while (haystack[pos]) {
> /* Advance to next word. */
> while (grub_iswordseparator (haystack[pos]))
>
On Feb 25, 2005, at 10:13 AM, Aki Tossavainen wrote:
Um, well, it does a lot of unnecessary expensive strcmp's there...
But if you add this, you can at least reduce them abit, since you are
only
interested on the words.
Oops, yes, thanks. :)
-Hollis
___
On Fri, 25 Feb 2005, Hollis Blanchard wrote:
> On Feb 25, 2005, at 5:52 AM, Vincent Pelletier wrote:
> >
> > grub_strword (string, word) : searches for word (a serie of
> > non-word-separators eventualy ended by word-separators) in string (a
> > succession of 0 or more words which can begin by wo
On Feb 25, 2005, at 5:52 AM, Vincent Pelletier wrote:
grub_strword (string, word) : searches for word (a serie of
non-word-separators eventualy ended by word-separators) in string (a
succession of 0 or more words which can begin by word-separator(s))
grub_strword looks a little overcomplicated; wou
dprintf patch, take 2.
grub_strword (string, word) : searches for word (a serie of
non-word-separators eventualy ended by word-separators) in string (a
succession of 0 or more words which can begin by word-separator(s))
grub_iswordseparator : matches any separator
Note : var="value1 value2" current
12 matches
Mail list logo