Wykres commitów

77 Commity (418d1ecea7571d10acd08df2edc7967a91e14b0d)

Autor SHA1 Wiadomość Data
Olaf Meeuwissen 4b825b7d87 Fix scanimage pixel bit depth reporting
The bytes_per_line value may include padding bytes which leads to
incorrect results for small values of pixels_per_line.
2015-09-19 13:39:37 -04:00
Olaf Meeuwissen 002fea134a Align JPEG format command-line option behaviour with TIFF 2015-09-19 12:02:57 -04:00
Matteo Croce bc698d4329 add JPEG support to scanimage 2015-09-19 12:02:57 -04:00
Matteo Croce c83123ee46 add PNG format to scanimage 2015-09-19 12:02:57 -04:00
Rolf Bensch 4a6d0be34e remove atexit() function
- in some cases atexit() doesn't work with libusb-compat
  - all exit() functions are replaced by scanimage_exit()
  - scanimage_exit() has a new parameter (exit status)
2015-08-20 23:34:33 +02:00
m. allan noah b973a9c49f change exit status of scanimage
If we have successfully scanned at least one image
during a batch scan, don't return SANE_STATUS_NO_DOCS.
Code by Jeff Breidenbach jeff@jab.org
2014-07-14 20:09:02 -04:00
m. allan noah 0bb6ae706d add batch-print option to scanimage
Enables better interoperability with tesseract.
Code by Jeff Breidenbach jeff@jab.org
2014-07-14 20:03:36 -04:00
Mark Buda c591d2b7da Correction of some spelling/grammatical errors in source code 2014-05-15 22:04:37 -04:00
Nils Philippsen 8082a42ec4 avoid using string formats insecurely with "-f"
In the process, simplify processing the device list format: don't copy
the format string for writing \0 into it, just iterate over chunks in
the original string.
2013-12-04 15:04:12 +01:00
Stéphane Voltz ce90b61894 add test to protect scanimage from incorrect group options 2013-06-19 17:28:04 +02:00
Chris Bagwell 5061c2d5b2 More mingw portability updates.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.

Add check for getuid and getpass; which are not on mingw.

Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.

Comment out parts of replacement sigprocmask.c on mingw.

To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
2011-11-06 12:40:00 -06:00
Chris Bagwell 9bdff1dbdf mingw32 compile fixes
The following updates were made to all directories but backends.
That still needs work. There are also still some pthread issues
and syslog is missing.

 Windows doesn't support SIGHUP or SIGPIPE so make that optional.
 Only include socket header files when sys/socket.h is detected.
 Use winsock.h on windows.
 Only include syslog.h when vsyslog() was detect by configure.
 Skip FD_CLOEXEC when not supported by OS (not defined).
 Only include sys/ioctl.h on platforms that define it.
2011-11-05 11:19:34 -05:00
Olaf Meeuwissen 738b153eb6 Plug a memory in batch mode
scanimage allocates a new buffer for each page scanned without ever
releasing it. Buffer is 32 kiB by default.
2011-06-30 20:56:52 +02:00
Stéphane Voltz 4d0cd3c5b1 add -A/--all-options to scanimage for exposing all control options of a
backend
2010-11-06 08:00:37 +01:00
Stéphane Voltz 27c7eae2b5 don't print readonly controls as valid command line options 2010-10-31 23:01:43 +01:00
m. allan noah e4466b68cc exit with error if stdout isatty() 2010-02-10 20:56:25 -05:00
chris@cnpbagwell.com 4d9e8138af standardize including local sane/ include files.
Source code was inconsistent on how they were referencing
include files in include/sane.  In certain cases, sane/sane.h
and sane/saneopts.h was really including external copies (with
some preprocessor implementations anyways).
2009-05-07 22:06:20 -05:00
m. allan noah 0342a63033 Updates to prepare for 1.0.20 release:
* configure.in: change version to 1.0.20cvs
* configure: rebuild from configure.in
* include/sane/sane.h: hide API changes (minor, frame and status)
* backend/canon_dr.c, backend/fujitsu.c: SANE_FRAME_JPEG
* backend/coolscan3.c: SANE_FRAME_RGBI
* backend/genesys_gl646.c, backend/genesys_gl841.c: STATUS_HW_LOCKED
* backend/rts8891.c, frontend/scanimage.c: STATUS_WARMING_UP
* backend/pixma_io_sanei.c, backend/xerox_mfp.c,
  backend/sane_strstatus.c: STATUS_HW_LOCKED & STATUS_WARMING_UP
