Wykres commitów

3578 Commity (d74d3bcd887d2a3d59ee96e04eb68f15c0a3b882)

Autor SHA1 Wiadomość Data
Jan Hauffa 529b6a1d6d Fix bug in device list handling. 2015-11-08 16:54:47 -05:00
Jan Hauffa 877f250b5c Resolve issue with debug logging. 2015-11-08 16:54:47 -05:00
Jan Hauffa 272c1d6fde Add preliminary model entry for the Microtek 4800H48U. 2015-11-08 16:54:47 -05:00
Jan Hauffa 7fda9bbf93 Introduce support for multiple scanners.
Keep all state local and ensure that all resources are freed by sane_exit. Ensure that each function returns only those error codes that are valid according to the SANE standard.
2015-11-08 16:54:47 -05:00
Jan Hauffa 6865eaf6ed Simplify sane_read, other fixes to mustek_usb2.c. 2015-11-08 16:54:47 -05:00
Jan Hauffa 63793907e2 Minor fixes to image processing. 2015-11-08 16:54:47 -05:00
Jan Hauffa bc203e8aa1 Sanitize option handling and add support for scanner buttons. 2015-11-08 16:54:47 -05:00
Jan Hauffa b2b3cf767a Use standard macros for byte swapping. 2015-11-08 16:54:47 -05:00
Jan Hauffa 281f53aa18 Remaining endian safety fixes. 2015-11-08 16:54:47 -05:00
Jan Hauffa 80b7249ebf Resolve minor thread safety problem. 2015-11-08 16:54:47 -05:00
Jan Hauffa de84f51270 Simplify row stride calculation in Asic_SetWindow(). 2015-11-08 16:54:47 -05:00
Jan Hauffa 7cd88d4122 Remove Scanner_ScanSuggest. 2015-11-08 16:54:47 -05:00
Jan Hauffa 3f5592ef8e Move global state variables of mustek_usb2_high.c into scanner structure. 2015-11-08 16:54:47 -05:00
Jan Hauffa 60a244ed1e Store size of shading table in ASIC structure. 2015-11-08 16:54:46 -05:00
Jan Hauffa ed1997b22f Do not test for NULL before calling free(). 2015-11-08 16:54:46 -05:00
Jan Hauffa 35c6a52834 Fix error propagation in mustek_usb2_high.c and a layering violation. 2015-11-08 16:54:46 -05:00
Jan Hauffa babee51689 Fix indentation of debug macros. 2015-11-08 16:54:46 -05:00
Jan Hauffa c0e44738a4 Simplify debug output in mustek_usb2.c. 2015-11-08 16:54:46 -05:00
Jan Hauffa c377a02453 Simplify debug output in mustek_usb2_high.c. 2015-11-08 16:54:46 -05:00
Jan Hauffa eebbe92c4e Simplify debug logging in mustek_usb2_asic.c. 2015-11-08 16:54:46 -05:00
Jan Hauffa 2c712f27c9 Remove uninformative function name prefixes, move gamma table creation into separate function. 2015-11-08 16:54:46 -05:00
Jan Hauffa c1dc16d709 Extensive changes to reduce the amount of global variables in mustek_usb2_high.c.
Might have made MustScanner_SetupScan less readable, though.
2015-11-08 16:54:46 -05:00
Jan Hauffa 9444bf1156 Reorganize some MustScanner_* functions. 2015-11-08 16:54:46 -05:00
Jan Hauffa bd7107ca05 Remove some unneeded global variables from mustek_usb2_high.c. 2015-11-08 16:54:46 -05:00
Jan Hauffa 589d6e15ee Endian-safe macros; moved remaining ASIC state into structure. 2015-11-08 16:54:46 -05:00
Jan Hauffa f89a7962de Fix indentation. 2015-11-08 16:54:46 -05:00
Jan Hauffa df045634cb Misc fixes. 2015-11-08 16:54:46 -05:00
Jan Hauffa 86f399bd21 Code in mustek_usb2.c should not use global state of mustek_usb2_high.c. 2015-11-08 16:54:45 -05:00
Jan Hauffa 74effd61fd Remove histogram stretching for negative images. 2015-11-08 16:54:45 -05:00
Jan Hauffa 4962b35abd Use prefix 'p' instead of 'lp', fix other style issues. 2015-11-08 16:54:45 -05:00
Jan Hauffa 9e2aabc976 If g_isCanceled is true, the thread has already been canceled. 2015-11-08 16:54:45 -05:00
Jan Hauffa a75bd3e8f7 Improve error handling in mustek_usb2_high.c. 2015-11-08 16:54:45 -05:00
Jan Hauffa 1d0f3ca42e Fix remaining comments. 2015-11-08 16:54:45 -05:00
Jan Hauffa 9226162537 Normalize naming of constants, structures, and enums. 2015-11-08 16:54:45 -05:00
Jan Hauffa d7ebb1553b Remove USB host type enum. 2015-11-08 16:54:45 -05:00
Jan Hauffa 41ac627e5f Get rid of unnecessary forward declarations. 2015-11-08 16:54:45 -05:00
Jan Hauffa da64a1fc1e First hack to build mustek_usb2* source files separately. 2015-11-08 16:54:45 -05:00
Jan Hauffa 3479acf538 Merge mustek_usb2_reflective/transparent.c into mustek_usb2_high.c. 2015-11-08 16:54:45 -05:00
Jan Hauffa a45931dd11 Remove MustScanner_GetScannerState. 2015-11-08 16:54:44 -05:00
Jan Hauffa c9516d5365 Merge Reflective_Reset, Transparent_Reset, and MustScanner_Prepare into new function MustScanner_Reset. 2015-11-08 16:54:44 -05:00
Jan Hauffa b2f52afa32 Further cleanup of mustek_usb2.c. 2015-11-08 16:54:44 -05:00
Jan Hauffa ccce2d4a9a Further cleanup of mustek_usb2.c. 2015-11-08 16:54:44 -05:00
Jan Hauffa 39141a4c02 Return SANE_STATUS_UNSUPPORTED unconditionally in sane_set_io_mode and sane_get_select_fd. 2015-11-08 16:54:44 -05:00
Jan Hauffa d9c1df0bb8 Remove vestigial support for custom gamma tables. 2015-11-08 16:54:44 -05:00
Jan Hauffa acf84e0c94 Clean up function StopScan. 2015-11-08 16:54:44 -05:00
Jan Hauffa 9158d10df9 Further simplification of MustScanner_Get*Line functions. 2015-11-08 16:54:44 -05:00
Jan Hauffa 1f6b405451 First attempt at simplifying the Get*Line functions. 2015-11-08 16:54:44 -05:00
Jan Hauffa a6b15f18cc Break remaining long lines. 2015-11-08 16:54:44 -05:00
Jan Hauffa 25242ff9c8 Clean up mustek_usb2_high.c. 2015-11-08 16:54:44 -05:00
Jan Hauffa c8982a9939 Do not use prefix "by" for byte variable names. 2015-11-08 16:54:44 -05:00
Jan Hauffa d7b4e02780 Use SANE_Status and SANE_TRUE/SANE_FALSE consistently. 2015-11-08 16:54:44 -05:00
Jan Hauffa 8b3c78838a Create common helper function for Asic_CarriageHome and Asic_MotorMove, remove MotorBackHome. 2015-11-08 16:54:43 -05:00
Jan Hauffa ed5dc8a7cd Further refactoring of Asic_SetWindow. 2015-11-08 16:54:43 -05:00
Jan Hauffa 82a40d5dca Refactoring of Asic_SetWindow. 2015-11-08 16:54:43 -05:00
Jan Hauffa 93a79af5d3 Fix indentation. 2015-11-08 16:54:43 -05:00
Jan Hauffa b43f0688db Use symbolic constants in more places. 2015-11-08 16:54:43 -05:00
Jan Hauffa 3c87b646b5 First attempt at merging Asic_SetCalibrate into Asic_SetWindow. 2015-11-08 16:54:43 -05:00
Jan Hauffa 033ebe6d9b Made error handling in mustek_usb2_asic.c more consistent. 2015-11-08 16:54:43 -05:00
Jan Hauffa 96c6ee1dae Cleaned up firmware state handling. 2015-11-08 16:54:43 -05:00
Jan Hauffa c1f22ef9a9 Clean up Asic_SetCalibrate, make Asic_SetCalibrate and Asic_SetWindow more similar. 2015-11-08 16:54:43 -05:00
Jan Hauffa 3cd05dacca Refactoring the smaller high level ASIC functions. 2015-11-08 16:54:43 -05:00
Jan Hauffa de5b647c4a Refactored medium level ASIC functions. 2015-11-08 16:54:43 -05:00
Jan Hauffa 693da258ce Move some definitions from mustek_usb2_asic.h to more appropriate headers. 2015-11-08 16:54:43 -05:00
Jan Hauffa 2776b336d1 Simplify LLFSetMotorCurrentAndPhase. 2015-11-08 16:54:42 -05:00
Jan Hauffa dea59ee824 Refactored all low-level motor functions except LLFSetMotorCurrentAndPhase. 2015-11-08 16:54:42 -05:00
Jan Hauffa e47fee8dcc Simplified computation of motor current, removed a redundant register assignment. 2015-11-08 16:54:42 -05:00
Jan Hauffa 5688a78ace Simplify low-level ASIC functions, add missing error checks. 2015-11-08 16:54:42 -05:00
Jan Hauffa 1d8a008856 Simplify SetRWSize, use symbolic constants for registers whenever possible. 2015-11-08 16:54:42 -05:00
Jan Hauffa 794b15ff9e Simplyfied Asic_SetShadingTable. 2015-11-08 16:54:42 -05:00
Jan Hauffa 6d5a5123ea Remove whitespace at the end of debug output lines. 2015-11-08 16:54:42 -05:00
Jan Hauffa d418094b64 Some motor table related fixes. 2015-11-08 16:54:42 -05:00
Jan Hauffa 3d1b409a1b Fix a few comments. 2015-11-08 16:54:42 -05:00
Jan Hauffa 88cac5b4ad Begin simplifying LLFSetMotorCurrentAndPhase, ensure all fields of LLF_MOTOR_CURRENT_AND_PHASE are initialized. 2015-11-08 16:54:42 -05:00
Jan Hauffa fb55a92604 Remove even more unused code from mustek_usb2_asic.c. 2015-11-08 16:54:42 -05:00
Jan Hauffa 77ea9b01c3 Improved readability of functions in mustek_usb2_high.c. 2015-11-08 16:54:42 -05:00
Jan Hauffa ca1e0db16f Remove unused code and fix indentation in mustek_usb2_high.c. 2015-11-08 16:54:42 -05:00
Jan Hauffa 3f7cf8a65f Remove DISABLE bit flag constants. 2015-11-08 16:54:41 -05:00
Jan Hauffa 073fe96611 LLF_MOTOR_CURRENT_AND_PHASE: only first byte of arrays MotorCurrentTableA/B is ever used 2015-11-08 16:54:41 -05:00
Jan Hauffa 4b242a7139 Remove unused parameter isOrderInvert from MustScanner_GetMono*Line. 2015-11-08 16:54:41 -05:00
Jan Hauffa 78863d13de Remove redundant typecasts. 2015-11-08 16:54:41 -05:00
Jan Hauffa cf6c88bfd1 Try to reduce differences between mustek_usb2_reflective.c and mustek_usb2_transparent.c, part 1. 2015-11-08 16:54:41 -05:00
Jan Hauffa 972fc54793 Move some code that was duplicated in mustek_usb2_transparent.c and mustek_usb2_reflective.c to mustek_usb2_high.c. 2015-11-08 16:54:41 -05:00
Jan Hauffa db37c13bb3 Remove information-less comments, break long lines, fix indentation. 2015-11-08 16:54:41 -05:00
Jan Hauffa fa8101e05e Remove unused enum FS_NULL. 2015-11-08 16:54:41 -05:00
Jan Hauffa ccde6b0635 Remove unused fields of struct GETPARAMETERS. 2015-11-08 16:54:41 -05:00
Jan Hauffa 2be2be76ae Unified style of struct and enum definitions. 2015-11-08 16:54:41 -05:00
Jan Hauffa ce6d7010d3 Pixel flavor is never PF_WhiteIs0, so the associated code can be removed. 2015-11-08 16:54:41 -05:00
Jan Hauffa 76a23c3bc4 Remove dead "auto level" code, sanitize key handling. 2015-11-08 16:54:41 -05:00
Jan Hauffa e7c44fe679 Cleanup of Asic_SetWindow 2015-11-08 16:54:41 -05:00
Jan Hauffa 16485d47da Optimize motor table calculation. 2015-11-08 16:54:41 -05:00
Jan Hauffa 8821c2882f First attempt at cleaning up mustek_usb2_asic.c. 2015-11-08 16:54:40 -05:00
Jan Hauffa 30087b3f43 Avoid some unorthodox language constructs. 2015-11-08 16:54:40 -05:00
Jan Hauffa 030c7fa122 Remove redundant code from mustek_usb2_high.c. 2015-11-08 16:54:40 -05:00
Jan Hauffa a554d61c17 Remove redundant code from mustek_usb2_asic.c, add a missing error check. 2015-11-08 16:54:40 -05:00
Jan Hauffa a49bff1a60 Simplify DRAM test. 2015-11-08 16:54:40 -05:00
Jan Hauffa bc9252c094 Remove bogus automatic warmup and power saving functions. 2015-11-08 16:54:40 -05:00
Jan Hauffa 0f63d16121 Remove redundant code from mustek_usb2.c. 2015-11-08 16:54:40 -05:00
Jan Hauffa 694a69dcab Remove unused definitions from mustek_usb2.h. 2015-11-08 16:54:40 -05:00
Jan Hauffa 21be236e84 Remove unused definitions from mustek_usb2_asic.h. 2015-11-08 16:54:40 -05:00
Jan Hauffa 2404326dde Remove unused definitions from mustek_usb2_high.h and ensure that the remaining ones are used consistently. 2015-11-08 16:54:40 -05:00
Jan Hauffa d1851a6512 Remove some particularly pointless comments, reduce size of block comments. 2015-11-08 16:54:40 -05:00
Jan Hauffa 047631050c Remove pointless indirection. 2015-11-08 16:54:39 -05:00
Jan Hauffa dedf0ac30d Remove unused global variable g_pDeviceFile and associated logic. 2015-11-08 16:54:39 -05:00
m. allan noah 3b73e1e8a3 fujitsu backend v128
do not ask fi-4340 for serial number
2015-11-08 13:12:12 -05:00
Olaf Meeuwissen 1baab222e4 Add missing include (fixes 315207)
Both Linux and NetBSD mention this header for use of setsocketopt().
DragonFly BSD needs it for the SOL_SOCKET symbol.
2015-11-08 18:49:58 +09:00
Olaf Meeuwissen b0a99cb489 Fix non-portable endian.h include issue (315209) 2015-11-08 18:36:57 +09:00
m. allan noah 358cbd7f31 canon_dr v53 continued
reorder geometry group options
use bg_color to fill missing image data
2015-11-06 21:39:35 -05:00
m. allan noah 398610336b canon_dr backend v53
add swskip option
2015-11-06 12:19:20 -05:00
m. allan noah b4bc0eb518 canon_dr backend v53
replace image processing methods with sanei_magic
2015-11-06 11:46:17 -05:00
m. allan noah 666c9a74ff canon_dr backend v52
improve dropout option handling
add software dropout implementation for downsampled modes
2015-11-05 21:44:58 -05:00
m. allan noah 9dc7924529 canon_dr backend v52
add must_downsample and must_fully_buffer
2015-11-05 21:44:58 -05:00
m. allan noah 01063a769d canon_dr backend v52
set can_color=1 by default (recent models dont have 'C' in name)
enable jpeg for DR-6080
2015-11-05 21:44:58 -05:00
m. allan noah 0b822359b3 cardscan backend v3
add USB IDs for newer model 800c
2015-11-05 21:44:58 -05:00
Luiz Angelo Daros de Luca 33495ef9b4 Add missing <sys/types.h> includes 2015-10-27 22:34:52 +09:00
Olaf Meeuwissen 716340e732 Include sys/types.h for u_long. Fixes compile on OS X 2015-10-17 13:55:17 +09:00
Alessandro Zummo 03d90ac2ed epsonds: do not enable double feed detection by default 2015-10-14 21:55:31 +02:00
Rolf Bensch 4a83d9c8a4 Pixma backend version 0.17.24 2015-10-14 19:04:27 +02:00
Rolf Bensch 3095ab46c4 new scanners Canon PIXUS MP5/SmartBase MPC190/imageCLASS MPC190 and Canon MP10/SmartBase MPC200/imageCLASS MPC200 2015-10-14 19:02:43 +02:00
Olaf Meeuwissen 06b865cfd2 Prevent possible buffer overflows [-Wstrncat-size]. Fixes 315198 2015-10-14 20:39:39 +09:00
m. allan noah 56e69f0998 added kvs1025.conf.in and utsushi.desc 2015-10-05 08:21:39 -04:00
m. allan noah 2ecf18f6fb autoheader and automake
After recent PNG and SNMP changes, need to run autoheader and automake
2015-10-02 21:53:14 -04:00
Alessandro Zummo 5c713413a0 epson2: added a missing include 2015-10-01 01:26:38 +02:00
m. allan noah 3403daef2e Make sequence point warning go away
See f219f7fb for details.
2015-09-28 21:16:28 -04:00
Olaf Meeuwissen e8586d8364 Use SNMP compiler flags and libraries only where needed
The compiler flags would take effect for every single compilation unit
and the libraries would be linked to every single backend/executable.
2015-09-28 21:16:07 -04:00
Olaf Meeuwissen 219a877858 net: Add mutex lock logic around device additions
The avahi_thread may call add_device() as well.  This addresses a
concern raised in 313921 and may fix 314696 as well as 315044.
2015-09-28 21:16:07 -04:00
Johannes Meixner f219f7fbd8 Make sequence-point warning go away. "Fixes" 311857
Sample code that mimicks the offending code gave identical run-time
results when compiled with gcc-4.9.2 and clang-3.5.0.  Rewriting the
sample code so that results matched both compilers was used to check
the validity of this change.
2015-09-28 20:40:51 +09:00
Rolf Bensch cbae0ea53b Pixma backend version 0.17.23 2015-09-26 10:10:38 +02:00
Olaf Meeuwissen ba1e395c66 Fix size_t printf format warnings 2015-09-25 20:53:42 -04:00
Olaf Meeuwissen 4c49c87827 Fix mixed declarations and code warnings (ISO C90) 2015-09-25 20:53:42 -04:00
Olaf Meeuwissen 22b17e232a Fix various types of unused variable warnings 2015-09-25 20:53:42 -04:00
Alessandro Zummo 86ba3c634f epson2: updated supported scanners 2015-09-22 00:44:38 +02:00
m. allan noah 87bfd53512 Run autofoo for recent changes 2015-09-19 13:39:38 -04:00
Olaf Meeuwissen 20a0ed547e [epson/epson2] Use separate lists of supported USB devices
The epson and epson2 backends shared a list of supported USB devices
generated from the epson2.desc file.  The epson backend doesn't even
claim to support a large number of the devices listed there.   This
change makes the backends use their own lists, generated from their
own *.desc files.
2015-09-19 13:39:37 -04:00
Olaf Meeuwissen 1c2b28307f Prevent access to memory that was not allocated 2015-09-19 13:39:37 -04:00
Olaf Meeuwissen f152b40faf Prefer string concatenation over copying
The `ibuf.product` byte array may contain embedded NUL characters.  In
that case the revision will not be visible as part of dev->sane.model.
2015-09-19 13:39:37 -04:00
Ilya Gordeev 16dc9c87a6 Fix memory clobbering issue in sane.model creation 2015-09-19 13:39:37 -04:00
Ilya Gordeev 98e4ee4084 Fix out-of-bounds array access 2015-09-19 13:39:37 -04:00
m. allan noah a1a04f7462 Use c90 compatible comments 2015-09-19 13:39:37 -04:00
Olaf Meeuwissen 9dd31f977c Move test on first array element into the loop 2015-09-19 12:02:57 -04:00
Sandro Mani 898270810d Fix string type option descriptor's size value 2015-09-19 12:02:57 -04:00
Eduard - Gabriel Munteanu ac1bf8d754 magicolor: add support for magicolor 4690MF
Currently, this works for USB, but the network OID needs to be
filled in properly.

