On (26/06/08 16:33), Sander van Dijk wrote:
> To: dynamic window manager <dwm_AT_suckless.org>
> From: Sander van Dijk <a.h.vandijk_AT_gmail.com>
> Subject: Re: [dwm] dmenu - simplification of cistrstr and kpress
> Reply-To: dynamic window manager <dwm_AT_suckless.org>
> List-Id: dynamic window manager <dwm.suckless.org>
>
> On 6/26/08, Premysl Hruby <dfenze_AT_gmail.com> wrote:
> > Hi,
> >
> > it also defines feature macro _BSD_SOURCE, so usleep and strdup is
> > declared.
> >
> > patch attached.
>
> "return (char *)1;"?
>
> cistrstr(s, sub) is supposed to return a pointer to the first
> occurence of "sub" in "s", or NULL if there is none; not some fixed
> pointer to memory that's probably not even allocated to the process.
>
> Greetings, Sander.
>
Yes, that's true, but return value is only used only in comparison if is
or isn't null, to signalize that substring is or isn't contained in the
string.
-Ph
-- Premysl "Anydot" Hruby, http://www.redrum.cz/Received on Thu Jun 26 2008 - 16:42:16 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:51:32 UTC