defaultVisual, nvisuals, visuals, (miBSFuncPtr) 0))
defaultVisual, nvisuals, visuals))
hpc8ScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)    register ScreenPtr pScreen;    pointer pbits;		/* pointer to screen bitmap */    int xsize, ysize;		/* in pixels */    int dpix, dpiy;		/* dots per inch */    int width;			/* pixel width of frame buffer */{    int	i, j;    VisualPtr	visuals;    DepthPtr	depths;    int		nvisuals;    int		ndepths;    int		rootdepth;    VisualID	defaultVisual;    VisualID *vid = NULL;    hpcFbPtr pFb = hpcGetScreenFb(pScreen);    struct hpcfb_fbconf *fbconf = &pFb->info;    if (!cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width))	return FALSE;    ndepths = 1;    nvisuals = 1;    depths = (DepthPtr)xalloc( sizeof(DepthRec) );    visuals = (VisualPtr)xalloc( sizeof(VisualRec) );    vid = (VisualID *)xalloc( sizeof(VisualID) );    if( !depths || !visuals || !vid ) {	xfree( depths );	xfree( visuals );	xfree( vid );	return FALSE;    }    depths[0].depth = 8;    depths[0].numVids = 1;    depths[0].vids = vid;    if (fbconf->hf_access_flags & HPCFB_ACCESS_STATIC) {	    visuals[0].class = StaticColor;    } else {	    visuals[0].class = PseudoColor;    }    visuals[0].bitsPerRGBValue = 8;    visuals[0].ColormapEntries = 256;    visuals[0].nplanes = 1;    visuals[0].vid = *vid = FakeClientID(0);    visuals[0].redMask   = 0x00e0;    visuals[0].greenMask = 0x001c;    visuals[0].blueMask  = 0x0003;    visuals[0].offsetRed   = 5;    visuals[0].offsetGreen = 2;    visuals[0].offsetBlue  = 0;    rootdepth = 8;    defaultVisual = *vid;    if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,			rootdepth, ndepths, depths,			defaultVisual, nvisuals, visuals,			(miBSFuncPtr) 0))	return FALSE;    /* overwrite miCloseScreen with our own */    pScreen->CloseScreen = cfbCloseScreen;    /* init backing store here so we can overwrite CloseScreen without stepping     * on the backing store wrapped version */    miInitializeBackingStore (pScreen, &cfbBSFuncRec);    return TRUE;}