Re: Apple OneScanner/Color OneScanner status?

Ian R. Justman (
Thu, 3 Sep 1998 07:09:28 -0700 (PDT)

On Thu, 3 Sep 1998, Milon Firikis wrote:

> The one and only developer I should say... though there are 4 to 5
> potential user which they had expressed interest. I hope you downloaded
> the sane-0.74 since the apple backend has greatly reworked from the
> sane-0.73 package.

I actually downloaded both; I realized at one point I had 0.73 (which I
got from Walnut Creek CD-ROM's mirror). I ended up getting 0.74 from
tsx-11 (I wasn't up to sifting through the mess that is Sunsite's (and
mirrors') Incoming directory).

> > I have been experimenting with the backend and found (and subsequently
> > corrected) a logic flaw which did not flush the buffer after the scan had
> > completed. The scanner says it wasn't in a blocked condition, yet there
> > was data still in its buffer waiting to be transferred to the host
> > computer. I added a check for still-available data failing the check for
> > a blocked condition as another condition to transfer data from the
> > scanner. I can provide a patch for this (it only affects one line of
> > code).
> >
> I am open to suggestions. You are invited to send/post anything you
> have. I am afraid I didn't excacltry understand what are you describing
> which is OK because if I understood it I would have fixed it.

Here's the patch I came up with:

--- apple.c.orig Wed Sep 2 00:35:21 1998
+++ apple.c Tue Sep 1 20:44:59 1998
@@ -2501,7 +2501,7 @@

if (data_length)
- if (result[3] & 1) /* Scanner Blocked: Retrieve data */
+ if ((result[3] & 1) || data_av) /* Scanner Blocked: Retrieve data */
"sane_read: (status) Available in scanner buffer %u.\n",

At the end of the scan, the block flag has been dropped, yet there might
be data in the scanner buffer. If the check for the block flag fails, it
immediately checks to see if there is any remaining data. If so, the
backend will empty the buffer for the last time.

> > In the meantime, I have since obtained and printed Apple's programming
> > specs for these scanners. They have helped enormously thus far in
> > tracking this particular bug down.
> Cool! Did you find the specs from your own or by the URL stated at the
> man page?

Actually, I found it on my own. I totally missed the URL in the man page,
mainly because I hadn't read it. :)

> Sure there are glitches. I am open to suggestions.

Cool. Any way I could get a copy of the most recent copy of the sources
to the Apple backend? I would lilke to see what's happening with it thus


Ian R. Justman Postmaster, System Administrator, ChocoboNet (home) (work) NIC handle: IJ12

Try EsperNet IRC! Small and personal! takes you to a random server
Admin of, ports 5555, 6666-6669, 7000, Nick: "IJ"
EsperNet Postmaster

I use Linux and FreeBSD, the ultimate "pane" relievers on the PC.
My heart AIX for a faster RS/6000

Hard Disk: n: Future windchimes

Source code, list archive, and docs:
To unsubscribe: echo unsubscribe sane-devel | mail