appletbits.c

Go to the documentation of this file.
00001 
00002 /*  $Id: appletbits.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /* copyright 1991-96 UserLand Software, Inc. All Rights Reserved.*/
00005 
00006 
00007 #include "frontier.h"
00008 #include "standard.h"
00009 
00010 #include "appletdefs.h"
00011 #include "appletbits.h"
00012 
00013 
00014 unsigned short setbit (unsigned short bits, short bitnum) {
00015     
00016     return (bits | ((unsigned short) 1 << bitnum));
00017     } /*setbit*/
00018     
00019 
00020 unsigned short clearbit (unsigned short bits, short bitnum) {
00021     
00022     return (bits & (~((unsigned long) 1 << bitnum)));
00023     } /*clearbit*/
00024     
00025 
00026 boolean getbit (unsigned short bits, short bitnum) {
00027 
00028     return ((bits >> bitnum) & 1);
00029     } /*getbit*/
00030     
00031     
00032 
00033 
00034     
00035 

Generated on Wed May 31 18:19:39 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6