Scanner-logiscan

Andreas Beck

becka@sunserver1.rz.uni-duesseldorf.de

愳娸椙帯 - 擔杮岅栿

kawagisi@yk.rim.or.jp

Revision History                                                       
Revision v0.0.4j                      1997擭11寧15擔                   
偙偺東栿偺儕儕乕僗                                                     
Revision v0.0.4                       1995擭2寧14擔                    
logiscan-0.0.4 僷僢働乕僕偺儕儕乕僗                                    

LOGITECH SCANMAN+ 400dpi 僴儞僪僿儖僪僗僉儍僫梡僪儔僀僶 "logiscan
v0.0.4" 偵晅懏偺僪僉儏儊儞僩椶

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Table of Contents
偙偺暥彂偵偮偄偰
1. README
   
    1.1. Copyright
    1.2. 偼偠傔偵
    1.3. 僀儞僗僩乕儖偺曽朄
    1.4. 儘乕僪帪偺僷儔儊乕僞偺曄峏曽朄
    1.5. 僾儘僌儔儅偺偨傔偺拲堄帠崁
    1.6. 僶僌曬崘偺拲堄揰
    1.7. 偝傜側傞僿儖僾偲忣曬
   
2. README.ioctl
   
    2.1. 偼偠傔偵
    2.2. 僒億乕僩偝傟偰偄傞 ioctl 婡擻
    2.3. 晅榐
   
3. demo/README
   
    3.1. Copyright
    3.2. 僨儌僾儘僌儔儉偵偮偄偰
    3.3. TODO
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

偙偺暥彂偵偮偄偰

    LOGITECH SCANMAN+ 400 dpi handheld scanner driver version 0.0.4
   
偙偺僪僉儏儊儞僩偼丄 LOGITECH SCANMAN+ 400 dpi 僴儞僪僿儖僪僗僉儍僫梡僪
儔僀僶 Version 0.0.4 偵晅懏偺僪僉儏儊儞僩傪嶌幰 Andreas Beck
<becka@sunserver1.rz.uni-duesseldorf.de> 偺嫋壜傪摼偰東栿偟偨傕偺偱偡丅

  戞侾晹  尦偺僼傽僀儖柤丗 README
          僼傽僀儖偺擔晅丗 Feb 14  1995
          嶌幰          丗 Andreas Beck
  戞俀晹  尦偺僼傽僀儖柤丗 README.ioctl
          僼傽僀儖偺擔晅丗 Dec 24  1994
          嶌幰          丗 Andreas Beck
  戞俁晹  demo 僨傿儗僋僩儕偺拞偺 README
          僼傽僀儖偺擔晅丗 Nov 21  1994
          嶌幰          丗 Andreas Beck

  嶌惉擔 丗 1997擭11寧15擔
  東栿幰 丗 愳娸 椙帯  <kawagisi@yk.rim.or.jp>

亂栿拲1亃僼傽僀儖偺擖庤偲揥奐

偙偺僜僼僩(logiscan0.0.4) 偼壓婰偐傜擖庤偱偒傑偡丅

 丒 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scanner/
   
偙傟傪僟僂儞儘乕僪偟偨傜師偺傛偆偵偟偰 /usr/src/ 僨傿儗僋僩儕偵揥奐偟傑
偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  # cd  /usr/src                                                    劆
劆  # tar xvfz ~/logiscan-x.x.tar.gz                                  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

(忋婰偼 logiscan-x.x.tar.gz 偑丄~/ 僨傿儗僋僩儕偵偁傞応崌偱偡偑丄偦傟埲
奜偺帪偼偦偺僨傿儗僋僩儕偵崌傢偣偰曄偊偰壓偝偄) /usr/src/logiscan-x.x/
僨傿儗僋僩儕偑嶌傜傟丄偦偙偵僼傽僀儖偑揥奐偝傟傑偡丅
logiscan-0.0.4.tar.gz 偵偼壓婰偺傛偆側僪僉儏儊儞僩僼傽僀儖偑擖偭偰偄傑
偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆    (1) README                                                                劆
劆    (2) README.ioctl (logi32.o 偵傛偭偰採嫙偝傟傞 ioctl 僀儞僞僼僃乕僗傪巊偆  劆
劆                      傾僾儕働乕僔儑儞奐敪幰偺僈僀僪儔僀儞)                   劆
劆    (3) CHANGELOG    (曄峏棜楌)                                               劆
劆    (4) CREDITS      (偙偺僾儘僌儔儉偺嶌惉偵嫤椡偟偨恖偺堦棗)                 劆
劆    (5) COPYING      (GNU GENERAL PUBLIC LICENSE  Version 2, June 1991)       劆
劆    (6) demo 僨傿儗僋僩儕偺拞偺 README                                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙偺暥彂 Scanner-HOWTO-logiscan 偼丄忋婰偺偆偪 (1) (2) (6) 傪栿偟偨傕偺
偱偡丅 (3) (4) (5) 偼尨暥傪偛棗壓偝偄丅

亂栿拲2亃嵟怴斉偲儊乕儖傾僪儗僗

嵟怴斉偼丄logiscan0.0.5 偱壓婰偐傜僟僂儞儘乕僪偱偒傑偡丅

 丒 http://sunserver1.rz.uni-duesseldorf.de/~becka
   
嶌幰傊偺儊乕儖偼傾僪儗僗偑曄峏偝傟偰偄傑偡偺偱拲堄偟偰壓偝偄丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  (媽)  becka@hp.rz.uni-duesseldorf.de                              劆
劆  (怴)  becka@sunserver1.rz.uni-duesseldorf.de                      劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
偙偙偱栿偟偨俁偮僪僉儏儊儞僩帺懱偼 0.0.4 偲 0.0.5 偱曄峏偑柍偔丄慡偔摨
偠偺傛偆偱偡丅嶌幰偺儊乕儖傾僪儗僗偼丄0.0.5 偱傕屆偄傑傑側偺偱梫拲堄偱
偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Chapter 1. README

1.1. Copyright

Copyright (C) 1994  Andreas Beck <becka@hp.rz.uni-duesseldorf.de>
亂栿拲亃尰嵼偺傾僪儗僗偼丄becka@sunserver1.rz.uni-duesseldorf.de

 

偙偺僾儘僌儔儉偼僼儕乕僜僼僩僂僃傾偱偡丅偁側偨偼丄偙傟傪 Free Software
Foundation 偑敪峴偟偰偄傞 GNU General Public License 偺儔僀僙儞僗偺僶乕
僕儑儞俀丄傑偨偼(偁側偨偺僆僾僔儑儞偱)偦傟埲崀偺忦審偵廬偭偰嵞攝晍偟偨
傝曄峏偡傞偙偲偑偱偒傑偡丅

偙偺僾儘僌儔儉偼丄栶偵棫偮偙偲傪婜懸偟偰攝晍偟偰偄傑偡丅偟偐偟丄偄偐側
傞曐徹傕偁傝傑偣傫丅彜昳惈傗摿掕梡搑傊偺揔崌惈偵偮偄偰偺埫栙偺曐徹偡傜
偁傝傑偣傫丅徻偟偔偼丄GNU 偺 General Public License 傪偛棗壓偝偄丅

偁側偨偼丄偙偺僾儘僌儔儉偲堦弿偵 GNU General Public License 偺僐僺乕傪
庴偗庢傞傋偒偱偡丅偦偆偱側偄側傜偽丄 Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA 偵庤巻傪彂偄偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.2. 偼偠傔偵

Hi folks!