Signed-off-by: Eduard - Gabriel Munteanu <edgmnt@gmail.com>
2015-09-19 12:02:57 -04:00
Eduard - Gabriel Munteanu afd22f7722 magicolor: complete support for duplex ADF
This is needed to fully-support scanners like magicolor 4960MF.

Signed-off-by: Eduard - Gabriel Munteanu <edgmnt@gmail.com>
2015-09-19 12:02:57 -04:00
Eduard - Gabriel Munteanu d0c3b22d7d magicolor: fix USB device detection
Only the generic device was being picked.

Signed-off-by: Eduard - Gabriel Munteanu <edgmnt@gmail.com>
2015-09-19 12:02:57 -04:00
Rolf Bensch 348d59f859 fix typo in debug output 2015-09-18 08:55:25 +02:00
Rolf Bensch d0745a10da for all adf scanners restrict maximum page height for flatbed scans 2015-09-18 08:52:36 +02:00
Stéphane Voltz 2fd04ccf84 warning fixes 2015-09-16 18:57:03 +02:00
Stéphane Voltz 65747277cc ifdef'ed temporaly disabled code since 2004 2015-09-16 18:38:11 +02:00
Stéphane Voltz 35d7d39550 Merge remote-tracking branch 'gitlab/pu/protect-niash-option-access-315132' into niash 2015-09-16 18:16:55 +02:00
Stéphane Voltz 45df679214 fix stdup declaration
- we need to include sane/config.h first  to use strdup
2015-09-16 17:49:45 +02:00
Olaf Meeuwissen db83bf44de niash.c: Add argument screening to sane_control_option
This prevents access to non-existing array elements as well as
potential NULL dereferences.

Fixes #315132.
2015-09-14 18:24:39 +09:00