static BITMAP *get_bitmap(FILE *p, int w, int h, int flags)
{
	int	i, j;
	BmUnit	*ptr;
	BITMAP	*bm;
	int	bitpos;
	int	currch;
		
	flags = 0; /* shut up that compiler */
	bitpos = -1;
	if((bm = bitmap_alloc(w, h)) == NULL)
		return NULL;
	DEBUG((DBG_BITMAPS, "get_bitmap(%d,%d,%d): reading raw bitmap\n",
		w, h, flags));
	ptr = bm->data;
	currch = 0;
	for(i = 0; i < h; i++) {
		BmUnit	mask;
		
		mask = FIRSTMASK;
		for(j = 0; j < w; j++) {
			if(bitpos < 0) {
				currch = fuget1(p);
				bitpos = 7;
			}
			if(currch & (1 << bitpos))
				*ptr |= mask;
			bitpos--;
			if(mask == LASTMASK) {
				ptr++;
				mask = FIRSTMASK;
			} else
				NEXTMASK(mask);
		}
		ptr = bm_offset(ptr, bm->stride);
	}
	return bm;
}
static BITMAP *get_bitmap(FILE *p, int w, int h, int flags)
{
	int	i, j;
	BmUnit	*ptr;
	BITMAP	*bm;
	int	bitpos;
	int	currch;
		
	flags = 0;  
	bitpos = -1;
	if((bm = bitmap_alloc(w, h)) == NULL)
		return NULL;
	DEBUG((DBG_BITMAPS, "get_bitmap(%d,%d,%d): reading raw bitmap\n",
		w, h, flags));
	ptr = bm->data;
	currch = 0;
	for(i = 0; i < h; i++) {
		BmUnit	mask;
		
		mask = FIRSTMASK;
		for(j = 0; j < w; j++) {
			if(bitpos < 0) {
				currch = fuget1(p);
				bitpos = 7;
			}
			if(currch & (1 << bitpos))
				*ptr |= mask;
			bitpos--;
			if(mask == LASTMASK) {
				ptr++;
				mask = FIRSTMASK;
			} else
				NEXTMASK(mask);
		}
		ptr = bm_offset(ptr, bm->stride);
	}
	return bm;
}