dvb/linuxtv-dvb-apps/debian/patches 02_av7110_loadkeys-BTN.dpatch 00list 01_README.scan.dpatch
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Tue, 28 Sep 2004 13:54:59 +0000
Update of /cvsroot/pkg-vdr-dvb/dvb/linuxtv-dvb-apps/debian/patches
In directory haydn:/tmp/cvs-serv13320/dvb/linuxtv-dvb-apps/debian/patches
Modified Files:
00list 01_README.scan.dpatch
Added Files:
02_av7110_loadkeys-BTN.dpatch
Log Message:
* applied patch from Darren Salt (closes: #273733)
* added description to 01_README.scan.dpatch
Index: 01_README.scan.dpatch
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/dvb/linuxtv-dvb-apps/debian/patches/01_README.scan.dpatch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- 01_README.scan.dpatch 23 May 2004 11:18:11 -0000 1.2
+++ 01_README.scan.dpatch 28 Sep 2004 13:54:57 -0000 1.3
@@ -2,7 +2,7 @@
## 01_README.scan.dpatch by Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: change Readme to list Debian-specific Paths
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
Index: 00list
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/dvb/linuxtv-dvb-apps/debian/patches/00list,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- 00list 22 Apr 2004 11:09:13 -0000 1.1.1.1
+++ 00list 28 Sep 2004 13:54:56 -0000 1.2
@@ -1 +1,2 @@
01_README.scan
+02_av7110_loadkeys-BTN
--- NEW FILE: 02_av7110_loadkeys-BTN.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_av7110_loadkeys-BTN.dpatch by Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: patch to allow BTN_* as input-keynames (closes: #273733)
@DPATCH@
diff -urNad linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c /tmp/dpep.6x7trg/linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c
--- linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c 2004-05-14 12:32:12.000000000 +0200
+++ /tmp/dpep.6x7trg/linuxtv-dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c 2004-09-28 15:49:18.000000000 +0200
@@ -35,7 +35,8 @@
{
int cmp, index;
int l = 1;
- int r = sizeof (key_name) / sizeof (key_name[0]);
+ const struct input_key_name *kn;
+ int r;
if (limit < 5)
return -1;
@@ -46,7 +47,18 @@
limit--;
}
- if (pos [0] != 'K' || pos[1] != 'E' || pos[2] != 'Y' || pos[3] != '_')
+ if (pos[3] != '_')
+ return -2;
+
+ if (pos[0] == 'K' && pos[1] == 'E' && pos[2] == 'Y') {
+ kn = key_name;
+ r = sizeof (key_name) / sizeof (key_name[0]);
+ }
+ else if (pos[0] == 'B' && pos[1] == 'T' && pos[2] == 'N') {
+ kn = btn_name;
+ r = sizeof (btn_name) / sizeof (btn_name[0]);
+ }
+ else
return -2;
(*nend) += 4;
@@ -58,19 +70,19 @@
index = (l + r) / 2;
- len0 = strlen(key_name[index-1].name);
+ len0 = strlen(kn[index-1].name);
while (len1 < limit && isgraph(pos[len1]))
len1++;
- cmp = strncmp (key_name[index-1].name, pos,
- strlen(key_name[index-1].name));
+ cmp = strncmp (kn[index-1].name, pos,
+ strlen(kn[index-1].name));
if (len0 < len1 && cmp == 0)
cmp = -1;
if (cmp == 0) {
- *nend = pos + strlen (key_name[index-1].name);
+ *nend = pos + strlen (kn[index-1].name);
if (**nend != '\n' &&
**nend != '\t' &&
@@ -78,7 +90,7 @@
*nend != pos)
return -3;
- return key_name[index-1].key;
+ return kn[index-1].key;
}
if (cmp < 0)
diff -urNad linuxtv-dvb-apps/util/av7110_loadkeys/Makefile /tmp/dpep.6x7trg/linuxtv-dvb-apps/util/av7110_loadkeys/Makefile
--- linuxtv-dvb-apps/util/av7110_loadkeys/Makefile 2004-05-14 12:32:12.000000000 +0200
+++ /tmp/dpep.6x7trg/linuxtv-dvb-apps/util/av7110_loadkeys/Makefile 2004-09-28 15:49:18.000000000 +0200
@@ -12,7 +12,7 @@
evtest.o: evtest.c input_keynames.h
-input_keynames.h: /usr/include/linux/input.h input_fake.h
+input_keynames.h: /usr/include/linux/input.h input_fake.h Makefile
@echo 'generate $@...'
@echo '#ifndef __INPUT_KEYNAMES_H__' > $@
@echo '#define __INPUT_KEYNAMES_H__' >> $@
@@ -32,8 +32,17 @@
@echo '' >> $@
@echo 'static struct input_key_name key_name [] = {' >> $@
@for x in `cat /usr/include/linux/input.h input_fake.h | \
- grep KEY_ | grep "#define" | grep -v KEY_MAX | \
- cut -f 1 | cut -f 2 -d ' ' | sort | uniq` ; do \
+ egrep '#define[ \t]+KEY_' | grep -v KEY_MAX | \
+ cut -f 1 | cut -f 2 -d ' ' | sort -u` ; do \
+ echo " { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
+ ; \
+ done
+ @echo '};' >> $@
+ @echo '' >> $@
+ @echo 'static struct input_key_name btn_name [] = {' >> $@
+ @for x in `cat /usr/include/linux/input.h input_fake.h | \
+ egrep '#define[ \t]+BTN_' | \
+ cut -f 1 | cut -f 2 -d ' ' | sort -u` ; do \
echo " { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
; \
done