BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kmemcmp - compare bytes from src1 and src2

LIBRARY CALL

int kmemcmp(
   const kaddr src1, 
   const kaddr src2,
   size_t      num)

INPUT

OUTPUT

none

RETURN VALUE

0 if up to num characters in src1 equals the corresponding characters in src2. The positive difference of the first character that differs between src1 and src2 if src1 is lexicographically greater than src2. The negative difference of the first character that differs, if src2 is lexicographically greater than src1.

DESCRIPTION

This function is the same as the system call memcmp(). Except kmemcmp() will make sure that the src1 and src2 pointers are not NULL before calling memcmp().

memcmp() compares its arguments, looking at the first num bytes, and returns an integer less than, equal to, or greater than 0, according as src1 is lexicographically less than, equal to, or greater than src2.

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.