Wykres commitów

306 Commity (1594aa5a0550b67a65a458e1841a50d57c34035c)

Autor SHA1 Wiadomość Data
Stéphane Voltz 8c062e89f4 make private functions static 2012-07-04 06:55:14 +02:00
m. allan noah d4ff20d857 Update sane_magic deskew algo
- allow paper to be +/- 1 inch from top of image
- correct integer overflow
- improve (disabled) debug logs
2012-05-09 21:17:33 -04:00
Ruediger Meier 0e3d873624 build fix, use the right scsi header on win32
Now we are using either ddk/ntddscsi.h or ntddscsi.h and even don't
stop if we have none of them.
2012-01-21 22:16:50 -06:00
Ruediger Meier 5311781404 cleanup, uniq PATH_SEP defines
Always use the same portable PATH_SEP define (note _WIN32
is not defined on cygwin).
2012-01-21 22:02:20 -06:00
Ruediger Meier ef66c1e767 fix, inconsistent PATH_SEP and DIR_SEP defines
PATH_SEP and DIR_SEP were inconsistently defined on cygwin since
5168206e (also see a28bd843)
2012-01-21 22:02:20 -06:00
Chris Bagwell 8ac464a47d add support for libusb-win32
It is API compatible with libusb-0.1 that is already supported
but uses different header file name to prevent conflict with
Window's own usb.h.
2011-12-27 17:35:35 -06:00
Chris Bagwell 2c4b1da0bf add FreeBSD Port's patches
epson2-commands.c: Include <sys/types.h> to resolve u_long.
epson2.c, magicolor.c, xerox_mfp-tcp.c: Include <sys/types.h>
and to <sys/socket.h> for anyone using setsockopt().
sanei_tcp.h: Include <sys/types.h> since ssize_t is referenced.
sanei_usb.c: Newer FreeBSD version checks.

All changes in this patch set come from FreeBSD ports patches.
Bug #312503.
2011-11-20 20:08:15 -06:00
Chris Bagwell 10b778b5d0 Map SANE_Pid to pthread_t
Not all platforms use an integer for pthread_t and so
couldn't compile on those; namely mingw.

This is least riskest version I could come up with. Backends
that do things like "SANE_Pid pid = -1" or "if (pid == -1)" will
need to switch to sanei_thread_set_invalid()
sanei_thread_is_invalid() to be able to compile on mingw.
2011-11-10 19:22:07 -06:00
Chris Bagwell ba10bb37cd remove unused variable. 2011-11-09 21:48:07 -06: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 c64249fc31 fix compile failure on non-windows platform. 2011-11-08 21:22:42 -06:00
Chris Bagwell 1aa332d710 Updates to use sockets on mingw
Add missing WSAStartup() and WSACleanup() code required
on windows to use ws2_32 library.

Also, O_NONBLOCK is tricky even on other platforms so create
a function to set that so portability logic doesn't need to be
done in every backend.  Windows requires using a non standard
function to enable nonblocking mode and also doesn't support
querying current state.
2011-11-07 21:49:54 -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
Mattias Ellert 9e639753a3 Include <sys/types.h> for definition of u_long on MacOS X 2011-10-30 10:32:34 +01:00
m. allan noah 28ccc11d91 Add new blank page and rotation detection algos 2011-06-06 20:45:34 -04:00
Reinhold Kainhofer c0b26b4568 sanei_usb: Add function sanei_usb_get_endpoint, add range check in sanei_usb_set_endpoint
Since we now have the possibility to change the endpoint used for a particular USB communication type,
we also need a way to retrieve the current endpoint, so that one can e.g. reset the endpoint to the
old value after a single usb operation on a different endpoint.
2011-01-31 22:42:29 +01:00
m. allan noah 40e40989d9 rebuild autofoo for magicolor and snmp support 2011-01-18 21:31:13 -05:00
Reinhold Kainhofer 6dc2a7d03a Add some sanity checks 2011-01-15 21:41:06 +01:00
Reinhold Kainhofer 039f21aaf8 Add function to set USB endpoints to use
Added
 void sanei_usb_set_endpoint (SANE_Int dn, SANE_Int ep_type, SANE_Int ep);