偙傟偼 LOGITECH SCANMAN+ 僗僉儍僫梡偺僪儔僀僶偱丄愱梡偺僀儞僞僼僃乕僗儃
乕僪傪捠偟偰僪儔僀僽偝傟傑偡丅偙偺僗僉儍僫偵偼偄偔偮偐偺僶乕僕儑儞偑偁
傝傑偡偑丄偙偺僪儔僀僶偼彮側偔偲傕偦傟傜偺偄偔偮偐傪僒億乕僩偟傑偡丅

 1. 屆偄 Logitech Scanman : 200dpi 屌掕偺敀崟僗僉儍僫 (偳側偨偐偙傟傪偍
    帩偪偱偡偐丠偙傟偼僨傿僓張棟偑偱偒傑偡偐丠崱偺偲偙傠偙傟偼夝憸搙屌
    掕偱 Scanman32 偲偟偰埖傢傟傑偡)
   
 2. 彮偟怴偟偄 Logitech Scanman32 (aka Scanman+) : 敀崟偺 100乣400 dpi
    偺僗僉儍僫偱丄 6x6 僨傿僓張棟(夝憸搙傪 1/6 偵壓偘偰 37怓偵偡傞)偑壜
    擻丅
   
 3. Logitech Scanman256 :
   
    100乣400 dpi 偺僌儗僀僗働乕儖丒僗僉儍僫偱丄僨傿僓張棟柍偟偱 1bit(敀
    崟俀抣), 4bit(16奒挷), 6bit(64奒挷), 8bit(256奒挷)偺夝憸搙偑偁傝傑
    偡丅偙偺僞僀僾偺僗僉儍僫偵偼拲堄偟偰壓偝偄埉婛偵弎傋偨傛偆偵偙傟偵
    偼偄偔偮偐偺僶乕僕儑儞偑偁傝傑偡(堎側偭偨僴乕僪僂僃傾傪巊梡偟偰偄傑
    偡)丅偁傞恖偑巹偵偙偺 Rev-03 儃乕僪偺埖偄曽傪嫵偊偰偔傟偨偺偱丄偙偺
    栤戣偼尰嵼偱偼僼傿僢僋僗偝傟偰偄傞偲巚偆偺偱偡偑丄傕偟偐偟偰懠偺傕
    偺偑偁偭偨偲偟偨傜... 廬偭偰僪儔僀僶偑 "incompatible
    scanner-interface " 偲曬崘偟偰偒偨傜偦傟偼暿偺屳姺惈偺柍偄儃乕僪偱
    偁傞偐丄偁傞偄偼儀乕僗 I乛O 傾僪儗僗偺愝掕偑娫堘偭偰偄傑偡丅偙偺傛
    偆側帪偼丄偁側偨偺僗僉儍僫丒僜僼僩僂僃傾丒僨傿僗僋偵擖偭偰偄傞
    HHSCAND.SYS 傪巹偵憲偭偰壓偝偄丅
   
    僪儔僀僶偼 insmod 傪巊偭偰儘乕僪偡傞帪偵僗僉儍僫偺僞僀僾傪帺摦専弌
    偟傑偡丅
   
    僪儔僀僶偑 "Unknown" 偲儗億乕僩偡傞偑僗僉儍僫偼摦嶌偡傞偲偄偆応崌
    (偙傟偼 code-tweaking 偑昁梫偱偡偑...)丄偁側偨偺僴乕僪僂僃傾傪偳偺
    傛偆偵偟偰専弌偡傞偐傪尒偮偗傞傛偆帋偟偰丄偳偺傛偆側曄峏偑昁梫偐傪
    巹偵嫵偊偰壓偝偄丅巹偼丄偁側偨偺僷僢僠傪崱屻偺儕儕乕僗偵擖傟傞傛偆
    偵偟傑偡丅慡偰傪曄峏偡傞傛偆側僷僢僠傪巹偵憲傜側偄偱壓偝偄丅懄偪丄
    巹偼尰嵼偺傕偺偐傜杮摉偵堎側傞傕偺傪埖偆傛偆側僗僉儍僫偼僒億乕僩偟
    傑偣傫丅
   
    偙偺僪儔僀僶偼僗僉儍僫偵晅懏偺 MS-LOSS 梡僗僉儍僫僪儔僀僶 [1] 傪媡
    傾僙儞僽儖偟偰廤傔偨忣曬傪尦偵偟偰偄傑偡丅偙傟埲奜偺捛壛忣曬丄梫朷
    丄採埬丄僶僌曬崘偑偁傟偽丄墦椂柍偔巹偵尵偭偰壓偝偄丅(壓婰偺僶僌曬崘
    傪偛棗壓偝偄) 巹偼摿偵丄懠偺僗僉儍僫丒僨僶僀僗僪儔僀僶傪彂偔恖偐傜
    偺僼傿乕僪僶僢僋傪摼傞偙偲偵嫽枴偑偁傝傑偡丅
   
    巹偨偪偼 Linux 偺慡偰偺僗僉儍僫僪儔僀僶偵巊傢傟傞僀儞僞僼僃乕僗傪堦
    偮偵傑偲傔傞偙偲偑偱偒傞偐傕偟傟傑偣傫丅偦偆側傟偽懡偔偺恖払偑彂偔
    偱偁傠偆丄僇儔僼儖側 X 儀乕僗偺僗僉儍僫僾儘僌儔儉偑丄懡偔偺僗僉儍僫
    偱僒億乕僩偝傟摦嶌偡傞傛偆偵側傞偱偟傚偆丅
   
    巹偼婛偵 M105 偲 A4-tech 僪儔僀僶偺嶌幰偲偼楢棈嵪傒偱丄巹偨偪偼僗僉
    儍僫僆僾僔儑儞梡偺 ioctl 偺"枩擻"僙僢僩偺愝掕偵僩儔僀偟偰偄傑偡丅偁
    側偨偑偙偺嶌嬈偵嶲壛偡傞偙偲偵嫽枴偑偁傞側傜(偁側偨偼偙偺傛偆側 API
    偺宱尡偑偁傞偐傕偟傟側偄) README.ioctl 傪撉傒丄巹(傑偨偼 Thomas 傑
    偨偼 Michael 壓婰嶲徠)偵憲偭偰壓偝偄丅
   
    傑偨丄偁側偨偑慺揋側僗僉儍僫僾儘僌儔儉傪彂偄偨傜巹偵憲偭偰壓偝偄丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.3. 僀儞僗僩乕儖偺曽朄

 

 1. 僪儔僀僶偼丄僇乕僱儖丒儘乕僟僽儖丒儌僕儏乕儖側偺偱丄柧傜偐偵嵟弶偵
    偡傞傋偒偙偲偼 `modutils' 僷僢働乕僕傪帩偭偰偄側偄応崌偼偙傟傪擖庤
    偟僀儞僗僩乕儖偡傞偙偲偱偡丅
   
 2. src 僨傿儗僋僩儕偵堏偭偰 logi32.h 偺愭摢傪尒偰壓偝偄丅昁梫偵墳偠偰
    丄傑偨僴乕僪僂僃傾愝掕偵墳偠偰掕媊傪曇廤偟傑偡丅 IOBASE 偩偗偼僨傿
    僢僾僗僀僢僠偺愝掕偵崌傢偣側偗傟偽偄偗傑偣傫偑丄 IRQ 偲 DMA 偼僜僼
    僩僂僃傾偱慖戰壜擻偱偡丅 IRQ 偲 DMA 偼懠偺僴乕僪僂僃傾偵傛偭偰巊傢
    傟偰偄側偄傕偺傪巊偭偰壓偝偄丅(SoundBlaster 偑僀儞僗僩乕儖偝傟偰偄
    傞側傜 DMA 1 偼巊傢傟偰偄傞偲巚偄傑偡)
   
    愝掕偱偒傞傕偺偼 IRQ 偑 2(9),3,4,5,7,9(2),11,12 偱丄DMA 偑 1 傑偨偼
    3 偱偡丅嵟怴偺僇乕僱儖(僗僞僢僋僪儌僕儏乕儖傪僒億乕僩偟偰偄傞)偲丄
    懳墳偟偨 modutils 偱偼丄儌僕儏乕儖偺儘乕僪帪偵偙傟傜偺抣(偲丄儊僕儍
    乕僨僶僀僗斣崋丅4)崁嶲徠 )傪曄峏偡傞偙偲偑偱偒傑偡丅偙傟傪偳偺傛偆
    偵偡傞偺偐偼丄"man insmod" 偱挷傋偰壓偝偄丅娭學偺偁傞曄悢偼
    logi32.c 偺愭摢丄傑偨偼僪儔僀僶傪忢挀偝偣偨帪偵 ksyms 偺弌椡偺拞偱
    尒偮偐傝傑偡丅
   
 3. scanner.h 傪偳偙偐揔摉側応強( usr/local/include 偑偍姪傔)偵堏偟偰壓
    偝偄丅scanner.h 偼偁側偨偺僔僗僥儉忋偱 "偨偩堦偮偺僶乕僕儑儞" 偱採
    嫙偝傟偰偄傞偺偩偲偄偆偙偲傪傛偔妎偊偰偍偄偰壓偝偄丅巹偼丄僪儔僀僶
    偑僗僉儍僫僜僼僩僂僃傾偱偼側偄懠偺 scanner.h 偲僐儞僷僀儖偝傟偨帪偺
    僩儔僽儖傪戲嶳暦偄偰偄傑偡丅
   
    PINT (UNIX 梡偺嫟捠僗僉儍僫僀儞僞僼僃乕僗丅Copyright (C) 1994
    Kenneth Stailey ken@spacenet.com)偺僒億乕僩壓偱僐儞僷僀儖偟偨偄側傜
    Makefile 偱 -D 偵憡摉偡傞偙偲傪僀僱乕僽儖偵偟丄<scanio.h> 僼傽僀儖
    傪懠偺揔愗側応強偵堏偟偰壓偝偄丅(偙傟偼懠偺僔僗僥儉忋偺 /usr/
    [local]/include/sys 偵偁傞傛偆偵尒偊傞偲偄偆揰偵拲堄偟偰壓偝偄丅偩
    偐傜丄偦傟傪偦偙偵抲偔偲偄偆偺偼椙偄峫偊偱偡)
   
    僪儔僀僶傪僐儞僷僀儖偡傞偵偼丄
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  make                                                  劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    偲擖椡偟偰壓偝偄丅儌僕儏乕儖傪慻傒崬傓偵偼丄
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  insmod logi32.o                                       劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    偲擖椡偟偰壓偝偄丅
   
    僔儞儃儖偑柍偄偲儘乕僟偑暥嬪傪尵偭偰偒偨帪偼丄偦傟傜傪 kernel/
    ksyms.c 偵壛偊偰壓偝偄丅 (傑偨偼丄傕偭偲椙偄偺偼丄偦偺僪儔僀僶偵偲
    偭偰偼杮摉偵屆偔偝偄僇乕僱儖傪傾僢僾僨乕僩偡傞偙偲偱偡...)
   
    kernel/ksyms.c 傪曄峏偡傞傋偒偩偭偨側傜丄僇乕僱儖傪嵞僐儞僷僀儖偟丄
    偦偺曄峏傪斀塮偝偣傞偨傔偵儕僽乕僩偡傞昁梫偑偁傝傑偡丅
   
 4. 僨僶僀僗偺僗儁僔儍儖僼傽僀儖傪嶌惉偟傑偡丅
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  mknod -m 444 /dev/logiscan c 26 0                     劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    /dev/scan 偵僔儞儃儖儕儞僋傪挘傝傑偡丅
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  ln -s /dev/logiscan /dev/scan                         劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    MAKEDEV 偺嵟怴僶乕僕儑儞偼丄揔愗側僨僶僀僗傪惗惉偡傞偙偲傕偱偒傞偼
    偢偱偡丅乽MAKEDEV 傪巊偆慜偵乿 logi32.o 偑儘乕僪偝傟偰偄側偗傟偽側
    傜側偄偙偲偵拲堄偟偰壓偝偄丅 MAKEDEV 偼丄logitech 僗僉儍僫僪儔僀僶
    傪専弌偟丄偦偙偵懚嵼偡傞儊僕儍乕僨僶僀僗傪尒偮偗傞偨傔偵 /proc/
    devices 偺忣曬傪巊偆偐傜偱偡丅偝傜偵徻偟偄偙偲偼丄娭學偡傞僪僉儏儊
    儞僩傪偛棗壓偝偄丅
   
        (拲): 忋婰偺 `26' 偼儊僕儍乕僨僶僀僗斣崋偱偡丅偦傟偑婛偵巊傢傟
        偰偄傞応崌(偦傟傪儘乕僪偟傛偆偲偡傞嵺丄僪儔僀僶偼乽cannot
        register major number丗儊僕儍乕斣崋偑搊榐偱偒傑偣傫乿偲暥嬪傪尵
        偆)偼丄懠偺巊傢傟偰偄側偄斣崋傪慖傃 `logi32.h' 偺
        LOGI32_SCANNER_MAJOR 偺掕媊傪偦傟偵曄峏偟偰壓偝偄丅
       
        怴偟偄僇乕僱儖偱偼丄儊僕儍乕傪摦揑偵妱傝晅偗傞偙偲偑偱偒傑偡丅
        偙偺傛偆偵偟偨偄帪偼丄掕媊傪 0 偵乽僙僢僩偟偰壓偝偄丅扐偟丄偙偆
        偡傞偲丄僪儔僀僶傪儘乕僪偡傞搙偵儊僕儍乕偑曄傢傞偺偱丄枅夞僨僶
        僀僗偺僗儁僔儍儖僼傽僀儖傪嶌惉偡傞昁梫偑偁傞偲偄偆偙偲偵拲堄偟
        偰壓偝偄丅
       
 5. `logi32.o' 傪僇乕僱儖儌僕儏乕儖傪僉乕僾偡傞偨傔偺偳偙偐偵僐僺乕偟偰
    壓偝偄丅
   
 6. 摦嶌妋擣
   
    (s)vgalib 偑摦嶌偟偰偄傞側傜丄 ./demo 僨傿儗僋僩儕偺 gifscan 傪價儖
    僪偟偰壓偝偄丅svgalib 偑柍偄側傜丄偙偺僷僢働乕僕偵擖偭偰偄傞僗僋儕
    僾僩 scan.sh 偼晄梫偱偡丅偩傟偐丄偁側偨偺偨傔偵彫偝側僗僉儍儞僾儘僌
    儔儉傪嶌偭偰偔傟傞偄偄恖傪尒偮偗傞傑偱偼丄cat </dev/scan > 僼傽僀儖
    偺傛偆側傗傝曽偱枮懌偡傞懠偁傝傑偣傫丅(傑偨偼丄GIF 僼傽僀儖偵
    "blind-scan" 偱偒傞傛偆偵偡傞偨傔偵 gifscan 偐傜慡偰偺 vga 偵娭偡傞
    傕偺傪庢傝彍偔昁梫偑偁傝傑偡) pbm 僼傽僀儖偵捈愙僗僉儍儞偟偨傕偺傪
    奿擺偡傞 pbmscan 偲偄偆怴偟偄僷僢働乕僕偑偁傝傑偡丅偙傟偼 svgalib
    偑晄梫偱丄GIF 偵彂偒崬傓傛傝偐側傝崅懍偱偡丅巹偼 PINT 僀儞僞僼僃乕
    僗梡偵壗偑偁傞偐抦傝傑偣傫丅偙傟傪巊偭偨椙偄傾僾儕働乕僔儑儞傪嫵偊
    偰壓偝偄丅 (壜擻側傜)巹偺僪儔僀僶偱摦偔側傜
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.4. 儘乕僪帪偺僷儔儊乕僞偺曄峏曽朄

