6 * Remove empty lines from the beginning and end.
8 * Turn multiple consecutive empty lines into just one
11 static void cleanup(char *line
)
13 int len
= strlen(line
);
15 if (len
> 1 && line
[len
-1] == '\n') {
17 unsigned char c
= line
[len
-2];
27 int main(int argc
, char **argv
)
32 while (fgets(line
, sizeof(line
), stdin
)) {
35 /* Not just an empty line? */
36 if (line
[0] != '\n') {