[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] xalloc: add xstrndup
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] xalloc: add xstrndup |
Date: |
Fri, 15 Aug 2003 13:39:23 +0200 |
User-agent: |
KMail/1.5 |
Simon Josefsson wrote:
> I find xalloc useful, but missed a xstrndup.
> 2003-08-15 Simon Josefsson <address@hidden>
>
> * modules/xalloc: Add xstrndup.c.
I'd much prefer a separate module 'xstrndup', because
1. Not everyone who needs xmalloc needs xstrndup (in particular
gettext doesn't need it),
2. xalloc is a general purpose memory allocation facility, whereas
xstrndup is a string processing facility (extracting a substring
of a string, starting at 0).
> 2003-08-15 Simon Josefsson <address@hidden>
>
> * xstrndup.c: New file.
Instead of rolling an implementation with a FIXME, why don't you take
the implementation from Bison?
Also, a xstrndup.h file is missing. We no longer want functions that
are not declared in .h files! lib/system.h is dead.
In MODULES.html.sh, the xstrndup module would belong in section
Extra functions based on ANSI C 89
String handling <string.h>
Bruno
- [Bug-gnulib] xalloc: add xstrndup, Simon Josefsson, 2003/08/14
- Re: [Bug-gnulib] xalloc: add xstrndup, Paul Eggert, 2003/08/14
- Re: [Bug-gnulib] xalloc: add xstrndup,
Bruno Haible <=
- Re: [Bug-gnulib] xalloc: add xstrndup, Paul Eggert, 2003/08/15
- Re: [Bug-gnulib] xalloc: add xstrndup, Simon Josefsson, 2003/08/15
- Re: [Bug-gnulib] xalloc: add xstrndup, Bruno Haible, 2003/08/17
- Re: [Bug-gnulib] xalloc: add xstrndup, Simon Josefsson, 2003/08/17
- Re: [Bug-gnulib] xalloc: add xstrndup, Bruno Haible, 2003/08/18
- Re: [Bug-gnulib] xalloc: add xstrndup, Paul Eggert, 2003/08/18
- Re: [Bug-gnulib] xalloc: add xstrndup, Derek Robert Price, 2003/08/22
- Re: [Bug-gnulib] xalloc: add xstrndup, Bruno Haible, 2003/08/22