Wykres commitów

406 Commity (97dd074595622948e456a9d8f20fb8457bd39b19)

Autor SHA1 Wiadomość Data
Povilas Kanapickas aa6bdba74d genesys: Add a way to record debug messages to USB captures 2019-08-08 20:33:49 +03:00
Povilas Kanapickas 599bfe519c sanei_usb: Fix build when USB replay-record mode is disabled 2019-06-16 21:12:42 +03:00
Povilas Kanapickas 4edfb7a287 sanei_usb: Add function to check whether we are using fake data 2019-06-16 20:46:46 +03:00
Povilas Kanapickas fd6adf2a46 sanei_usb: Don't crash when recording failed reads 2019-06-16 20:46:46 +03:00
Povilas Kanapickas b30406873c sanei_usb: Add support for record testing mode 2019-06-16 20:46:46 +03:00
Povilas Kanapickas 7de8efd395 sanei_usb: Add support for "development mode" replay testing 2019-06-16 20:46:46 +03:00
Povilas Kanapickas 0122c060b7 sanei_usb: Add support for replay testing 2019-06-16 20:46:46 +03:00
Povilas Kanapickas a88b6241cd configure: Add option to enable USB record-replay 2019-06-16 20:46:39 +03:00
Povilas Kanapickas ac624433bb sanei: Print the number of read bytes on bulk USB read error 2019-06-02 11:47:57 +03:00
Olaf Meeuwissen f9eb32317a Merge branch 'sanei-usb-testing-mode-prep' into 'master'
sanei: Preparation to support capture and replay of USB data for testing

See merge request sane-project/backends!74
2019-06-15 05:43:06 +00:00
Povilas Kanapickas 1c3e1aa184 autotools: Remove files generated by autotools from version control 2019-06-01 14:38:36 +03:00
Povilas Kanapickas 0b5ab0b5e4 sanei_usb: Fall through to the end of sanei_usb_get_descriptor() 2019-05-27 18:56:01 +03:00
Povilas Kanapickas 422e083175 sanei_usb: Fall through the end in sanei_usb_control_msg() 2019-05-27 18:56:01 +03:00
Povilas Kanapickas d865705ef1 sanei_usb: Don't change input size variable in USBCALLS bulk code paths 2019-05-27 18:56:01 +03:00
Olaf Meeuwissen be9736020f autofoo: Sync generated files
The AX_CXX_COMPILE_STDCXX* macros that were embedded in aclocal.m4
have been replaced with the versions found in the autoconf-archive
package from Debian 9.
2019-05-21 22:14:46 +09:00
Povilas Kanapickas 9e3b5d6381 Update generated files 2019-05-11 00:03:26 +03:00
Povilas Kanapickas 0921d36618 sanei_usb: Deduplicate endpoint setup code 2019-03-22 18:31:46 +02:00
Povilas Kanapickas 2653cbaec7 Run autoreconf and automake 2019-03-20 23:09:07 +02:00
Olaf Meeuwissen a78969384b autotools: Sync derived files
This was done by running

  libtoolize --copy
  autoreconf --force --install

on Debian GNU/Linux 9.3.
2018-03-17 10:35:57 +09:00
Olaf Meeuwissen 54627bdeac lib/isfdtype.c: Remove badly broken substitute
The substitute completely ignores the fdtype argument and only works
correctly for S_IFSOCK values.  This happened to be the only way the
function was invoked but for safety's sake this has been replaced by
a local implementation that does pretty much the same thing, without
the misleading bit.

Found courtesy of a [-Wunused-parameter] compiler warning on Alpine.
2017-07-15 21:58:51 +09:00
Olaf Meeuwissen c754d440ea sanei_thread: Fix [-Wunused-function] compiler warning
The sanei_thread_set_invalid static function is only used by code that
exists if USE_PTHREAD is defined.
2017-07-15 20:27:28 +09:00
Olaf Meeuwissen ddd7d821f6 sanei_thread: Fix [-Wformat=] compiler warnings 2017-07-15 17:07:13 +09:00
Olaf Meeuwissen ad09bbdd18 sanei_thread: Fix [-Wint-conversion] compiler warnings 2017-07-15 17:06:20 +09:00
Olaf Meeuwissen a08f5630d8 sanei_scsi: Fix [-Wdeprecated-declarations] compiler warning
The readdir_r() using loop in sanei_scsi_find_devices() has been
modified to use readdir().

With the exception of sane_cancel(), the SANE API is not re-entrant.
The sanei_scsi_find_devices() function is referenced neither directly
nor indirectly from any of the sane_cancel() implementations so there
is no inherent need to use readdir_r().
2017-07-08 18:40:09 +09:00
Olaf Meeuwissen fc4b250a09 .editorconfig: use utf-8 charset throughout 2017-05-29 21:14:30 +09:00
Olaf Meeuwissen f0f187f995 .editorconfig: trim trailing blank lines 2017-05-29 21:14:30 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Jörg Frings-Fürst e21bb28e50 Source code string typo fixes 2017-05-13 18:38:43 +09:00
Martin Husemann 8995b1fc81 sanei_usb: fix number of bytes read for 64bit big-endian systems
Fixes 315337.
2017-05-06 12:10:52 +09:00
Olaf Meeuwissen 471e8ac0c1 sanei_pp: fix [-Wcpp] compiler warning
The `#warning` directive is turned into an error by `-Werror`.  The
directive triggers is guaranteed to trigger with __GNUC__ when no
parallel support is available.  This would prevent strict CI builds.