怴偟偄 modutils (偲僗僞僢僋僪儌僕儏乕儖僒億乕僩)偱丄儘乕僪帪偵壓婰偺僷
儔儊乕僞偺抣傪梌偊傞偙偲偑偱偒傑偡丅廬偭偰愝掕傪曄偊偨偄応崌偱傕丄僪儔
僀僶傪嵞僐儞僷僀儖偡傞昁梫偼偁傝傑偣傫丅

"insmod logi32.o LOGI_FOOBAR=%d" 偱僪儔僀僶傪儘乕僪偟傑偡丅%d 偑僷儔儊
乕僞傪愝掕偡傞偨傔偺抣偱偡丅偙偺婡擻偵娭偡傞傛傝徻偟偄偙偲偼 insmod 偺
僪僉儏儊儞僩傪偛棗壓偝偄丅

巊梡偱偒傞僷儔儊乕僞偼埲壓偺偲偍傝偱偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  LOGI_DEBUG    偙傟傪 0 埲奜偺抣偵偟偰丄僨僶僢僌儌乕僪偱僐儞僷僀儖偡傞偲丄         劆
劆                僪儔僀僶偼僨僶僢僌忣曬傪弌椡偟傑偡丅偦偆偱側偄偲偒偼偙偺曄悢偼      劆
劆                尰傟傑偣傫丅                                                        劆
劆                                                                                    劆
劆  LOGI_MAJOR    儊僕儍乕斣崋丅0 偼乽僇乕僱儖偵僼儕乕側傕偺傪慖戰偝偣傞乿偙偲傪      劆
劆                堄枴偟傑偡丅                                                        劆
劆                                                                                    劆
劆  LOGI_IOBASE   僗僉儍僫偺儀乕僗傾僪儗僗偱偡丅偙傟偼惓偟偔側偗傟偽側傝傑偣傫丅      劆
劆                偦偆偱側偄偲僪儔僀僶偼弶婜壔偲儃乕僪偺専弌偵幐攕偟傑偡丅            劆
劆                                                                                    劆
劆  LOGI_IRQ      僗僉儍僫偑巊梡偡傞 IRQ 偱偡丅                                       劆
劆                                                                                    劆
劆  LOGI_DMA      DMA 僠儍儞僱儖偱偡丅                                                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.5. 僾儘僌儔儅偺偨傔偺拲堄帠崁

僪儔僀僶偼僗僉儍僫偲偺捠怣偺偨傔偵 DMA 揮憲偲IRQ傪巊梡偟傑偡丅偄偢傟偺
僠儍僱儖傕僜僼僩僂僃傾偱愝掕偱偒傑偡丅(徻偟偔偼 logi32.h 傪偛棗壓偝偄)
僗僉儍僫偼侾儔僀儞僗僉儍儞偡傞搙偵妱傝崬傒梫媮傪敪峴偡傞偺偱丄桳岠側僨
乕僞傪摼傞偨傔偵 busy-wait 張棟傪偡傞昁梫偼偁傝傑偣傫丅

僪儔僀僶偼撪晹偵(僟僀僫儈僢僋傾儘働乕僩偺)僶僢僼傽傪僉乕僾偟傑偡丅偙偺
僶僢僼傽偺僨僼僅儖僩偺僒僀僘偼丄50 僗僉儍儞儔僀儞暘 (logi32.h 傪嶲徠)偱
偡偑 ioctl 僐乕儖傪捠偟偰挷惍壜擻偱偡丅(壓婰嶲徠) /dev/scan 傪巊偭偰偄
傞僾儘僙僗偑尰嵼幚峴偟偰偄偰傕偄側偔偰傕丄僗僉儍僫偐傜偺僨乕僞揮憲偼僶
僢僼傽偑僼儖偵側傞傑偱桳岠偱偁傞偙偲偵拲堄偟偰壓偝偄丅偙傟偼丄僾儘僙僗
偑掆巭偟偨傝僗儚僢僾傾僂僩偟偰傕丄僶僢僼傽僗儁乕僗偑偁傞偺偱僨乕僞敳偗
偼柍偄偲偄偆偙偲傪堄枴偟傑偡丅

