Home | History | Annotate | Download | only in src

Lines Matching refs:buf

50 	static char *buf = NULL;
55 if (buf == NULL) {
57 if ((buf = malloc(bufsiz)) == NULL)
61 if (fgets(buf, bufsiz, fp) == NULL)
65 while ((ptr = strchr(&buf[*len], '\n')) == NULL) {
67 char *nbuf = realloc(buf, nbufsiz);
71 free(buf);
73 buf = NULL;
76 buf = nbuf;
78 if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) {
79 buf[bufsiz] = '\0';
80 *len = strlen(buf);
81 return buf;
88 *len = (ptr - buf) + 1;
89 return buf;