Lines Matching refs:size
30 * Write up to size bytes to buf. Return negative on error, and number of
33 static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
37 assert(size <= SSIZE_MAX);
49 r = snprintf(buf + pos, size - pos,
51 if (pos + r > size)
57 if (pos + r == size) {
59 buf[size - 1] = '\n';
60 return size;
73 r = snprintf(buf + pos, size - pos,
75 if (r + pos > size)
81 if (r + pos == size) {
83 buf[size - 1] = '\n';
84 return size;
98 r = snprintf(buf + pos, size - pos,
100 if (r + pos > size)
106 if (r + pos == size) {
108 buf[size - 1] = '\n';
109 return size;
123 r = snprintf(buf + pos, size - pos,
125 if (r + pos > size)
131 if (r + pos == size) {
133 buf[size - 1] = '\n';
134 return size;
167 done = size - pos > u->field_length - u->field_pos;
171 tocopy = size - pos;
184 return size;
201 if (size - pos < len + 1)
216 if (size - pos < 8)
229 if (size - pos < 1)
245 static size_t journal_input_callback(void *buf, size_t size, size_t nmemb, void *userp) {
253 assert(nmemb <= SSIZE_MAX / size);
257 while (j && filled < size * nmemb) {
279 w = write_entry((char*)buf + filled, size * nmemb - filled, u);