Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Keep the bit position even when the report descriptor says POP.



details:   https://anonhg.NetBSD.org/src/rev/82b9f11cf7c4
branches:  trunk
changeset: 483764:82b9f11cf7c4
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Mar 17 18:09:17 2000 +0000

description:
Keep the bit position even when the report descriptor says POP.

diffstat:

 lib/libusb/parse.c |  6 ++++--
 sys/dev/usb/hid.c  |  7 +++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (57 lines):

diff -r cc0e75fb2004 -r 82b9f11cf7c4 lib/libusb/parse.c
--- a/lib/libusb/parse.c        Fri Mar 17 17:41:01 2000 +0000
+++ b/lib/libusb/parse.c        Fri Mar 17 18:09:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.8 2000/02/22 12:39:22 augustss Exp $       */
+/*     $NetBSD: parse.c,v 1.9 2000/03/17 18:09:17 augustss Exp $       */
 
 /*
  * Copyright (c) 1999 Lennart Augustsson <augustss%netbsd.org@localhost>
@@ -104,7 +104,7 @@
 hid_get_item(hid_data_t s, hid_item_t *h)
 {
        hid_item_t *c;
-       unsigned int bTag = 0, bType = 0, bSize;
+       unsigned int bTag = 0, bType = 0, bSize, oldpos;
        unsigned char *data;
        int dval;
        unsigned char *p;
@@ -285,7 +285,9 @@
                                break;
                        case 11: /* Pop */
                                hi = c->next;
+                               oldpos = c->pos;
                                s->cur = *hi;
+                               c->pos = oldpos;
                                free(hi);
                                break;
                        default:
diff -r cc0e75fb2004 -r 82b9f11cf7c4 sys/dev/usb/hid.c
--- a/sys/dev/usb/hid.c Fri Mar 17 17:41:01 2000 +0000
+++ b/sys/dev/usb/hid.c Fri Mar 17 18:09:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hid.c,v 1.11 1999/11/18 23:32:25 augustss Exp $        */
+/*     $NetBSD: hid.c,v 1.12 2000/03/17 18:16:18 augustss Exp $        */
 /*     $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
 
 /*
@@ -125,7 +125,8 @@
        struct hid_item *h;
 {
        struct hid_item *c = &s->cur;
-       int bTag, bType, bSize;
+       unsigned int bTag, bType, bSize;
+       struct hid_location oldloc;
        u_char *data;
        int32_t dval;
        u_char *p;
@@ -299,7 +300,9 @@
                                break;
                        case 11: /* Pop */
                                hi = c->next;
+                               oldloc = c->loc;
                                s->cur = *hi;
+                               c->loc = oldloc;
                                free(hi, M_TEMP);
                                break;
                        default:



Home | Main Index | Thread Index | Old Index