BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kmemccpy - restricted copy of bytes from src to dest
LIBRARY CALL
kaddr kmemccpy(
kaddr dest,
const kaddr src,
int c,
size_t num)
INPUT
- src - the source pointer to copy "num" bytes from
- c - the character value to terminate copy
- num - the number of bytes to be copied
OUTPUT
- dest - the destination pointer to copy the bytes to
RETURN VALUE
returns dest if "c" was encountered, NULL otherwise
DESCRIPTION
This function is the same as the system call memccpy().
Except kmemccpy() will make sure that the src and dest
pointers are not NULL before calling memccpy().
memccpy() copies the bytes in the "src" character
array to the "dest" array. The number of bytes
to be copied is determined by the "c" character value
and the parameter "num". Bytes will be copied from "src"
to "dest" until the "c" character value is encountered or
num bytes have been copied. If "c" is encountered and
copied before "num" bytes then the "dest" array is returned.
Otherwise if "num" bytes are copied then NULL is returned
to indicate the "c" was not encountered.
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.