7 * Reads consecutive lines from file line that start with end_string
8 * read finishes at an empty line or eof
10 extern char *read_text_file_to_buffer(FILE *src_file)
14 int buffer_length = 0;
20 /* Loop until line is empty, or just one char, which will be '\n' */
22 line = get_line_from_file(src_file);
26 line_length = strlen(line);
27 buffer_length += line_length + 1;
28 buffer = (char *) xrealloc(buffer, buffer_length + 1);
31 } while (line_length > 1);
33 if (strlen(buffer) == 0) {
36 return(strdup(buffer));