BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kmemchr - find the first occurence of 'c' in an character array
LIBRARY CALL
kaddr kmemchr(
const kaddr src,
int c,
size_t num)
INPUT
- src - the source pointer to be searched
- c - the character value to be searched for within src
- num - the number of bytes to be searched
OUTPUT
none
RETURN VALUE
pointer in which "c" occurs, NULL upon failure
DESCRIPTION
This function is the same as the system call memchr().
Except kmemchr() will make sure that the source and the
the number of bytes to be searched are greater than 0.
memchr() searches the bytes in the "src" character
array for the character value "c". The number of bytes
to be searched is determined by the parameter "num".
Upon loction of "c" in the source array, the pointer pointing
to "c" within the source array is returned.
If "c" does not occur within the first "num" bytes then
NULL is returned.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/memory.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.