Path: blob/main/misc/bogosort/files/patch-getlines.c
16461 views
--- getlines.c.orig 2002-05-04 20:22:22 UTC1+++ getlines.c2@@ -49,7 +49,7 @@ getlines(FILE *stream)3char **ss = NULL;45/* read all lines available */6- while ((s = getline(stream)) != NULL) {7+ while ((s = get_line(stream)) != NULL) {8if (numlines == allocated) /* make more room if needed */9ss = (char **)xrealloc(ss,10(allocated += LINESTEP) * sizeof (char *));11@@ -81,7 +81,7 @@ getmorelines(FILE *stream, char **lines)12allocated = numlines + 1; /* this is a lie, but it's close enough */1314/* read all lines available */15- while ((s = getline(stream)) != NULL) {16+ while ((s = get_line(stream)) != NULL) {17if (numlines == allocated) /* make more room if needed */18ss = (char **)xrealloc(ss,19(allocated += LINESTEP) * sizeof (char *));20@@ -100,7 +100,7 @@ getmorelines(FILE *stream, char **lines)21* line in stream, return NULL on EOF22*/23char *24-getline(FILE *stream)25+get_line(FILE *stream)26{27int c, numchars = 0, allocated = 0;28char *s = NULL;293031