| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | The draw |
A creature called Eric Weigel screamed at Jay Collins:
MV> JC> Anyone know a way to dispay Thedraw ANsi's to the screen
MV> JC> under Os/2 using the VIO stuff?
MV>Write an ANSI emulator... About 400 lines...
EW> Wouldn't it be easier to use the built in ANSI support?
EW> copy ansifile.dat con
EW> or
EW> type ansifile.dat
EW> should do the trick. If you really want to write a program
EW> to do it, then in order of pain:
EW> Write to stdout or cout.
EW> Open a file "CON" and write to it.
EW> Use VioWrtTTY.
EW> Re-invent an ANSI emulator.
Howabout this, my newest method, used in the door game I'm writing:
void DspAns(char *filename)
{
ULONG l;
char *stuff;
ULONG openflag,openmode,action;
FILESTATUS3 infobuf;
HFILE infile;
openflag = OPEN_ACTION_FAIL_IF_NEW|OPEN_ACTION_OPEN_IF_EXISTS;
openmode = OPEN_SHARE_DENYWRITE|OPEN_ACCESS_READONLY|
OPEN_FLAGS_FAIL_ON_ERROR;
if(DosOpen(filename, &infile,&action,0L,0L,openflag,openmode,NULL))
{
printf("Error reading %s!\n\rPlease inform the SysOp!",filename);
return;
}
// read the length of the file
DosQueryFileInfo(infile,1,&infobuf,sizeof(infobuf));
// malloc enough space
stuff=(char *)malloc(infobuf.cbFile*sizeof(char));
// read all the input file into the buffer (stuff)
DosRead(infile,stuff,infobuf.cbFile,&l);
// write the buffer to the screen
VioWrtTTY(stuff,infobuf.cbFile,0);
// close the file
DosClose(infile);
// free the buffer
free(stuff);
}
.\\ike Stella
--- ShadowMail/2 1.00
* Origin: Shadowland/2 - 203.456.1103 (V34) & 203.456.4244 (V32) (1:327/138)SEEN-BY: 105/42 620/243 624/50 711/401 409 410 413 430 807 808 809 934 955 SEEN-BY: 712/407 515 628 704 713/888 800/1 7877/2809 @PATH: 327/138 469 451 324/288 3615/50 396/1 270/101 105/103 42 712/515 @PATH: 711/808 809 934 |
|
| 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™.