bitmap.h

00001 /*<std-header orig-src='shore' incl-file-exclusion='BITMAP_H'>
00002 
00003  $Id: bitmap.h,v 1.23 2010/05/26 01:20:11 nhall Exp $
00004 
00005 SHORE -- Scalable Heterogeneous Object REpository
00006 
00007 Copyright (c) 1994-99 Computer Sciences Department, University of
00008                       Wisconsin -- Madison
00009 All Rights Reserved.
00010 
00011 Permission to use, copy, modify and distribute this software and its
00012 documentation is hereby granted, provided that both the copyright
00013 notice and this permission notice appear in all copies of the
00014 software, derivative works or modified versions, and any portions
00015 thereof, and that both notices appear in supporting documentation.
00016 
00017 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY
00018 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS
00019 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND
00020 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
00021 
00022 This software was developed with support by the Advanced Research
00023 Project Agency, ARPA order number 018 (formerly 8230), monitored by
00024 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
00025 Further funding for this work was provided by DARPA through
00026 Rome Research Laboratory Contract No. F30602-97-2-0247.
00027 
00028 */
00029 
00030 #ifndef BITMAP_H
00031 #define BITMAP_H
00032 
00033 #include "w_defines.h"
00034 
00035 /*  -- do not edit anything above this line --   </std-header>*/
00036 
00037 #ifdef __GNUG__
00038 #pragma interface
00039 #endif
00040 
00041 extern "C" int bm_first_set(const u_char* bm, int size, int start);
00042 extern "C" int bm_first_clr(const u_char* bm, int size, int start);
00043 
00044 extern "C" int bm_last_set(const u_char *bm, int size, int start);
00045 extern "C" int bm_last_clr(const u_char *bm, int size, int start);
00046 
00047 extern "C" int bm_num_set(const u_char* bm, int size);
00048 extern "C" int bm_num_clr(const u_char* bm, int size);
00049 
00050 extern "C" bool bm_is_set(const u_char* bm, int offset);
00051 extern "C" bool bm_is_clr(const u_char* bm, int offset);
00052 
00053 extern "C" void bm_zero(u_char* bm, int size);
00054 extern "C" void bm_fill(u_char* bm, int size);
00055 
00056 extern "C" void bm_set(u_char* bm, int offset);
00057 extern "C" void bm_clr(u_char* bm, int offset);
00058 
00059 inline bool bm_is_clr(const u_char* bm, int offset)
00060 {
00061     return !bm_is_set(bm, offset);
00062 }
00063 
00064 inline int bm_num_clr(const u_char* bm, int size)
00065 {
00066     return size - bm_num_set(bm, size);
00067 }
00068 
00069 /*<std-footer incl-file-exclusion='BITMAP_H'>  -- do not edit anything below this line -- */
00070 
00071 #endif          /*</std-footer>*/

Generated on Wed Jul 7 17:22:31 2010 for Shore Storage Manager by  doxygen 1.4.7