Lines Matching refs:re
57 next_line (int fd, char *const buffer, char **cp, char **re, in next_line() argument
61 char *nl = memchr (*cp, '\n', *re - *cp); in next_line()
66 if (*re == buffer_end) in next_line()
68 memmove (buffer, *cp, *re - *cp); in next_line()
69 *re = buffer + (*re - *cp); in next_line()
72 ssize_t n = __read_nocancel (fd, *re, buffer_end - *re); in next_line()
76 *re += n; in next_line()
78 nl = memchr (*cp, '\n', *re - *cp); in next_line()
79 while (nl == NULL && *re == buffer_end) in next_line()
82 *re = buffer + 3 * (buffer_end - buffer) / 4; in next_line()
83 n = __read_nocancel (fd, *re, buffer_end - *re); in next_line()
87 nl = memchr (*re, '\n', n); in next_line()
88 **re = '\n'; in next_line()
89 *re += n; in next_line()
93 nl = memchr (*cp, '\n', *re - *cp); in next_line()
99 nl = *re - 1; in next_line()
103 assert (*cp <= *re); in next_line()
105 return res == *re ? NULL : res; in next_line()
115 char *re = buffer_end; in get_nproc_stat() local
123 while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL) in get_nproc_stat()
144 char *re = buffer_end; in read_sysfs_file() local
153 l = next_line (fd, buffer, &cp, &re, buffer_end); in read_sysfs_file()
181 if (l < re && *l == ',') in read_sysfs_file()
184 while (l < re && *l != '\n'); in read_sysfs_file()