bitarr man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

BITARR(3)		     C Programmer's Manual		     BITARR(3)

NAME
       ba_and_ba,  ba_clear,  ba_clear_all,  ba_copy,  ba_create,  ba_destroy,
       ba_not, ba_or_ba, ba_or_not_ba, ba_query, ba_resize, ba_set,  ba_xor_ba
       - bit array manipulation

SYNOPSIS
       #include <bitarr.h>

       Bitarr *ba_create(void);
       void ba_destroy(Bitarr *ba);
       Bitarr *ba_copy(const Bitarr *ba);
       int ba_resize(Bitarr *ba, size_t max_number);

       int ba_set(Bitarr *ba, unsigned number);
       int ba_clear(Bitarr *ba, unsigned number);
       void ba_clear_all(Bitarr *ba);
       int ba_query(Bitarr *ba, unsigned number);
       void ba_and_ba(Bitarr *ba1, const Bitarr *ba2);
       int ba_or_ba(Bitarr *ba1, const Bitarr *ba2);
       void ba_xor_ba(Bitarr *ba1, const Bitarr *ba2);
       void ba_or_not_ba(Bitarr *ba1, const Bitarr *ba2);
       void ba_not(Bitarr *ba);

DESCRIPTION
       These  functions	 operate  on  bit  arrays.   ba_create creates one and
       ba_destroy it.  ba_copy makes a copy of one, and ba_resize changes  its
       size.   The  bit	 arrays resize themselves automatically, but ba_resize
       can be used to get rid of extra memory allocated for the array,	or  to
       make  sure there is enough memory allocated for the array (so that fur‐
       ther operations are guaranteed to work).

       ba_set sets one element (bit) in the array to 1.	 ba_clear  clears  one
       element	(sets  it  to  0), ba_clear_all clears all elements.  ba_query
       returns the current value of an element.

       ba_and_ba, ba_or_ba, ba_xor_ba, and ba_or_ba do logical	operations  on
       two  arrays.   The result will be stored in the first one.  ba_not will
       invert all elements in the array.

RETURNS
       ba_create and ba_copy return a pointer to the new  array,  or  NULL  if
       they fail.  Those that return an integer, return -1 for error, non-neg‐
       ative for success.

SEE ALSO
       publib(3), iset(3)

AUTHOR
       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib			     C Programmer's Manual		     BITARR(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net