1afe61c15SRodney W. Grimes.\" Copyright (c) 1989, 1991, 1993 2afe61c15SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3afe61c15SRodney W. Grimes.\" 4afe61c15SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 5afe61c15SRodney W. Grimes.\" Paul Vixie. 6afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 7afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions 8afe61c15SRodney W. Grimes.\" are met: 9afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 10afe61c15SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 11afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 12afe61c15SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 13afe61c15SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 14dda5b397SEitan Adler.\" 3. Neither the name of the University nor the names of its contributors 15afe61c15SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 16afe61c15SRodney W. Grimes.\" without specific prior written permission. 17afe61c15SRodney W. Grimes.\" 18afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21afe61c15SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28afe61c15SRodney W. Grimes.\" SUCH DAMAGE. 29afe61c15SRodney W. Grimes.\" 301b82e02fSAlan Somers.\" Copyright (c) 2014,2016 Spectra Logic Corporation 318907f744SAlan Somers.\" All rights reserved. 328907f744SAlan Somers.\" 338907f744SAlan Somers.\" Redistribution and use in source and binary forms, with or without 348907f744SAlan Somers.\" modification, are permitted provided that the following conditions 358907f744SAlan Somers.\" are met: 368907f744SAlan Somers.\" 1. Redistributions of source code must retain the above copyright 378907f744SAlan Somers.\" notice, this list of conditions, and the following disclaimer, 388907f744SAlan Somers.\" without modification. 398907f744SAlan Somers.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 408907f744SAlan Somers.\" substantially similar to the "NO WARRANTY" disclaimer below 418907f744SAlan Somers.\" ("Disclaimer") and any redistribution must be conditioned upon 428907f744SAlan Somers.\" including a substantially similar Disclaimer requirement for further 438907f744SAlan Somers.\" binary redistribution. 448907f744SAlan Somers.\" 458907f744SAlan Somers.\" NO WARRANTY 468907f744SAlan Somers.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 478907f744SAlan Somers.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 488907f744SAlan Somers.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 498907f744SAlan Somers.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 508907f744SAlan Somers.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 518907f744SAlan Somers.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 528907f744SAlan Somers.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 538907f744SAlan Somers.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 548907f744SAlan Somers.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 558907f744SAlan Somers.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 568907f744SAlan Somers.\" POSSIBILITY OF SUCH DAMAGES. 578907f744SAlan Somers.\" 58afe61c15SRodney W. Grimes.\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93 597f3dea24SPeter Wemm.\" $FreeBSD$ 60afe61c15SRodney W. Grimes.\" 61*52e8f6a3SEric Joyner.Dd Nov 18, 2019 62afe61c15SRodney W. Grimes.Dt BITSTRING 3 633d45e180SRuslan Ermilov.Os 64afe61c15SRodney W. Grimes.Sh NAME 65afe61c15SRodney W. Grimes.Nm bit_alloc , 66afe61c15SRodney W. Grimes.Nm bit_clear , 671b82e02fSAlan Somers.Nm bit_count , 68afe61c15SRodney W. Grimes.Nm bit_decl , 698907f744SAlan Somers.Nm bit_ffc , 70afe61c15SRodney W. Grimes.Nm bit_ffs , 718907f744SAlan Somers.Nm bit_ffc_at , 728907f744SAlan Somers.Nm bit_ffs_at , 73*52e8f6a3SEric Joyner.Nm bit_ffc_area , 74*52e8f6a3SEric Joyner.Nm bit_ffs_area , 75*52e8f6a3SEric Joyner.Nm bit_ffc_area_at , 76*52e8f6a3SEric Joyner.Nm bit_ffs_area_at , 77afe61c15SRodney W. Grimes.Nm bit_nclear , 78afe61c15SRodney W. Grimes.Nm bit_nset , 79afe61c15SRodney W. Grimes.Nm bit_set , 808907f744SAlan Somers.Nm bit_test , 818907f744SAlan Somers.Nm bitstr_size 828907f744SAlan Somers.Nd bit-string manipulation functions and macros 83afe61c15SRodney W. Grimes.Sh SYNOPSIS 8432eef9aeSRuslan Ermilov.In bitstring.h 85afe61c15SRodney W. Grimes.Ft bitstr_t * 86afe61c15SRodney W. Grimes.Fn bit_alloc "int nbits" 8769a6a1d7SBruce Evans.Ft void 8869a6a1d7SBruce Evans.Fn bit_decl "bitstr_t *name" "int nbits" 8969a6a1d7SBruce Evans.Ft void 9069a6a1d7SBruce Evans.Fn bit_clear "bitstr_t *name" "int bit" 9169a6a1d7SBruce Evans.Ft void 921b82e02fSAlan Somers.Fn bit_count "bitstr_t *name" "int count" "int nbits" "int *value" 931b82e02fSAlan Somers.Ft void 9469a6a1d7SBruce Evans.Fn bit_ffc "bitstr_t *name" "int nbits" "int *value" 9569a6a1d7SBruce Evans.Ft void 9669a6a1d7SBruce Evans.Fn bit_ffs "bitstr_t *name" "int nbits" "int *value" 9769a6a1d7SBruce Evans.Ft void 988907f744SAlan Somers.Fn bit_ffc_at "bitstr_t *name" "int start" "int nbits" "int *value" 998907f744SAlan Somers.Ft void 1008907f744SAlan Somers.Fn bit_ffs_at "bitstr_t *name" "int start" "int nbits" "int *value" 1018907f744SAlan Somers.Ft void 102*52e8f6a3SEric Joyner.Fn bit_ffc_area "bitstr_t *name" "int nbits" "int size" "int *value" 103*52e8f6a3SEric Joyner.Ft void 104*52e8f6a3SEric Joyner.Fn bit_ffs_area "bitstr_t *name" "int nbits" "int size" "int *value" 105*52e8f6a3SEric Joyner.Ft void 106*52e8f6a3SEric Joyner.Fn bit_ffc_area_at "bitstr_t *name" "int start" "int nbits" "int size" "int *value" 107*52e8f6a3SEric Joyner.Ft void 108*52e8f6a3SEric Joyner.Fn bit_ffs_area_at "bitstr_t *name" "int start" "int nbits" "int size" "int *value" 109*52e8f6a3SEric Joyner.Ft void 11069a6a1d7SBruce Evans.Fn bit_nclear "bitstr_t *name" "int start" "int stop" 11169a6a1d7SBruce Evans.Ft void 11269a6a1d7SBruce Evans.Fn bit_nset "bitstr_t *name" "int start" "int stop" 11369a6a1d7SBruce Evans.Ft void 11469a6a1d7SBruce Evans.Fn bit_set "bitstr_t *name" "int bit" 11569a6a1d7SBruce Evans.Ft int 116afe61c15SRodney W. Grimes.Fn bitstr_size "int nbits" 11769a6a1d7SBruce Evans.Ft int 11869a6a1d7SBruce Evans.Fn bit_test "bitstr_t *name" "int bit" 119afe61c15SRodney W. Grimes.Sh DESCRIPTION 120afe61c15SRodney W. GrimesThese macros operate on strings of bits. 121afe61c15SRodney W. Grimes.Pp 1228907f744SAlan SomersThe function 123afe61c15SRodney W. Grimes.Fn bit_alloc 124afe61c15SRodney W. Grimesreturns a pointer of type 125afe61c15SRodney W. Grimes.Dq Fa "bitstr_t *" 126afe61c15SRodney W. Grimesto sufficient space to store 127afe61c15SRodney W. Grimes.Fa nbits 128afe61c15SRodney W. Grimesbits, or 129afe61c15SRodney W. Grimes.Dv NULL 130afe61c15SRodney W. Grimesif no space is available. 1318907f744SAlan SomersIf successful, the returned bit string is initialized with all bits cleared. 132afe61c15SRodney W. Grimes.Pp 133afe61c15SRodney W. GrimesThe macro 134afe61c15SRodney W. Grimes.Fn bit_decl 1358907f744SAlan Somersdeclares a bit string with sufficient space to store 136afe61c15SRodney W. Grimes.Fa nbits 1378907f744SAlan Somersbits. 1388907f744SAlan Somers.Fn bit_decl 1398907f744SAlan Somersmay be used to include statically sized bit strings in structure 1408907f744SAlan Somersdefinitions or to create bit strings on the stack. 1418907f744SAlan SomersUsers of this macro are responsible for initialization of the bit string, 1428907f744SAlan Somerstypically via a global initialization of the containing struct or use of the 1438907f744SAlan Somers.Fn bit_nset 1448907f744SAlan Somersor 1458907f744SAlan Somers.Fn bin_nclear 1468907f744SAlan Somersfunctions. 147afe61c15SRodney W. Grimes.Pp 148afe61c15SRodney W. GrimesThe macro 149afe61c15SRodney W. Grimes.Fn bitstr_size 1508907f744SAlan Somersreturns the number of bytes necessary to store 151afe61c15SRodney W. Grimes.Fa nbits 152afe61c15SRodney W. Grimesbits. 153afe61c15SRodney W. GrimesThis is useful for copying bit strings. 154afe61c15SRodney W. Grimes.Pp 1558907f744SAlan SomersThe functions 156afe61c15SRodney W. Grimes.Fn bit_clear 157afe61c15SRodney W. Grimesand 158afe61c15SRodney W. Grimes.Fn bit_set 159afe61c15SRodney W. Grimesclear or set the zero-based numbered bit 160afe61c15SRodney W. Grimes.Fa bit , 161afe61c15SRodney W. Grimesin the bit string 162afe61c15SRodney W. Grimes.Ar name . 163afe61c15SRodney W. Grimes.Pp 164afe61c15SRodney W. GrimesThe 165afe61c15SRodney W. Grimes.Fn bit_nset 166afe61c15SRodney W. Grimesand 167afe61c15SRodney W. Grimes.Fn bit_nclear 1688907f744SAlan Somersfunctions 169afe61c15SRodney W. Grimesset or clear the zero-based numbered bits from 170afe61c15SRodney W. Grimes.Fa start 1710b607240SJohn-Mark Gurneythrough 172afe61c15SRodney W. Grimes.Fa stop 173afe61c15SRodney W. Grimesin the bit string 174afe61c15SRodney W. Grimes.Ar name . 175afe61c15SRodney W. Grimes.Pp 176afe61c15SRodney W. GrimesThe 177afe61c15SRodney W. Grimes.Fn bit_test 1788907f744SAlan Somersfunction 179afe61c15SRodney W. Grimesevaluates to non-zero if the zero-based numbered bit 180afe61c15SRodney W. Grimes.Fa bit 181afe61c15SRodney W. Grimesof bit string 182afe61c15SRodney W. Grimes.Fa name 183afe61c15SRodney W. Grimesis set, and zero otherwise. 184afe61c15SRodney W. Grimes.Pp 1858907f744SAlan SomersThe function 186afe61c15SRodney W. Grimes.Fn bit_ffc 187afe61c15SRodney W. Grimesstores in the location referenced by 188afe61c15SRodney W. Grimes.Fa value 189afe61c15SRodney W. Grimesthe zero-based number of the first bit not set in the array of 190afe61c15SRodney W. Grimes.Fa nbits 191afe61c15SRodney W. Grimesbits referenced by 192afe61c15SRodney W. Grimes.Fa name . 193afe61c15SRodney W. GrimesIf all bits are set, the location referenced by 194afe61c15SRodney W. Grimes.Fa value 195afe61c15SRodney W. Grimesis set to \-1. 196afe61c15SRodney W. Grimes.Pp 1978907f744SAlan SomersThe 1988907f744SAlan Somers.Fn bit_ffs 1998907f744SAlan Somersfunction 2008907f744SAlan Somersstores in the location referenced by 2018907f744SAlan Somers.Fa value 2028907f744SAlan Somersthe zero-based number of the first bit set in the array of 2038907f744SAlan Somers.Fa nbits 2048907f744SAlan Somersbits referenced by 2058907f744SAlan Somers.Fa name . 2068907f744SAlan SomersIf no bits are set, the location referenced by 2078907f744SAlan Somers.Fa value 2088907f744SAlan Somersis set to \-1. 2098907f744SAlan Somers.Pp 2108907f744SAlan SomersThe function 2118907f744SAlan Somers.Fn bit_ffc_at 2128907f744SAlan Somersstores in the location referenced by 2138907f744SAlan Somers.Fa value 2148907f744SAlan Somersthe zero-based number of the first bit not set in the array of 2158907f744SAlan Somers.Fa nbits 2168907f744SAlan Somersbits referenced by 2178907f744SAlan Somers.Fa name , 2188907f744SAlan Somersat or after the zero-based bit index 2198907f744SAlan Somers.Fa start . 2208907f744SAlan SomersIf all bits at or after 2218907f744SAlan Somers.Fa start 2228907f744SAlan Somersare set, the location referenced by 2238907f744SAlan Somers.Fa value 2248907f744SAlan Somersis set to \-1. 2258907f744SAlan Somers.Pp 2268907f744SAlan SomersThe 2278907f744SAlan Somers.Fn bit_ffs_at 2288907f744SAlan Somersfunction 2298907f744SAlan Somersstores in the location referenced by 2308907f744SAlan Somers.Fa value 2318907f744SAlan Somersthe zero-based number of the first bit set in the array of 2328907f744SAlan Somers.Fa nbits 2338907f744SAlan Somersbits referenced by 2348907f744SAlan Somers.Fa name , 2358907f744SAlan Somersat or after the zero-based bit index 2368907f744SAlan Somers.Fa start . 2378907f744SAlan SomersIf no bits are set after 2388907f744SAlan Somers.Fa start , 2398907f744SAlan Somersthe location referenced by 2408907f744SAlan Somers.Fa value 2418907f744SAlan Somersis set to \-1. 2428907f744SAlan Somers.Pp 2431b82e02fSAlan SomersThe 244*52e8f6a3SEric Joyner.Fn bit_ffc_area 245*52e8f6a3SEric Joynerfunction stores in the location referenced by 246*52e8f6a3SEric Joyner.Fa value 247*52e8f6a3SEric Joynerthe zero-based number of the first bit beginning a sequence of unset bits of 248*52e8f6a3SEric Joynerat least 249*52e8f6a3SEric Joyner.Fa size 250*52e8f6a3SEric Joynerunset bits in the array of 251*52e8f6a3SEric Joyner.Fa nbits 252*52e8f6a3SEric Joynerbits referenced by 253*52e8f6a3SEric Joyner.Fa name . 254*52e8f6a3SEric JoynerIf no sequence of contiguous unset bits of the specified 255*52e8f6a3SEric Joyner.Fa size 256*52e8f6a3SEric Joynercan be found, the location referenced by 257*52e8f6a3SEric Joyner.Fa value 258*52e8f6a3SEric Joyneris set to \-1. 259*52e8f6a3SEric Joyner.Pp 260*52e8f6a3SEric JoynerThe 261*52e8f6a3SEric Joyner.Fn bit_ffs_area 262*52e8f6a3SEric Joynerfunction stores in the location referenced by 263*52e8f6a3SEric Joyner.Fa value 264*52e8f6a3SEric Joynerthe zero-based number of the first bit beginning a sequence of set bits of 265*52e8f6a3SEric Joynerat least 266*52e8f6a3SEric Joyner.Fa size 267*52e8f6a3SEric Joynerset bits in the array of 268*52e8f6a3SEric Joyner.Fa nbits 269*52e8f6a3SEric Joynerbits referenced by 270*52e8f6a3SEric Joyner.Fa name . 271*52e8f6a3SEric JoynerIf no sequence of contiguous set bits of the specified 272*52e8f6a3SEric Joyner.Fa size 273*52e8f6a3SEric Joynercan be found, the location referenced by 274*52e8f6a3SEric Joyner.Fa value 275*52e8f6a3SEric Joyneris set to \-1. 276*52e8f6a3SEric Joyner.Pp 277*52e8f6a3SEric JoynerThe 278*52e8f6a3SEric Joyner.Fn bit_ffc_area_at 279*52e8f6a3SEric Joynerfunction stores in the location referenced by 280*52e8f6a3SEric Joyner.Fa value 281*52e8f6a3SEric Joynerthe zero-based number of the first bit beginning a sequence of unset bits of 282*52e8f6a3SEric Joynerat least 283*52e8f6a3SEric Joyner.Fa size 284*52e8f6a3SEric Joynerunset bits in the array of 285*52e8f6a3SEric Joyner.Fa nbits 286*52e8f6a3SEric Joynerbits referenced by 287*52e8f6a3SEric Joyner.Fa name , 288*52e8f6a3SEric Joynerat or after the zero-based bit index 289*52e8f6a3SEric Joyner.Fa start . 290*52e8f6a3SEric JoynerIf no sequence of contiguous unset bits of the specified 291*52e8f6a3SEric Joyner.Fa size 292*52e8f6a3SEric Joynercan be found at or after 293*52e8f6a3SEric Joyner.Fa start , 294*52e8f6a3SEric Joynerthe location referenced by 295*52e8f6a3SEric Joyner.Fa value 296*52e8f6a3SEric Joyneris set to \-1. 297*52e8f6a3SEric Joyner.Pp 298*52e8f6a3SEric JoynerThe 299*52e8f6a3SEric Joyner.Fn bit_ffs_area_at 300*52e8f6a3SEric Joynerfunction stores in the location referenced by 301*52e8f6a3SEric Joyner.Fa value 302*52e8f6a3SEric Joynerthe zero-based number of the first bit beginning a sequence of set bits of 303*52e8f6a3SEric Joynerat least 304*52e8f6a3SEric Joyner.Fa size 305*52e8f6a3SEric Joynerset bits in the array of 306*52e8f6a3SEric Joyner.Fa nbits 307*52e8f6a3SEric Joynerbits referenced by 308*52e8f6a3SEric Joyner.Fa name , 309*52e8f6a3SEric Joynerat or after the zero-based bit index 310*52e8f6a3SEric Joyner.Fa start . 311*52e8f6a3SEric JoynerIf no sequence of contiguous set bits of the specified 312*52e8f6a3SEric Joyner.Fa size 313*52e8f6a3SEric Joynercan be found at or after 314*52e8f6a3SEric Joyner.Fa start , 315*52e8f6a3SEric Joynerthe location referenced by 316*52e8f6a3SEric Joyner.Fa value 317*52e8f6a3SEric Joyneris set to \-1. 318*52e8f6a3SEric Joyner.Pp 319*52e8f6a3SEric JoynerThe 3201b82e02fSAlan Somers.Fn bit_count 3211b82e02fSAlan Somersfunction stores in the location referenced by 3221b82e02fSAlan Somers.Fa value 3231b82e02fSAlan Somersthe number of bits set in the array of 3241b82e02fSAlan Somers.Fa nbits 3251b82e02fSAlan Somersbits referenced by 3261b82e02fSAlan Somers.Fa name , 3271b82e02fSAlan Somersat or after the zero-based bit index 3281b82e02fSAlan Somers.Fa start . 3291b82e02fSAlan Somers.Pp 3308907f744SAlan SomersThe arguments in bit string macros are evaluated only once and may safely 331afe61c15SRodney W. Grimeshave side effects. 332251c176fSRuslan Ermilov.Sh EXAMPLES 333afe61c15SRodney W. Grimes.Bd -literal -offset indent 334afe61c15SRodney W. Grimes#include <limits.h> 335afe61c15SRodney W. Grimes#include <bitstring.h> 336afe61c15SRodney W. Grimes 3373136363fSRuslan Ermilov\&... 338afe61c15SRodney W. Grimes#define LPR_BUSY_BIT 0 339afe61c15SRodney W. Grimes#define LPR_FORMAT_BIT 1 340afe61c15SRodney W. Grimes#define LPR_DOWNLOAD_BIT 2 3413136363fSRuslan Ermilov\&... 342afe61c15SRodney W. Grimes#define LPR_AVAILABLE_BIT 9 343afe61c15SRodney W. Grimes#define LPR_MAX_BITS 10 344afe61c15SRodney W. Grimes 345afe61c15SRodney W. Grimesmake_lpr_available() 346afe61c15SRodney W. Grimes{ 347afe61c15SRodney W. Grimes bitstr_t bit_decl(bitlist, LPR_MAX_BITS); 348afe61c15SRodney W. Grimes ... 349afe61c15SRodney W. Grimes bit_nclear(bitlist, 0, LPR_MAX_BITS - 1); 350afe61c15SRodney W. Grimes ... 351afe61c15SRodney W. Grimes if (!bit_test(bitlist, LPR_BUSY_BIT)) { 352afe61c15SRodney W. Grimes bit_clear(bitlist, LPR_FORMAT_BIT); 353afe61c15SRodney W. Grimes bit_clear(bitlist, LPR_DOWNLOAD_BIT); 354afe61c15SRodney W. Grimes bit_set(bitlist, LPR_AVAILABLE_BIT); 355afe61c15SRodney W. Grimes } 356afe61c15SRodney W. Grimes} 357afe61c15SRodney W. Grimes.Ed 358afe61c15SRodney W. Grimes.Sh SEE ALSO 3597ebf4122SConrad Meyer.Xr malloc 3 , 3607ebf4122SConrad Meyer.Xr bitset 9 361afe61c15SRodney W. Grimes.Sh HISTORY 362afe61c15SRodney W. GrimesThe 363afe61c15SRodney W. Grimes.Nm bitstring 36421421932SMike Pritchardfunctions first appeared in 36521421932SMike Pritchard.Bx 4.4 . 366