Wykres commitów

287 Commity (ce713f95c0470e1afb20148e1c886310bcc09eb4)

Autor SHA1 Wiadomość Data
Olaf Meeuwissen f3471c2ca6 saned: Use system header IPv6 test macros if available
This should fix [-Wstrict-aliasing] compiler warnings on those systems
where the IN6_IS_ADDR_LOOPBACK and IN6_IS_ADDR_V4MAPPED macros exist.
POSIX.1-2001 states that they shall be defined in netinit/in.h so most
systems will probably have them.
2016-01-02 17:50:34 +09:00
Olaf Meeuwissen cadb4b0fff saned: fix [-Wmaybe-uninitialized] compiler warning 2015-12-27 18:41:55 +09:00
Olaf Meeuwissen 18e4c4a086 Revert "Prevent use of uninitialized variable"
This change introduces a variable that shadows the file scope one.

This reverts commit 45e66aee95.
2015-10-13 23:32:40 +09:00
Olaf Meeuwissen 36876a8366 saned: minor improvement of help message wording 2015-10-12 20:55:19 +09:00
Olaf Meeuwissen 32986192bd fix: declaration-after-statement warning 2015-10-12 20:49:55 +09:00
Olaf Meeuwissen 42aa01e4e5 fix: missing-field-initializers warning 2015-10-12 20:49:55 +09:00
Olaf Meeuwissen fa001c2193 Follow getopt_long usage in scanimage.c
This is on the off chance that getopt_long is not in the system's
standard library.
2015-10-12 20:49:07 +09:00
Olaf Meeuwissen 45e66aee95 Prevent use of uninitialized variable 2015-10-12 20:47:43 +09:00
Matteo Croce eab8fd457d saned: add '-b' option to bind to a specific address 2015-10-12 20:25:15 +09:00
Matteo Croce fed2a2cf60 saned: use getopt_long() for option parsing
The help message has been adjusted to match getopt_long conventions.
2015-10-12 20:24:59 +09:00
Matteo Croce 418d1ecea7 saned: move help message to usage() function 2015-10-12 17:11:49 +09:00
Matteo Croce a79cd0abe7 saned: parse inetd args in main()
move argument parsing logic from run_inetd() to main()
2015-10-12 16:52:01 +09:00
Matteo Croce 2c3cb206ce saned: parse standalone args in main()
move argument parsing logic from run_standalone() to main()
2015-10-12 16:52:01 +09: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
m. allan noah 87bfd53512 Run autofoo for recent changes 2015-09-19 13:39:38 -04:00
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
m. allan noah 7566619e53 rebuild with automake 1.14.1 2015-08-31 20:58:30 -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
Stéphane Voltz 0e6d9621c1 add a new option for tstbackend
- add '-s' '--scan' option to add scan during open/close tests to better
	catch issues with resources incorrectly free'd and alloc'd
2015-07-30 19:00:32 +02:00
Stéphane Voltz 87ca2f5f0e fix clang warning 2015-07-30 14:01:13 +02:00
Alessandro Zummo ccd15dc966 Revert "epsonds: enable double feed detection"
This reverts commit 005c3928a5.
2015-04-26 23:09:08 +02:00
Alessandro Zummo 005c3928a5 epsonds: enable double feed detection 2015-04-26 22:44:01 +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
Chris Bagwell bc2dc68fa5 Improve snmp detection when cross compiling.
Improving here means do not set LIBS/CFLAGS if library is not detected.
This prevents some unknown options based to ld when host is Linux and
target is mingw32/64.  Further improvements are needed if one wants this
snmp support when cross compiling to really work.

Also, to make commit bisectable, updated all autofoo files using
'autoreconf -i -f' and repatching ltmain.sh.

Also, test-driver was missing from git repo but the Makefile.in
checked in expected it to exist.
2013-08-15 13:10:39 -05:00
Stéphane Voltz 017d8aaf88 add a verbose parameter to trace tests done 2013-08-07 06:49:54 +02:00
Nils Philippsen fab378a681 Add short help message to saned 2013-07-08 15:09:51 +02:00
Stéphane Voltz ce90b61894 add test to protect scanimage from incorrect group options 2013-06-19 17:28:04 +02:00
Stéphane Voltz a545ec1f14 add a test for scanner hotplug detection
- add an option to loop on sane_get_devices for a given time,
  so hotpluggin and removing of scanners can be tested
2013-03-29 21:52:38 +01:00
Louis Lagendijk 3276babdec Added optional support in saned for systemd socket activation. This will allow for
using backend debugging using SANE_DEBUG_xxx to be used for saned controlled
scanning when using socket activation. When only the socket is received we
use the existing code path.
2013-01-10 20:59:26 +01:00
m. allan noah 9b142567fa Revert "forgot to do autoreconf"
This reverts commit aa6f185452.
2012-11-28 21:51:12 -05:00
Paul Newall aa6f185452 forgot to do autoreconf 2012-11-28 22:11:04 +00:00
m. allan noah a3853f9422 Updated scanimage deps 2012-08-14 21:53:19 -04:00
m. allan noah 349a0104b9 updated scanimage and saned linker options 2012-08-09 21:03:10 -04:00
Chris Bagwell e7f01c3b36 Add --disable-dynamic/--disable-preload and update docs
Options were in README but removed at some point.  They
are useful so add them back.

