1 .\" Id: bitncmp.mdoc,v 1.3 2004/03/09 06:30:07 marka Exp
3 .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
4 .\" Copyright (c) 1996,1999 by Internet Software Consortium.
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16 .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 .Fn bitncmp "const void *l" "const void *r" "int n"
32 most-significant bits of the two masks pointed to by
36 and returns an integer less than, equal to, or greater than 0, according to
39 is lexicographically less than, equal to, or greater than
41 when taken to be unsigned characters (this behaviour is just like that of
47 .Sy network byte order ;
48 this means that the fourth octet of
53 returns values in the manner of
55 .Bd -ragged -offset indent
77 are both interpreted as strings of unsigned characters (through bit