struct fbinfo fb;
struct fbtype fb;
InitOutput(screenInfo, argc, argv)    ScreenInfo *screenInfo;    int argc;    char **argv;{    int i, fd, imageByteOrder, bitmapScanlineUnit, bitmapScanlinePad;    int bitmapBitOrder, numPixmapFormats;    struct fbinfo fb;    screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;    screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;    screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;    screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;    if ((fd = open("/dev/fb0", O_RDWR | O_NDELAY, 0)) < 0)	ErrorF("couldn't open /dev/fb0\n");    /* Damn DEC ioctls() aren't enough. Using the Sun ones too... */    if (ioctl(fd, FBIOGTYPE, &fb) < 0) {	ErrorF("FBIOGTYPE ioctl failed: %s\n", strerror(errno));	exit(1);    }        /* XXX horrible... */    close(fd);    screenInfo->numPixmapFormats = (fb.fb_depth == 8 ? 2 : 1);    for (i = 0; i < screenInfo->numPixmapFormats; i++) {	screenInfo->formats[i].depth = formats[i].depth;	screenInfo->formats[i].bitsPerPixel = formats[i].bitsPerPixel;	screenInfo->formats[i].scanlinePad = formats[i].scanlinePad;    }    pmaxScreenPrivateIndex = AllocateScreenPrivateIndex();    AddScreen(pmaxScreenInit, argc, argv);}