Greetings.
On Wed, 27 Feb 2013 20:17:04 +0100 "Roberto E. Vargas Caballero"
wrote:
> > Since a long‐time goal of suckless is to have its own better libc, is
> > this a selection which is done to find the best functions. Strsep seems
> > to be superior to strtok[_r], so I’m using it now.
>
> Ok,
> Since a long‐time goal of suckless is to have its own better libc, is
> this a selection which is done to find the best functions. Strsep seems
> to be superior to strtok[_r], so I’m using it now.
Ok, I only hope that users of systems without strsep (for example solaris
https://bugs.launchpad.ne
Greetings.
On Wed, 27 Feb 2013 06:40:56 +0100 "Roberto E. Vargas Caballero"
wrote:
> On Wed, Feb 27, 2013 at 12:47:57AM +0400, Alexander Sedov wrote:
> >It still conforms to C89/C99, which is the chosen standard for compiling
> >st according to default config.mk.
>
>
> Taken from C99 s
On Wed, Feb 27, 2013 at 12:47:57AM +0400, Alexander Sedov wrote:
>It still conforms to C89/C99, which is the chosen standard for compiling
>st according to default config.mk.
Taken from C99 standard:
The strsep function was proposed as an enhanced replacement of strtok
functi
It still conforms to C89/C99, which is the chosen standard for compiling st
according to default config.mk.
Also, good thing about separate patches is that you don't need to apply all
of them. It looks like zero field handling was already casted upon
strtok_r, although in slightly more complicated
> 1. Replaced strtok_r with strsep in strparse, because strsep can handle
> zero-width fields (manpage says so) and because resulting code is
> clearer.
As far as I know strsep is a BSD extension and it is not a POSIX function,
so I think we should look for other solution.
Best re
Same things, with style error fixed.
2013/2/27 Alexander Sedov
> 1. Replaced strtok_r with strsep in strparse, because strsep can handle
> zero-width fields (manpage says so) and because resulting code is clearer.
> 2. Fixed potential problem with calling strtol on non-null-terminated
> buffer.
1. Replaced strtok_r with strsep in strparse, because strsep can handle
zero-width fields (manpage says so) and because resulting code is clearer.
2. Fixed potential problem with calling strtol on non-null-terminated
buffer.
0001-Replaced-strtok_r-with-strsep-for-correct-empty-fiel.patch
Descript