* doc/releases.txt: minor updates for new build system
2009-04-12 19:40:31 +00:00
m. allan noah 1636ba5334 * frontend/scanimage.c, doc/scanimage.man: make -B (buffer-size)
selectable, and make long name consistent. (#309672 by Johannes Berg)
2009-03-14 18:10:38 +00:00
Chris Bagwell 70f3fdfba4 * acinclude.m4, backend/*.[ch], tools/*.[ch], frontend/*.[ch]:
Global replace of u_int??_t with C9x standard based uintxx_t
 in order to remove some tricky and overlapping portability logic
 from acinclude.m4 and leave it in only m4/stdint.m4.
2009-02-26 03:15:43 +00:00
m. allan noah c290bb2e1b * frontend/scanimage.c: improved comments, simplified x/y option code,
removed buggy -1/+1 x/y code (#311172), expose non-settable options,
check for invalid caps on options, handle option descs with \n
* doc/releases.txt: add note about cvs checkout on alioth.
2009-02-25 03:29:14 +00:00
Mattias Ellert 18e9d6c358 Restore alloca include order 2009-02-20 17:56:54 +00:00
Chris Bagwell caba90c552 * configure.in, acinclude.ac: Cleanup autoconf 2.63 warnings.
add cv_ prefix to cached variable.  Remove AC_ARG_PROGRAM as
automake already invokes this. When prefered AC_USE_SYSTEM_EXTENSIONS
exists, use that instead of AC_GNU_SOURCE/AC_AIX/AC_MINUX.
Cleanup socket detection more by creating only a single
SOCKET_LIBS that contains list of all optional libraries
for any socket related funciton.  Make sure that checks
for socket related functions use SOCKET_LIBS when searching.
Check for getopt_long() and getopt.h.  Make OS/2 use
-no-undefined (same as windows).
* ltmain.sh, m4/libtool.m4: Upgrade to libtool 1.5.26.
* Makefile.am: Cleanups to match configure updates.
* frontend/scanimage.c, include/Makefile.in, lib/getopt.c
lib/getopt1.c, toosl/sane-desc.c, include/lgetopt.h:
Rename internal getopt.h to lgetopt.h to allow using
external getopt.h when it exists.  This allows to go
back to optionally compiling getopt()/getopt_long() and its
prototypes and not have conflicts with external headers/symbols.
2009-02-06 03:10:44 +00:00
Chris Bagwell 23ff26f9a5 * acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided.  Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
  lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
  tools/sane-desc.c: Convert lib/ to automake.  Create a liblib.la
  for everyone to use and a libfelib.la for only frontend programs.
  Make all internal programs be prefixed with sanei_ as not to conflict
  with other programs libsane is linked in with that will also most
  likely create similar internal utils on problem platforms.
  * include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
  and link in getopt_long() but prefix it with sanei_.  Its
  easier to always use internal version then try to figure out what
  platforms support getopt_long() and what header files to use.
  * backend/Makefile.am: Convert backend makefile to automake.
  Initial version that is feature parity with original but uses
  specific rules instead of wildcards and only links in libraries/objs
  really required. Room for more cleanup of whats linked in once
  all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
Julien BLACHE a42b57186f Make batch mode create output files atomically. 2009-01-17 10:18:40 +00:00
m. allan noah 425a3d034d * backend/fujitsu.[ch]: backend v85
- round pixels_per_line down to arbitrary limits for fi-4990 & fi-4860
 - fi-4860 returns random garbage to serial number queries
 - initialize *info to 0 in sane_control_option()
* doc/descriptions/fujitsu.desc: backend v85, improve status/comments
* frontend/scanimage.c: initialize *info, fix buffer overwalk
2008-12-10 21:32:10 +00:00
m. allan noah ba856d2aec 2008-09-25 m. allan noah <kitno455 a t gmail d o t com>
* include/sane/saneopts.h: underscore not allowed in option names
        * frontend/scanimage.c: fix broken unknown length (-1) binary scans,
          fix invalid tiff height with unknown length scans, fix compiler warn
2008-09-25 02:39:52 +00:00
Julien BLACHE eefb1b1155 Get option descriptor 0 before trying to read the value for option 0. 2008-08-04 20:54:10 +00:00
m. allan noah 0acce974b2 add %n (newline) to -f option 2008-05-28 00:48:21 +00:00
Stéphane Voltz 78fc186543 - handling of SANE_STATUS_WARMING_UP 2008-05-26 04:56:41 +00:00
m. allan noah 09f523defe remove support for SANE_FRAME_JPEG, add other frame types but commented out 2007-12-29 21:36:25 +00:00
m. allan noah b2666cada5 scanimage: bugfix, dont round up negative user input values
fujitsu.desc: add/consolidate new models
2007-08-08 12:46:02 +00:00
m. allan noah c8e8f2c41a scanimage.c: add default: blocks to switch statements so recent gcc will shutup
fujitsu.[ch]: update to backend v1.0.52:
- remove unused jpeg function
- reactivate look-up-table based brightness and contrast options
- change range of hardware brightness/contrast to match LUT versions
- call send_lut() from sane_control_option instead of sane_start
2007-07-31 18:07:53 +00:00
m. allan noah e343cc59cf * backend/fujitsu.[ch], backend/fujitsu-scsi.h: update to v1.0.50,
add JPEG support, usb command sending and scan params cleanups
* include/sane/sane.h: add SANE_FRAME_JPEG
* frontend/scanimage.c: dont crash on unknown frame types
2007-07-10 16:07:25 +00:00
Henning Geinitz 6bff1fdf4b Added examples on how to set the scan area in the manual page (bug
#303802). Mention how to separate parameters from options in --help and manpage
(bug #303819).
2006-10-03 18:39:35 +00:00
Jon Chambers b6f25c8971 flush the output buffer after each page (help prevent lost data on ctrl-C) 2006-06-15 20:10:15 +00:00
m. allan noah e5bb981d6a move sane_cancel outside of tight loop, only done at end of batch 2006-06-09 13:04:06 +00:00
Henning Geinitz 56ba575749 Don't create and delete a file in batch mode if the document feeder is empty or
if CTRL-D is pressed in prompt mode. This change avoids deleting existing
files. For an explanation, see bug #302797.
2006-01-02 23:00:23 +00:00
Henning Geinitz 38087da06a Use correct size for fgets. Patch from Antoine Jacoutot <ajacoutot@lphp.org>. 2005-10-06 19:11:09 +00:00
Henning Geinitz e3e00e9d91 Added progress indicator to scanimage (based on patch from Mario Goppold
<mgoppold@tbz-pariv.de>). Updated copyright information, added links to
sane-devel mailing list.
2005-09-23 12:05:51 +00:00
Henning Geinitz 3ae9b03454 Don't exit with error when trying to set inactive options. This especially
happens in connection with geometry options and the v4l backend (bugs #300321,
#301977).
2005-08-14 14:51:06 +00:00
Mattias Ellert 23b39a25f1 Missing braces 2005-04-28 12:49:01 +00:00
Gerard Klaver e9e045a44b -split up printf command to remove warning ISO C89 (string length > 509)
-patch for bugreport 300160, ranges for width and height are wrong

-added option -B -buffersize so instead of default input buffer of
32*1024 a buffer of 1024*1024 can be chosen, so for vidcams for example
640x480, usb 2.0, 30fps less time is needed to fill input buffer.
2005-04-15 21:09:56 +00:00
Julien BLACHE 746faf32c9 More auth_callback() fixes, although these ones aren't critical. 2004-09-05 09:27:28 +00:00
Julien BLACHE c5f9d0d711 * frontend/scanimage.c: Added the possibility to cleanly stop a batch by pressing Ctrl+D when using --batch-prompt. 2004-07-31 17:26:02 +00:00
Henning Geinitz a2e686d667 Added support for asking for pressing a key before scanning a page in a batch
scan. Patch from Dominik Fischer <dom_fischer@web.de>.
2004-02-22 11:17:49 +00:00
Henning Geinitz b59fc7f95a Updated email address of Andreas Beck. 2003-07-26 09:33:21 +00:00
Henning Geinitz 494e6a1cf4 When parsing string options whose arguments are too short, don't overwrite the
remaining command line arguments. Print "[inactive]" after every inactive
option.
2003-07-19 14:23:31 +00:00
Henning Geinitz 85e0bb2735 Added option --dont-scan. Resorted usage output. 2002-09-11 19:20:43 +00:00
Oliver Rauch d054ded6c1 2002-08-18 Oliver Rauch <Oliver.Rauch@rauch-domain.de>
* frontend/scanimage.c, frontend/stiff.h, frontend/stiff.c:
          Added option "-i filename"/"--icc-profile filename":
          When image is saved in tiff format then this icc-profile is
          added to the tiff file as tiff tag
2002-08-27 17:57:19 +00:00