Lines Matching refs:tbuf
678 unsigned char tbuf[255]; /* Some devices choke on size > 255 */
686 r = libusb_get_string_descriptor(dev, 0, 0, tbuf, sizeof(tbuf));
693 langid = tbuf[2] | (tbuf[3] << 8);
695 r = libusb_get_string_descriptor(dev, desc_index, langid, tbuf,
696 sizeof(tbuf));
700 if (tbuf[1] != LIBUSB_DT_STRING)
703 if (tbuf[0] > r)
706 for (di = 0, si = 2; si < tbuf[0]; si += 2) {
710 if (tbuf[si + 1]) /* high byte */
713 data[di++] = tbuf[si];