2023-05-28 11:15:50 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
static char *buf = NULL;
|
|
|
|
static size_t size = 0;
|
2023-05-28 19:04:04 +00:00
|
|
|
long n = 1;
|
|
|
|
while(getline(&buf, &size, stdin) > 0)
|
2023-05-28 11:15:50 +00:00
|
|
|
{
|
2023-05-28 19:04:04 +00:00
|
|
|
if (n++ < 5) /* overflow possible */
|
2023-05-28 11:15:50 +00:00
|
|
|
continue;
|
|
|
|
if (strncmp(buf,"-->", 3) == 0)
|
|
|
|
putchar('\n');
|
2023-05-28 19:04:04 +00:00
|
|
|
else if (buf[0] != 10)
|
|
|
|
fputs(buf, stdout);
|
2023-05-28 11:15:50 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|