[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread stef
Hello, here's a simple patch against XSane 0.996 that allows compiling against SANE 1.1 . It doesn't take (yet) advantage of the new warming up status code to give users feedback in this case. Regards, Stef -- next part -- A non-text attachment

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread Julien BLACHE
stef wrote: Hi, > +#if SANE_CURRENT_MINOR >= 1 > + do > + { > +status = sane_start(dev); > + } while (status == SANE_STATUS_WARMING_UP); > +#else Please, tell me this is not busy-looping on sane_start() ... JB. -- Julien BLACHE

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread stef
Le Tuesday 07 October 2008 10:29:21 Julien BLACHE, vous avez ?crit?: > stef wrote: > > Hi, > > > +#if SANE_CURRENT_MINOR >= 1 > > + do > > + { > > +status = sane_start(dev); > > + } while (status == SANE_STATUS_WARMING_UP); > > +#else > > Please, tell me this is not busy-looping on sane_sta

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread m. allan noah
how about adding a 1/2 second usleep and an upper bound on the number of tries? allan On Tue, Oct 7, 2008 at 3:44 PM, stef wrote: > Le Tuesday 07 October 2008 10:29:21 Julien BLACHE, vous avez ?crit : >> stef wrote: >> >> Hi, >> >> > +#if SANE_CURRENT_MINOR >= 1 >> > + do >> > + { >> > +s

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread stef
Le Tuesday 07 October 2008 21:51:10 m. allan noah, vous avez ?crit?: > how about adding a 1/2 second usleep and an upper bound on the number of > tries? > > allan > > On Tue, Oct 7, 2008 at 3:44 PM, stef wrote: > > Le Tuesday 07 October 2008 10:29:21 Julien BLACHE, vous avez ?crit : > >> stef wro

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread Julien BLACHE
stef wrote: Hi, >> Please, tell me this is not busy-looping on sane_start() ... > > sorry can't tell you that. It is indeed doing busy-looping. While it > works > fine with the pnm backend and the rts8891 which handles warming-up, adding a > sleep() in the loop would be better. However,

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-07 Thread Julien BLACHE
Julien BLACHE wrote: > do > { >while (gtk_events_pending()) > gtk_main_iteration(); > >status = sane_start(dev); > } while (status == SANE_STATUS_WARMING_UP); Oh, also, that breaks the API and means that even if SANE 1.1 is binary-compatible with SANE 1.0, a soname bump is mandate

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-08 Thread stef
Le Tuesday 07 October 2008 22:35:37 Julien BLACHE, vous avez ?crit?: > stef wrote: > > Hi, > > >> Please, tell me this is not busy-looping on sane_start() ... > > > > sorry can't tell you that. It is indeed doing busy-looping. While it > > works fine with the pnm backend and the rts8891 which

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-08 Thread Julien BLACHE
stef wrote: Hi, > I agree with you. This is the way that xscanimage was modified to > handle > warming up. Hints to get it even better are welcomed. You can test this > functionality with the 'pnm:warmup' test backend. Whatever, this change will have to be backed out from SANE 1.1. It

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-09 Thread stef
Le Wednesday 08 October 2008 10:00:31, vous avez ?crit?: > stef wrote: > ... > > Whatever, this change will have to be backed out from SANE 1.1. > > It's a backward-incompatible API change in sane_start()'s > semantic. You've introduced a non-fatal error where previously all > errors were fatal on

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-09 Thread Julien BLACHE
stef wrote: > unfortunately, we don't have the same idea of what SANE 1.1 goals > should be. It has only ?been stated that SANE 1.1 will have to be compatible > for backends not frontends. This is because we don't have the ability to test > all the scanners that would have been impacte

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-09 Thread m. allan noah
On Thu, Oct 9, 2008 at 5:07 AM, Julien BLACHE wrote: > stef wrote: > >> unfortunately, we don't have the same idea of what SANE 1.1 goals >> should be. It has only been stated that SANE 1.1 will have to be compatible >> for backends not frontends. This is because we don't have the abilit

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-10 Thread Julien BLACHE
"m. allan noah" wrote: Hi, >> So please increment V_MAJOR in configure.in to 2. You're breaking >> everyone's system without that, and you're going to seriously piss off >> distributors too (me first). > > When i suggested this months ago, you swore that a soversion bump was > out of the questio

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-11 Thread stef
Le Friday 10 October 2008 12:08:40, vous avez ?crit?: > "m. allan noah" wrote: > > Hi, > > >> So please increment V_MAJOR in configure.in to 2. You're breaking > >> everyone's system without that, and you're going to seriously piss off > >> distributors too (me first). > > > > When i suggested thi

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-11 Thread Julien BLACHE
stef wrote: Hi, > frontends will have to be changed to benefit from the improvements in > the new SANE > version. These changes are small, and the sane-frontends package give a > sample > implementation. Frontend developers will find help here if they need. The problem is binary-level

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-13 Thread René Rebe
Hi, Julien BLACHE wrote: > stef wrote: > > Hi, > > >> frontends will have to be changed to benefit from the improvements in >> the new SANE >> version. These changes are small, and the sane-frontends package give a >> sample >> implementation. Frontend developers will find help here i

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-13 Thread m. allan noah
On Mon, Oct 13, 2008 at 11:45 AM, Ren? Rebe wrote: > Hi, > > Julien BLACHE wrote: >> stef wrote: >> >> Hi, >> >> >>> frontends will have to be changed to benefit from the improvements in >>> the new SANE >>> version. These changes are small, and the sane-frontends package give a >>> sample

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-13 Thread Louis Lagendijk
On Mon, 2008-10-13 at 13:55 -0400, m. allan noah wrote: > On Mon, Oct 13, 2008 at 11:45 AM, Ren? Rebe wrote: > > Hi, > > > > Julien BLACHE wrote: > >> stef wrote: > >> > >> Hi, > pseudocode: > > ret = sane_start() > if(ret){ > die("bad status"); > } > > that works in sane 1.0, and fails in

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-13 Thread m. allan noah
On Mon, Oct 13, 2008 at 2:49 PM, Louis Lagendijk wrote: > On Mon, 2008-10-13 at 13:55 -0400, m. allan noah wrote: >> On Mon, Oct 13, 2008 at 11:45 AM, Ren? Rebe wrote: >> > Hi, >> > >> > Julien BLACHE wrote: >> >> stef wrote: >> >> >> >> Hi, > > >> pseudocode: >> >> ret = sane_start() >> if(ret)

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-13 Thread stef
Le Monday 13 October 2008 19:55:30 m. allan noah, vous avez ?crit?: > On Mon, Oct 13, 2008 at 11:45 AM, Ren? Rebe wrote: > > Hi, > > > > Julien BLACHE wrote: > >> stef wrote: > >> > >> Hi, > >> > >>> frontends will have to be changed to benefit from the improvements > >>> in the new SANE ver

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Olaf Meeuwissen
"m. allan noah" writes: >> Julien BLACHE wrote: >>> stef wrote: frontends will have to be changed to benefit from the improvements in the new SANE version. These changes are small, and the sane-frontends package give a sample implementation. Frontend developers will find

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Alesh Slovak
> We have several choices as i see it: > > 1. Remove new status values and release sane 1.1. (do we need to > remove other things?) > > 2. Release this as sane 2.0. > > 3. Reopen the sane 2.0 discussion, and make more drastic changes to the API. > What about doing both 1 & 3 suggested above?

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread stef
Le Tuesday 14 October 2008 03:34:31 Alesh Slovak, vous avez ?crit?: > > We have several choices as i see it: > > > > 1. Remove new status values and release sane 1.1. (do we need to > > remove other things?) > > > > 2. Release this as sane 2.0. > > > > 3. Reopen the sane 2.0 discussion, and make mo

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Alesh Slovak
stef wrote: > It is out of the picture to 'back out' other people work. This > work has been > discussed publicly months ago, and development happened in the open. > If you want to keep with SANE 1.0, then use the SANE 1.0 branch that > has been > planned when work began on

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Rene Rebe
Hi, >> Binary incompatible and breaking would be silently data corruption or >> no longer starting due to missing symbols etc. > > pseudocode: > > ret = sane_start() > if(ret){ > die("bad status"); > } > > that works in sane 1.0, and fails in sane 1.1, both with the original > binary, and with a

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Julien BLACHE
Olaf Meeuwissen wrote: Hi, >> 2. Release this as sane 2.0. > > If there were few other changes besides those for the 1.1 stuff, a > soversion bump is probably the best way to move forward. However, > considering the scope of the changes, 2.0 feels a little like an > overstatement and we could c

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread m. allan noah
On Tue, Oct 14, 2008 at 6:31 AM, Julien BLACHE wrote: > Olaf Meeuwissen wrote: > > Hi, > >>> 2. Release this as sane 2.0. >> >> If there were few other changes besides those for the 1.1 stuff, a >> soversion bump is probably the best way to move forward. However, >> considering the scope of the

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-14 Thread Julien BLACHE
"m. allan noah" wrote: Hi, > while this is technically true, i personally find it kind of annoying. > A library like sane effectively IS its interface, so changing the > interface is changing the version number. Consider that you may need to bump the soname for reasons unrelated to SANE, like A

[sane-devel] Patch to make XSane work with SANE 1.1

2008-10-15 Thread Olaf Meeuwissen
"m. allan noah" writes: > On Tue, Oct 14, 2008 at 6:31 AM, Julien BLACHE wrote: >> Olaf Meeuwissen wrote: >> >> Hi, >> 2. Release this as sane 2.0. >>> >>> If there were few other changes besides those for the 1.1 stuff, a >>> soversion bump is probably the best way to move forward. Howev