home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
563.lha
/
QPrint_v1.0
/
QPrint.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-23
|
893b
|
39 lines
/*
This program sets the FASTMODE bit in Kick2.0 parallel.device
*/
void __stdargs fprintf(BPTR, const char *, ...);
void print(char *s)
{
fprintf(Output(), "%s", s);
}
void __saveds __stdargs main(void)
{
struct MsgPort *QPrintPort;
struct IOExtPar *QPrintReq;
if (QPrintPort = CreatePort("QPrintPort", 0))
{
if (QPrintReq = (struct IOExtPar *)CreateExtIO(QPrintPort, sizeof(struct IOExtPar)))
{
if (!OpenDevice(PARALLELNAME, 0, (struct IORequest *)QPrintReq, 0))
{
QPrintReq->io_ParFlags |= PARF_FASTMODE;
QPrintReq->IOPar.io_Command = PDCMD_SETPARAMS;
DoIO((struct IORequest *)QPrintReq);
CloseDevice((struct IORequest *)QPrintReq);
}
else print("Can't open "PARALLELNAME);
DeleteExtIO((struct IORequest *)QPrintReq);
}
else print("Can't create QPrintReq");
DeletePort(QPrintPort);
}
else print("Can't create QPrintPort");
}