BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kbcmp - compare bytes from src1 and src2 (BSD style)

LIBRARY CALL

void kbcmp(
  char *src1,
  char *src2,
  int  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 a replacement for the BSD system call bcmp() which does not exist on many systems. The kbcmp() routine compares "src1" and "src2" for "num" bytes. kbcmp() really uses kmemcmp(), so it will be checked to make sure that both source arrays are not NULL and "num" is greater than 0.

kbcmp() 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/include/kutils/kmemory.h

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.