僪儔僀僶偼丄堦夞偺 read(2) 僐乕儖偱擟堄偺僶僀僩悢傪撉傒崬傓偙偲偑偱偒傞
傛偆偵側偭偰偄傑偡偑丄撪晹僶僢僼傽偼堦夞偺 read(2) 僐乕儖偱僶僢僼傽偵僼
傿僢僩偟偨埲忋偺僶僀僩悢傪梫媮偟偨応崌偼偆傑偔偄偐側偄偲偄偆揰偵拲堄偟
偰壓偝偄丅捠忢丄b/w 儌乕僪偱僗僉儍儞偡傞応崌偼堦夞偵侾僗僉儍儞儔僀儞暘
傪撉傒崬傒丄僴乕僼僩乕儞儌乕僪偺応崌偼偨傇傫悢僗僉儍儞儔僀儞暘傪撉傒崬
傓偱偟傚偆丅 read(2) 僐乕儖偑僔僌僫儖偵傛偭偰妱傝崬傑傟傞偲丄read(2) 偼
撉傒崬傫偩僶僀僩悢傪曉偟傑偡丅巹偼偙傟偑 EINTR 偺栠傝偺 `昗弨揑側' 怳傞
晳偄偲偼堎側傞偙偲傪抦偭偰偄傑偡偑丄僗僉儍僫偱偼偙偺曽朄偑棟偵偐側偭偰
偄傞偺偱偡丅(暿偺曽朄偱偼撪晹僶僢僼傽偺婛懚偺僨乕僞傪偄偔傜偐幐偭偰偟傑
偆) 僗僉儍僫僨僶僀僗忋偱 select(2) 傪偡傞偲丄僶僢僼傽偺拞偵嵟掅偱傕侾僗
僉儍儞儔僀儞偺僨乕僞偑偁傟偽丄僨僶僀僗偼 `ready' 偲偟偰擣幆偝傟傑偡丅偟
偐偟偙傟傕曄峏偱偒傑偡丅(壓婰嶲徠)

僒億乕僩偝傟偨 ioctl 婡擻偺偨傔偵丄 README.ioctl 傪偍撉傒壓偝偄丅偟偐偟
丄 ioctl 僀儞僞僼僃乕僗偼傑偩奐敪拞偱偁傝丄廬偭偰曄峏偑偁傝偦偆偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.6. 僶僌曬崘偺拲堄揰

僶僌傪宱尡偝傟偨傜巹偵嫵偊偰壓偝偄丅偁側偨偺僶僌曬崘偵偼偦傟傪嵞尰偡傞
曽朄丄傑偨偼彮側偔偲傕巹偑暘偐傞傛偆偵惓妋側忬嫷傪愢柧偟偨傕偺傪揧晅偟
偰壓偝偄丅儊僢僙乕僕偺拞偺僶僌寢壥丄椺偊偽

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  general protection: xxxx                                          劆
劆  EIP:    0010:xxxxxxxx                                             劆
劆  EFLAGS: xxxxxxxx                                                  劆
劆  eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx     劆
劆  esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx                     劆
劆  ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx                            劆
劆  Pid: xx, process nr: xx                                           劆
劆  xx xx xx xx xx xx xx xx xx xx                                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偑丄夋柺偁傞偄偼僔僗僥儉儘僌偵偁傟偽丄偦傟傪惓妋偵僐僺乕偟丄僗僉儍僫僪
儔僀僶偑儘乕僪偝傟偰偄傞儘働乕僔儑儞偲斾妑偟偰丄偦偺斖埻撪偐偳偆偐傪尒
偰壓偝偄丅偙傟偼 insmod 傪幚峴偡傞偲昞帵偝傟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  module `Logi32' (2 pages @ 0x0080c000) created                    劆
劆                             ^^^^^^^^^^ 巹偑抦傝偨偄偺偼偙傟偱偡... 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙傟偑偦偺斖埻撪偱偼側偄(僇乕僱儖偺偳偙偐懠偺強)応崌丄zSystem.map 偱
EIP 偺抣 (`0010:'偵懕偄偨傕偺偱偼側偄) 傪憑偟丄 zSystem.map 偺娭學偁傞
晹暘傪娷傔偰壓偝偄丅

傕偟偦偆側傜偽 'nm -n logi32.o >logi32.map' 僐儅儞僪傪巊偭偰僪儔僀僶偺
儅僢僾傪嶌傝丄偁側偨偺儗億乕僩偵偙傟傪娷傔偰壓偝偄丅偁側偨偺僶僌曬崘偵
丄偙傟傜俀偮偺晹暘偺偳偪傜偐偑寚偗偰偄傞側傜丄巹偵偲偭偰堄枴偑柍偄偲偄
偆偙偲偵拲堄偟偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

1.7. 偝傜側傞僿儖僾偲忣曬

