summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-02-16 10:20:08 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-02-16 10:20:08 +0100
commit778ebf8ee9cb22ea5727844333bcd5a6ee6bc0de (patch)
treea754e785b286ed82b45fe4e50b980714ad80e0a7 /tools
parent7d8aac1f3634dc58785bec7acf097dd6bac8c394 (diff)
parent32cb765f681299af226ca0520993cbe47ba5ecd0 (diff)
Merge branch 'release/debian/1.2.1-1'debian/1.2.1-1
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rwxr-xr-xtools/create-changelog.sh10
-rw-r--r--tools/mustek600iin-off.c27
-rw-r--r--tools/sane-backends.pc.in3
-rw-r--r--tools/sane-find-scanner.c20
5 files changed, 22 insertions, 40 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c861979..3c36988 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -11,8 +11,6 @@ bin_PROGRAMS = sane-find-scanner gamma4scanimage
noinst_PROGRAMS = sane-desc
if INSTALL_UMAX_PP_TOOLS
bin_PROGRAMS += umax_pp
-else
-noinst_PROGRAMS += umax_pp
endif
if CROSS_COMPILING
diff --git a/tools/create-changelog.sh b/tools/create-changelog.sh
index bb3c8f2..9c1fb5a 100755
--- a/tools/create-changelog.sh
+++ b/tools/create-changelog.sh
@@ -4,13 +4,15 @@
#
# License: GPL-3.0+
-git log --date=iso8601 --decorate=short 1.0.28..HEAD \
- | sed 's/^[ \t]*$//' \
+git log --date=iso8601 --no-decorate --topo-order --abbrev=12 \
+ $(git describe --tags --abbrev=0)..HEAD \
+ | sed 's/[[:space:]]*$//' \
> ChangeLog
cat << EOF >> ChangeLog
----------------------------------------------------------------------
-Older ChangeLog entries can be found in the ChangeLogs/ directory on a
-file per release basis. Please note that version 1.0.26 was skipped.
+Older entries are located in the ChangeLogs/ directory, which contains
+a separate file for each release. (Please note: 1.0.26 and 1.1.0 were
+skipped as release numbers.)
EOF
diff --git a/tools/mustek600iin-off.c b/tools/mustek600iin-off.c
index 4d89bdd..5fb7a61 100644
--- a/tools/mustek600iin-off.c
+++ b/tools/mustek600iin-off.c
@@ -26,6 +26,7 @@
#include "../include/sane/config.h"
#include "../include/sane/sanei.h"
+#include "../include/sane/sanei_directio.h"
#define MUSTEK_CONF STRINGIFY(PATH_SANE_CONFIG_DIR) "/mustek.conf"
#define PORT_DEV "/dev/port"
@@ -39,28 +40,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_SYS_IO_H
-# include <sys/io.h> /* use where available (glibc 2.x, for example) */
-#elif HAVE_ASM_IO_H
-# include <asm/io.h> /* ugly, but backwards compatible */
-#elif defined(__i386__) && defined (__GNUC__)
-
-static __inline__ void
-outb (u_char value, u_long port)
-{
- __asm__ __volatile__ ("outb %0,%1"::"a" (value), "d" ((u_short) port));
-}
-
-static __inline__ u_char
-inb (u_long port)
-{
- u_char value;
-
- __asm__ __volatile__ ("inb %1,%0":"=a" (value):"d" ((u_short) port));
- return value;
-}
-#endif
-
char *Mustek_Conf = MUSTEK_CONF;
int allowed_ports[] =
@@ -165,9 +144,9 @@ main (int argc, char **argv)
fprintf (stderr, "using control port address 0x%03x\n", portaddr);
/* try to get I/O permission from the kernel */
- if (ioperm (portaddr, 1, 1) == 0)
+ if (sanei_ioperm (portaddr, 1, 1) == 0)
{
- outb (0x00, portaddr);
+ sanei_outb (portaddr, 0x00);
}
/* else try to open /dev/port to access the I/O port */
else if ((pfd = open (PORT_DEV, O_RDWR, 0666)) >= 0)
diff --git a/tools/sane-backends.pc.in b/tools/sane-backends.pc.in
index b4d9731..43f3ac5 100644
--- a/tools/sane-backends.pc.in
+++ b/tools/sane-backends.pc.in
@@ -2,7 +2,6 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-ldflags=@LDFLAGS@ @GPHOTO2_LDFLAGS@
libs=@LIBS@ @DL_LIBS@ @LIBV4L_LIBS@ @MATH_LIB@ @TIFF_LIBS@ @JPEG_LIBS@ @GPHOTO2_LIBS@ @SOCKET_LIBS@ @AVAHI_LIBS@ @USB_LIBS@ @SCSI_LIBS@ @RESMGR_LIBS@
Name: SANE Backends
@@ -10,5 +9,5 @@ Description: Backends for SANE, the universal scanner interface
Version: @VERSION@
Requires:
Libs: -L${libdir} -lsane
-Libs.private: ${ldflags} ${libs}
+Libs.private: ${libs}
Cflags: -I${includedir}
diff --git a/tools/sane-find-scanner.c b/tools/sane-find-scanner.c
index 25e5954..a949695 100644
--- a/tools/sane-find-scanner.c
+++ b/tools/sane-find-scanner.c
@@ -89,9 +89,12 @@ scsiblk;
#define set_inquiry_return_size(icb,val) icb[0x04]=val
#define IN_periph_devtype_cpu 0x03
#define IN_periph_devtype_scanner 0x06
-#define get_scsi_inquiry_vendor(in, buf) strncpy(buf, in + 0x08, 0x08)
-#define get_scsi_inquiry_product(in, buf) strncpy(buf, in + 0x10, 0x010)
-#define get_scsi_inquiry_version(in, buf) strncpy(buf, in + 0x20, 0x04)
+#define get_scsi_inquiry_vendor(in, buf) snprintf(buf, 0x08 + 1, "%.*s", \
+ 0x08, in + 0x08)
+#define get_scsi_inquiry_product(in, buf) snprintf(buf, 0x10 + 1, "%.*s", \
+ 0x10, in + 0x10)
+#define get_scsi_inquiry_version(in, buf) snprintf(buf, 0x04 + 1, "%.*s", \
+ 0x04, in + 0x20)
#define get_scsi_inquiry_periph_devtype(in) (in[0] & 0x1f)
#define get_scsi_inquiry_additional_length(in) in[0x04]
#define set_scsi_inquiry_length(out,n) out[0x04]=n-5
@@ -384,7 +387,7 @@ check_usb_file (char *file_name)
{
if (verbose > 1)
printf (" open ok, vendor and product ids were identified\n");
- printf ("found USB scanner (vendor=0x%04x, "
+ printf ("found possible USB scanner (vendor=0x%04x, "
"product=0x%04x) at %s\n", vendor, product, file_name);
}
else
@@ -392,8 +395,8 @@ check_usb_file (char *file_name)
if (verbose > 1)
printf (" open ok, but vendor and product could NOT be "
"identified\n");
- printf ("found USB scanner (UNKNOWN vendor and product) "
- "at device %s\n", file_name);
+ printf ("found possible USB scanner (UNKNOWN vendor and "
+ "product) at %s\n", file_name);
unknown_found = SANE_TRUE;
}
device_found = SANE_TRUE;
@@ -676,7 +679,8 @@ check_libusb_device (struct usb_device *dev, SANE_Bool from_file)
{
char * chipset = check_usb_chip (dev, verbose, from_file);
- printf ("found USB scanner (vendor=0x%04x", dev->descriptor.idVendor);
+ printf ("found possible USB scanner (vendor=0x%04x",
+ dev->descriptor.idVendor);
if (vendor)
printf (" [%s]", vendor);
printf (", product=0x%04x", dev->descriptor.idProduct);
@@ -1066,7 +1070,7 @@ check_libusb_device (libusb_device *dev, SANE_Bool from_file)
if(!from_file)
chipset = check_usb_chip (verbose, desc, hdl, config0);
- printf ("found USB scanner (vendor=0x%04x", vid);
+ printf ("found possible USB scanner (vendor=0x%04x", vid);
if (vendor)
printf (" [%s]", vendor);
printf (", product=0x%04x", pid);