Hi, On Sat, Oct 01, 2005 at 10:52:51PM +0200, s...@zago.net wrote: > This code is in dire need of de-windowsification. Eg this kind of non > portable code: > typedef unsigned long UINT, DWORD, *LPDWORD;
Unfortunately you are right. The code has been created by Mustek based on their Windows source code. I'll see what size these types really need. I'm pretty sure that "unsigned int" is ok for all of them. The idea is to keep the SANE and Windows driver as close as possible to eachother to enable the Mustek people to add more scanners easier. On the other hand I already had to change a lot of stuff like their split in separate libraries. > There's also some global variables that should be moved somewhere else > (m_bDSOpen, ...) While I also think it's better to don't use global variables for all the scanner states, changing this requires a lot more effort. Also it makes the backend again more different to the Windows driver. I'm not sure yet if that's worth the effort. > The other mustek backend (P 3600 A3 Pro) has the same problems too. That backend hasn't been touched by me yet and is based on the same code base. It's in a similar state as the mustek_usb2 backend before I modified it. It has been published in that early stage as I have gotten quite some questions about sane drivers for it. I'm not sure what to do with the P 3600 A3 Pro backend yet. It's based on the same code as the mustek_usb2 but has quite a lot of changes in every file. So I guess my plan to use one single backend for alls these SQ chips won't work. Thanks for your comments, Henning