[sane-devel] question about Option_Value union

stef stef-listes at wanadoo.fr
Thu Aug 28 09:34:03 BST 2003


On Thu, Aug 21, 2003 at 09:42:37PM +0000, stef wrote:
> On Thu, Aug 21, 2003 at 03:16:40PM +0200, Henning Meier-Geinitz wrote:
> > Hi,
> > 
> > On Wed, Aug 20, 2003 at 07:45:47AM +0000, stef wrote:
> > > 	I noticed that each backend defines an union like that:
> > > 
> > > typedef union
> > > {
> > >   SANE_Word w;
> > >   SANE_Word *wa;
> > >   SANE_String s;
> > > }
> > > Option_Value;
> > > 
> > > 	Sometimes with fewer fields, sometime with more. Would it be a good idea
> > > to have it declared once for all backends in only one include file ?
> > 
> > I think so, yes. What about sanei_backend.h? Any volunteers to check
> > which fields are needed and change all the backends and
> > sanei_backend.h in CVS?
> > 
> > Bye,
> >   Henning

	Hello,

	I've put up a patch moving Option_Value declaration in sanei_backend.h, and
modifying backends include to use it at 

	http://perso.wanadoo.fr/septieme/Option_Value.patch 

It affects the following files:

sane/sane-backends/backend/abaton.h
sane/sane-backends/backend/agfafocus.h
sane/sane-backends/backend/apple.h
sane/sane-backends/backend/artec_eplus48u.h
sane/sane-backends/backend/artec.h
sane/sane-backends/backend/as6e.h
sane/sane-backends/backend/avision.h
sane/sane-backends/backend/bh.h
sane/sane-backends/backend/canon.h
sane/sane-backends/backend/coolscan.h
sane/sane-backends/backend/dmc.h
sane/sane-backends/backend/epson.h
sane/sane-backends/backend/fujitsu.h
sane/sane-backends/backend/gt68xx_high.h
sane/sane-backends/backend/ibm.h
sane/sane-backends/backend/leo.h
sane/sane-backends/backend/ma1509.h
sane/sane-backends/backend/matsushita.h
sane/sane-backends/backend/mustek.h
sane/sane-backends/backend/mustek_pp.h
sane/sane-backends/backend/mustek_usb_high.h
sane/sane-backends/backend/nec.h
sane/sane-backends/backend/pie.c
sane/sane-backends/backend/plustek.h
sane/sane-backends/backend/qcam.h
sane/sane-backends/backend/ricoh.h
sane/sane-backends/backend/sceptre.h
sane/sane-backends/backend/sharp.h
sane/sane-backends/backend/snapscan.h
sane/sane-backends/backend/tamarack.h
sane/sane-backends/backend/teco1.h
sane/sane-backends/backend/teco2.h
sane/sane-backends/backend/teco3.h
sane/sane-backends/backend/test.h
sane/sane-backends/backend/umax.h
sane/sane-backends/backend/umax_pp.h
sane/sane-backends/backend/v4l.h
sane/sane-backends/include/sane/sanei_backend.h

	Before going further, it should be reviewed. I noticed that there are some
variations between backends in the usage of #include <> and #include "" . But it's
only cosmetic.

Regards,
	Stef



More information about the sane-devel mailing list