/* Bitset statistics.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This file is a wrapper bitset implementation for the other bitset
#include <string.h>
#include <stdio.h>
-#ifdef HAVE_GETTEXT_H
#include "gettext.h"
#define _(Msgid) gettext (Msgid)
-#else
-#define _(Msgid) Msgid
-#endif
/* Configuration macros. */
#define BITSET_STATS_FILE "bitset.dat"
for (; i < n_bins; i++)
fprintf (file, "%*lu-%lu\t%8u (%5.1f%%)\n",
max_width - ((unsigned int) (0.30103 * (i) + 0.9999) + 1),
- (unsigned long) 1 << (i - 1),
- ((unsigned long) 1 << i) - 1,
+ 1UL << (i - 1),
+ (1UL << i) - 1,
bins[i],
(100.0 * bins[i]) / total);
}
{
case BITSET_ARRAY:
bytes = abitset_bytes (n_bits);
- sbset = (bitset) xcalloc (1, bytes);
+ sbset = xcalloc (1, bytes);
abitset_init (sbset, n_bits);
break;
case BITSET_LIST:
bytes = lbitset_bytes (n_bits);
- sbset = (bitset) xcalloc (1, bytes);
+ sbset = xcalloc (1, bytes);
lbitset_init (sbset, n_bits);
break;
case BITSET_TABLE:
bytes = ebitset_bytes (n_bits);
- sbset = (bitset) xcalloc (1, bytes);
+ sbset = xcalloc (1, bytes);
ebitset_init (sbset, n_bits);
break;
case BITSET_VARRAY:
bytes = vbitset_bytes (n_bits);
- sbset = (bitset) xcalloc (1, bytes);
+ sbset = xcalloc (1, bytes);
vbitset_init (sbset, n_bits);
break;