Import Upstream version 1.1.6

This commit is contained in:
luoyaoming 2024-04-24 16:07:31 +08:00
parent 0448246f8f
commit 5d709f3fb7
38 changed files with 7467 additions and 5227 deletions

View File

@ -1,3 +1,72 @@
commit 25d541d2b0b526eba58fee99ceac202acca6d4a2
Author: Henrik Rydberg <rydberg@bitmath.se>
Date: Sun Jan 26 14:40:46 2020 +0100
Release mtdev-1.1.6
Signed-off-by: Henrik Rydberg <rydberg@bitmath.se>
commit 598e561881c687cea072375637aa08ac9230fabe
Author: Khem Raj <raj.khem@gmail.com>
Date: Sat Nov 23 18:45:32 2019 -0800
adjust for 64bit time_t for 32bit architectures
libc that has support for 32 bit applications to use 64 bit
time_t supplies __USE_TIME_BITS64 define [1]
[1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@bitmath.se>
commit 5a260fa95a5e7cebdd8f9da947c8d8eb244efae0
Author: Michael Forney <mforney@mforney.org>
Date: Fri Jun 7 11:29:01 2019 -0700
Use a macro for `nlongs` so it can be used in constant expression
This way, it can be used to specify the `absbits` array size (in
`mtdev_configure`) without making it a VLA.
VLAs are an optional feature in C11, and in this case we can determine
the array size statically.
This also matches the macros used in libevdev and libinput.
Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Henrik Rydberg <rydberg@bitmath.se>
commit 5f9caa26b81155feede6ff71c9b14fa0e8980fbd
Author: Martin Kepplinger <martink@posteo.de>
Date: Tue Aug 22 11:12:13 2017 +0200
mtdev-matching.c: declare global variables static
n1 and n2 are only locally used and can thus be static.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
commit d9f084c9384f99d3589cf51f8503b7aee4e9666c
Author: Martin Kepplinger <martink@posteo.de>
Date: Tue Aug 22 11:12:12 2017 +0200
mtdev-mapgen.c: declare init_caps() static
init_caps() is only locally used and can thus be static.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
commit 8ba8d359392693f9882ea2d195fc1bebb8b3a29d
Author: Martin Kepplinger <martink@posteo.de>
Date: Tue Aug 22 11:12:11 2017 +0200
caps.c: declare mtdev_set_slots() static
mtdev_set_slots() is only used internally, so it should be static.
Signed-off-by: Martin Kepplinger <martink@posteo.de>
commit 4381b78fea54de0e775bf54952b2f95e5a06c57d
Author: Henrik Rydberg <rydberg@euromail.se>
Date: Fri Feb 28 19:57:15 2014 +0100

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ -79,22 +89,12 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/mtdev.pc.in COPYING ChangeLog \
INSTALL README config-aux/compile config-aux/config.guess \
config-aux/config.sub config-aux/depcomp config-aux/install-sh \
config-aux/missing config-aux/ltmain.sh \
$(top_srcdir)/config-aux/compile \
$(top_srcdir)/config-aux/config.guess \
$(top_srcdir)/config-aux/config.sub \
$(top_srcdir)/config-aux/install-sh \
$(top_srcdir)/config-aux/ltmain.sh \
$(top_srcdir)/config-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
@ -164,7 +164,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
# Read a list of newline-separated strings from the standard input,
@ -187,6 +187,16 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/mtdev.pc.in $(top_srcdir)/config-aux/compile \
$(top_srcdir)/config-aux/config.guess \
$(top_srcdir)/config-aux/config.sub \
$(top_srcdir)/config-aux/install-sh \
$(top_srcdir)/config-aux/ltmain.sh \
$(top_srcdir)/config-aux/missing COPYING ChangeLog INSTALL \
README config-aux/compile config-aux/config.guess \
config-aux/config.sub config-aux/depcomp config-aux/install-sh \
config-aux/ltmain.sh config-aux/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -269,6 +279,7 @@ LIB_VERSION = @LIB_VERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@ -367,15 +378,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -540,7 +550,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -608,7 +621,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@ -623,17 +636,17 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@ -651,7 +664,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -661,23 +674,23 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@ -858,6 +871,8 @@ uninstall-am: uninstall-pkgconfigDATA
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-pkgconfigDATA
.PRECIOUS: Makefile
.PHONY: ChangeLog INSTALL
INSTALL:

2852
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# 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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@ -339,9 +340,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2012-01-01'
timestamp='2009-12-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -57,8 +57,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -145,7 +145,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@ -270,10 +270,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@ -555,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -792,12 +789,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@ -806,9 +804,6 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@ -884,29 +879,20 @@ EOF
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@ -948,7 +934,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo or32-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@ -982,14 +968,11 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo x86_64-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -1248,9 +1231,6 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;

150
config-aux/config.sub vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2012-01-01'
timestamp='2010-01-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -76,8 +76,8 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -124,9 +124,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@ -251,17 +250,13 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@ -287,39 +282,29 @@ case $basic_machine in
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rl78 | rx \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
@ -329,18 +314,6 @@ case $basic_machine in
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@ -360,19 +333,16 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@ -398,29 +368,26 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tile-* | tilegx-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
@ -515,15 +482,6 @@ case $basic_machine in
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
@ -560,7 +518,7 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
cr16)
basic_machine=cr16-unknown
os=-elf
;;
@ -718,6 +676,7 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@ -814,18 +773,10 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@ -890,12 +841,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -978,10 +923,9 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
ppc) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@ -1075,9 +1019,6 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@ -1134,8 +1075,25 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=$basic_machine-unknown
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
@ -1205,9 +1163,6 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@ -1345,9 +1300,8 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1530,15 +1484,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1557,6 +1502,9 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout

