Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ames!ucbcad!ucbvax!POSTGRES.BERKELEY.EDU!dcmartin From: dcmartin@POSTGRES.BERKELEY.EDU (David C. Martin) Newsgroups: comp.windows.x Subject: Re: X for color sun 3/60 Message-ID: <8711181614.AA07475@avalon.berkeley.edu> Date: Wed, 18-Nov-87 11:14:15 EST Article-I.D.: avalon.8711181614.AA07475 Posted: Wed Nov 18 11:14:15 1987 Date-Received: Sat, 21-Nov-87 10:31:30 EST References: <1403@rtech.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley - Dept of EECS/CS Division Lines: 37 Sun tech support can't read manuals, apparently. I have been hacking on 10.4 to support the cg4 and the file is available for public ftp from postgres.Berkeley.EDU. If you can't get ftp access, let me know and I will see that Joe Cortopossi gets a tape. Anyway, in addition to the fixes for the cg4, there are some enhancements of the basic Sun implementation (for dashed lines, etc...). As for the ioctl problem, this solves it: if ((fd = open(DEV_FB, O_RDWR, 0)) < 0) { fprintf(stderr, "Can't open device %s\n", DEV_FB); return(-1); } /* attempt to get attributes */ if (ioctl(fd, FBIOGATTR, (char *) &fbgattr) < 0) { /* standard ioctl since cg4 special failed */ if (ioctl(fd, FBIOGTYPE, (char *) &fbt) < 0) { /* oops! */ fprintf(stderr, "Can't access device %s.\n", DEV_FB); close(fd); return(-1); } } else { /* set video display to emulate itself */ fbgattr.sattr.emu_type = fbgattr.real_type; /* do the ioctl */ if (ioctl(fd, FBIOSATTR, (char *) &fbgattr.sattr) < 0) { fprintf(stderr, "Can't set the attribute emulation type"); close(fd); return(-1); } /* use fbtype structure for real device */ fbt = fbgattr.fbtype; } close(fd); dcm