[sane-devel] Re: [PATCH] generate hal fdi file

David Zeuthen david at fubar.dk
Tue Mar 20 17:27:43 CET 2007


On Tue, 2007-03-20 at 12:18 +0100, Julien BLACHE wrote:
> David Zeuthen <david at fubar.dk> wrote:
> 
> Hi,
> 
> > So I'm curious if a) you think this is a good idea; and b) whether such
> > a patch would be able to go into mainline SANE? Thanks for considering!
> 
> Looks good to me, as long as the added code in SANE is propery
> #ifdef'd out etc. Let's try not to turn SANE into a Linux-specific
> piece of code :)

Yeah, it would all be #ifdef'ed out (btw, HAL runs on Solaris and
FreeBSD too these days)

> Also, how do you manage different HAL versions ? Is the HAL plugin API
> stable ?
> 
> What would be the impact in terms of:
>  - added code

I think there would be 200-300 LOC in a new file that and maybe 5-10
lines of code in dll.c. The add-on itself would probably be around
500-100 LOC of code but that would be independent on SANE code apart
form linking in libsane. The add-on could use glib but it's not really
necessary and I don't see it using it.

>  - added library dependencies (and here I'm especially worried about
>    bringing in the infamous GLib for the DBus stuff in dll.c, so if we
>    could avoid it, that'd be nice)

Yeah, it would only pull in libdbus and libdbus have no library
requirements except the C library. Specifically glib wouldn't be used
(D-Bus does not use glib anywhere mostly because glib doesn't handle
OOM). 

I'll try writing the patch today but I just need a scanner where the
libsane driver supports buttons. Any recommendations for a cheap scanner
I should get?

Btw, how does the sane-backends build system work? I couldn't find the
Makefile.am files anywhere...

     David





More information about the sane-devel mailing list