text2page minor non-functional update

This commit is contained in:
Egan Ford 2017-04-09 14:47:26 -06:00
parent 00609d4106
commit 90a86105a7
2 changed files with 7 additions and 7 deletions

Binary file not shown.

View File

@ -14,7 +14,7 @@ unsigned char holes[] = {
int main() int main()
{ {
char c, highbit = 0x80; char c, highbit = 0x80;
int i, j, k, columns = 0, lines = 0, linemap[24]; int i, j, k, column = 0, line = 0, linemap[24];
unsigned char screen[24][40]; unsigned char screen[24][40];
// build table // build table
@ -33,18 +33,18 @@ int main()
while((c = getchar()) != EOF) { while((c = getchar()) != EOF) {
if(c == '\r') // windows trash if(c == '\r') // windows trash
continue; continue;
if(columns > 39) // user didn't read the docs if(column > 39) // user didn't read the docs
continue; continue;
if(lines > 23) // ditto if(line > 23) // ditto
break; break;
if(c == '\n') { // end of line if(c == '\n') { // end of line
columns=0; column=0;
lines++; line++;
continue; continue;
} }
screen[linemap[lines]][columns] = c | highbit; screen[linemap[line]][column] = c | highbit;
columns++; column++;
} }
// dump to stdout // dump to stdout