setbit man page on NetBSD

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

SETBIT(9)		 BSD Kernel Developer's Manual		     SETBIT(9)

NAME
     setbit — macros related to bitmaps

SYNOPSIS
     #include <sys/param.h>

     void
     setbit(array, x);

     void
     clrbit(array, x);

     int
     isset(array, x);

     int
     isclr(array, x);

DESCRIPTION
     The setbit family of macros operate with bitmaps, also known as bit
     arrays.

     In a nutshell, setbit() sets the bit x in array, clrbit() clears it,
     isset() tests whether x is set, and isclr() returns 1 if x is not set.

EXAMPLES
     The following example declares a buffer of 10 chars, treating it as an
     array of 80 bits:

	   char buf[10];

	   ...

	   setbit(buf, 12);	   /* set the fifth bit in the second byte */

SEE ALSO
     bitstring(3)

CAVEATS
     The number of valid bits in a given array is assumed to be multiple of
     CHAR_BIT, the number of bits for smallest object that is not a bit-field.

BSD				 March 1, 2010				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

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