Henning Meier-Geinitz wrote: >Hi, > >On Sat, Oct 01, 2005 at 10:52:51PM +0200, [email protected] 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. > > These types are 32 bits on all modern windows (including their 64 bits versions).
>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. > > If mustek intend to provide new code drops that's going to be painful. Couldn't you keep these files insulated from the rest of Sane? > > >>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. > > Unless I'm mistaken, these variables can go into the sane handle. Frank.
