home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung 2
/
Power-Programmierung CD 2 (Tewi)(1994).iso
/
c
/
library
/
dos
/
communic
/
ansi_bbs
/
sample.c
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-01-05
|
465 b
|
27 lines
#include <stdio.h>
#include <ansi.h>
main(int argc, char **argv)
{
FILE *fp;
char ch;
int test = 0;
fast_video = 1;
if ((fp = fopen(argv[1], "r")) != NULL)
{
while (!feof(fp))
{
ch = fgetc(fp);
if (ch == 0x1b || test > 0)
{
test = ansi_cmd(ch);
}
else
write_char(ch, attr.color);
}
}
else
puts("Can't find the file");
}