Document BACKENDS and PRELOADABLE_BACKENDS variables in
README as well as in configure --help output.
2011-11-08 21:28:30 -06: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
Pino Toscano 56e39a9080 Define PATH_MAX if needed 2011-03-04 18:19:06 +01:00
m. allan noah 40e40989d9 rebuild autofoo for magicolor and snmp support 2011-01-18 21:31:13 -05:00
Chris Bagwell 650ea7cf8a update generate files using latest autoconf tools.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
2011-01-02 13:07:31 -06: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
Alex Belkin 842c98d204 Added Samsung SCX-4500W scan over network support for xerox_mfp backend (by Alexander Kuznetsov).
autoconf and automake reconfigure.
2010-09-30 15:11:56 +04:00
Julien BLACHE f7ee384569 Exit the Avahi process on error and when the poll loop terminates 2010-09-16 18:23:12 +02:00
Chris Bagwell 0109113ea3 Don't include -lresmgr in all backends
resmgr library is only used (optionally) by
sanei_usb and sanei_scsi.  So only need to
link it in for those backends.  This was
a stray piece from initial cleanup of LIBS
in sane-backends 1.0.20.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
2010-04-06 09:49:58 -05:00
Chris Bagwell 1903d646b2 align autoconf/automake output to common version.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
2010-02-27 23:27:32 -06:00
m. allan noah 54a84f2053 Use standard gettext infrastructure, from Adi Roiban 2010-02-27 20:51:31 -05:00
Stéphane Voltz b37621d86a addition of the p5 backend to the distribution 2010-02-15 22:15:43 +01:00
m. allan noah e4466b68cc exit with error if stdout isatty() 2010-02-10 20:56:25 -05:00
Julien BLACHE ec295e359a Fix standalone polling loop
Not explicitely checking for POLLIN leads to breakage. Unbreak saned.
2009-12-24 17:22:46 +01:00
Julien BLACHE 161ca93aa5 Explicitely check for errors on fds
Previous code checked for no activity (!POLLIN) and would error out with
2 fds and only one active.
2009-08-09 09:31:12 +02:00
Stéphane Voltz cb59301448 remove WARMING_UP_STATUS usage 2009-08-02 21:27:27 +02:00
m. allan noah 163f5fa345 New kodak backend, and all the autofoo changes required to build it
- remove some Kodak machines from unsupported list
- add sane-kodak manpage
- add kodak.desc
2009-06-22 23:06:22 -04:00
Julien BLACHE d3f1f6fa50 Guard sin6 union member by #ifdef ENABLE_IPV6 2009-06-16 15:11:45 +02:00
Julien BLACHE f06cf4770b Fix strict aliasing issues
Strict aliasing warnings can now lead to broken code with gcc 4.4. Replace
various sockaddr casts by unions.
2009-06-16 15:07:00 +02:00
chris@cnpbagwell.com 07c5723cab Merge branch 'master' of ssh://cbagwell-guest@git.debian.org/git/sane/sane-backends 2009-05-09 21:40:55 -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
Julien BLACHE d92a20febb Close network fds in the Avahi process
Network fds are of no use to the Avahi process and can cause the net
backend to hang when saned is run in debug mode.

This only happens if the net backend tries to connect to saned a second
time and manages to establish the connection before saned has completed
its shutdown.

