Re: [dev] [st] Two small patches for string handling.

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed, 27 Feb 2013 06:40:56 +0100

Greetings.

On Wed, 27 Feb 2013 06:40:56 +0100 "Roberto E. Vargas Caballero" <k0ga_AT_shike2.com> 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 standard:
>
> The strsep function was proposed as an enhanced replacement of strtok
> function. While this is a common extension, et is easy enough for a
> user provide this functionality, and it is unclear that an implementor
> can do a substantially better job; so, there was not sufficient
> support for adding this feature.
>
>
> From man 3 strsep:
>
> CONFORMING TO
> 4.4BSD.
>
> And the standard used is POSIX (I doubt C99 admit 'read', 'write' or
> 'gettimeofday'), although we never have decided what version of POSIX...

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.


Sincerely,

Christoph Lohmann
Received on Wed Feb 27 2013 - 06:40:56 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 27 2013 - 06:48:04 CET