added page2text, fixed 40 col bug in text2page

This commit is contained in:
Egan Ford 2017-04-15 21:55:14 -06:00
parent 2bc0752f9d
commit 6f38a3d75f
3 changed files with 2 additions and 10 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
int main()
{
unsigned char c;
int i, j, k, count=0, linemap[24];
int i, j, k, linemap[24];
unsigned char screen[24][40];
// build table
@ -22,19 +22,11 @@ int main()
for(i=0;i<24;i++) {
for(j=0;j<40;j++) {
c = getchar();
count++;
screen[linemap[i]][j] = c & 0x7F;
}
if((i + 1) % 3 == 0)
for(k=0;k<8;k++) {
for(k=0;k<8;k++)
c = getchar();
count++;
}
}
if(count != 1024) {
fprintf(stderr,"input size < 1024\n\n");
return 1;
}
// dump to stdout