TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Stella
from: Jay Collins
date: 1995-03-24 20:16:02
subject: The draw

> 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);
 > }

BTW: If I had the ANSI file in an array, how would I display it? I was
readying The Draw's DOC's, but it has it's example in Turbo C. I'd like to
be able to write it to the Video memory, but I hear that Os/2 won't allow
that.

--- ---
* Origin: (1:275/158)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 275/158 271/270 3615/50 396/1 270/101 105/103 42 712/515 711/808 809
@PATH: 711/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™.