Lines Matching refs:len

176 	register int len;
218 if (!(len = pend))
225 if (len < SIZEOF(xReply))
226 len = SIZEOF(xReply);
227 else if (len > BUFSIZE)
228 len = BUFSIZE;
229 len /= SIZEOF(xReply);
230 pend = len * SIZEOF(xReply);
237 STARTITERATE (rep,xReply, buf, (len > 0), len--) {
380 void _XRead32 (Display *dpy, long *data, long len)
385 for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
388 if (len) _doXRead32 (dpy, data, len, packbuffer);
421 void _XRead16 (Display *dpy, short *data, long len)
426 for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
429 if (len) _doXRead16 (dpy, data, len, packbuffer);
541 long len;
557 len = (length) - before; \
558 if (len > remain) \
559 len = remain; \
560 if (len <= 0) { \
561 before = (-len); \
563 iov[i].iov_len = len; \
566 remain -= len; \
575 if ((len = WritevToServer(dpy->fd, iov, i)) >= 0) {
576 skip += len;
577 total -= len;
1495 void NXProcData (Display *dpy, char *data, long len)
1497 if (dpy->bufptr + (len) <= dpy->bufmax) {
1498 bcopy(data, dpy->bufptr, (int)len);
1499 dpy->bufptr += ((len) + 3) & ~3;
1501 N_XSend(dpy, data, len);
1518 * "len" is the length in bytes of the data.
1522 doData16(Display *dpy, short *data, unsigned len, char *packbuffer)
1535 nwords = len >> 1;
1548 Data(dpy, packbuffer, len);
1552 Data16 (Display *dpy, short *data, unsigned len)
1557 for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
1560 if (len) doData16 (dpy, data, len, packbuffer);
1568 * "len" is the length in bytes of the data.
1571 static doData32 (Display *dpy, long *data, unsigned len, char *packbuffer)
1584 nwords = len >> 2;
1595 Data(dpy, packbuffer, len);
1598 Data32 (Display *dpy, long *data, unsigned len)
1603 for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) {
1606 if (len) doData32 (dpy, data, len, packbuffer);
1650 int len;
1656 len = strlen (name.nodename);
1657 if (len >= maxlen) len = maxlen - 1;
1658 strncpy (buf, name.nodename, len);
1659 buf[len] = '\0';
1664 len = strlen(buf);
1666 return len;
1755 int i, len, total;
1760 len = iov->iov_len;
1762 while (len > 0) {
1764 nbytes = read(fd, base, len);
1768 len -= nbytes;
1829 int i, rc, len, size = 0;
1840 if ((len = v[i].iov_len) < 0 || v[i].iov_base == NULL)
1845 size += len;
1857 memcpy (v[i].iov_base, p, len = v[i].iov_len);
1858 p += len;
1870 int i, rc, len, size = 0;
1881 if ((len = v[i].iov_len) < 0 || v[i].iov_base == NULL)
1886 size += len;
1896 memcpy (p, v[i].iov_base, len = v[i].iov_len);
1897 p += len;