inhabitor/mamelink/griddle/util/shorten.c

20 lines
208 B
C
Raw Permalink Normal View History

#include <stdio.h>
main()
{
char c;
int i;
i = 0;
while ((c = getchar()) != EOF) {
putchar(c);
if (c == '\n')
i = 0;
else if (++i > 78) {
putchar('\\');
putchar('\n');
i = 0;
}
}
}