6 * Remove empty lines from the beginning and end.
8 * Turn multiple consecutive empty lines into just one
9 * empty line. Return true if it is an incomplete line.
11 static int cleanup(char *line)
13 int len = strlen(line);
15 if (len && line[len-1] == '\n') {
19 unsigned char c = line[len-2];
31 int main(int argc, char **argv)
37 while (fgets(line, sizeof(line), stdin)) {
38 incomplete = cleanup(line);
40 /* Not just an empty line? */
41 if (line[0] != '\n') {