mirror of
https://github.com/datajerk/c2d.git
synced 2024-06-22 02:29:26 +00:00
added page2text, fixed 40 col bug in text2page
This commit is contained in:
parent
2bc0752f9d
commit
6f38a3d75f
BIN
bin/page2text
BIN
bin/page2text
Binary file not shown.
Binary file not shown.
12
page2text.c
12
page2text.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user