home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * BPRINT.H Header file for TURBO C TOOLS Printer Functions
- *
- * Version 6.00 (C) Copyright Blaise Computing Inc. 1987,1989
- *
- **/
-
- #ifndef DEF_BPRINT /* prevent redefinition */
- #define DEF_BPRINT 1
-
- #include <bios.h>
-
-
- /* Interrupt numbers for communicating with print spooler and BIOS. */
-
- #define PR_BIOS_INT 0x17 /* BIOS printer control int for */
- /* PRSTATUS and PRINIT. */
-
- #define PR_DOS_INT 0x2F /* DOS printer control int. */
-
- #define PR_DOSFUNC_INT 0x21 /* DOS general service gate. */
-
-
- /* Error return codes. */
-
- #define PR_OK 0 /* No PR error. */
-
- #define PR_INSTAL 1 /* Printer not installed or DOS older */
- /* than 3.00 */
-
- #define PR_EXIST 2 /* File does not exist (in queue or file*/
- /* system, depending on context. */
-
- #define PR_PATH 3 /* Path does not exist. */
- #define PR_HANDLES 4 /* Out of handles. */
- #define PR_ACCESS 5 /* Access denied. */
- #define PR_EMPTY 6 /* Print spooler queue empty. */
- #define PR_RANGE 7 /* Item requested out of range of queue.*/
- #define PR_FULL 8 /* Queue full. */
- #define PR_BUSY 9 /* Spooler busy; can't get attention. */
- #define PR_NAMELEN 12 /* Path name too long. */
- #define PR_DRIVE 15 /* Invalid disk drive. */
-
-
- /* Status return codes. */
-
- #define PR_S_ACK 0x40 /* printer acknowledged. */
- #define PR_S_IOERR 0x08 /* i/o errors with printer. */
- #define PR_S_NOPAPER 0x20 /* out of paper. */
- #define PR_S_NOTBUSY 0x80 /* printer not busy. */
- #define PR_S_ONLINE 0x10 /* on line. */
- #define PR_S_TIMEOUT 0x01 /* timeout. */
-
-
- /* Defines which make PRSTATUS (i.e. BIOS) return codes into zero */
- /* for no error. */
-
- #define PR_BIOS_OK (PR_S_ONLINE | PR_S_NOTBUSY)
- #define PR_MAKEOK(retcode) (retcode ^ PR_BIOS_OK)
-
-
- /* Print a single character using BIOS. */
- #define prchar(port,bval) (biosprint (0, (bval), (port)))
-
- /* Initialize printer port using BIOS. */
- #define prinit(port) (biosprint (1, 0, (port)))
-
- /* Get status for a printer port. BIOS. */
- #define prstatus(port) (biosprint (2, 0, (port)))
-
-
- /* Definitions of functions for use with strong type checking */
-
- int cdecl prcancel (char *); /* Cancel file(s) from the */
- /* PRINT.COM spooler queue. */
- /* */
- const char *cdecl prerror (int); /* Return error string */
- /* corresponding to PR error*/
- /* code. */
- /* */
- int cdecl prgetq (int, int *, char *);/* Get name of file in */
- /* spooler queue, capacity */
- /* and fullness of queue. */
- /* */
- int cdecl prinstld (void); /* Check to see whether */
- /* PRINT.COM is installed. */
- /* Always fails on dos 2.x. */
- /* */
- int cdecl prspool (const char *); /* Put a file in the DOS */
- /* PRINT.COM spooler queue. */
-
- #endif /* prevent redefinition */