[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String functions with end pointers?
From: |
Paul Eggert |
Subject: |
Re: String functions with end pointers? |
Date: |
Tue, 25 Apr 2006 13:26:03 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Paul Eggert <address@hidden> writes:
>> pe> char *memechr(const char *str, const char *endp, char c);
Come to think of it, this kind of signature isn't right for the mem*
family, and I suppose it should be something like this instead:
void *memechr(const void *mem, const void *endp, unsigned char c);
This is because the mem* functions use void * as part of the API (so
that you can pass anything to them), but internally they operate on
arrays as if they were arrays of unsigned char.