Lines Matching defs:len
463 int len = strlen(key) + strlen(value) + 4;
464 if (len > 9) len++;
465 if (len > 99) len++;
466 if (len > 999) len++;
470 return snprintf(buf, buf_size, "%d %s=%s\n", len, key, value);
642 // size header -- calc len in digits by actually rendering the number
836 int len;
844 len = strlen(data);
845 amt = write(fd, data, len);
846 if (amt != len) {
857 compare_file(const char* path, const unsigned char* data, int len)
868 unsigned char* contents = (unsigned char*)malloc(len);
870 fprintf(stderr, "malloc(%d) failed\n", len);
876 if (amt != len) {
877 fprintf(stderr, "compare_file file length should be %d, was %d\n", len, amt);
882 int readLen = amt < len ? amt : len;
885 fprintf(stderr, "compare_file read expected %d bytes but got %d\n", len, amt);