Deleted Added
full compact
usb_hid.c (196219) usb_hid.c (199816)
1/* $NetBSD: hid.c,v 1.17 2001/11/13 06:24:53 lukem Exp $ */
2
3
4#include <sys/cdefs.h>
1/* $NetBSD: hid.c,v 1.17 2001/11/13 06:24:53 lukem Exp $ */
2
3
4#include <sys/cdefs.h>
5__FBSDID("$FreeBSD: head/sys/dev/usb/usb_hid.c 196219 2009-08-14 20:03:53Z jhb $");
5__FBSDID("$FreeBSD: head/sys/dev/usb/usb_hid.c 199816 2009-11-26 00:43:17Z thompsa $");
6/*-
7 * Copyright (c) 1998 The NetBSD Foundation, Inc.
8 * All rights reserved.
9 *
10 * This code is derived from software contributed to The NetBSD Foundation
11 * by Lennart Augustsson (lennart@augustsson.net) at
12 * Carlstedt Research & Technology.
13 *

--- 431 unchanged lines hidden (view full) ---

445 s->cur[s->pushlevel] = *c;
446 /* store size and count */
447 c->loc.size = s->loc_size;
448 c->loc.count = s->loc_count;
449 /* update current item pointer */
450 c = &s->cur[s->pushlevel];
451 } else {
452 DPRINTFN(0, "Cannot push "
6/*-
7 * Copyright (c) 1998 The NetBSD Foundation, Inc.
8 * All rights reserved.
9 *
10 * This code is derived from software contributed to The NetBSD Foundation
11 * by Lennart Augustsson (lennart@augustsson.net) at
12 * Carlstedt Research & Technology.
13 *

--- 431 unchanged lines hidden (view full) ---

445 s->cur[s->pushlevel] = *c;
446 /* store size and count */
447 c->loc.size = s->loc_size;
448 c->loc.count = s->loc_count;
449 /* update current item pointer */
450 c = &s->cur[s->pushlevel];
451 } else {
452 DPRINTFN(0, "Cannot push "
453 "item @ %d!\n", s->pushlevel);
453 "item @ %d\n", s->pushlevel);
454 }
455 break;
456 case 11: /* Pop */
457 s->pushlevel --;
458 if (s->pushlevel < MAXPUSH) {
459 /* preserve position */
460 oldpos = c->loc.pos;
461 c = &s->cur[s->pushlevel];
462 /* restore size and count */
463 s->loc_size = c->loc.size;
464 s->loc_count = c->loc.count;
465 /* set default item location */
466 c->loc.pos = oldpos;
467 c->loc.size = 0;
468 c->loc.count = 0;
469 } else {
470 DPRINTFN(0, "Cannot pop "
454 }
455 break;
456 case 11: /* Pop */
457 s->pushlevel --;
458 if (s->pushlevel < MAXPUSH) {
459 /* preserve position */
460 oldpos = c->loc.pos;
461 c = &s->cur[s->pushlevel];
462 /* restore size and count */
463 s->loc_size = c->loc.size;
464 s->loc_count = c->loc.count;
465 /* set default item location */
466 c->loc.pos = oldpos;
467 c->loc.size = 0;
468 c->loc.count = 0;
469 } else {
470 DPRINTFN(0, "Cannot pop "
471 "item @ %d!\n", s->pushlevel);
471 "item @ %d\n", s->pushlevel);
472 }
473 break;
474 default:
475 DPRINTFN(0, "Global bTag=%d\n", bTag);
476 break;
477 }
478 break;
479 case 2: /* Local */

--- 5 unchanged lines hidden (view full) ---

485 /* set last usage, in case of a collection */
486 s->usage_last = dval;
487
488 if (s->nusage < MAXUSAGE) {
489 s->usages_min[s->nusage] = dval;
490 s->usages_max[s->nusage] = dval;
491 s->nusage ++;
492 } else {
472 }
473 break;
474 default:
475 DPRINTFN(0, "Global bTag=%d\n", bTag);
476 break;
477 }
478 break;
479 case 2: /* Local */

--- 5 unchanged lines hidden (view full) ---

485 /* set last usage, in case of a collection */
486 s->usage_last = dval;
487
488 if (s->nusage < MAXUSAGE) {
489 s->usages_min[s->nusage] = dval;
490 s->usages_max[s->nusage] = dval;
491 s->nusage ++;
492 } else {
493 DPRINTFN(0, "max usage reached!\n");
493 DPRINTFN(0, "max usage reached\n");
494 }
495
496 /* clear any pending usage sets */
497 s->susage = 0;
498 break;
499 case 1:
500 s->susage |= 1;
501

--- 18 unchanged lines hidden (view full) ---

520 (c->usage_minimum <= c->usage_maximum)) {
521 /* add usage range */
522 s->usages_min[s->nusage] =
523 c->usage_minimum;
524 s->usages_max[s->nusage] =
525 c->usage_maximum;
526 s->nusage ++;
527 } else {
494 }
495
496 /* clear any pending usage sets */
497 s->susage = 0;
498 break;
499 case 1:
500 s->susage |= 1;
501

--- 18 unchanged lines hidden (view full) ---

520 (c->usage_minimum <= c->usage_maximum)) {
521 /* add usage range */
522 s->usages_min[s->nusage] =
523 c->usage_minimum;
524 s->usages_max[s->nusage] =
525 c->usage_maximum;
526 s->nusage ++;
527 } else {
528 DPRINTFN(0, "Usage set dropped!\n");
528 DPRINTFN(0, "Usage set dropped\n");
529 }
530 s->susage = 0;
531 break;
532 case 3:
533 c->designator_index = dval;
534 break;
535 case 4:
536 c->designator_minimum = dval;

--- 266 unchanged lines hidden ---
529 }
530 s->susage = 0;
531 break;
532 case 3:
533 c->designator_index = dval;
534 break;
535 case 4:
536 c->designator_minimum = dval;

--- 266 unchanged lines hidden ---