home *** CD-ROM | disk | FTP | other *** search
- /*
- 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");
- }
-