home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / mtek004.zip / confige6.h < prev    next >
Text File  |  1997-10-08  |  10KB  |  180 lines

  1. /*
  2.    config.h
  3.    Global #defines for mtekscan.
  4.  
  5.    Copyright (c) 1996, 1997 Jan Schoenepauck / Fast Forward Productions
  6.    <schoenep@uni-wuppertal.de>
  7.  
  8.    $Id: config.h 1.1 1997/09/13 02:45:10 parent Exp $
  9. */
  10.  
  11. /* Adjust the following settings according to your scanner and system     */
  12. /* configuration. The following list contains some settings for specific  */
  13. /* scanner models as they have been reported to me. If your scanner model */
  14. /* is not listed here, or you get unexpected scanning results, you might  */
  15. /* try to experiment with these. Please read the description supplied for */
  16. /* each setting carefully.                                                */
  17. /*                                                                        */
  18. /* ScanMaker E6:  No changes needed (probably).                           */
  19. /*                                                                        */
  20. /* ScanMaker E3:  FIX_FRAMESIZE must be set to 0; VENDOR_STRING must be   */
  21. /*                "        " (8 spaces) or empty, MAX_BASE_RESOLUTION is  */
  22. /*                300.                                                    */
  23. /*                                                                        */
  24. /* ScanMaker II:  FIX_FRAMESIZE must be set to 0; MAX_WAIT_RETURN_RETRY   */
  25. /*                and/or WAIT_RETURN_SLEEP_TIME values must be raised if  */
  26. /*                you get 'Error executing STOP SCAN command (timeout)'   */
  27. /*                messages. MAX_BASE_RESOLUTION must be set to 300,       */
  28. /*                MAX_EXPANDED_RESOLUTION to 600.                         */
  29. /*                You could also try to set USE_FCP to 1 and mail me if   */
  30. /*                it works.                                               */
  31. /*                                                                        */
  32. /* ScanMaker 35t: FIX_FRAMESIZE must be set to 0; MAX_BASE_RESOLUTION is  */
  33. /*                1950, MAX_EXPANDED_RESOLUTION 3900.                     */
  34. /*                                                                        */
  35. /* Non-MicroTek scanners: At least change VENDOR_STRING to reflect the ID */
  36. /*                reported by your scanner (or leave empty).              */
  37.  
  38.  
  39. /* Scanner device name.                                                   */
  40. /* The default device name to be used, e.g. /dev/sga (or use /dev/scanner */
  41. /* and make it a link pointing to the device your scanner is mapped to at */
  42. /* boot time).                                                            */
  43. #define DEFAULT_DEVICE "/dev/scanner"
  44.  
  45. /* Maximum resolution(s) supported by scanner.                            */
  46. /* MAX_EXPANDED_RESOLUTION is ignored if the scanner does not support an  */
  47. /* expanded resolution range and IGNORE_XRES is not set (see below).      */
  48. /* On the other hand, if the scanner does support an expanded resolution  */
  49. /* but the value is set to zero here, it will not be used. As a rule of   */
  50. /* thumb, if your scanner reports that it supports expanded resolution    */
  51. /* (check the output of 'mtekscan -I') and it has a physical resolution   */
  52. /* of, say, 300 dpi horizontally by 600 dpi vertically, you'll probably   */
  53. /* have to set MAX_BASE_RESOLUTION to the horizontal resolution value     */
  54. /* (300) and MAX_EXPANDED_RESOLUTION to the vertical resolution value     */
  55. /* (600).                                                                 */
  56. /* These values have to be set here, as there is no way to request this   */
  57. /* information from the scanner.                                          */
  58. /*    For the E3:    */
  59. /* #define MAX_BASE_RESOLUTION 300 */
  60. /* #define MAX_EXPANDED_RESOLUTION 600 */
  61. /*    For the E6:    */
  62. #define MAX_BASE_RESOLUTION 600
  63. #define MAX_EXPANDED_RESOLUTION 1200
  64.  
  65. /* Expanded resolution support check override flag.                       */
  66. /* The ScanMaker E6 supports an expanded resolution even though the       */
  67. /* scanner reports that it does not. If this option is set to 1, the      */
  68. /* scanner┤s opinion is ignored. It is probably safe to leave this un-    */
  69. /* changed even if your scanner really does not have an expanded          */
  70. /* resolution range.                                                      */
  71. #define IGNORE_XRES_FLAG 1
  72.  
  73. /* E6 frame size correction flag.                                         */
  74. /* The ScanMaker E6 behaves a little strange: It always scans an area     */
  75. /* twice as large as the one specified (e.g. 2x2" if 1x1" was specified)  */
  76. /* Maybe I've made a mistake somewhere, but until I find out, this        */
  77. /* #define will fix it.                                                   */
  78. /* So far, the E6 is the only scanner known to need this fix.             */
  79. /*    For the E6:    */
  80. #define FIX_FRAMESIZE 1
  81. /*    For the E3:    */
  82. /* #define FIX_FRAMESIZE 0    */
  83.  
  84. /* SCSI command handling fix flag.                                        */
  85. /* Setting this to 1 enables a different behaviour in the communication   */
  86. /* with the generic SCSI driver. I need this one set for the AVA-1502E    */
  87. /* host adaptor card, but if you have a different card and experience     */
  88. /* SCSI bus lock-ups, kernel panics, system crashes or the like, try      */
  89. /* setting it to 0. Apparently this is not neccessary anymore for newer   */
  90. /* kernel versions.                                                       */
  91. #define SCSI_REPLYLEN_FIX 0
  92.  
  93. /* Scanner vendor ID.                                                     */
  94. /* The string against which the VendorID reported by the scanner is       */
  95. /* checked, for security. According to the docs, all MicroTek scanners    */
  96. /* should reply with MICROTEK, but at least the E3 doesn't (reports       */
  97. /* 8 spaces). And of course all non-MicroTek scanners will most probably  */
  98. /* need a different setting here. If leave this empty (or comment it out) */
  99. /* the check is not made (the device type code is still checked, though). */
  100. /*    For the E3:    */
  101. /* #define VENDOR_STRING "        " */
  102. /*    For the E6:    */
  103. #define VENDOR_STRING "MICROTEK"
  104.  
  105. /* Busy retry/timeout.                                                    */
  106. /* Maximum number of retries when checking if scanner is busy, and time   */
  107. /* to sleep between retries (in seconds). There is probably no need to    */
  108. /* change these.                                                          */
  109. #define MAX_BUSY_RETRY  5
  110. #define BUSY_SLEEP_TIME 3
  111.  
  112. /* Head positioning delay control.                                        */
  113. /* Maximum number of retries when waiting for the scan head to return to  */
  114. /* starting position between scanning passes, and time to sleep between   */
  115. /* them (in seconds). Some scanner models don't accept a STOP SCAN        */
  116. /* command until the scan head has returned to starting position (The     */
  117. /* ScanMaker II is known to be among these -- I guess it's a feature of   */
  118. /* 3-pass scanners only). Raise these values if mtekscan aborts with a    */
  119. /* 'Error executing STOP SCAN command (timeout)' message while the head   */
  120. /* is still on its way back to home position.                             */
  121. #define MAX_WAIT_RETURN_RETRY  10
  122. #define WAIT_RETURN_SLEEP_TIME 2
  123.  
  124. /* Fast Color Prescan flag - EXPERIMENTAL.                                */
  125. /* Some 3-pass models (e.g. the ScanMaker II, according to it┤s inquiry   */
  126. /* output) support a ┤Fast Color Prescan┤, i.e. scanning the green color  */
  127. /* plane while the scanning head returns to the starting position.        */
  128. /* Setting this value to 1 will enable this mode when the -p (prescan)    */
  129. /* option is specified on the command line, but it is still untested --   */
  130. /* I have no idea if it will work and no means to test it.                */
  131. #define USE_FCP 0
  132.  
  133. /* Output file format selection.                                          */
  134. /* If this is set to 1, images are written in pbm/pgm/ppm raw format,     */
  135. /* resulting in much smaller files. It is probably not necessary to set   */
  136. /* it to 0, except for debugging perhaps.                                 */
  137. #define WRITE_RAW 1
  138.  
  139. /* Software-based negative scanning.                                      */
  140. /* Normally, specifying the -n switch selects the scanner┤s negative      */
  141. /* scanning option. If the scanner does not support negative scanning,    */
  142. /* or negative scanning does not work this way (as it has been reported   */
  143. /* for the ScanMaker 35t+), you can set this to 1 to force mtekscan to    */
  144. /* invert the image by using an inverted gamma table.                     */
  145. #define INVERT_USING_GAMMA 1
  146.  
  147. /* Default scanning options.                                              */
  148. /* You can change these defaults if you wish to use a particular          */
  149. /* setting most of the time.                                              */
  150. #define DEFAULT_RESOLUTION 300
  151. /* A negative paper length value tells mtekscan to use the maximum        */
  152. /* document length supported by the scanner as the paper length setting.  */
  153. #define DEFAULT_PAPER_LENGTH -1
  154. /* Scan type can be LINEART, HALFTONE, GRAYSCALE or COLOR                 */
  155. #define DEFAULT_SCAN_TYPE COLOR
  156. /* The default scanning frame size. The top left corner is at the         */
  157. /* origin (0,0) by default. 8.2" x 11.7" = DIN A4                         */
  158. #define DEFAULT_WIDTH  8.5
  159. #define DEFAULT_HEIGHT 11.0
  160. /* The halftone pattern must be in the range 0..11                        */
  161. #define DEFAULT_HALFTONE_PATTERN 0
  162.  
  163.  
  164.  
  165. /*------------------------------------------------------------------------*/
  166. /*         Don't change anything beyond this point unless you             */
  167. /*                    really know what you're doing                       */
  168. /*------------------------------------------------------------------------*/
  169.  
  170. /* The following #defines are for debugging only.                         */
  171. #define FORCE_5_PERCENT_STEPS 0
  172. #define FORCE_3PASS 0
  173. #define SHOW_MODE_SENSE 0
  174. #define WRITE_GAMMA 0
  175. #define SCSI_DEBUGLEVEL 0
  176. #define DEBUG 0
  177.  
  178. /* Version number, obviously. Don't change.                               */
  179. #define VERSION "0.2"
  180.