remove agetline

This commit is contained in:
Evan Gates
2014-11-18 12:49:30 -08:00
committed by sin
parent cca0522872
commit 84b08427a1
14 changed files with 13 additions and 28 deletions

2
grep.c
View File

@@ -132,7 +132,7 @@ grep(FILE *fp, const char *str)
struct pattern *pnode;
int match = NoMatch;
for (n = 1; (len = agetline(&buf, &size, fp)) != -1; n++) {
for (n = 1; (len = getline(&buf, &size, fp)) != -1; n++) {
/* Remove the trailing newline if one is present. */
if (len && buf[len - 1] == '\n')
buf[len - 1] = '\0';