/* usage: line2block < linefile > blockfile * takes a file (like one generated by block2line) of the form: *
* < 16 screen lines > * ... * and produces a block file with exactly 64 characters on each line, having * removed the header lines. This file is suitable for use with FORTH as a * block file. */ #include main() { int i; char buf[65]; char *spaces = /* 64 spaces, below */ " "; /* 64 spaces, above */ while (1) { gets(buf); /* header line */ for (i=0; i<16; i++) { if (gets(buf) == NULL) exit(0); printf("%s%s",buf,spaces+strlen(buf)); } } }