On (26/06/08 17:24), Sander van Dijk wrote:
> To: dynamic window manager <[email protected]>
> From: Sander van Dijk <[EMAIL PROTECTED]>
> Subject: Re: [dwm] dmenu - simplification of cistrstr and kpress
> Reply-To: dynamic window manager <[email protected]>
> List-Id: dynamic window manager <dwm.suckless.org>
> 
> That would be better, but then it still wouldn't do the right thing:
> 
>     if (strcasecmp(s, sub) == 0)
> 
> is only true when "s" is exactly the same (ignoring case, of course)
> as "sub", which would make
> 
>     cistrstr("blaat", "aa")
> 
> NOT match, which is wrong.
> 
> Gr. Sander.
> 

Oh, true :)

there must be something like:

uint len;
...

len = strlen(sub);

and that if changed to:
if (strncasecmp(s, sub, len) == 0)

-Ph

-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/

Reply via email to