僪儔僀僶梡偺儊乕儕儞僌儕僗僩偑偁傝丄偦偙偵偼嵟怴偺忣曬僼傽僀儖偑偁傝傑
偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  >>>> info logiscan                                                劆
劆  [Last updated on: Wed Aug 10 10:41:58 1994]                       劆
劆                             LOGISCAN MILINGLIST                    劆
劆                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆                         !!! 廳梫側拲堄 !!!                         劆
劌劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劎
劆偙偺儊乕儕儞僌儕僗僩偼丄LOGITECH 偺岞幃側儕僗僩偱偼偁傝傑偣傫 !!!   劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆 .---------------------------------------------------------------------------.  劆
劆 |  偙偺儊乕儕儞僌儕僗僩偼丄 Linux 梡偺 Logitech 僗僉儍僫僪儔僀僶偺奐敪幰    |  劆
劆 |  (庡偵 Andreas Beck ) 偲偦偺儐乕僓娫偺    |                                  劆
劆 |  僐儈儏僯働乕僔儑儞傪梕堈偵偡傞偨傔偵僙僢僩偝傟偰偄傑偡丅                 |  劆
劆 |  偙傟偼 Andreas 偺丄傑偨偼 偦偺懠偺 Linux 梡偺 Logitech 僗僉儍僫僪儔僀僶  |  劆
劆 |  偺怴偟偄僶乕僕儑儞偲僷僢僠傪攝晍偡傞偨傔偵傕巊傢傟偰偄傑偡丅             |  劆
劆 |                                                                           |  劆
劆 |  Linux 偱偼側偄懠偺僆儁儗乕僥傿儞僌僔僗僥儉偱 Logitech 僗僉儍僫偺栤戣偑   |  劆
劆 |  偁傞偲偒偼偙偺儕僗僩傪峸撉偟側偄偱壓偝偄丅偙偙偱偼僿儖僾傪摼傜傟傑偣傫   |  劆
劆 `---------------------------------------------------------------------------'  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

儕僗僩傪峸撉偡傞偵偼丄儊僢僙乕僕儃僨傿偵壓婰偺傛偆偵彂偄偨儊乕儖傪
majordomo@venture.net 偵憲偭偰壓偝偄丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  subscribe logiscan [return mail address, optional]                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

師偵堄尒摍偼壓婰偵憲偭偰壓偝偄丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  logiscan@venture.net                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

峸撉傪傗傔傞偲偒偼丄儊僢僙乕僕儃僨傿偵壓婰偺傛偆偵彂偄偨儊乕儖傪
majordomo@venture.net 偵憲偭偰壓偝偄丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  unsubscribe logiscan                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺忣曬偺僥僉僗僩傪梸偟偄偲偒偼丄壓婰偺傛偆偵彂偄偨儊乕儖傪
majordomo@venture.net 偵憲偭偰壓偝偄丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  info logiscan                                                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

  Bye, Andreas.

  Andreas Beck becka@hp.rz.uni-duesseldorf.de
  Germany

亂栿拲亃尰嵼偺傾僪儗僗偼丄becka@sunserver1.rz.uni-duesseldorf.de

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **************************************************************************  劆
劆  M105 僗僉儍僫僪儔僀僶傪彂偒丄偐側傝儀乕僗偲側偭偨                           劆
劆  Thomas Faehnle     Thomas.Faehnle@student.uni-ulm.de   偵戝曄姶幱偟傑偡丅   劆
劆  **************************************************************************  劆
劆  偝傜偵丄摨偠 ioctl 僀儞僞僼僃乕僗傪巊偭偰 A4Tech 僇儔乕僗僉儍僫僪儔僀僶傪   劆
劆  彂偄偨 Michael Beck       beck@hp832.informatik.hu-berlin.de 偵傕丅         劆
劆  **************************************************************************  劆
劆  偝傜偵丄摨偠 ioctl 僀儞僞僼僃乕僗傪巊偭偰 GS4500 僗僉儍僫僪儔僀僶傪彂偄偨   劆
劆  Jan Willamowius    jan@janhh.sh.sub.de  偵傕丅                              劆
劆  **************************************************************************  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Chapter 2. README.ioctl

2.1. 偼偠傔偵

Hi folks!

偙傟偼愱梡偺僀儞僞僼僃乕僗儃乕僪傪捠偟偰僪儔僀僽偝傟傞 LOGITECH
SCANMAN+ 僗僉儍僫梡偺僪儔僀僶偱偡丅

偙傟偼 logi32.o 偵傛偭偰採嫙偝傟傞 ioctl 僀儞僞僼僃乕僗傪巊偆傾僾儕働乕
僔儑儞奐敪幰偺僈僀僪儔僀儞偱偡丅

偳傫側採埬傕娊寎偟傑偡丄偦偟偰巹偼懠偺僗僉儍僫梡僨僶僀僗僪儔僀僶偺嶌幰
偐傜偺僼傿乕僪僶僢僋傪丄嫟捠偺僀儞僞僼僃乕僗傪嶌惉偡傞偙偲偑弌棃傞傛偆
偵丄惓摉偵昡壙偟傑偡丅

巹偼崱傑偱偵 Kenneth Stailey ken@spacenet.com 偐傜僼傿乕僪僶僢僋傪庴偗
庢偭偰偄傑偡丅斵偼丄巹偑彨棃僆僾僔儑儞偲偟偰僒億乕僩偡傞梊掕偺 PINT 偲
屇偽傟傞 UNIX 梡偺僗僉儍僫僀儞僞僼僃乕僗傪婛偵帩偭偰偄傑偡丅

偙偺僷僢働乕僕偺 pint 僒僽僨傿儗僋僩儕偵偁傞僪僉儏儊儞僩傪嶲徠偟偰壓偝
偄丅偙傟偼僶乕僕儑儞 0.0.3 側偺偱丄偙偙偱弎傋偨掕媊偼僪儔僀僶偺奐敪偵墳
偠偰昿斏偵曄峏偝傟傞偐傕偟傟側偄偙偲偵拲堄偟偰壓偝偄丅

巹偼偙傟傑偱僗僉儍僫丄傑偨偼摨條偺僨僶僀僗偺 ioctl 僀儞僞僼僃乕僗傪愝寁
偟偨偙偲偑側偄偲偄偆偙偲傪敀忬偟側偗傟偽側傝傑偣傫丅偦偙偱巹偺傾僾儘乕
僠偵壗偐娫堘偭偰偄傞揰偑柍偄偐丄傑偨丄偳偆偡傟偽傕偭偲傛偔側傞偐傪嫵偊
偰壓偝偄丅

傑偨丄偁側偨偑偙偺 ioctl API 傪巊偭偰慺惏傜偟偄僗僉儍儞僯儞僌丒僾儘僌儔
儉傪彂偐傟偨傜丄巹偵憲偭偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2.2. 僒億乕僩偝傟偰偄傞 ioctl 婡擻

埲壓偵丄僒億乕僩偝傟偰偄傞 ioctl 婡擻傪彂偒傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **********************************************************************  劆
劆  #define HSIOCGSCC               0x73e8  /* Get Scanner Capabilities */  劆
劆  **********************************************************************  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

(ioctls 偺 MAGIC NUMBERS 偼丄嬤偄彨棃 ioctl 偺巇條偑傛傝埨掕偵側傝"儊僕
儍乕僋儕乕儞傾僢僾"偑婲偒偨帪偵丄曄峏偝傟傞偩傠偆偲巚偄傑偡) 偙傟偼僗僉
儍僫偺僔僗僥儉丒僐乕儖偺拞偱嵟傕廳梫偱偡丅偲偄偆偺偼丄僗僉儍僫偵偳偺傛
偆偵傾僋僙僗偟丄壗偑僒億乕僩偝傟偰偄傞偺偐偲偄偆昁梫側忣曬偺傎偲傫偳慡
偰傪採嫙偡傞偐傜偱偡丅

偙偺娭悢偼壓婰偺峔憿懱傪曉偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  struct scanner_capabilities {                                             劆
劆                                                                            劆
劆          int o_scm_mono;         /* Options for monochrome mode */         劆
劆          int o_scm_grey;         /* Options for greyscale  mode */         劆
劆          int o_scm_true;         /* Options for true-color mode */         劆
劆                                                                            劆
劆          int o_xdpi;             /* Options for x resolution */            劆
劆          int o_ydpi;             /* Options for y resolution */            劆
劆                                                                            劆
劆          int o_bright;           /* Options for brightness */              劆
劆          struct minmax bright;                                             劆
劆          int o_contrast;         /* Options for contrast */                劆
劆          struct minmax contrast;                                           劆
劆          int o_hue;              /* Options for hue */                     劆
劆          struct minmax hue;                                                劆
劆          int o_sat;              /* Options for saturation */              劆
劆          struct minmax sat;                                                劆
劆                                                                            劆
劆          int phys_width;         /* Width in mm */                         劆
劆          int phys_length;        /* Length in mm */                        劆
劆                                                                            劆
劆          int av_options;         /* Number of available Options (0-32) */  劆
劆                                                                            劆
劆  };                                                                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

摢偵 'o_' 偑晅偔僼傿乕儖僪偼慡偰 "僆僾僔儑儞丒僼傿乕儖僪" 偱壓婰偺僼儔
僌偲慻傒崌傢偣傞偙偲偑偱偒傑偡丅(偮傑傝丄偙傟偼價僢僩僼傿乕儖僪偱偡)

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  #define SCC_SOFTSELECT  0x0001  /* 僆僾僔儑儞傪僜僼僩僂僃傾偱慖戰壜擻 */        劆
劆  #define SCC_SOFTDETECT  0x0002  /* 僆僾僔儑儞傪僜僼僩僂僃傾偱専弌壜擻 */        劆
劆  #define SCC_HARDSWITCH  0x0004  /* 僆僾僔儑儞偼僴乕僪僂僃傾僗僀僢僠   */        劆
劆                                  /* (儐乕僓偺娭梌偑昁梫) */                      劆
劆  #define SCC_EMULATE     0x0008  /* 僆僾僔儑儞偼僪儔僀僶偱僄儈儏儗乕僩偝傟傞 */  劆
劆  #define SCC_CANDO       0x000f  /* 忋婰偺壗偐偑僙僢僩偝傟偨傜僪儔僀僶偑 */      劆
劆                                  /* 僒億乕僩偡傞僆僾僔儑儞 */                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙偺僆僾僔儑儞傪偳偺傛偆偵巊偆偐偺椺傪帵偟傑偡丅

僴乕僪僂僃傾僗僀僢僠傪巊偭偰僗僉儍僫偺 dpi 傪慖戰偱偒偰丄偦偺愝掕傪僪儔
僀僶偑撉傒崬傓偙偲偑偱偒傞側傜丄偙偺傛偆偵彂偒傑偡丗

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  SCC_SOFTDETECT|SCC_HARDSWITCH                                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僗僉儍僫偑侾偮偺 dpi 愝掕偵屌掕偝傟偰偄傞側傜"僴乕僪僂僃傾僗僀僢僠" 偼
偁傝傑偣傫偑丄傆偮偆僪儔僀僶偼屌掕儗乕僩傪 "専弌壜擻" 偱偁傞偲偄偆傆傝
傪偟傑偡丅 (偟偐偟儗乕僩偼屌掕側偺偱杮摉偵専弌偡傞昁梫偼偁傝傑偣傫)丗

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  SCC_SOFTDETECT                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僗僀僢僠偱 dpi 愝掕傪慖戰偱偒傞偑丄僪儔僀僶偑偦偺愝掕傪撉傒崬傓曽朄偑柍
偄 (偙傟偼幚嵺偵偼偁傞偼偢偑側偄偑丄悽偺拞偵偼婏柇側僴乕僪僂僃傾偑偁傝
傑偡) 偲偄偆応崌偼丄SCC_HARDSWITCH 傪僙僢僩偟側偗傟偽側傝傑偣傫丅

偙傟偺傾僾儕働乕僔儑儞偵偲偭偰偺堄枴偼

SCC_SOFTDETECT 偑巜掕偝傟偰偄側偄応崌丄僷儔儊乕僞偺抣傪抦傜側偄偺偱側偄
尷傝偦傟傪擖椡偡傞傛偆懀偝傟傞傋偒偱偡丅(巹偼 SCC_SOFTSELECT 偑
SCC_SOFTDETECT 傪娷傑側偄偲偄偆傛偆側働乕僗傪憐憸偱偒傑偣傫...) 偦偟偰
抣傪僪儔僀僶偵嫵偊傞偨傔偵柧帵揑偵 SMOD-call 偵傛偭偰僙僢僩偟側偗傟偽側
傝傑偣傫丅

SCC_HARDSWITCH 偼丄傾僾儕働乕僔儑儞偑儐乕僓偵僴乕僪僂僃傾傪惓偟偔愝掕偡
傞傛偆偵懀偡昁梫偑偁傞偙偲傪堄枴偡傞偱偟傚偆丅(偙傟偑婛偵峴傢傟偰偄傞偙
偲偑暘偐偭偰偄傞丄椺偊偽 SOFTDETECT 偑張棟偟偨...応崌傪彍偔)

SCC_EMULATE 僆僾僔儑儞偼丄偙傟偑慖戰偝傟偨偲偒丄僴乕僪僂僃傾偑懠偺儌乕
僪偱偁偭偰傕丄傑偨偼偙偺儌乕僪傪僒億乕僩偟偰偄側偔偰傕僪儔僀僶偼偙偺儌
乕僪傪僄儈儏儗乕僩偡傞偩傠偆偲偄偆偙偲傪堄枴偟傑偡丅 (椺偊偽丄慡偰偺儌
僲僋儘僗僉儍僫偼捠忢丄儌僲僋儘僨乕僞傪慡偰偺俁 RGB 抣偵奼挘偡傞偙偲偵傛
傝僩僁儖乕僇儔乕儌乕僪傪僄儈儏儗乕僩偟傑偡)

phys_* 僼傿乕儖僪偼丄嵟戝僗僉儍儞僂傿儞僪僂偺暔棟揑僒僀僘傪 mm 偱昞偟傑
偡丅

minmax-structs 偼丄僷儔儊乕僞偺斖埻丄壓婰偺傛偆偵掕媊偝傟偨峔憿懱偱偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  struct minmax {int min,max;};                                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

av_options 僼傿乕儖僪偵偼丄偙偺摿暿側僗僉儍僫偺巊梡壜擻側僆僾僔儑儞偺斣
崋偑擖傝傑偡丅偙偺抣偼丄 0-32 (inclusive) 偺斖埻偱丄 HSIOCGOPT 僐乕儖偐
傜偺僨乕僞偺惓妋側曄姺偑昁梫偱偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ********************************************************************* 劆
劆  #define HSIOCGOPT               0x73e7  /* Get option descriptions */ 劆
劆  ********************************************************************* 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺僐乕儖偼丄壓婰僼僅乕儅僢僩偺32傑偱偺僆僾僔儑儞僨僗僋儕僾僞(偙傟偼
av_options 僄儞僩儕傪梊栺偡傞偵偼廫暘偱偟傚偆)偺僼傿乕儖僪傪曉偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  struct scanner_option {int  options;    /* Option availability */ 劆
劆                          char name[20];};                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

'僆僾僔儑儞'僼儔僌偼忋婰偺 'o_'偺抣偺堦偮偲偟偰(偡側傢偪丄僴乕僪僂僃傾
傑偨偼僜僼僩僂僃傾偵傛偭偰僆僾僔儑儞偑慖戰偝傟偨傜丄偦偟偰偦傟偑僜僼僩
偱専弌壜擻丄偁傞偄偼僪儔僀僶婡擻偑僄儈儏儗乕僩偡傞傛偆側傕偺側傜偽) 埖
傢傟傑偡丅

僆僾僔儑儞偲偟偰丄儐乕僓偑僆僾僔儑儞傪慖戰乛旕慖戰乛昞帵偡傞偨傔偺僆僾
僔儑儞柤傪帵偡儐乕僓僟僀傾儘僌傪採埬偟傑偡丅

偙傟偑弌棃側偄丄偁傞偄偼偟偨偔側偄(椺偊偽 OCR 偺傛偆側僶僢僋僌儔儞僪張
棟)応崌丄偦偺柤慜偐傜僆僾僔儑儞偺堄枴傪堷偒弌偡傛偆偵偡傞傋偒偱偡丅

屳姺惈傪曐徹偡傞偨傔偵丄僨僶僀僗僪儔僀僶偺嶌惉幰偼丄壗偐偺婡擻偺柤晅偗
偺斵傜偺傾僀僨傾傪巹偵妋擣偡傞偙偲偑彠椼偝傟傑偡丅偙傟偼丄摨偠僆僾僔儑
儞偵懳偟偰暋悢偺柤慜傪旔偗傞偨傔偵丄偦偟偰偙偺暥彂傪巹偑峏怴偡傞偙偲偑
偱偒傞傛偆偵偡傞偨傔偱偡丅

尰嵼丄僪儔僀僶偵傛偭偰巊傢傟傞僆僾僔儑儞偼侾偮偩偗偁傝傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  僆僾僔儑儞: "Dithering"                                           劆
劆  婡擻F     : dithered greyscale 儌乕僪傪 on/off 偡傞               劆
劆  僪儔僀僶  : logi32.o                                              劆
劆  嶌幰      : becka@hp.rz.uni-duesseldorf.de                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **************************************************************    劆
劆  #define HSIOCGSCT               0x73e9  /* Get Scanner Type */    劆
劆  **************************************************************    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺僐乕儖偼丄捠忢偺 ioctl 僀儞僞僼僃乕僗偱偼傾僋僙僗偱偒側偄摿庩側僗僉
儍僫偺摿暿偺婡擻傪傾僾儕働乕僔儑儞偑巊偊傞傛偆偵偡傞偨傔偵丄僗僉儍僫僴
乕僪僂僃傾傪幆暿偟傑偡丅壓婰偺峔憿懱傪曉偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  struct scanner_type {                                             劆
劆    char manufacturer[20],model[20];                                劆
劆  };                                                                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **********************************************************        劆
劆  #define HSIOCGMOD               0x73ea  /* Get modeinfo */        劆
劆  **********************************************************        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺僐乕儖偼丄僗僉儍僫偺尰嵼偺儌乕僪忣曬傪摼傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  struct modeinfo_struct {                                              劆
劆    int xdpi,ydpi;                /* resolution */                      劆
劆    int sc_mode;                                                        劆
劆    int depth;                    /* number of different colors (-1) */ 劆
劆    int bpl;                      /* bytes per scanline */              劆
劆    int left,right;               /* margins in Pixels */               劆
劆    int top,bottom;               /* margins in Lines */                劆
劆    int bright;                   /* brightness */                      劆
劆    int contrast;                 /* contrast */                        劆
劆    int hue;                      /* hue */                             劆
劆    int sat;                      /* saturation */                      劆
劆    int options;                  /* enabled options */                 劆
劆  };                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

sc_mode 偼丄壓婰偺偄偢傟偐堦偮偺抣傪偲傝傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  #define SCM_UNKNOWN 0           /* Scanner modes : */             劆
劆  #define SCM_MONO 1              /* 1 BitPerPixel   */             劆
劆  #define SCM_GREY 2              /* 8 BitsPerPixel  */             劆
劆  #define SCM_TRUE 3              /* 24 Bit RGB      */             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

侽偺応崌丄僗僉儍僫偼枹掕媊偺忬懺偱偡丅(婲偒傞傋偒偱偼側偄) 怴偟偄儌乕僪
傪僙僢僩偡傞偙偲傕偱偒傑偡偑丄傓偟傠傾儃乕僩偡傞傋偒偱偡...丅

僗僉儍儞儌乕僪偼揮憲偝傟偨僨乕僞偺僼僅乕儅僢僩偲堎側傝傑偡丗

MONO 儌乕僪偼僶僀僫儕僄儞僐乕僪偝傟偨崟偲敀偺抣偺價僢僩楍傪憲傝傑偡丅懄
偪丄0x83 0x10 傪撉傒崬傫偩応崌丄僗僉儍僫僿僢僪偺壓偺僷僞乕儞偼丄

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  * . . . . . * *  . . . * . . . . ;                                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偮傑傝丄侾僶僀僩偵偮偒忢偵俉屄偺僺僋僙儖(夋慺)偑偁傝丄堦峴偵偼忢偵暋悢
偺俉僺僋僙儖偑偁傝傑偡丅(偙傟偼嵍塃傪捠偟偰嵞尰偝傟傞敜偱偡...)

僌儗乕儌乕僪偼丄0乣255 傑偱偺斖埻偱應掕偝傟偨奃怓偺抣偺僶僀僩楍傪憲傝傑
偡丅幚嵺偺僨僾僗偼丄depth 僼傿乕儖僪傪巊偆偙偲偵傛偭偰尒偮偗傞偙偲偑偱
偒傑偡偑丄偨偲偊 depth 偑 0 (懄偪丄僗僉儍僫偑幚嵺偵崟敀儌乕僪偱偁傞)偱
傕丄1 僺僋僙儖偵偮偒忢偵 0 傑偨偼 255 傪憲傝傑偡丅懄偪丄侾僺僋僙儖偵偮
偒侾僶僀僩側偺偱偡丅

僩僁儖乕儌乕僪偼丄僶僀僩偱 RGB 抣傪憲傝傑偡丅廬偭偰丄1 僺僋僙儖偵晅偒3
僶僀僩偁傝傑偡丅幚嵺偺僨僾僗偺夝憸搙偼 0xrrggbb 偱丄rr 偼僗僉儍僫偑幆暿
偱偒傞愒怓偺斣崋偱偡丅懄偪丄24價僢僩儌僨儖偩偲 0xffffff 偲儗億乕僩偡傞
傋偒偲偙傠傪 4096怓偺僗僉儍僫 (4價僢僩偺愒丄椢丄惵)偱偼 0x0f0f0f 偲儗億
乕僩偡傞傢偗偱偡丅

bpl 偼丄read 僐乕儖偱傾僾儕働乕僔儑儞偵憲傜傟傞 bytes per line (1儔僀儞
偁偨傝偺僶僀僩悢) 偺悢偱偡丅

Left, right, top, bottom 偼丄儅乕僕儞傪僙僢僩偟傑偡丅

Bright, Contrast, Hue, Saturation 偼丄夋憸偺偦傟偧傟偺摿惈抣偱偡丅

僆僾僔儑儞偼丄慖戰偝傟偨僆僾僔儑儞偺價僢僩僼傿乕儖僪偲偟偰傒側偝傟傑偡
丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **********************************************************        劆
劆  #define HSIOCSMOD               0x73eb  /* Set modeinfo */        劆
劆  **********************************************************        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺僐乕儖偼丄僗僉儍僫儌乕僪傪僙僢僩偡傞偨傔偵巊偄傑偡丅偁側偨偑梌偊偨
峔憿懱偼僗僉儍僫傑偨偼僪儔僀僶偑埖偆偙偲偺弌棃傞杮摉偺抣傪斀塮偡傞偨傔
偵"曄峏偝傟傞"偲偄偆揰偵拲堄偟偰壓偝偄丅

椺偊偽丄400dpi(X曽岦), 600dpi (y曽岦), 僼儖丒僨僾僗偱 24價僢僩儌乕僪丄
儅乕僕儞偼 5-1003 (曽岦x),13-4000 (y曽岦) 偲偄偆忦審偱僗僉儍儞偝偣偨偄
応崌壓婰偺傛偆偵偟偰 SMOD 傪僐乕儖偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  { 400,600,                                                        劆
劆    SCM_TRUE,                                                       劆
劆    0xffffff,                                                       劆
劆    0,/* bpl doesn't matter */                                      劆
劆    5,1003,13,4000,                                                 劆
劆    ...                                                             劆
劆  }                                                                 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僗僉儍僫偑椉曽偺幉偱 300dpi 偟偐僒億乕僩偱偒側偄応崌丄僴乕僪僂僃傾僗僀
僢僠傪宱桼偟偰 SCM_MONO 偵僙僢僩偟傑偡丅(偦偟偰僪儔僀僶偼僨乕僞傪曄姺偱
偒側偄 [!]) 俉偺攞悢偱侾侽僀儞僠傑偱偺儁乕僕挿偺悈暯曽岦偺嫬奅偺傒僒億
乕僩偟丄峔憿懱偼師偺傛偆偵曄峏偝傟傞偱偟傚偆丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  { 300,300,                                                        劆
劆    SCM_MONO,                                                       劆
劆    0,                                                              劆
劆    126,/* Bytes per line filled in */                              劆
劆    0,1008,13,3000                                                  劆
劆  }                                                                 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僪儔僀僶偼 TRUE-MOD 傪僄儈儏儗乕僩偱偒傞昁梫偑偁傞偲偄偆揰偵拲堄偟偰壓
偝偄丅懹偗傕偺偺僜僼僩僂僃傾偑偦傟傪偁偰偵偡傞偐傕偟傟傑偣傫偐傜...

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ************************************************************************* 劆
劆  #define HSIOCGREG               0x73ec  /* play with strange registers */ 劆
劆  #define HSIOCSREG               0x73ef                                    劆
劆  ************************************************************************* 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙傟偼僪儔僀僶偺奐敪偵巊梡偟丄捠忢偼儐乕僓儗儀儖偺傾僾儕働乕僔儑儞偵偼
傾僋僙僗弌棃傑偣傫丅偙偺僐乕儖偺婡擻偼丄僗僉儍僫偐傜僗僉儍僫傊丄偁傞偄
偼僪儔僀僶偐傜僪儔僀僶傊丄偲偼堘偄傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ************************************************************************* 劆
劆  #define HSIOCGBUF               0x73f0  /* get/set current buffer size */ 劆
劆  #define HSIOCSBUF               0x73f1                                    劆
劆  ************************************************************************* 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僗僉儍儞偡傞儔僀儞偺尰嵼偺僶僢僼傽僒僀僘傪庢摼乛愝掕偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ************************************************************************* 劆
劆  #define HSIOCSSTH               0x73f2  /* get/set select(2) threshold */ 劆
劆  #define HSIOCGSTH               0x73f3                                    劆
劆  ************************************************************************* 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僗儗僢僔儏儂乕儖僪偺慖戰抣傪庢摼乛愝掕偟傑偡丅

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ********************************************************************* 劆
劆  #define HSIOCGSIB               0x73f4  /* get scanlines in buffer */ 劆
劆  ********************************************************************* 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙傟偼僗僉儍僫偺撪晹僶僢僼傽偺 fill-gauge 偺堦庬偲偟偰巊傢傟傞偱偟傚偆
丅偙傟偼揟宆揑偵偼僨乕僞僼儘乕偺検傪儐乕僓偑惂屼偡傞僗僉儍僫(椺偊偽僴儞
僪僗僉儍僫)偵傛偭偰巊傢傟丄僶僢僼傽偑枮攖偵側偭偨偲偒偵儐乕僓偵傕偭偲抶
偔僗僉儍儞偡傞傛偆揱偊傞偙偲偑弌棃傞傛偆偵偟傑偡丅

 Bye, Andreas. 

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2.3. 晅榐

偙偺巇條傪巊偭偨僗僉儍僫僪儔僀僶偺奐敪幰

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  Andreas Beck            becka@hp.rz.uni-duesseldorf.de          (logi32)      劆
劆  亂栿拲亃尰嵼偺傾僪儗僗偼丄becka@sunserver1.rz.uni-duesseldorf.de              劆
劆  Thomas Faehnle          Thomas.Faehnle@student.uni-ulm.de       (m105)        劆
劆  Jan Willamowius         jan@janhh.sh.sub.de                     (GS4500)      劆
劆  Michael Beck            beck@hp832.informatik.hu-berlin.de      (A4Tec)       劆
劆  Willem Dantum           willemd@knoware.nl                      (Genius B105G)劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

偙偺巇條傪棙梡偱偒傞僗僉儍僫僾儘僌儔儉

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  gifscan :     Thomas Faehnle 偵傛偭偰偐偐傟 Andreas Beck 偵傛偭偰曄峏偝傟偨 劆
劆                僆儕僕僫儖偺 svgalib 儀乕僗偺僨儌傾僾儕働乕僔儑儞             劆
劆  pbmscan :     Andreas Matthias  偵傛偭偰彂偐傟偨                            劆
劆                pbm 僼傽僀儖偵僗僉儍儞(寢壥傪奿擺)偡傞僐儅儞僪儔僀儞僣乕儖    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Chapter 3. demo/README

    LOGITECH SCANMAN 400 dpi 僴儞僪僿儖僪丒僗僉儍僫僪儔僀僶梡偺 GIFSCAN
    version 0.0.3
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3.1. Copyright

Copyright (C) 1994  Andreas Beck <becka@hp.rz.uni-duesseldorf.de>
亂栿拲亃尰嵼偺傾僪儗僗偼丄becka@sunserver1.rz.uni-duesseldorf.de

偙偺僾儘僌儔儉偼僼儕乕僜僼僩僂僃傾偱偡丅偁側偨偼丄偙傟傪 Free Software
Foundation 偑敪峴偟偰偄傞 GNU General Public License 偺儔僀僙儞僗偺僶乕
僕儑儞俀丄傑偨偼(偁側偨偺僆僾僔儑儞偱)偦傟埲崀偺忦審偵廬偭偰嵞攝晍偟偨
傝曄峏偡傞偙偲偑偱偒傑偡丅

偙偺僾儘僌儔儉偼丄栶偵棫偮偙偲傪婜懸偟偰攝晍偟偰偄傑偡丅偟偐偟丄偄偐側
傞曐徹傕偁傝傑偣傫丅彜昳惈傗摿掕梡搑傊偺揔崌惈偵偮偄偰偺埫栙偺曐徹偡傜
偁傝傑偣傫丅徻偟偔偼丄GNU 偺 General Public License 傪偛棗壓偝偄丅

偁側偨偼丄偙偺僾儘僌儔儉偲堦弿偵 GNU General Public License 偺僐僺乕傪
庴偗庢傞傋偒偱偡丅偦偆偱側偄側傜偽丄 Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA 偵庤巻傪彂偄偰壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3.2. 僨儌僾儘僌儔儉偵偮偄偰

Hi folks!

偙傟偼 LOGITECH SCANMAN+ 僗僉儍僫梡僪儔僀僶偺偨傔偺彫偝側僨儌儞僗僩儗乕
僔儑儞僾儘僌儔儉偱偡丅

偙偺僾儘僌儔儉偺堦晹偼丄Thomas Faehnle
<Thomas.Faehnle@student.uni-ulm.de> 偵傛偭偰彂偐傟偨傕偺偱丄巹偼斵偺搘
椡偵姶幱偟偨偄偲巚偄傑偡丅

巹偼僆儕僕僫儖偺 'scandemo' 傪 LOGI32 僪儔僀僶乛僗僉儍僫偺奼挘偝傟偨擻
椡(僗僉儍僫偺幆暿丄SIB-ioctl,僨傿僓拞娫挷)偵崌傢偣丄妿偮僗僉儍儞偟偨夋
憸傪嫟捠偺僼僅乕儅僢僩偵奿擺偡傞偨傔偺怣棅偱偒傞曽朄傪採嫙偡傞偨傔偵偐
側傝曄峏偟傑偟偨丅

scandemo 偺偙偺僶乕僕儑儞偼 gifscan 偵儕僱乕儉偟丄偙偺僷僢働乕僕偺憗婜
僶乕僕儑儞偱採嫙偝傟偰偄偨僗僋儕僾僩傪偡偭偐傝抲偒姺偊傑偟偨丅

僗僋儕僾僩偼丄僗僉儍僫偑憲偭偰偄傞儔僀儞暆傪惓偟偔寛掕偡傞偨傔偺壜擻惈
偑柍偄偟丄廬偭偰堎側偭偨僗僉儍僫傗娫堘偭偨僷儔儊乕僞偱巊偭偨帪丄娫堘偭
偨寢壥傪嶌傞偺偱僗僋儕僾僩偼幪偰傑偟偨丅

巹偼庡偵壓婰偺棟桼偐傜 GIF 僼僅乕儅僢僩(偙傟偼 (c) by Compuserve 偩偲巚
偆)傪慖戰偟傑偟偨丅

 丒 傎偲傫偳偺僌儔僼傿僢僋僗僷僢働乕僕偑偙傟傪埖偭偰偄傞丅
   
 丒 巹偼婛偵 Gif 傊偺奿擺傪埖偆 C 偺僜乕僗(Mess埪OS偐傜)傪彂偄偰偄傞
   
 丒 埑弅棪偑嬌傔偰傛偄
   
    亂栿拲亃: Mess埪OS 偲偄偆偺偼 MS-DOS 偺偙偲傪拑壔偟偰偄傞偺偱偡丅
   
 

GIF 埑弅偼抶偔 PBM 僼僅乕儅僢僩偼婰弎偡傞偺偑戝曄梕堈偱偁傞偙偲偵婥偑晅
偄偰偄傞偺偱丄巹偼偦偺擻椡傪傕捛壛偟傑偟偨丅怽偟栿側偄偗偳扤偑僆儕僕僫
儖偺 PPM (P4)僐乕僪傪 gifscan 偵捛壛偟偨偐巚偄弌偣傑偣傫丅(斵偵姶幱偟傑
偡) 巹偼偦傟傪 Greyscale (P5) 夋憸偵彂偔偨傔偺曄峏傪偟偨偲偙傠偱偡丅

僾儘僌儔儉傪價儖僪偡傞偨傔偵 "make" 傪偟傑偡丅 #include <scanner.h> 偼
丄僗僉儍僫僪儔僀僶傪僐儞僷僀儖偡傞偨傔偵巊傢傟傞傕偺偲摨偠偱偁傞偙偲偵
拲堄偟偰壓偝偄丅偙偺僼傽僀儖偼昿斏偵曄峏偝傟傞偺偱丄忢偵嵟怴斉傪 /usr/
local/include 偵擖傟傞傛偆偵偟偰壓偝偄丅 ioctl 僀儞僞僼僃乕僗偼傑偩傑偩
岺帠偺嵟拞偱偡偐傜丄屆偄 gifscan 偺僶僀僫儕偼偙傟傪怴偟偄僪儔僀僶偲嫟偵
巊偆偲捠忢偼僽儗乕僋偟傑偡丅

Logitech 僗僉儍僫偵偼崟敀儌乕僪偲僌儗乕僗働乕儖儌乕僪偑偁傝傑偡丅偙傟偼
晄岾偵傕僜僼僩僂僃傾偱専弌晄壜擻偱偡丅(偦傟偲傕偩傟偐偙偺曽朄傪抦偭偰傑
偡偐丠)

偦偙偱巹偼 -g x 偲偄偆僗僀僢僠(x 偼僌儗乕僗働乕儖丒儅僩儕僋僗偺僒僀僘)
傪捛壛偟傑偟偨丅(枹弉側僆僾僔儑儞張棟偱偁傞偙偲偼暘偐偭偰偄傑偡偑丄偨偭
偨堦偮偺僗僀僢僠偺偨傔偵 getopt 傪僀儞僋儖乕僪偟偨偔側偐偭偨偺偱偡...)

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **************************************************************************  劆
劆  尰僶乕僕儑儞偱傕偙偺僗僀僢僠偼巊偊傑偡偑丄怴偟偄僗僞僀儖偺僗僉儍僫僪儔僀僶  劆
劆  偼僆僾僔儑儞偲偟偰僨傿僓傪採嫙偡傞(Logi32 偼)敜側偺偱丄崱屻偼巊偆傋偒偱偼   劆
劆  偁傝傑偣傫丅                                                                劆
劆  **************************************************************************  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

崟敀儌乕僪偵偼偙傟傪侾(僨僼僅儖僩)偵丄僌儗乕僗働乕儖儌乕僪偵偼俇傪僙僢
僩偟側偗傟偽側傝傑偣傫丅(偙傟偼僗僉儍僫撪晹儅僩儕僋僗偺僒僀僘側偺偱) 侾
偐傜侾俇傑偱偺斖埻偺抣偼丄懠偺僗僉儍僫偱偼桳岠偐傕偟傟傑偣傫偑丄
LOGITECH 偱偼嫮偄儌傾儗岠壥偑弌偰偟傑偄傑偡丅

    亂栿拲亃: 儌傾儗岠壥偲偄偆偺偼丄尨夋憸偵偼柍偄柾條偑敪惗偡傞尰徾偱
    偡丅
   
 

崱搙僒億乕僩偝傟偨 Scanman256 偵偼恀偺僌儗乕僗働乕儖儌乕僪偑偁傝傑偡丅
偦偺儌乕僪偺慡偰(崟敀丄4,6,8 bit)偑丄崱僒億乕僩偝傟傞傋偒偱偟偨丅

僗僉儍儞拞偼壓婰偺僉乕偑巊偊傑偡丅(價僕乕懸偪傗丄擖椡偝傟傞僗僉儍儞僨乕
僞偺慖戰傪偟偨偔側偄偺偱僉乕偼丄僗僉儍僫偑摦偔傑偱偼擣幆偝傟傑偣傫)

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ,q,x,Q,X   : gifscan 傪廔椆偟傑偡丅                                       劆
劆  i,I             : (I)nverse 儌乕僪傪愗懼偊傑偡丅                          劆
劆  w,W             : 僗僉儍儞懍搙儚乕僯儞僌儌乕僪傪愗懼偊傑偡丅              劆
劆                    (僶僢僼傽偑枮攖偵嬤偔側傞偲丄夋柺偑愒乛巼偵側傝傑偡)    劆
劆  f               : GIF 僼傽僀儖傊偺奿擺傪奐巒偟傑偡丅                      劆
劆                    (壗傜偐偺僉乕傪墴偡偲掆巭偟傑偡)                        劆
劆  p               : ppm 僼傽僀儖傊偺奿擺傪奐巒偟傑偡丅                      劆
劆  0-9             : 僆僾僔儑儞斣崋傪愗懼偊傑偡丅                            劆
劆  b/B,c/C,h/H,s/S : Brightness(婸搙)丄Contrast(僐儞僩儔僗僩)丄Hue(怓挷)丄   劆
劆                    Saturation(嵤搙)傪挷惍偟傑偡丅                          劆
劆  'm'             : 嫮惂揑偵 SCM_MONO (儌僲僋儘儌乕僪)張棟偵偟傑偡丅        劆
劆  'g'             : force SCM_GREY-operation                                劆
劆                    嫮惂揑偵 SCM_GREY (僌儗乕僗働乕儖儌乕僪)張棟偵偟傑偡丅  劆
劆  'a'             : SCM (僗僉儍僫儌乕僪)偺帺摦専弌傪嫋壜偟傑偡丅            劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

僆僾僔儑儞偼婲摦帪偵昞帵偝傟傑偡丅偙傟傜偺僉乕偼僼傽僀儖傪僗僉儍儞(僙乕
僽儌乕僪)拞偼柍岠偱偁傞偙偲偵拲堄偟偰壓偝偄丅偙傟偼丄(撉傒庢傝暆傗 bpp
偺傛偆側) 僗僉儍儞夋憸偺婎杮僷儔儊乕僞傪曄峏偟丄僙乕僽偡傞僐乕僪傪偁偄
傑偄偵偡傞偐傕偟傟側偄偐傜偱偡丅(GIF 偱偼堎側傞儔僀儞暆傪巊偆偙偲偼偱偒
傑偣傫)

傑偨丄GIF 埑弅偼擻棪揑偱偡偑抶偔丄摿偵 1價僢僩 GIF 偱僄儞僐乕僪偡傞偲僙
乕僽儌乕僪傪巊偭偨応崌丄僗僉儍僫傪偐側傝抶偔憖嶌偡傞昁梫偑偁傝傑偡丅

偙偺僆僾僔儑儞偼偡偖偵徚偊嫀傞偩傠偆偐傜丄偩傟傕 "bit-count-code" (巹偼
埲慜偺僶乕僕儑儞偱偁傞偲傎偺傔偐偟偨)傪彂偒捈偡昁梫偼偁傝傑偣傫丅

Bye, Andreas.

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3.3. TODO

 

傗傞傋  傛傝椙偄儐乕僓僀儞僞僼僃乕僗丄僼傽僀儖偺僱乕儈儞僌丄椺偊偽僟僀 
偒偙偲  傾儘僌儃僢僋僗偲偐...                                          
丗                                                                     
BTW     svgalib 僌儔僼傿僢僋僗傪帩偭偰偄側偄乛梸偟偔側偄乛昁梫偱側偄恖 
(丠)丗  偺偨傔偵 PBMSCAN 偲屇偽傟傞怴偟偄僐儅儞僪儔僀儞偺僗僉儍儞僣乕儖
        偑偁傝傑偡丅                                                   

 

Andreas Beck becka@hp.rz.uni-duesseldorf.de
Germany

 

亂栿拲亃尰嵼偺傾僪儗僗偼丄becka@sunserver1.rz.uni-duesseldorf.de

 
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  **************************************************************************  劆
劆  Thomas Faehnle                Thomas.Faehnle@student.uni-ulm.de             劆
劆  偵偼怺偔姶幱偟傑偡丅                                                        劆
劆  **************************************************************************  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆=====================================================               劆
劆 Ryoji Kawagishi   E-Mail: kawagisi@yk.rim.or.jp                    劆
劆                           KFA02544@niftyserve.or.jp                劆
劆=====================================================               劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

(sgml conversion, y.senda, ysenda@pop01.odn.ne.jp, 2001/09)

Notes

[1] 亂栿拲亃 MS-LOSS 偲偄偆偺偼丄僞僀僾儈僗偱偼側偄偲巚偄傑偡丅(^_^)   

