Lines Matching refs:pBuf

1191     unsigned char *pBuf, u;
1196 pBuf = pMse->protoBuf;
1316 pBuf[pBufP++] = u;
1323 LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[i]);
1386 if ((pBuf[j] & pMse->protoPara[2]) != pMse->protoPara[3])
1392 if ((pBuf[j] & pMse->protoPara[0]) == pMse->protoPara[1])
1396 if ((pBuf[0] & pMse->protoPara[0]) != pMse->protoPara[1] || baddata) {
1403 LogMessageVerbSigSafe(X_INFO, -1, "skipping byte %x\n",*pBuf);
1410 pBuf[j] = pBuf[j+1];
1437 buttons = (((int) pBuf[0] & 0x30) == 0x30) ? 2 :
1438 ((int)(pBuf[0] & 0x20) >> 3)
1439 | ((int)(pBuf[0] & 0x10) >> 4);
1442 | ((int)(pBuf[0] & 0x20) >> 3)
1443 | ((int)(pBuf[0] & 0x10) >> 4);
1444 dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
1445 dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
1452 | ((int)(pBuf[0] & 0x20) >> 3)
1453 | ((int)(pBuf[0] & 0x10) >> 4);
1454 dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
1455 dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
1459 buttons = (~pBuf[0]) & 0x07;
1460 dx = (signed char)(pBuf[1]) + (char)(pBuf[3]);
1461 dy = - ((signed char)(pBuf[2]) + (char)(pBuf[4]));
1465 buttons = pBuf[0] & 0x07;
1468 dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1];
1469 dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2];
1474 buttons = (pBuf[0] & 0x02) | ((pBuf[0] & 0x04) >> 2) |
1475 ((pBuf[0] & 1) << 2);
1476 dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1];
1477 dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2];
1482 buttons = pBuf[0] & 0x07;
1483 dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1];
1484 dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2];
1488 buttons = (~pBuf[0]) & 0x07;
1489 dx = (signed char)pBuf[1];
1490 dy = - (signed char)pBuf[2];
1495 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1496 (pBuf[0] & 0x02) >> 1 | /* Right */
1497 (pBuf[0] & 0x01) << 2; /* Left */
1498 dx = (pBuf[0] & 0x10) ? (int)pBuf[1]-256 : (int)pBuf[1];
1499 dy = (pBuf[0] & 0x20) ? -((int)pBuf[2]-256) : -(int)pBuf[2];
1505 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1506 (pBuf[0] & 0x02) >> 1 | /* Right */
1507 (pBuf[0] & 0x01) << 2 | /* Left */
1508 (pBuf[0] & 0x40) >> 3 | /* button 4 */
1509 (pBuf[0] & 0x80) >> 3; /* button 5 */
1510 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1511 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1516 dz = (signed char)(pBuf[3] | ((pBuf[3] & 0x08) ? 0xf8 : 0));
1517 if ((pBuf[3] & 0xf8) && ((pBuf[3] & 0xf8) != 0xf8)) {
1531 if (pMse->autoProbe && (pBuf[3] & 0xC0)) {
1537 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1538 (pBuf[0] & 0x02) >> 1 | /* Right */
1539 (pBuf[0] & 0x01) << 2 | /* Left */
1540 (pBuf[3] & 0x10) >> 1 | /* button 4 */
1541 (pBuf[3] & 0x20) >> 1; /* button 5 */
1542 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1543 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1545 switch (pBuf[3] & 0x0f) {
1558 dz = (pBuf[3]&0x08) ? (pBuf[3]&0x0f) - 16 : (pBuf[3]&0x0f);
1562 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1563 (pBuf[0] & 0x02) >> 1 | /* Right */
1564 (pBuf[0] & 0x01) << 2; /* Left */
1565 dx = (pBuf[0] & 0x10) ? pBuf[1] - 256 : pBuf[1];
1566 if (((pBuf[0] & 0x48) == 0x48) &&
1568 ((((pBuf[2] & 0x03) << 2) | 0x02) == (pBuf[1] & 0x0f))) {
1570 switch ((((pBuf[0] & 0x30) >> 2) | ((pBuf[1] & 0x30) >> 4))) {
1572 buttons |= ((pBuf[2] & 0x10) ? 0x08 : 0) | /* 4th button */
1573 ((pBuf[2] & 0x20) ? 0x10 : 0); /* 5th button */
1575 dz = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 :
1576 (pBuf[2] & 0x0f);
1585 dz = (pBuf[2] & 0x80) ? ((pBuf[2] >> 4) & 0x0f) - 16 :
1586 ((pBuf[2] >> 4) & 0x0f);
1587 dw = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 :
1588 (pBuf[2] & 0x0f);
1599 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1600 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1605 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1606 (pBuf[0] & 0x02) >> 1 | /* Right */
1607 (pBuf[0] & 0x01) << 2 | /* Left */
1608 ((pBuf[0] & 0x08) ? 0 : 0x08);/* fourth button */
1609 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1610 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1614 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1615 (pBuf[0] & 0x02) >> 1 | /* Right */
1616 (pBuf[0] & 0x01) << 2 | /* Left */
1617 ((pBuf[3] & 0x02) ? 0x08 : 0) | /* button 4 */
1618 ((pBuf[3] & 0x01) ? 0x10 : 0); /* button 5 */
1619 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1620 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1621 dz = (pBuf[3] & 0x10) ? pBuf[4] - 256 : pBuf[4];
1625 buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
1626 (pBuf[0] & 0x02) >> 1 | /* Right */
1627 (pBuf[0] & 0x01) << 2 | /* Left */
1628 ((pBuf[0] & 0x08) ? 0x08 : 0);/* fourth button */
1629 pBuf[1] |= (pBuf[0] & 0x40) ? 0x80 : 0x00;
1630 dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1];
1631 dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2];
1635 buttons = (~pBuf[0]) & 0x07;
1636 dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]);
1637 dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4]));
1644 dz = ((signed char)(pBuf[5] << 1) +
1645 (signed char)(pBuf[6] << 1)) >> 1;
1646 buttons |= (int)(~pBuf[7] & 0x7f) << 3;
1651 buttons = ((int)(pBuf[0] & 0x20) >> 3)
1652 | ((int)(pBuf[0] & 0x10) >> 4)
1653 | ((int)(pBuf[3] & 0x10) >> 3);
1654 dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
1655 dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
1656 dz = (pBuf[3] & 0x08) ? ((int)(pBuf[3] & 0x0F) - 0x10) :
1657 ((int)(pBuf[3] & 0x0F));
1669 LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[j]);