There is some potential for this to also occur when saned is run in
standalone mode but it's far less probable as the window is a lot smaller.
2009-05-06 11:38:16 +02:00
m. allan noah 764aa7c6e1 add more generated files to .gitignore 2009-05-05 15:56:54 -04:00
Julien BLACHE 6e4ed52293 Add basic .gitignore files 2009-05-04 14:45:17 +02:00
Chris Bagwell 6b5973313c * Makefile.in, aclocal.m4, configure, */Makefile.in: Regenerated
with newer automake.
* backend/Makefile.am, tools/sane-config.in: Add missing
$GPHOTO2_LDFLAGS so library can be found.
* tools/Makefile.am: Add mising $SCSI_LIBS to sane-find-scanner.
2009-05-03 22:01:23 +00: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
Julien BLACHE f29d2ac068 Explicitly bind IPv6 addresses first. 2009-03-13 17:02:25 +00:00
Ilia Sotnikov 2ddc741dac - Remove unnecessary 'res' variable assignment in check_host()
(AF-indep version)
2009-03-13 11:43:57 +00:00
Julien BLACHE 9cdf75633d Rework Ilia's changes in check_host(). 2009-03-13 08:59:31 +00:00
Ilia Sotnikov 6940d841eb * Allow host checking to proceed if no local name was found 2009-03-12 15:54:00 +00:00
Ilia Sotnikov d32a9420da * Use hstrerror (h_errno) instead of strerror(errno) on gethostbyname()
errors
2009-03-12 12:41:46 +00:00
Chris Bagwell 9d1375fd7e * acinclude.m4, tools/sane-config.in: Add in missing libraries
to sane-config missed during fix to stop using LIBS to link everything.
Add back in code to move LDFLAGS out of $GPHOTO2_LIBS and into
GPHOTO2_LDFLAGS.
2009-03-03 02:53:42 +00:00
Julien BLACHE b72c29cd75 Make sure backends can't break the network dialog and crash the remote net
backend by writing to stdin/stdout/stderr.
2009-03-02 11:21:52 +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
Chris Bagwell be3f46204b * po/Makefile.am, configure.in: convert remaining directory,
po, to use automake.
2009-02-21 22:45:14 +00:00
Mattias Ellert 18e9d6c358 Restore alloca include order 2009-02-20 17:56:54 +00:00
Mattias Ellert 0827226249 Adding missing liblib dependencies 2009-02-20 16:51:09 +00:00
Chris Bagwell cb4fb37eca Have configure define configdir so all makefiles can use
it (fixes bug introduce with sanei converted to automake).
Enable running testsuite during distcheck.
2009-02-19 18:10:12 +00:00
Chris Bagwell e380729334 * configure.in, tools/Makefile.am: convert tools to automake.
Add tools/openbsd to distribution package.
* include/Makefile.am: include files should have been installed
under sane/ directory when converted to automake.
* doc/Makefile.am: Cleanup. Use automake's built in support to
install docs within subdirectories.
2009-02-19 02:17:45 +00:00
Julien BLACHE 25818023c6 Fix handling of Avahi server restart. 2009-02-18 13:19:51 +00:00
Chris Bagwell aef46252cc convert frontend, include, and sanei directories to use
automake.  Only reference libsanei.la now. Use am_conditional
to compile sanei_jpeg.lo.  distcheck now runs sanei/wire_test.
2009-02-15 03:31:36 +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 0330a4d416 * aclocalm4: fix prototype of internal strcasestr and usleep.
* configure.in: Group all USB logic together and all SCSI
logic together to aid understanding of whats no longer
valid.  Allow sharing enable/disable options between all
USB drivers on multiple platforms.  Combined CAM_LIBS and
SCSI_LIBS since they are mutually exclusive.
Skip some USB/SCSI checks when previous tests show it will always fail.
* backend/Makefile.am, tools/Makefile.in: Combine CAM_LIBS and
SCSI_LIBS. Add missing SOCKET_LIBS to epson2.  Add USB_LIB.
* saned.c: Add limits.h for PATH_MAX.
2009-02-02 03:17:32 +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
Chris Bagwell 907cbe7ac6 Replace usage of getgrouplist() with
getgrent() and friends.  getgrouplist is not posix and not
on several platforms including cygwin.
2009-01-31 02:18:41 +00:00
Chris Bagwell b52b0c0c14 * backend/epson2.c backend/pixma_bjnp.c, include/sane/sanei_backend.h,
sanei/sanei_tcp.c, sanie/sanei_udp.c: Improve portablity by
  removing usage of MSG_WAITALL since not all platforms support
  that (cygwin).  Default is to be blocking anyways.  Changed
  usage of MSG_NOTWAIT to use fcntl() function as needed as well.
  * configure.in, lib/Makefile.in, lib/strcasestr.c: Add internal
  strcasestr() for platforms missing it (cygwin).
  * pixma_common.c: My source match header prototype for picky
  compilers (cygwin).
  * backend/umax_pp_mid.c: Allow BACKEND_NAME to be filename
  yet debug to be SANE_DEBUG_UMAX_PP to match man page.
2009-01-29 15:10:19 +00:00
Julien BLACHE a42b57186f Make batch mode create output files atomically. 2009-01-17 10:18:40 +00:00
Chris Bagwell c90e23a6d2 Updates to Makefiles to prepare for transition to automake.
Fix a few bugs with "all" and "uninstall" targets to work when
$(builddir) != $(srcdir).  Added $(DESTDIR) to uninstall target.
Made $(distdir) related to current directory to match automake.
2009-01-16 23:39:48 +00:00
Julien BLACHE b9807541c7 Add a data_portrange configuration file option to saned. 2008-12-12 15:51:15 +00:00
Julien BLACHE 3dfc5881ea Fix crasher typo in IPv4-only code. 2008-12-12 15:29:59 +00:00
Julien BLACHE 383947f31d Fix erroneous comment. 2008-12-12 15:29:10 +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 9f7441d267 Initialize ngroups to 0, ditto for runas_{u,g}id (instead of -1). 2008-08-05 09:27:39 +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
Julien BLACHE 32b343dcea Set supplemental group list in addition to setting euid and egid. Reported by Cameron Hutchison. 2008-07-31 09:42:33 +00:00