"Fossies" - the Fresh Open Source Software Archive

Member "imal-3.7.7b/xmtnimaged.h" (23 Sep 2014, 7704 Bytes) of archive /linux/misc/imal-source.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "xmtnimaged.h" see the Fossies "Dox" file reference documentation.

    1 //-----------------------------------------------------------------------//
    2 //  xmtnimaged.h                                                         //
    3 //  Latest revision: 03-12-1999                                          //
    4 //  Copyright (C) 1999 by Thomas J. Nelson                               //
    5 //  See xmtnimage.h for Copyright Notice                                 //
    6 //-----------------------------------------------------------------------//
    7 
    8 
    9 #ifndef DIGITAL
   10 ////  Scanner device inquiry codes without commands 
   11 ////  (terminate with E; answer follows d and ends with V, or N if null)
   12 const int SL_ADF_HAS_PAPER     = 25;
   13 const int SL_ADF_OPENED        = 26;
   14 const int SL_ADF_UNLOAD_RDY    = 27;
   15 const int SL_ERR_MAX_DEPTH     = 256;
   16 const int SL_ERR_DEPTH         = 257;
   17 const int SL_ERR_CURRENT       = 259;
   18 const int SL_ERR_OLDEST        = 261;
   19 const int SL_PIXELS_PER_LINE   = 1024;
   20 const int SL_BYTES_PER_LINE    = 1025;
   21 const int SL_LINES_PER_SCAN    = 1026;
   22 const int SL_ADF_READY         = 1027;
   23 const int SL_PIXELS_PER_INCH   = 1028;
   24 const int SL_OPTICAL_RES       = 1029;
   25 const int SL_XPA_AVAILABLE     = 28;
   26 const int SL_XPA_READY         = 30;
   27 const int SL_SHOULD_BE         = 1034;
   28 const int SL_XPA_STATUS        = 29;
   29 const int SL_BYTES_IN_LASTSCAN = 1037;
   30 const int SL_WHICH_ADF         = 1041;
   31 const int SL_SCAN_DIRECTION    = 1047;
   32 const int SL_AUTO_COEF         = 1046;
   33                           
   34 ////  Device inquiry codes returning strings
   35 ////  (terminate with E; answer follows d and contains a W or ends with N)
   36 const int SL_DATE_CODE         =  4;
   37 const int SL_SCAN_STATUS       =  5;
   38 const int SL_ADF_STATUS        =  6;
   39 const int SL_MODEL_1           =  3;
   40 const int SL_MODEL_2           =  10;
   41 const int SL_MODEL_3           =  9;
   42 const int SL_MODEL_4           =  11;
   43 const int SL_MODEL_5           =  12;
   44 const int SL_MODEL_6           =  14;
   45 const int SL_MODEL_7           =  13;
   46 const int SL_MODEL_8           =  15;
   47 const int SL_MODEL_9           =  16;
   48 
   49                              
   50 ////  High, low, or current inquiry codes
   51 ////  (terminate with L,H,or R; answer follows k,g, or p and ends with V or N)
   52 const int SL_X_RESOLUTION    = 10323;
   53 const int SL_Y_RESOLUTION    = 10324;
   54 const int SL_X_SCALE         = 10310;
   55 const int SL_Y_SCALE         = 10311;
   56 const int SL_XPOS_DECI       = 10329;
   57 const int SL_YPOS_DECI       = 10330;
   58 const int SL_XEXT_DECI       = 10321;
   59 const int SL_YEXT_DECI       = 10322;
   60 const int SL_XPOS_PIXEL      = 10489;
   61 const int SL_YPOS_PIXEL      = 10490;
   62 const int SL_XEXT_PIXEL      = 10481;
   63 const int SL_YEXT_PIXEL      = 10482;
   64 const int SL_INTENSITY       = 10317;
   65 const int SL_CONTRAST        = 10316;
   66 const int SL_NEGATIVE        = 10314;
   67 const int SL_MIRROR          = 10318;
   68 const int SL_AUTO_BACKGROUND = 10307;
   69 const int SL_DATA_TYPE       = 10325;
   70 const int SL_BITS_PER_PIXEL  = 10312;
   71 const int SL_PATTERN         = 10315;
   72 const int SL_TONEMAP         = 10956;
   73 const int SL_DOWNLOAD_TYPE   = 10309;
   74 const int SL_DOWNLOAD        = 10328;
   75 const int SL_YPOS_BAR        = 10471;
   76 const int SL_TEST_LAMP       = 10477;
   77 const int SL_TEST_SCANNER    = 10485;
   78 const int SL_FILTER          = 10951;
   79 const int SL_COLOR_PATTERN   = 10955;
   80 const int SL_MATRIX          = 10965;
   81 const int SL_ADF_UNLOAD      = 10966;
   82 const int SL_ADF_CHANGE      = 10969;
   83 const int SL_CALIB_Y         = 10946;
   84 const int SL_CALIB_PARAM     = 10948;
   85 const int SL_XPA_DISABLE     = 10953;
   86 const int SL_LIGHT_POWER     = 10957;
   87 const int SL_BYTEORDER       = 10947;
   88 const int SL_CAL_MODE        = 10952;
   89 const int SL_SPEED_MODE      = 10950;
   90 const int SL_COMPRESSION     = 10308;
   91 const int SL_SCAN_SPEED      = 10327;
   92 const int SL_RECONNECT_LEVEL = 10331;
   93 const int SL_NUM_OF_VIEWS    = 10466;
   94 const int SL_VIEW_TYPE       = 10462;
   95 const int SL_MEDIA_TYPE      = 10469;
   96 const int SL_COORD_SYSTEM    = 10470;
   97 const int SL_RESERVED1       = 10320;
   98 
   99 #else  // for digital compiler (can't handle const int)
  100 ////  Scanner device inquiry codes without commands 
  101 ////  (terminate with E; answer follows d and ends with V, or N if null)
  102 #define SL_ADF_HAS_PAPER      25
  103 #define SL_ADF_OPENED         26
  104 #define SL_ADF_UNLOAD_RDY     27
  105 #define SL_ERR_MAX_DEPTH      256
  106 #define SL_ERR_DEPTH          257
  107 #define SL_ERR_CURRENT        259
  108 #define SL_ERR_OLDEST         261
  109 #define SL_PIXELS_PER_LINE    1024
  110 #define SL_BYTES_PER_LINE     1025
  111 #define SL_LINES_PER_SCAN     1026
  112 #define SL_ADF_READY          1027
  113 #define SL_PIXELS_PER_INCH    1028
  114 #define SL_OPTICAL_RES        1029
  115 #define SL_XPA_AVAILABLE      28
  116 #define SL_XPA_READY          30
  117 #define SL_SHOULD_BE          1034
  118 #define SL_XPA_STATUS         29
  119 #define SL_BYTES_IN_LASTSCAN  1037
  120 #define SL_WHICH_ADF          1041
  121 #define SL_SCAN_DIRECTION     1047
  122 #define SL_AUTO_COEF          1046
  123                           
  124 ////  Device inquiry codes returning strings
  125 ////  (terminate with E; answer follows d and contains a W or ends with N)
  126 #define SL_DATE_CODE           4
  127 #define SL_SCAN_STATUS         5
  128 #define SL_ADF_STATUS          6
  129 #define SL_MODEL_1             3
  130 #define SL_MODEL_2             10
  131 #define SL_MODEL_3             9
  132 #define SL_MODEL_4             11
  133 #define SL_MODEL_5             12
  134 #define SL_MODEL_6             14
  135 #define SL_MODEL_7             13
  136 #define SL_MODEL_8             15
  137 #define SL_MODEL_9             16
  138 
  139                              
  140 ////  High, low, or current inquiry codes
  141 ////  (terminate with L,H,or R; answer follows k,g, or p and ends with V or N)
  142 #define SL_X_RESOLUTION     10323
  143 #define SL_Y_RESOLUTION     10324
  144 #define SL_X_SCALE          10310
  145 #define SL_Y_SCALE          10311
  146 #define SL_XPOS_DECI        10329
  147 #define SL_YPOS_DECI        10330
  148 #define SL_XEXT_DECI        10321
  149 #define SL_YEXT_DECI        10322
  150 #define SL_XPOS_PIXEL       10489
  151 #define SL_YPOS_PIXEL       10490
  152 #define SL_XEXT_PIXEL       10481
  153 #define SL_YEXT_PIXEL       10482
  154 #define SL_INTENSITY        10317
  155 #define SL_CONTRAST         10316
  156 #define SL_NEGATIVE         10314
  157 #define SL_MIRROR           10318
  158 #define SL_AUTO_BACKGROUND  10307
  159 #define SL_DATA_TYPE        10325
  160 #define SL_BITS_PER_PIXEL   10312
  161 #define SL_PATTERN          10315
  162 #define SL_TONEMAP          10956
  163 #define SL_DOWNLOAD_TYPE    10309
  164 #define SL_DOWNLOAD         10328
  165 #define SL_YPOS_BAR         10471
  166 #define SL_TEST_LAMP        10477
  167 #define SL_TEST_SCANNER     10485
  168 #define SL_FILTER           10951
  169 #define SL_COLOR_PATTERN    10955
  170 #define SL_MATRIX           10965
  171 #define SL_ADF_UNLOAD       10966
  172 #define SL_ADF_CHANGE       10969
  173 #define SL_CALIB_Y          10946
  174 #define SL_CALIB_PARAM      10948
  175 #define SL_XPA_DISABLE      10953
  176 #define SL_LIGHT_POWER      10957
  177 #define SL_BYTEORDER        10947
  178 #define SL_CAL_MODE         10952
  179 #define SL_SPEED_MODE       10950
  180 #define SL_COMPRESSION      10308
  181 #define SL_SCAN_SPEED       10327
  182 #define SL_RECONNECT_LEVEL  10331
  183 #define SL_NUM_OF_VIEWS     10466
  184 #define SL_VIEW_TYPE        10462
  185 #define SL_MEDIA_TYPE       10469
  186 #define SL_COORD_SYSTEM     10470
  187 #define SL_RESERVED1        10320
  188 
  189 #endif // ifdef digital (end of directives for braindead compilers)
  190 
  191 #ifndef LINUX
  192 struct sg_header
  193  {
  194   int pack_len;    /* length of incoming packet <4096 (including header) */
  195   int reply_len;   /* maximum length <4096 of expected reply */
  196   int pack_id;     /* id number of packet */
  197   int result;      /* 0==ok, otherwise refer to errno codes */
  198   unsigned int twelve_byte:1; /* Force 12 byte command length for group 6 & 7 commands  */
  199   unsigned int other_flags:31;                  /* for future use */
  200   unsigned char sense_buffer[16]; /* used only by reads */
  201   /* command follows then data for command */
  202  };     
  203 #endif
  204 
  205