1 .\" $Id: bitncmp.mdoc,v 8.2 1999/01/08 19:25:21 vixie Exp $
3 .\"Copyright (c) 1996,1999 by Internet Software Consortium.
5 .\"Permission to use, copy, modify, and distribute this software for any
6 .\"purpose with or without fee is hereby granted, provided that the above
7 .\"copyright notice and this permission notice appear in all copies.
9 .\"THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
10 .\"ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
11 .\"OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
12 .\"CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 .\"DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 .\"PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
15 .\"ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
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 -filled -offset indent
77 are both interpreted as strings of unsigned characters (through bit