From 23a15ec84631a6255971e5a244ac46748aeff460 Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 20 Nov 2015 20:41:58 +0000 Subject: [PATCH] reflect reality. --- share/man/man3/bitstring.3 | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3 index 284b0884d723..4ebd858b93c2 100644 --- a/share/man/man3/bitstring.3 +++ b/share/man/man3/bitstring.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: bitstring.3,v 1.15 2012/12/04 18:02:48 christos Exp $ +.\" $NetBSD: bitstring.3,v 1.16 2015/11/20 20:41:58 christos Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" .\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93 .\" -.Dd December 4, 2012 +.Dd November 20, 2015 .Dt BITSTRING 3 .Os .Sh NAME @@ -49,23 +49,24 @@ .Sh SYNOPSIS .In bitstring.h .Ft bitstr_t * -.Fn bit_alloc "int nbits" -.Fn bit_clear "bit_str name" "int bit" -.Fn bit_decl "bit_str name" "int nbits" -.Fn bit_ffc "bit_str name" "int nbits" "int *value" -.Fn bit_ffs "bit_str name" "int nbits" "int *value" -.Fn bit_nclear "bit_str name" "int start" "int stop" -.Fn bit_nset "bit_str name" "int start" "int stop" -.Fn bit_set "bit_str name" "int bit" -.Fn bitstr_size "int nbits" -.Fn bit_test "bit_str name" "int bit" +.Fn bit_decl "bitstr_t *name" "size_t nbits" +.Ft bitstr_t * +.Fn bit_alloc "size_t nbits" +.Fn bit_clear "bitstr_t *name" "size_t bit" +.Fn bit_ffc "const bitstr_t *name" "size_t nbits" "int *value" +.Fn bit_ffs "const bitstr_t *name" "size_t nbits" "int *value" +.Fn bit_nclear "bitstr_t *name" "size_t start" "size_t stop" +.Fn bit_nset "bitstr_t *name" "size_t start" "size_t stop" +.Fn bit_set "bitstr_t *name" "size_t bit" +.Fn bitstr_size "size_t nbits" +.Fn bit_test "const bitstr_t *name" "size_t bit" .Sh DESCRIPTION These macros operate on strings of bits. .Pp The macro .Fn bit_alloc returns a pointer of type -.Dq Fa "bitstr_t *" +.Dq Fa "bitstr_t" to sufficient space to store .Fa nbits bits, or @@ -157,7 +158,8 @@ have side effects. #define LPR_AVAILABLE_BIT 9 #define LPR_MAX_BITS 10 -make_lpr_available() +void +make_lpr_available(void) { bitstr_t bit_decl(bitlist, LPR_MAX_BITS); ... @@ -172,7 +174,7 @@ make_lpr_available() .Ed .Sh SEE ALSO .Xr bitmap 3 , -.Xr malloc 3 , +.Xr calloc 3 , .Xr setbit 9 .Sh HISTORY The