On Thu, 26 Jun 2003, Cheshire Cat Fish wrote: > How do I go about reading a file from within my X driver. I want to read in > a table of gamma correction values. If I use fopen() I get an unresolved > symbol error. > > Do I need to link to libc somehow? Or use something other than fopen()?
Drivers can't call libc functions, because drivers binaries are supposed to run on any operating system. XFree86 provides wrappers for some libc functions, but files are deliberately excluded (there is an exception for input device drivers to talk to the device). I think that XF86VidModeSetGammaRamp <X11/extensions/xf86vmode.h> will do what you want. If so write a small client to read the file and use XF86VidModeSetGammaRamp to pass the data to the server. It should be then trivial (or even automatic) to get the driver to take the data from the server, I think it is just a color map change request. Andrew C Aitchison _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
