Re: developing plustek driver-- questions

Jon Knight (jon@net.lut.ac.uk)
Tue, 21 Jul 1998 17:00:23 +0100 (BST)

On Mon, 20 Jul 1998, Antal Novak wrote:
> Also, for parallel port scanners, how should a backend determine the port
> to use for the scanner? Although 0x378 is all but standard, I would like
> to make this as portable as possible. Should it simply read that from its
> config file, I wonder?

My thoughts on this part was to make a loadable kernel module for the
parallel port low level driver which could then have its port address
default to 0x378 but also have a different port address passed in on the
command line. Of course this ties the solution down to Linux (in my case
- I've not got a FreeBSD box so I don't know if they can support loadable
kernel modules or not). The SANE code then talks to this low level,
platform dependant code using /dev/scanner or /dev/plustek.

Tatty bye,

Jim'll

#!/usr/bin/perl -- -Whois++-client-in-6-lines-of-Perl -Beat-that-Z39.50!
use IO::Socket;sub w{$f=shift;$a{$f}=1;($h,$p,$q)=split("/",$f);$s=
IO::Socket::INET->new(PeerAddr=>"$h:$p")||return;print $s "$q\r\n";while(<$s>)
{next if(/^%/);if(/^# SERVER-TO-ASK/){while(<$s>){$x=$1 if/Name: (.*)\r\n$/;$y
=$1 if/Port: (.*)\r\n$/;$f="$x/$y/$q";@j=(@j,$f)if(/^# END/&&!$a{$f})}}else{
print}}close($s)}@j=shift;while(@j){w(pop(@j))}# whois++.pl host/port/query

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com