summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/RenSaneDlls.cmd35
-rwxr-xr-xtools/check-po.awk16
-rw-r--r--tools/check-usb-chip.c6
-rw-r--r--tools/gamma4scanimage.c4
-rwxr-xr-xtools/git-version-gen226
-rw-r--r--tools/hotplug/README2
-rwxr-xr-xtools/libtool-get-dll-ext2
-rw-r--r--tools/mustek600iin-off.c3
-rw-r--r--tools/sane-desc.c18
-rw-r--r--tools/sane-find-scanner.c4
-rw-r--r--tools/umax_pp.c6
-rwxr-xr-xtools/update-upstreams.sh7
13 files changed, 275 insertions, 55 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 105d178..c861979 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -36,6 +36,7 @@ EXTRA_DIST = check-po.awk libtool-get-dll-ext mustek600iin-off.c \
EXTRA_DIST += style-check.sh
EXTRA_DIST += create-changelog.sh
EXTRA_DIST += update-upstreams.sh
+EXTRA_DIST += epson2usb.pl
sane_find_scanner_SOURCES = sane-find-scanner.c
if have_usblib
diff --git a/tools/RenSaneDlls.cmd b/tools/RenSaneDlls.cmd
index 97c6f71..37e0e16 100644
--- a/tools/RenSaneDlls.cmd
+++ b/tools/RenSaneDlls.cmd
@@ -1,22 +1,21 @@
/* REXX */
-/* Convert backend-DLL-filenames according to 8.3 naming convention */
-/* necessary for DLLs on OS/2 (C) Franz Bakan 2004,2005 */
-/* */
-/* This file is part of the SANE package. */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU General Public License as */
-/* published by the Free Software Foundation; either version 2 of the */
-/* License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, but */
-/* WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
-/* General Public License for more details. */
-/* */
-/* You should have received a copy of the GNU General Public License */
-/* along with this program; if not, write to the Free Software */
-/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+/* Convert backend-DLL-filenames according to 8.3 naming convention */
+/* necessary for DLLs on OS/2 (C) Franz Bakan 2004,2005 */
+/* */
+/* This file is part of the SANE package. */
+/* */
+/* This program is free software; you can redistribute it and/or */
+/* modify it under the terms of the GNU General Public License as */
+/* published by the Free Software Foundation; either version 2 of the */
+/* License, or (at your option) any later version. */
+/* */
+/* This program is distributed in the hope that it will be useful, but */
+/* WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
+/* General Public License for more details. */
+/* */
+/* You should have received a copy of the GNU General Public License */
+/* along with this program. If not, see <https://www.gnu.org/licenses/>. */
CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
diff --git a/tools/check-po.awk b/tools/check-po.awk
index 412b451..880f731 100755
--- a/tools/check-po.awk
+++ b/tools/check-po.awk
@@ -11,9 +11,7 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# This script will (hopefully!) check the completeness of a .po
@@ -23,14 +21,14 @@
# (and the percentage it represents), how many are fuzzy (and the
# percentage it represents amongst translated strings), and how
# many are untranslated (and the percentage it represents).
-# It will _not_ tell you wether your file is syntactically correct
+# It will _not_ tell you whether your file is syntactically correct
# (eg. check for terminating double quotes!). And of course it
-# will _not_ tell you wether the translations are correct! ;-]
+# will _not_ tell you whether the translations are correct! ;-]
#
-# It was originaly been written for SANE backends translations, but
+# It was originally been written for SANE backends translations, but
# shall be able to check any .po file.
#
-# Originally writen by Yann E. MORIN
+# Originally written by Yann E. MORIN
# <yann dot morin dot 1998 at anciens dot enib dot fr>
#
# Output will look like :
@@ -39,7 +37,7 @@
# | | | | |
# | | | | \-> Original untranslated string
# | | | |
-# | | | \-> flag telling wether it is
+# | | | \-> flag telling whether it is
# | | | fuzzy (F) or not (-)
# | | |
# | | \-> line number in the .po file
@@ -139,7 +137,7 @@ $1 ~ /msgid/ && first == 0 \
trans = trans a[i]
}
- # Checks wether we have a translation or not, wether it is fuzzy or not
+ # Checks whether we have a translation or not, whether it is fuzzy or not
if( ( trans == "" ) || ( is_fuzzy == 1 ) )
{
# Enclose original messages between double quotes
diff --git a/tools/check-usb-chip.c b/tools/check-usb-chip.c
index ac71cb4..dfa677c 100644
--- a/tools/check-usb-chip.c
+++ b/tools/check-usb-chip.c
@@ -20,9 +20,7 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
@@ -4291,7 +4289,7 @@ check_usb_chip (int verbosity,
if (ret < 0)
{
if (verbose > 2)
- printf ("couldnt set device to configuration %d\n",
+ printf ("couldn't set device to configuration %d\n",
config0->bConfigurationValue);
return NULL;
}
diff --git a/tools/gamma4scanimage.c b/tools/gamma4scanimage.c
index 69d83c7..9fcf659 100644
--- a/tools/gamma4scanimage.c
+++ b/tools/gamma4scanimage.c
@@ -18,9 +18,7 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* --------------------------------------------------------------------------------------------------------- */
diff --git a/tools/git-version-gen b/tools/git-version-gen
new file mode 100755
index 0000000..959f988
--- /dev/null
+++ b/tools/git-version-gen
@@ -0,0 +1,226 @@
+#!/bin/sh
+# Print a version string.
+scriptversion=2019-10-13.15; # UTC
+
+# Copyright (C) 2007-2021 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
+# It may be run two ways:
+# - from a git repository in which the "git describe" command below
+# produces useful output (thus requiring at least one signed tag)
+# - from a non-git-repo directory containing a .tarball-version file, which
+# presumes this script is invoked like "./git-version-gen .tarball-version".
+
+# In order to use intra-version strings in your project, you will need two
+# separate generated version string files:
+#
+# .tarball-version - present only in a distribution tarball, and not in
+# a checked-out repository. Created with contents that were learned at
+# the last time autoconf was run, and used by git-version-gen. Must not
+# be present in either $(srcdir) or $(builddir) for git-version-gen to
+# give accurate answers during normal development with a checked out tree,
+# but must be present in a tarball when there is no version control system.
+# Therefore, it cannot be used in any dependencies. GNUmakefile has
+# hooks to force a reconfigure at distribution time to get the value
+# correct, without penalizing normal development with extra reconfigures.
+#
+# .version - present in a checked-out repository and in a distribution
+# tarball. Usable in dependencies, particularly for files that don't
+# want to depend on config.h but do want to track version changes.
+# Delete this file prior to any autoconf run where you want to rebuild
+# files to pick up a version string change; and leave it stale to
+# minimize rebuild time after unrelated changes to configure sources.
+#
+# As with any generated file in a VC'd directory, you should add
+# /.version to .gitignore, so that you don't accidentally commit it.
+# .tarball-version is never generated in a VC'd directory, so needn't
+# be listed there.
+#
+# Use the following line in your configure.ac, so that $(VERSION) will
+# automatically be up-to-date each time configure is run (and note that
+# since configure.ac no longer includes a version string, Makefile rules
+# should not depend on configure.ac for version updates).
+#
+# AC_INIT([GNU project],
+# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+# [bug-project@example])
+#
+# Then use the following lines in your Makefile.am, so that .version
+# will be present for dependencies, and so that .version and
+# .tarball-version will exist in distribution tarballs.
+#
+# EXTRA_DIST = $(top_srcdir)/.version
+# BUILT_SOURCES = $(top_srcdir)/.version
+# $(top_srcdir)/.version:
+# echo $(VERSION) > $@-t && mv $@-t $@
+# dist-hook:
+# echo $(VERSION) > $(distdir)/.tarball-version
+
+
+me=$0
+
+year=`expr "$scriptversion" : '\([^-]*\)'`
+version="git-version-gen $scriptversion
+
+Copyright $year Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="\
+Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
+Print a version string.
+
+Options:
+
+ --prefix PREFIX prefix of git tags (default 'v')
+ --fallback VERSION
+ fallback version to use if \"git --version\" fails
+
+ --help display this help and exit
+ --version output version information and exit
+
+Running without arguments will suffice in most cases."
+
+prefix=v
+fallback=
+
+while test $# -gt 0; do
+ case $1 in
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ --prefix) shift; prefix=${1?};;
+ --fallback) shift; fallback=${1?};;
+ -*)
+ echo "$0: Unknown option '$1'." >&2
+ echo "$0: Try '--help' for more information." >&2
+ exit 1;;
+ *)
+ if test "x$tarball_version_file" = x; then
+ tarball_version_file="$1"
+ elif test "x$tag_sed_script" = x; then
+ tag_sed_script="$1"
+ else
+ echo "$0: extra non-option argument '$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+if test "x$tarball_version_file" = x; then
+ echo "$usage"
+ exit 1
+fi
+
+tag_sed_script="${tag_sed_script:-s/x/x/}"
+
+nl='
+'
+
+# Avoid meddling by environment variable of the same name.
+v=
+v_from_git=
+
+# First see if there is a tarball-only version file.
+# then try "git describe", then default.
+if test -f $tarball_version_file
+then
+ v=`cat $tarball_version_file` || v=
+ case $v in
+ *$nl*) v= ;; # reject multi-line output
+ esac
+ test "x$v" = x \
+ && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
+fi
+
+if test "x$v" != x
+then
+ : # use $v
+# Otherwise, if there is at least one git commit involving the working
+# directory, and "git describe" output looks sensible, use that to
+# derive a version string.
+elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
+ && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
+ || git describe --abbrev=4 HEAD 2>/dev/null` \
+ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
+ && case $v in
+ $prefix[0-9]*) ;;
+ *) (exit 1) ;;
+ esac
+then
+ # Is this a new git that lists number of commits since the last
+ # tag or the previous older version that did not?
+ # Newer: v6.10-77-g0f8faeb
+ # Older: v6.10-g0f8faeb
+ vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
+ case $vprefix in
+ *-*) : git describe is probably okay three part flavor ;;
+ *)
+ : git describe is older two part flavor
+ # Recreate the number of commits and rewrite such that the
+ # result is the same as if we were using the newer version
+ # of git describe.
+ vtag=`echo "$v" | sed 's/-.*//'`
+ commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
+ || { commit_list=failed;
+ echo "$0: WARNING: git rev-list failed" 1>&2; }
+ numcommits=`echo "$commit_list" | wc -l`
+ v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
+ test "$commit_list" = failed && v=UNKNOWN
+ ;;
+ esac
+
+ # Change the penultimate "-" to ".", for version-comparing tools.
+ # Remove the "g" to save a byte.
+ v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
+ v_from_git=1
+elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
+ v=UNKNOWN
+else
+ v=$fallback
+fi
+
+v=`echo "$v" |sed "s/^$prefix//"`
+
+# Test whether to append the "-dirty" suffix only if the version
+# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
+# or if it came from .tarball-version.
+if test "x$v_from_git" != x; then
+ # Don't declare a version "dirty" merely because a timestamp has changed.
+ git update-index --refresh > /dev/null 2>&1
+
+ dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
+ case "$dirty" in
+ '') ;;
+ *) # Append the suffix only if there isn't one already.
+ case $v in
+ *-dirty) ;;
+ *) v="$v-dirty" ;;
+ esac ;;
+ esac
+fi
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+printf %s "$v"
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/tools/hotplug/README b/tools/hotplug/README
index 1170639..b7c9d15 100644
--- a/tools/hotplug/README
+++ b/tools/hotplug/README
@@ -17,7 +17,7 @@ instead.
using the vendor ID and the product ID of your scanner. Please contact the
sane-devel mailing list in this case so the ids of your scanner can be added.
o Make sure that the "scanner" group exists on your system and that every user
- who should be allowed to acces the scanner is a member of that group.
+ who should be allowed to access the scanner is a member of that group.
Alternatively, you can enable access for every user of your system in
libusbscanner.
diff --git a/tools/libtool-get-dll-ext b/tools/libtool-get-dll-ext
index 722e676..d8ca0a3 100755
--- a/tools/libtool-get-dll-ext
+++ b/tools/libtool-get-dll-ext
@@ -3,7 +3,7 @@
# Author: Petter Reinholdtsen <pere@td.org.uit.no>
# Date: 2000-03-18
#
-# Given a libtool lib*.la, return the dll extention used (ie. so, sl,
+# Given a libtool lib*.la, return the dll extension used (ie. so, sl,
# dll, etc)
if test "x$1" = x; then
echo "usage: $0 <libfile.la>"
diff --git a/tools/mustek600iin-off.c b/tools/mustek600iin-off.c
index d2c6754..4d89bdd 100644
--- a/tools/mustek600iin-off.c
+++ b/tools/mustek600iin-off.c
@@ -19,8 +19,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
andreas.czechanowski@ins.uni-stuttgart.de
*/
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index 191c6e5..7a8645d 100644
--- a/tools/sane-desc.c
+++ b/tools/sane-desc.c
@@ -20,9 +20,7 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <../include/sane/config.h>
@@ -268,7 +266,7 @@ static const char *device_type_name[] =
{"Unknown", "Scanners", "Still cameras", "Video Cameras", "Meta backends",
"APIs"};
static const char *device_type_aname[] =
- {"UKNOWN", "SCANNERS", "STILL", "VIDEO", "META",
+ {"UNKNOWN", "SCANNERS", "STILL", "VIDEO", "META",
"API"};
static const char *status_color[] =
{COLOR_UNKNOWN, COLOR_UNSUPPORTED, COLOR_UNTESTED, COLOR_MINIMAL,
@@ -783,7 +781,7 @@ check_hex (SANE_String string)
return SANE_TRUE;
}
-/* Read and interprete the .desc files */
+/* Read and interpret the .desc files */
static SANE_Bool
read_files (void)
{
@@ -1698,7 +1696,7 @@ update_model_record_list (model_record_entry * first_model_record,
/* Insert manufacturer into list at the alphabetically correct position, */
-/* create new record if neccessary */
+/* create new record if necessary */
static mfg_record_entry *
update_mfg_record_list (mfg_record_entry * first_mfg_record, mfg_entry * mfg,
backend_entry * be)
@@ -3496,7 +3494,7 @@ print_udev (void)
int i;
print_udev_header ();
- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n"
+ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n"
"ENV{DEVTYPE}==\"usb_device\", GOTO=\"libsane_create_usb_dev\"\n"
"SUBSYSTEMS==\"scsi\", GOTO=\"libsane_scsi_rules_begin\"\n"
"SUBSYSTEM==\"usb_device\", GOTO=\"libsane_usb_rules_begin\"\n"
@@ -3546,10 +3544,10 @@ print_udev (void)
printf ("\n");
if (mode == output_mode_udevacl)
- printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
else
- printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP);
usbid = usbid->next;
@@ -3679,7 +3677,7 @@ print_udevhwdb (void)
int i;
print_udevhwdb_header ();
- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n\n");
+ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n\n");
printf("# The following rule will disable USB autosuspend for the device\n");
printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n\n");
diff --git a/tools/sane-find-scanner.c b/tools/sane-find-scanner.c
index ac25c55..25e5954 100644
--- a/tools/sane-find-scanner.c
+++ b/tools/sane-find-scanner.c
@@ -13,9 +13,7 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
diff --git a/tools/umax_pp.c b/tools/umax_pp.c
index eabf900..4c2e2b6 100644
--- a/tools/umax_pp.c
+++ b/tools/umax_pp.c
@@ -374,10 +374,10 @@ main (int argc, char **argv)
if (sanei_umax_pp_initPort (port, name) != 1)
{
if (port)
- fprintf (stderr, "failed to gain direct acces to port 0x%X!\n",
+ fprintf (stderr, "failed to gain direct access to port 0x%X!\n",
port);
else
- fprintf (stderr, "failed to gain acces to device %s!\n", name);
+ fprintf (stderr, "failed to gain access to device %s!\n", name);
return 0;
}
}
@@ -499,7 +499,7 @@ main (int argc, char **argv)
if (x + width > maxw)
{
fprintf (stderr,
- "Right side of scan area exceed physical limits (x+witdh>%d)\n",
+ "Right side of scan area exceed physical limits (x+width>%d)\n",
maxw);
return 0;
}
diff --git a/tools/update-upstreams.sh b/tools/update-upstreams.sh
index 3a5e94a..93fbc20 100755
--- a/tools/update-upstreams.sh
+++ b/tools/update-upstreams.sh
@@ -1,6 +1,6 @@
#!/bin/sh -u
# tools/update-upstreams.sh -- files to their latest version
-# Copyright (C) 2017, 2019 Olaf Meeuwissen
+# Copyright (C) 2017, 2019, 2021 Olaf Meeuwissen
#
# License: GPL-3.0+
@@ -19,3 +19,8 @@ CONFIG_BASE_URL=https://git.savannah.gnu.org/cgit/config.git/plain
for file in config.guess config.sub; do
fetch $CONFIG_BASE_URL/$file
done
+
+GNULIB_BASE_URL=https://git.savannah.gnu.org/cgit/gnulib.git/plain
+fetch $GNULIB_BASE_URL/build-aux/git-version-gen
+mv git-version-gen tools/
+chmod 0755 tools/git-version-gen