Lines Matching refs:len

136 	int len;  local
175 while ((len = read( fd1, bufr, EBUFSIZ )) > 0) {
176 DEBUG(9, "ewrdata writing %d ...", len);
178 bytes += len;
180 ret = (*Write)(fn, bufr, (unsigned) len);
183 if (ret != len)
185 if ((msglen -= len) <= 0)
188 if (len < 0 || (len == 0 && msglen != 0)) return(FAIL);
208 int len; local
219 ret = len = 0;
223 len = sizeof(cmsglen) - Erdlen;
224 ret = erdblk(cptr, len, fn);
228 len = sizeof(cmsglen);
231 if (ret != len)
250 len = erdblk(bufr, (int) MIN(msglen, EBUFSIZ), fn);
251 DEBUG(9, "erdblk ret %d\n", len);
252 if (len < 0) {
260 if (len == 0) {
266 bytes += len;
268 if ((msglen -= len) < 0) {
273 if ( ret == SUCCESS && write( fd2, bufr, len ) != len ) {
294 erdblk(blk, len, fn) in erdblk() argument
305 for (i = 0; i < len; i += ret) {
306 DEBUG(9, "erdblk ask %d ", len - i);
307 if ((ret = (*Read)(fn, blk, (unsigned) len - i)) < 0) {
372 int len; local
383 while ((len = read(fileno(fp1), bufr.t_data, TBUFSIZE)) > 0) {
384 bufr.t_nbytes = htonl((long)len);
385 DEBUG(7, "twrdata writing %d ...", len);
386 bytes += len;
388 len += sizeof(long);
390 ret = (*Write)(fn, (char *)&bufr, (unsigned) len);
393 if (ret != len)
395 if (len != TBUFSIZE+sizeof(long))
419 int len, nread; local
425 len = erdblk((char *)&Nbytes, sizeof(Nbytes), fn);
426 DEBUG(7, "trddata ret %d\n", len);
427 if (len != sizeof(Nbytes))
434 len = erdblk(bufr, nread, fn);
435 if (len != Nbytes)
437 bytes += len;
439 if (write(fileno(fp2), bufr, len) != len)
464 int len; local
484 len = (*Read)(fn, str, i);
485 DEBUG(9, "got %d\n", len);
486 if (len == 0)
488 if (len < 0) {
492 str += len;
493 i -= len;
526 etwrmsg(type, str, fn, len) in etwrmsg() argument
529 int fn, len;
543 if (len == 0)
544 len = (endstr - str) + 2; /* include bufr[0] and '\0' */
546 bufr[len-1] = 0; /* 't' needs this terminator */
553 DEBUG(9, "etwrmsg want %d ... ", len);
555 ret = (*Write)(fn, bufr, (unsigned) len);
558 if (ret != len)