Lines Matching refs:slen
296 static int add_byte(int c, char **lineptr, size_t slen, size_t *n) in add_byte() argument
299 size_t new_size = slen + 1; in add_byte()
311 (*lineptr)[slen] = c; in add_byte()
319 size_t slen = 0; in compat_getline() local
326 if (add_byte(c, &line, slen, n) < 0) in compat_getline()
328 slen++; in compat_getline()
331 if (add_byte('\0', &line, slen, n) < 0) in compat_getline()
334 if (slen == 0) in compat_getline()
336 return slen; in compat_getline()
338 if (add_byte(c, &line, slen, n) < 0) in compat_getline()
340 slen++; in compat_getline()
345 line[slen-1] = '\0'; in compat_getline()