Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<memchr>>---find character in memory
21 * void *memchr(const void *<[src]>, int <[c]>, size_t <[length]>);
24 * void *memchr(<[src]>, <[c]>, <[length]>)
28 * This function searches memory starting at <<*<[src]>>> for the
29 * character <[c]>. The search only ends with the first
30 * occurrence of <[c]>, or after <[length]> characters; in
31 * particular, <<NULL>> does not terminate the search.
33 * If the character <[c]> is found within <[length]> characters
34 * of <<*<[src]>>>, a pointer to the character is returned. If
35 * <[c]> is not found, then <<NULL>> is returned.
37 * <<memchr>>> is ANSI C.
38 * <<memchr>> requires no supporting OS subroutines.
51 Search buffer for a character.
52 Searches the first num bytes of memory block pointed by src_void for character c.
53 @return A pointer to the first occurrence of c in buffer.
54 If character is not found the function returns NULL.
55 @param src_void Pointer to buffer.
56 @param c Key character to look for.
57 @param length Number of characters to check from buffer.
60 memchr (const void* src_void, int c, size_t length)
62 const unsigned char *src = (const unsigned char *) src_void;