[Nagios-checkins] SF.net SVN: nagios:[2086] nagioscore/trunk/lib

ageric at users.sourceforge.net ageric at users.sourceforge.net
Sun Aug 26 19:58:26 UTC 2012


Revision: 2086
          http://nagios.svn.sourceforge.net/nagios/?rev=2086&view=rev
Author:   ageric
Date:     2012-08-26 19:58:26 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
lib/bitmap: Janitor fixes

Remove debug printf()'s and s/bitmaptors/bitmaps/

Blind search and replace from 'bitvector' to 'bitmap' caused the
latter, while sloppiness caused the former.

Signed-off-by: Andreas Ericsson <ae at op5.se>

Modified Paths:
--------------
    nagioscore/trunk/lib/bitmap.c
    nagioscore/trunk/lib/bitmap.h

Modified: nagioscore/trunk/lib/bitmap.c
===================================================================
--- nagioscore/trunk/lib/bitmap.c	2012-08-26 19:58:04 UTC (rev 2085)
+++ nagioscore/trunk/lib/bitmap.c	2012-08-26 19:58:26 UTC (rev 2086)
@@ -27,10 +27,6 @@
 	/* be tight on space */
 	bm->alloc = (size >> SHIFTOUT) + !!(size & MAPMASK);
 	bm->vector = calloc(1, bm->alloc * sizeof(bmap));
-#if 0
-	printf("bitmap created with %lu bytes of storage and capacity %lu\n",
-		   bm->alloc * sizeof(bmap), bm->alloc * MAPSIZE);
-#endif
 	return bm;
 }
 

Modified: nagioscore/trunk/lib/bitmap.h
===================================================================
--- nagioscore/trunk/lib/bitmap.h	2012-08-26 19:58:04 UTC (rev 2085)
+++ nagioscore/trunk/lib/bitmap.h	2012-08-26 19:58:26 UTC (rev 2086)
@@ -2,7 +2,7 @@
 #define LIBNAGIOS_bitmap_h__
 /**
  * @file bitmap.h
- * @brief Bit vector API
+ * @brief Bit map API
  * @{
  */
 struct bitmap;
@@ -29,7 +29,7 @@
 extern bitmap *bitmap_copy(const bitmap *bm);
 
 /**
- * Set a bit in the vector
+ * Set a bit in the map
  * @param bm The bitmaptor to operate on
  * @param pos Position of the bit to set
  * @return 0 on success, -1 on errors
@@ -37,7 +37,7 @@
 extern int bitmap_set(bitmap *bm, unsigned long pos);
 
 /**
- * Check if a particular bit is set in the vector
+ * Check if a particular bit is set in the map
  * @param bm The bitmaptor to check
  * @param pos Position of the bit to check
  * @return 1 if set, otherwise 0
@@ -45,7 +45,7 @@
 extern int bitmap_isset(const bitmap *bm, unsigned long pos);
 
 /**
- * Unset a particular bit in the vector
+ * Unset a particular bit in the map
  * @param bm The bitmaptor to operate on
  * @param pos Position of the bit to unset
  */
@@ -60,14 +60,14 @@
 #define bitmap_size bitmap_cardinality
 
 /**
- * Count set bits in vector. Completed in O(n/8) time.
+ * Count set bits in map. Completed in O(n/8) time.
  * @param bm The bitmaptor to count bits in
  * @return The number of set bits
  */
 extern unsigned long bitmap_count_set_bits(const bitmap *bm);
 
 /**
- * Count unset bits in vector. Completed in O(n/8) time.
+ * Count unset bits in map. Completed in O(n/8) time.
  * @param bm The bitmaptor to count bits in
  * @return The number of set bits
  */
@@ -80,7 +80,7 @@
 extern bitmap *bitmap_clear(bitmap *bm);
 
 /**
- * Calculate intersection of two bitmaptors
+ * Calculate intersection of two bitmaps
  * The intersection is defined as all bits that are members of
  * both A and B. It's equivalent to bitwise AND.
  * This function completes in O(n/sizeof(long)) operations.
@@ -91,7 +91,7 @@
 extern bitmap *bitmap_intersect(const bitmap *a, const bitmap *b);
 
 /**
- * Calculate union of two bitmaptors
+ * Calculate union of two bitmaps
  * The union is defined as all bits that are members of
  * A or B or both A and B. It's equivalent to bitwise OR.
  * This function completes in O(n/sizeof(long)) operations.
@@ -102,7 +102,7 @@
 extern bitmap *bitmap_union(const bitmap *a, const bitmap *b);
 
 /**
- * Calculate set difference between two bitmaptors
+ * Calculate set difference between two bitmaps
  * The set difference of A / B is defined as all members of A
  * that isn't members of B. Note that parameter ordering matters
  * for this function.
@@ -114,7 +114,7 @@
 extern bitmap *bitmap_diff(const bitmap *a, const bitmap *b);
 
 /**
- * Calculate symmetric difference between two bitmaptors
+ * Calculate symmetric difference between two bitmaps
  * The symmetric difference between A and B is the set that
  * contains all elements in either set but not in both.
  * This function completes in O(n/sizeof(long)) operations.
@@ -124,7 +124,7 @@
 extern bitmap *bitmap_symdiff(const bitmap *a, const bitmap *b);
 
 /**
- * Compare two bitmaptors for equality
+ * Compare two bitmaps for equality
  * @param a The first bitmaptor
  * @param b The other bitmaptor
  * @return Similar to memcmp(), with tiebreaks determined by cardinality

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Nagios-commits mailing list