| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ans.c 2/2 |
/*_|_| ANS.C part 2 of 2
_|_|_| PUBLIC DOMAIN Kurt Kuzba 10/10/1998
_|_|*/
switch(ch)
{
case 'H':
case 'f': pos = 2; len = addchar(esc, 0); lin = atoi(&esc[pos]);
while(pos < len && esc[pos++] != ';');
col = atoi(&esc[pos]); if(lin < 1) lin = 1;
if(lin > H) lin = H;
if(col < 1) col = 1;
if(col > 80) col = 80;
C = (lin - 1) * 80 + (col - 1); break;
case 'A': col = (C / 80); if(col < 1) break;
if( (lin = atoi(&esc[2])) < 2) lin = 1;
col = col - lin; if(col < 0) col = 0;
C = (C % 80) + 80 * col; break;
case 'B': col = (C / 80); if(col >= (H - 1)) break;
if( (lin = atoi(&esc[2])) < 2) lin = 1;
col = col + lin; if(col >= H) col = H - 1;
C = (C % 80) + 80 * col; break;
case 'C': col = (C % 80); if(col > 78) break;
if( (lin = atoi(&esc[2])) < 2) lin = 1;
col = col + lin; if(col > 79)col = 79;
C = 80 * (C / 80) + col; break;
case 'D': col = (C % 80); if(col == 0) break;
if( (lin = atoi(&esc[2])) < 2) lin = 1;
col = col - lin; if(col < 0) col = 0;
C = 80 * (C / 80) + col; break;
case 's': S = C; break;
case 'u': C = S; break;
case 'J': for(C = 0; C < H * 80; C++) *(Scr + C) = 32 + 256 * A;
C = 0; break;
case 'K': len = C; while(len % 80) *(Scr + len) = 32 + 256 * A;
case 'h':
case 'l':
case 'p': break;
case 'm': len = addchar(esc, 0); pos = 2;
while(pos < len)
{
int colorz[8] = {0, 4, 2, 6, 1, 5, 3, 7};
col = atoi(&esc[pos]);
if(col == 0) A = 7;
if(col == 1) A = A | 8;
if(col == 5) A = A | 128;
if(col == 8) A = (A & 240) + ((A & 112) / 16);
if(col > 29 && col < 38)
A = (A & 248) + (colorz[col - 30]);
if(col > 39 && col < 48)
A = (A & 143) + 16 * (colorz[col - 40]);
while(esc[pos++] != ';' && pos < len);
} break;
default: return;
}
cursor(C);
E = 0;
esc[0] = 0;
}
int main(int c, char *v[])
{
FILE *ans;
ans = fopen(v[0],"rb");
fseek(ans, FileEnd, SEEK_SET);
while (!feof(ans)) dir_ansi(getc(ans));
fclose(ans);
return 0;
}
/*_|_| end ANS.C part 2 of 2 */
> ] * Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252 SEEN-BY: 670/218 @PATH: 154/750 222 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.