[sane-devel] How to set a double value?

Thiago Milczarek Sayão thiago.sayao at gmail.com
Thu Mar 11 17:40:32 GMT 2021


So simple.. :)

It seems to work, thanks.

Em qui., 11 de mar. de 2021 às 13:54, Ralph Little <skelband at gmail.com>
escreveu:

> Hi,
>
> On 2021-03-09 1:25 p.m., Thiago Milczarek Sayão wrote:
> > I have a double var that represents a FIXED value as in SANE_TYPE_FIXED.
> >
> > How do I pass it to sane_control_option() as void * ?
> >
> > tried:
> > (void *) double_var
> > (void *) SANE_FIX(double_var)
> >
> >
> I believe that you need to pass a pointer to the value:
>
> e.g.
>
> SANE_Fixed value;
> function(&value);
>
> The callee will know what the referenced type is and will make the
> appropriate cast.
>
> Cheers,
> Ralph
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20210311/0133dade/attachment-0001.htm>


More information about the sane-devel mailing list