Output a message with all compilers that understand the pragma.  Those
that don't should ignore it, according to C99.
2016-09-25 16:28:11 +09:00
Olaf Meeuwissen 7d7030a409 sanei_usb: : fix [-Wunused-parameter] compiler warnings
These were issued in the absence of libusb.
2016-09-25 15:53:46 +09:00
Olaf Meeuwissen 23cc2e1ba0 Fix include guard typo
This seems to have been present since the beginning of sanei/sanei_scsi.c.
2016-08-03 22:12:45 +09:00
Olaf Meeuwissen bfd1626c4b Sync autofoo 2016-07-13 23:44:26 +09:00
Olaf Meeuwissen 2481e1e98b Sync autofoo 2016-07-10 21:54:24 +09:00
Olaf Meeuwissen c962368626 Sync autofoo 2016-07-01 23:45:43 +09:00
Olaf Meeuwissen a9c813944e Make libusb-1.0 the default for USB support
When libusb-1.0 is not found, libusb-0.1 will be tried.  On BeOS and
OS2, nothing should have changed in terms of detection of USB support.

On all systems the --enable-libusb* flags are now ignored.  Instead, the
--with-usb and --without-usb flags now control support.  When neither is
given USB support will be enable if possible and disabled otherwise.  If
--with-usb is requested but not possible, ./configure will fail.  There
is no support to prefer libusb-0.1 over libusb-1.0.
2016-07-01 23:44:37 +09:00
Olaf Meeuwissen f03f1f66d4 Sync autofoo files 2016-06-29 22:15:06 +09:00
Olaf Meeuwissen 81f9557966 Clean up .gitignore file content
Removes empty lines and duplicates (note that .gitignore patterns are
recursive unless anchored with a leading /).
2016-06-27 22:40:20 +09:00
Olaf Meeuwissen cb4924f210 Stop distclean from removing files willy-nilly
The distclean target should only remove files that make creates.  If
there are any that need taking care of, they should be added in on a
per file basis in the Makefile.am that creates it.
2016-06-26 10:24:30 +09:00
Olaf Meeuwissen bdade6bb07 Sync derived files with previous changes 2016-06-26 10:24:29 +09:00
Olaf Meeuwissen d853463ef1 Sync derived files
This was done with

  AUTOMAKE="automake --add-missing --copy" autoreconf --force

on Debian GNU/Linux 8.5.
2016-06-14 06:30:48 +09:00
Olaf Meeuwissen 87e12bbf2e Sync derived files with autoreconf --force
For the record, this was done on Debian GNU/Linux 8.5.
2016-06-13 22:24:21 +09:00
Olaf Meeuwissen 2d6fad58b4 Respect GNU Standards user variables
Several variables are considered "user variables" by the GNU Standards.
This means that the user can pass these to their ./configure and make
invocations as they see fit.  These variables include CPPFLAGS, CFLAGS
and LDFLAGS.

This changeset pushes our use of these variables to the automake shadow
variables, AM_CPPFLAGS, AM_CFLAGS and AM_LDFLAGS, so that user variables
will no longer clobber flags required in order to build.
2016-06-13 22:03:14 +09:00
m. allan noah 1207ce5a40 Support SANE_USB_WORKAROUND env var
Here, we add a new env var (SANE_USB_WORKAROUND) to sanei_usb.c.
This allows end users to conditionally enable the workaround added
in commit 014b45d920. The default is
to not enable the workaround, because more recent Linux kernels no
longer seem to need it. Some users have even reported failure with
the workaround enabled.
2016-02-23 20:36:32 -05:00
Olaf Meeuwissen 04d5e4a0cf Move #include <pthread.h> to sanei_thread.h
The sanei header file may need pthread_t.  If it does, make sure it
is available.
2016-02-13 17:34:46 +09:00
Olaf Meeuwissen 57ae115eaf sanei_thread: fix [-Wmaybe-uninitialized] compiler warning 2015-12-27 18:38:16 +09:00
Olaf Meeuwissen cd3453948d sanei_usb: const_cast data buffer
The libusb_bulk_transfer() API caters to both reads and writes and
as a result of that will not take a const pointer.
2015-12-27 18:38:03 +09:00
Olaf Meeuwissen be084e0d7b sanei_usb: Move variable declarations to scope of usage
Fixes an [-Wunused-variable] when compiling without libusb.
2015-12-27 15:36:18 +09:00
Volker Diels-Grabsch baec5e0395 Use consistently __func__ instead of __FUNCTION__
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources.  This
fixes all occurrences of the following GCC warning:

warning: ISO C does not support '__FUNCTION__' predefined identifier
2015-12-20 15:27:45 +09:00
Volker Diels-Grabsch 93298674d0 Merge all compatibility macros around __func__ and __FUNCTION__
Various parts of SANE introduced their own compatibility macros for
old compilers that don't support __func__.  Most of these definitions
are identical or have minor differences.  This patch replaces them
with a single instance in the central header file for backends.
2015-12-20 15:27:45 +09:00