Lines Matching defs:buf
105 unsigned char buf[BUFLEN];
119 memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
134 mouse->buf[mouse->count++] = byte;
170 if (!IS_HDR_BYTE(mouse->buf[0])) {
171 DBG("vsck: len=%d, 1st=0x%02x\n", packet_len, mouse->buf[0]);
177 if (IS_HDR_BYTE(mouse->buf[i])) {
182 packet_len, i, mouse->buf[i]);
193 return mouse->count >= len && MATCH_PACKET_TYPE(mouse->buf[0], type);
199 unsigned char *buf = mouse->buf;
216 dx = buf[1] & 0x7f;
217 dx *= ((buf[0] >> 4) & 0x01) ? 1 : -1;
223 dy = buf[2] & 0x7f;
224 dy *= ((buf[0] >> 3) & 0x01) ? -1 : 1;
230 left = buf[0] & 0x04;
231 middle = buf[0] & 0x02;
232 right = buf[0] & 0x01;
255 unsigned char *buf = mouse->buf;
273 x = ((buf[2] & 0x3f) << 6) | (buf[1] & 0x3f);
274 y = ((buf[4] & 0x3f) << 6) | (buf[3] & 0x3f);
280 left = buf[0] & 0x02;
281 middle = buf[0] & 0x04;
282 right = buf[0] & 0x08;
283 touch = buf[0] & 0x10;
307 unsigned char *buf = mouse->buf;
329 mouse->version = buf[0] & 0x0f;
330 mouse->country = (buf[1] >> 4) & 0x07;
331 mouse->type = buf[1] & 0x0f;
332 error = buf[2] & 0x7f;
339 left = buf[0] & 0x04;
340 middle = buf[0] & 0x02;
341 right = buf[0] & 0x01;
377 unsigned char *buf = mouse->buf;
391 while (mouse->count > 0 && !IS_HDR_BYTE(buf[0])) {