This function allows the user to set the endpoint to use on
the given device for the given endpoint type (e.g. bulk in).
Some scanners have multiple bulk in/out endpoints but use
only one for communication (not the one detected during auto-detection),
so one call to the new function will change the used endpoint.
Some scanners use two different endpoint for different purposes,
so in that case each read/write call needs to be preceeded
by a call to that function to set the proper endpoint.

ep_type is a bitmask and is usually of the form
    (USB_DIR_IN|USB_ENDPOINT_TYPE_BULK)
2011-01-15 21:40:55 +01:00
Chris Bagwell 9de4dcd8a5 Fixes for "make distcheck" on cygwin.
Allow "make dist" when translations are disabled.
Allow "make check" to work by linking in liblib.la.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
2011-01-02 20:00:22 -06: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
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
Reinhold Kainhofer 093fff631c Fix SANE_CONFIG_DIR handling, use it for dll.d/; Add sanei_config_get_paths
* include/sane/sanei_config.h sanei/sanei_config.c: Add function
        sanei_config_get_paths to obtain all configuration pathes (from env var
        SANE_CONFIG_DIR and default paths); fix pointers to invalid/freed
        strings when SANE_CONFIG_DIR is set

* backend/dll.c: When searching for the dll.d/ directory, also use
        the SANE_CONFIG_DIR env variable.
2010-09-18 10:35:35 +02:00
Stéphane Voltz 226d4cf172 valgrind memory leaks/overwrite fixes 2010-09-17 06:49:41 +02:00
Stéphane Voltz 056994c6c4 use same estimation method for getTransX than in getTransY 2010-09-12 21:20:19 +02:00
Julien BLACHE 60b79b6463 sanei_magic: kill unused variable 2010-06-23 18:21:34 +02:00
Stéphane Voltz a717c4658a add sanei_usb_reset function 2010-05-16 07:37:34 +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 dc6a1ef2b0 reset the libusb device handle after bus scan. patch from Hans Petter Selasky (FreeBSD) 2009-09-14 13:31:15 -04:00
m. allan noah 3a26db083f Add sanei_magic image processing library
Initial support for:
Deskew
Autocrop
Despeckle
2009-09-14 13:13:31 -04: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
chris@cnpbagwell.com 581b94fb88 Fix sanei_tcp_read(). Revert some getopt logic.
* sanei/sanie_tcp.c, backend/epson2_net.c: Update
sanei_tcp_read() to better simulate old behavior of MSG_WAITALL.
recv() tends to return MTU sized chunks of data without that option.  And at
least cygwin doesn't support MSG_WAITALL.  Re-enable epson2 using that
function for big recieves.
* libgetopt.c, libgetopt1.c:
Revert some logic meant to be used only when we were always compiling
interal getopt() functions.  Fix header filename.
2009-06-09 19:12:43 -05:00
Nicolas Martin 1e381db161 Adds debug verbosity to last sanei_usb.c patch.
This commit adds some debug verbosity to the last committed sanei_usb.c patch
id 5b69fa8c6d
for fixing the choice of usb endpoints, in the sanei_usb_open() seek for endpoints loop.
2009-05-25 22:01:43 +02:00
Nicolas Martin 5b69fa8c6d Fix for Pixma MP730 in pixma backend and sanei_usb
Updated following files for Pixma MP730 support:
- backend/pixma_mp730.c:
  Add width scan area fitting
  Fix end scan sequence protocol
- sanei/sanei_usb.c:
  In sanei_usb_open(), changed the "seek for endpoints" loop
  so that it first looks for those interfaces (in config 0)
  that have been detected as potential scanners in
  sanei_usb_init()
2009-05-22 10:29:37 +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
m. allan noah 1541ad928f new .gitignore files 2009-05-05 16:06:38 -04: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
Julien BLACHE c5991b48a0 /proc/scsi is being deprecated in the Linux
kernel; use sysfs for SCSI device enumeration in
sanei_scsi_find_devices() by default, keep
sanei_proc_scsi_find_devices() as a fallback option.
2009-04-28 13:28:25 +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
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 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
Julien BLACHE ad1a44d92a Add support for libusb-1.0. 2009-02-19 13:57:45 +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
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