View File

@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2011-12-04.11; # UTC
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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
@ -44,7 +44,7 @@ Environment variables:
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@ -90,18 +90,10 @@ if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@ -166,12 +158,10 @@ gcc)
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -415,52 +405,6 @@ tru64)
rm -f "$tmpdepfile"
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/ \1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/ /
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
@ -559,9 +503,7 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-01-19.21; # UTC
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -156,10 +156,6 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
@ -208,11 +200,7 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@ -240,9 +228,9 @@ fi
for src
do
# Protect names problematic for `test' and other utilities.
# Protect names starting with `-'.
case $src in
-* | [=\(\)!]) src=./$src;;
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
@ -264,7 +252,12 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@ -392,7 +385,7 @@ do
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
-*) prefix='./';;
*) prefix='';;
esac
@ -410,7 +403,7 @@ do
for d
do
test X"$d" = X && continue
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2012-01-06.13; # UTC
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -84,6 +84,7 @@ Supported PROGRAM values:
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@ -121,6 +122,15 @@ case $1 in
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
@ -216,7 +226,7 @@ WARNING: \`$1' $msg. You should only need it if
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG=\${$#}
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@ -246,7 +256,7 @@ WARNING: \`$1' is $msg. You should only need it if
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG=\${$#}
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@ -308,6 +318,41 @@ WARNING: \`$1' is $msg. You should only need it if
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.

View File

@ -30,8 +30,7 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */

2345
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([Multitouch Protocol Translation Library],
[1.1.5],
[1.1.6],
[],
[mtdev])
AC_CONFIG_SRCDIR([Makefile.am])

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
mtdev (1.1.5-ok1) yangtze; urgency=medium
* Build for openKylin.
-- openKylinBot <openKylinBot@openkylin.com> Mon, 25 Apr 2022 22:03:04 +0800

1
debian/compat vendored
View File

@ -1 +0,0 @@
7

65
debian/control vendored
View File

@ -1,65 +0,0 @@
Source: mtdev
Section: libs
Priority: optional
Maintainer: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Build-Depends: debhelper (>= 8.1.3),
cdbs (>= 0.4.93~),
pkg-config,
quilt,
dpkg-dev (>= 1.14.17),
dh-autoreconf (>= 7)
Standards-Version: 4.4.0
Homepage: http://bitmath.org/code/mtdev/
Vcs-Git: https://salsa.debian.org/debian/mtdev.git
Vcs-Browser: https://salsa.debian.org/debian/mtdev
Package: libmtdev1
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: Multitouch Protocol Translation Library - shared library
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
Package: libmtdev-dev
Section: libdevel
Architecture: linux-any
Multi-Arch: same
Depends: libmtdev1 (= ${binary:Version}),
${misc:Depends}
Description: Multitouch Protocol Translation Library - dev files
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This package contains files that are needed to build applications.
Package: mtdev-tools
Section: libdevel
Architecture: linux-any
Depends: libmtdev1 (= ${binary:Version}),
${shlibs:Depends},
${misc:Depends}
Description: Multitouch Protocol Translation Library - test tools
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This package provides some test tools for the libmtdev library.
+ mtdev-test: prints the information coming from the kernel
Package: libmtdev1-udeb
Section: debian-installer
Architecture: linux-any
Package-Type: udeb
Depends: ${shlibs:Depends},
${misc:Depends}
Description: Multitouch Protocol Translation Library - shared library
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This is a udeb, or a microdeb, for the debian-installer.

84
debian/control.m4 vendored
View File

@ -1,84 +0,0 @@
divert(-1)
define(`checkdef',`ifdef($1, , `errprint(`error: undefined macro $1
')m4exit(1)')')
define(`errexit',`errprint(`error: undefined macro `$1'
')m4exit(1)')
define(`PN', `$1')
ifdef(`PRI', `', `
define(`PRI', `$1')
')
define(`MAINTAINER', `Nobuhiro Iwamatsu <iwamatsu@debian.org>')
define(`ifenabled', `ifelse(index(enabled_pkgs, `$1'), -1, `dnl', `$2')')
divert`'dnl
dnl --------------------------------------------------------------------------
Source: mtdev
Section: libs
Priority: optional
ifelse(DIST,`Ubuntu',`dnl
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: MAINTAINER
', `dnl
Maintainer: MAINTAINER
')dnl DIST
Build-Depends: debhelper (>= 7.0.0),
pkg-config,
quilt,
dpkg-dev (>= 1.14.17),
automake,
libtool,
cdbs
Standards-Version: 3.9.1
Homepage: http://bitmath.org/code/mtdev/
Package: libmtdev1
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
Description: Multitouch Protocol Translation Library - shared library
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
Package: libmtdev-dev
Section: libdevel
Architecture: any
Depends: libmtdev1 (= ${binary:Version}),
${misc:Depends}
Description: Multitouch Protocol Translation Library - dev files
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This package contains files that are needed to build applications.
Package: mtdev-tools
Section: libdevel
Architecture: any
Depends: libmtdev1 (= ${binary:Version}),
${shlibs:Depends},
${misc:Depends}
Description: Multitouch Protocol Translation Library - test tools
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This package provides some test tools for the libmtdev library.
+ mtdev-test: prints the information comming from the kernel
ifenabled(`mtdevudev',`
Package: libmtdev1-udeb
Section: debian-installer
Architecture: any
XC-Package-Type: udeb
Depends: ${shlibs:Depends},
${misc:Depends}
Description: Multitouch Protocol Translation Library - shared library
libmtdev is a library for translating evdev multitouch events using the legacy
protocol to the new multitouch slots protocol. This is necessary for kernel
drivers that have not been updated to use the newer protocol.
.
This is a udeb, or a microdeb, for the debian-installer.
')`'dnl

36
debian/copyright vendored
View File

@ -1,36 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: mtdev
Upstream-Contact: Henrik Rydberg <rydberg@euromail.se>
Source: http://bitmath.org/code/mtdev/
Files: *
Copyright: 2010, Henrik Rydberg <rydberg@euromail.se>
2010, Canonical Ltd.
License: Expat
Files: debian/*
Copyright: 2010, Chase Douglas <chase.douglas@ubuntu.com>
2010 - 2012, Nobuhiro Iwamatsu <iwamatsu@debian.org>
License: Expat
Comment:
This package was debianized by Chase Douglas <chase.douglas@ubuntu.com>
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@ -1,3 +0,0 @@
usr/include
usr/lib/*/libmtdev.so
usr/lib/*/pkgconfig

View File

@ -1 +0,0 @@
usr/lib/*/libmtdev.so.1*

View File

@ -1,3 +0,0 @@
usr/lib/*/libmtdev.so.1*
debian/source_mtdev.py usr/share/apport/package-hooks

View File

View File

@ -1,29 +0,0 @@
libmtdev.so.1 libmtdev1 #MINVER#
* Build-Depends-Package: libmtdev-dev
mtdev_close@Base 1.0.8
mtdev_close_delete@Base 1.1.0
mtdev_configure@Base 1.0.8
mtdev_delete@Base 1.1.0
mtdev_empty@Base 1.0.8
mtdev_fetch_event@Base 1.0.8
mtdev_get@Base 1.0.8
mtdev_get_abs_fuzz@Base 1.1.0
mtdev_get_abs_maximum@Base 1.1.0
mtdev_get_abs_minimum@Base 1.1.0
mtdev_get_abs_resolution@Base 1.1.0
mtdev_get_event@Base 1.0.8
mtdev_has_mt_event@Base 1.1.0
mtdev_idle@Base 1.0.8
mtdev_init@Base 1.0.8
mtdev_match@Base 1.0.8
mtdev_match_four@Base 1.0.11
mtdev_new@Base 1.1.0
mtdev_new_open@Base 1.1.0
mtdev_open@Base 1.0.8
mtdev_put_event@Base 1.0.8
mtdev_set_abs_fuzz@Base 1.1.0
mtdev_set_abs_maximum@Base 1.1.0
mtdev_set_abs_minimum@Base 1.1.0
mtdev_set_abs_resolution@Base 1.1.0
mtdev_set_mt_event@Base 1.1.0
mtdev_set_slots@Base 1.1.2

13
debian/links.m4 vendored
View File

@ -1,13 +0,0 @@
divert(-1)
define(`checkdef',`ifdef($1, , `errprint(`error: undefined macro $1
')m4exit(1)')')
define(`errexit',`errprint(`error: undefined macro `$1'
')m4exit(1)')
divert`'dnl
dnl --------------------------------------------------------------------------
ifelse(DIST,`Ubuntu',`dnl
usr/share/apport/package-hooks/source_mtdev.py usr/share/apport/package-hooks/source_utouch.py
usr/share/apport/package-hooks/source_mtdev.py usr/share/apport/package-hooks/source_utouch-grail.py
')dnl DIST

23
debian/mtdev-test.1 vendored
View File

@ -1,23 +0,0 @@
.TH mtdev 1 "July 16, 2010" "Ara Pulido"
.SH NAME
mtdev \- Tool to test libmtdev library
.SH SYNOPSIS
.B mtdev
.RI <input_device>
.SH DESCRIPTION
mtdev reads the kernel event device directly, transforms the flow of events,
and prints information from the kernel input events structure.
It only works on MT-enabled kernel drivers.
.SH AUTHOR
.B libmtdev
and the accompanying tools are developed by Henrik Rydberg
<rydberg@euromail.se>

View File

@ -1 +0,0 @@
usr/bin/*

28
debian/rules vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
distribution := $(shell lsb_release -is)
LDFLAGS += -Wl,-z,defs -Wl,--as-needed
DEB_DH_MAKESHLIBS_ARGS_libmtdev1 = --add-udeb=libmtdev1-udeb
DEB_INSTALL_MANPAGES_mtdev-tools = debian/mtdev-test.1
change_dist: control links
links:
$(MAKE) -f debian/rules.conf $@
common-binary-post-install-arch::
find debian/tmp/usr/lib -name \*.la -exec rm {} \;
find debian/tmp/usr/lib -name \*.a -exec rm {} \;
common-binary-predeb-arch:: list-missing
binary-install/libmtdev1-udeb::
rm -rf debian/libmtdev1-udeb/usr/share/doc/libmtdev1-udeb

6
debian/rules.conf vendored
View File

@ -1,6 +0,0 @@
links: libmtdev1-links-file
libmtdev1-links-file:
echo "Change links file"; \
m4 $(ctrl_flags) \
debian/links.m4 > debian/libmtdev1.links

View File

@ -1 +0,0 @@
3.0 (native)

137
debian/source_mtdev.py vendored
View File

@ -1,137 +0,0 @@
# Multitouch device related problems
# Author: Ara Pulido <ara@ubuntu.com>
# (C) 2010 Canonical Ltd.
# License: GPL v2 or later.
from glob import glob
from subprocess import Popen, PIPE
import sys
import apport.hookutils
import time
import os
# See linux/input.h
ABS_MT_POSITION_X = 0x35
# scan-for-mt-devices written by Marc Tardif,
# based on a script by Henrik Rydberg
class Input(object):
def __init__(self, path):
self.path = path
@property
def device(self):
base = os.path.basename(self.path)
return os.path.join("/dev", "input", base)
@property
def name(self):
path = os.path.join(self.path, "device", "name")
return read_line(path)
def get_capabilities(self):
path = os.path.join(self.path, "device", "capabilities", "abs")
line = read_line(path)
capabilities = []
long_bit = getconf("LONG_BIT")
for i, word in enumerate(line.split(" ")):
word = int(word, 16)
subcapabilities = [bool(word & 1<<i) for i in range(long_bit)]
capabilities[:0] = subcapabilities
return capabilities
def has_capability(self, capability):
capabilities = self.get_capabilities()
return len(capabilities) > capability and capabilities[capability]
def getconf(var):
output = Popen(["getconf", var], stdout=PIPE).communicate()[0]
return int(output)
def get_inputs(path):
event_glob = os.path.join(path, "event*")
for event_path in glob(event_glob):
yield Input(event_path)
def read_line(path):
f = open(path)
try:
return f.readline().strip()
finally:
f.close()
def scan_for_mt_devices(report):
capability = ABS_MT_POSITION_X
input = "/sys/class/input"
inputs = get_inputs(input)
inputs = [i for i in inputs if i.has_capability(capability)]
report['MtDevices'] = ''
if inputs:
for input in inputs:
report['MtDevices'] += "%s: %s\n" % (input.name, input.device)
return 0
else:
report['MtDevices'] += "No capable devices found..."
return 1
##################################
description = 'Multitouch device problem'
RELATED_PACKAGES = ['xserver-xorg', 'xserver-xorg-video-intel', 'xserver-xorg-video-ati', 'libmtdev1', 'libutouch-grail1', 'libutouch-geis1']
def add_info(report, ui):
report.setdefault('Tags', '')
report['Tags'] += ' hci touch'
# Capture hardware
apport.hookutils.attach_hardware(report)
report['PciDisplay'] = apport.hookutils.pci_devices(apport.hookutils.PCI_DISPLAY)
# Attach the results of scan mt devices
scan_for_mt_devices(report)
# Only collect the following data if X11 is available
if os.environ.get('DISPLAY'):
# For resolution/multi-head bugs
report['Xrandr'] = apport.hookutils.command_output(['xrandr', '--verbose'])
apport.hookutils.attach_file_if_exists(report,
os.path.expanduser('~/.config/monitors.xml'),
'monitors.xml')
# Attach the Xorg logs and config
apport.hookutils.attach_file_if_exists(report, '/etc/X11/xorg.conf', 'XorgConf')
apport.hookutils.attach_file(report, '/var/log/Xorg.0.log', 'XorgLog')
apport.hookutils.attach_file_if_exists(report, '/var/log/Xorg.0.log.old', 'XorgLogOld')
apport.hookutils.attach_file_if_exists(report, '/var/log/gdm/:0.log', 'GdmLog')
apport.hookutils.attach_file_if_exists(report, '/var/log/gdm/:0.log.1', 'GdmLogOld')
# Attach the output of xinput
report['XInput'] = apport.hookutils.command_output(['xinput', 'input'])
# Attach the output of lsinput
report['LsInput'] = apport.hookutils.root_command_output(["lsinput"])
# Attach descriptors
attach_descriptors(report)
apport.hookutils.attach_related_packages(report, RELATED_PACKAGES)
def attach_descriptors(report):
path = '/sys/kernel/debug/hid/*/rdesc'
for desc in glob(path):
name = desc.split('/')[5]
name = name.replace(":", "").replace(".", "")
report[name] = apport.hookutils.root_command_output(["cat", desc])

2
debian/watch vendored
View File

@ -1,2 +0,0 @@
version=3
http://bitmath.org/code/mtdev/mtdev-([0-9.]+)\.tar\.gz

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -16,7 +16,17 @@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ -80,12 +90,12 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/config-aux/depcomp $(libmtdevinclude_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(libmtdevinclude_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@ -145,7 +155,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config-aux/depcomp
am__depfiles_maybe = depfiles
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/caps.Plo ./$(DEPDIR)/core.Plo \
./$(DEPDIR)/iobuf.Plo ./$(DEPDIR)/match.Plo \
./$(DEPDIR)/match_four.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@ -192,6 +205,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/config-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@ -233,6 +248,7 @@ LIB_VERSION = @LIB_VERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@ -348,14 +364,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -411,11 +426,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iobuf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match_four.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iobuf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match_four.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@ -517,7 +538,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@ -590,7 +614,11 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/caps.Plo
-rm -f ./$(DEPDIR)/core.Plo
-rm -f ./$(DEPDIR)/iobuf.Plo
-rm -f ./$(DEPDIR)/match.Plo
-rm -f ./$(DEPDIR)/match_four.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@ -636,7 +664,11 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/caps.Plo
-rm -f ./$(DEPDIR)/core.Plo
-rm -f ./$(DEPDIR)/iobuf.Plo
-rm -f ./$(DEPDIR)/match.Plo
-rm -f ./$(DEPDIR)/match_four.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@ -658,9 +690,9 @@ uninstall-am: uninstall-libLTLIBRARIES \
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@ -674,6 +706,8 @@ uninstall-am: uninstall-libLTLIBRARIES \
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-libmtdevincludeHEADERS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -32,16 +32,12 @@ static const int SN_COORD = 250; /* coordinate signal-to-noise ratio */
static const int SN_WIDTH = 100; /* width signal-to-noise ratio */
static const int SN_ORIENT = 10; /* orientation signal-to-noise ratio */
static const int bits_per_long = 8 * sizeof(long);
static inline int nlongs(int nbit)
{
return (nbit + bits_per_long - 1) / bits_per_long;
}
#define LONG_BITS (sizeof(long) * 8)
#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
static inline int getbit(const unsigned long *map, int key)
{
return (map[key / bits_per_long] >> (key % bits_per_long)) & 0x01;
return (map[key / LONG_BITS] >> (key % LONG_BITS)) & 0x01;
}
static int getabs(struct input_absinfo *abs, int key, int fd)
@ -82,7 +78,7 @@ static void default_fuzz(struct mtdev *dev, int code, int sn)
abs->fuzz = (abs->maximum - abs->minimum) / sn;
}
int mtdev_set_slots(struct mtdev *dev, int fd)
static int mtdev_set_slots(struct mtdev *dev, int fd)
{
struct { unsigned code; int values[DIM_FINGER]; } req;
struct mtdev_state *state = dev->state;
@ -106,7 +102,7 @@ int mtdev_set_slots(struct mtdev *dev, int fd)
int mtdev_configure(struct mtdev *dev, int fd)
{
unsigned long absbits[nlongs(ABS_MAX)];
unsigned long absbits[NLONGS(ABS_MAX)];
int rc, i;
SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits));

View File

@ -31,6 +31,11 @@
#include "evbuf.h"
#include "match.h"
#ifndef input_event_sec
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#endif
static inline int istouch(const struct mtdev_slot *data,
const struct mtdev *dev)
{
@ -251,7 +256,8 @@ static void push_slot_changes(struct mtdev_state *state,
count++;
if (!count)
return;
ev.time = syn->time;
ev.input_event_sec = syn->input_event_sec;
ev.input_event_usec = syn->input_event_usec;
ev.type = EV_ABS;
ev.code = ABS_MT_SLOT;
ev.value = slot;

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ -82,12 +92,11 @@ noinst_PROGRAMS = mtdev-mapgen$(EXEEXT) mtdev-matching$(EXEEXT) \
mtdev-kernel$(EXEEXT)
bin_PROGRAMS = mtdev-test$(EXEEXT)
subdir = test
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/config-aux/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@ -134,7 +143,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config-aux/depcomp
am__depfiles_maybe = depfiles
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/mtdev-kernel.Po \
./$(DEPDIR)/mtdev-mapgen.Po ./$(DEPDIR)/mtdev-matching.Po \
./$(DEPDIR)/mtdev-test.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@ -182,6 +194,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/config-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@ -223,6 +237,7 @@ LIB_VERSION = @LIB_VERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@ -322,14 +337,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -421,10 +435,16 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-kernel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-mapgen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-matching.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-kernel.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-mapgen.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-matching.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtdev-test.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@ -505,7 +525,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@ -578,7 +601,10 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/mtdev-kernel.Po
-rm -f ./$(DEPDIR)/mtdev-mapgen.Po
-rm -f ./$(DEPDIR)/mtdev-matching.Po
-rm -f ./$(DEPDIR)/mtdev-test.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@ -624,7 +650,10 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/mtdev-kernel.Po
-rm -f ./$(DEPDIR)/mtdev-mapgen.Po
-rm -f ./$(DEPDIR)/mtdev-matching.Po
-rm -f ./$(DEPDIR)/mtdev-test.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@ -645,7 +674,7 @@ uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libtool \
clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
@ -660,6 +689,8 @@ uninstall-am: uninstall-binPROGRAMS
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -49,7 +49,7 @@
static unsigned int cabs2mt[ABS_CNT];
static unsigned int cmt2abs[MT_ABS_SIZE];
void init_caps()
static void init_caps()
{
static const int init_abs_map[MT_ABS_SIZE] = MT_SLOT_ABS_EVENTS;
int i;

View File

@ -31,8 +31,8 @@
#include <time.h>
#define ITS 4000000
const int n1 = 4;
const int n2 = 4;
static const int n1 = 4;
static const int n2 = 4;
static void test1()
{

View File

@ -30,9 +30,15 @@
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#ifndef input_event_sec
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#endif
/* year-proof millisecond event time */
typedef __u64 mstime_t;
typedef uint64_t mstime_t;
static int use_event(const struct input_event *ev)
{
@ -47,7 +53,7 @@ static void print_event(const struct input_event *ev)
{
static const mstime_t ms = 1000;
static int slot;
mstime_t evtime = ev->time.tv_usec / ms + ev->time.tv_sec * ms;
mstime_t evtime = ev->input_event_usec / ms + ev->input_event_sec * ms;
if (ev->type == EV_ABS && ev->code == ABS_MT_SLOT)
slot = ev->value;
fprintf(stderr, "%012llx %02d %01d %04x %d\n",