home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
257.img
/
PRO-C1.ZIP
/
HELP.ZIP
/
PRT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-28
|
8KB
|
233 lines
/*******( prt.h )***************************************************************
* *
* Written: Brent Faulkner - May 25, 1989 *
* Updated: Brent Faulkner - June 13, 1989 *
* *
********************************************************************************
* *
* Contents: general prt defines, externs, structure definitions, etc. *
* *
*******************************************************************************/
/* indices into prtcap table */
#define NUM_LINES 0
#define NUM_COLS 1
#define BS 2
#define HT 3
#define FORMFEED 4
#define CR 5
#define SP 6
#define LINEFEED 7
#define ITALIC_ON 8
#define ITALIC_OFF 9
#define BOLD_ON 10
#define BOLD_OFF 11
#define UNDER_ON 12
#define UNDER_OFF 13
#define LQ_ON 14
#define LQ_OFF 15
#define PS_ON 16
#define PS_OFF 17
#define SUBSCRIPT_ON 18
#define SUBSCRIPT_OFF 19
#define SUPERSCRIPT_ON 20
#define SUPERSCRIPT_OFF 21
#define DBL_WIDE_ON 22
#define DBL_WIDE_OFF 23
#define DBL_HIGH_ON 24
#define DBL_HIGH_OFF 25
#define CONDENSED_ON 26
#define CONDENSED_OFF 27
#define BOX_ON 28
#define BOX_OFF 29
#define SOLID_BLOCK 30
#define SHADE_BLOCK 31
#define BOT_BLOCK 32
#define TOP_BLOCK 33
#define BOX1_VERT 34
#define BOX1_HORIZ 35
#define BOX1_TOP_LFT 36
#define BOX1_TOP_RT 37
#define BOX1_BOT_LFT 38
#define BOX1_BOT_RT 39
#define BOX1_TOP_TEE 40
#define BOX1_BOT_TEE 41
#define BOX1_LFT_TEE 42
#define BOX1_RT_TEE 43
#define BOX1_CROSS 44
#define BOX2_VERT 45
#define BOX2_HORIZ 46
#define BOX2_TOP_LFT 47
#define BOX2_TOP_RT 48
#define BOX2_BOT_LFT 49
#define BOX2_BOT_RT 50
#define BOX2_TOP_TEE 51
#define BOX2_BOT_TEE 52
#define BOX2_LFT_TEE 53
#define BOX2_RT_TEE 54
#define BOX2_CROSS 55
#define BOX3_VERT 56
#define BOX3_HORIZ 57
#define BOX3_TOP_LFT 58
#define BOX3_TOP_RT 59
#define BOX3_BOT_LFT 60
#define BOX3_BOT_RT 61
#define BOX3_TOP_TEE 62
#define BOX3_BOT_TEE 63
#define BOX3_LFT_TEE 64
#define BOX3_RT_TEE 65
#define BOX3_CROSS 66
#define BOX4_VERT 67
#define BOX4_HORIZ 68
#define BOX4_TOP_LFT 69
#define BOX4_TOP_RT 70
#define BOX4_BOT_LFT 71
#define BOX4_BOT_RT 72
#define BOX4_TOP_TEE 73
#define BOX4_BOT_TEE 74
#define BOX4_LFT_TEE 75
#define BOX4_RT_TEE 76
#define BOX4_CROSS 77
#define LPI1 78
#define LPI2 79
#define LPI3 80
#define LPI4 81
#define LPI6 82
#define LPI8 83
#define LPI12 84
#define CPI5 85
#define CPI10 86
#define CPI12 87
#define CPI16 88
#define POSTSCRIPT 89
#define ATTR_REFRESH 90
#define LAST 91
/* box character macros */
#define BOX_SOLID_BLOCK (prtdef[SOLID_BLOCK] == NULL) ? '#' : *prtdef[SOLID_BLOCK]
#define BOX_SHADE_BLOCK (prtdef[SHADE_BLOCK] == NULL) ? '#' : *prtdef[SHADE_BLOCK]
#define BOX_BOT_BLOCK (prtdef[BOT_BLOCK] == NULL) ? '#' : *prtdef[BOT_BLOCK]
#define BOX_TOP_BLOCK (prtdef[TOP_BLOCK] == NULL) ? '#' : *prtdef[TOP_BLOCK]
#define BOX_VERT(set) (prtdef[BOX1_VERT + set * 11] == NULL) ? '|' : *prtdef[BOX1_VERT + set * 11]
#define BOX_HORIZ(set) (prtdef[BOX1_HORIZ + set * 11] == NULL) ? '-' : *prtdef[BOX1_HORIZ + set * 11]
#define BOX_TOP_LFT(set) (prtdef[BOX1_TOP_LFT + set * 11] == NULL) ? '+' : *prtdef[BOX1_TOP_LFT + set * 11]
#define BOX_TOP_RT(set) (prtdef[BOX1_TOP_RT + set * 11] == NULL) ? '+' : *prtdef[BOX1_TOP_RT + set * 11]
#define BOX_BOT_LFT(set) (prtdef[BOX1_BOT_LFT + set * 11] == NULL) ? '+' : *prtdef[BOX1_BOT_LFT + set * 11]
#define BOX_BOT_RT(set) (prtdef[BOX1_BOT_RT + set * 11] == NULL) ? '+' : *prtdef[BOX1_BOT_RT + set * 11]
#define BOX_TOP_TEE(set) (prtdef[BOX1_TOP_TEE + set * 11] == NULL) ? '+' : *prtdef[BOX1_TOP_TEE + set * 11]
#define BOX_BOT_TEE(set) (prtdef[BOX1_BOT_TEE + set * 11] == NULL) ? '+' : *prtdef[BOX1_BOT_TEE + set * 11]
#define BOX_LFT_TEE(set) (prtdef[BOX1_LFT_TEE + set * 11] == NULL) ? '+' : *prtdef[BOX1_LFT_TEE + set * 11]
#define BOX_RT_TEE(set) (prtdef[BOX1_RT_TEE + set * 11] == NULL) ? '+' : *prtdef[BOX1_RT_TEE + set * 11]
#define BOX_CROSS(set) (prtdef[BOX1_CROSS + set * 11] == NULL) ? '+' : *prtdef[BOX1_CROSS + set * 11]
/* define attributes */
#define P_NORMAL 0x0000
#define P_ITALIC 0x0001
#define P_BOLD 0x0002
#define P_UNDER 0x0004
#define P_LQ 0x0008
#define P_PS 0x0010
#define P_SUBSCRIPT 0x0020
#define P_SUPERSCRIPT 0x0040
#define P_DBL_WIDE 0x0080
#define P_DBL_HIGH 0x0100
#define P_CONDENSED 0x0200
#define P_CPI5 0x0400
#define P_CPI10 0x0800
#define P_CPI12 0x1000
#define P_CPI16 0x2000
#define P_BOX 0x4000
#define P_DUMMY 0x8000
#define MAX_PRINTERS 64
#define PRINT_FILE "File"
#define PRINTER Printer
struct devtab
{
int com[4];
int lpt[3];
};
/* external variables */
extern char *prtdef[];
extern int sizdef[];
extern char *pnames[];
extern int nprts;
extern FILE *prtfp;
extern FILE *devfp;
extern unsigned char **pagebuff;
extern unsigned int **attrbuff;
extern int boxset_p;
extern char *vprtbuff;
/* external function prototypes/declarations */
/* chars */
#ifdef ANSI
char **get_devs(int, struct devtab *);
#else
char **get_devs();
#endif
/* voids */
#ifdef ANSI
extern void free_devs(int, char **);
extern void box_p(int, int, int, int, int);
extern void fill_p(int, int, int, int, int, int);
extern void clear_p(void);
extern void emit_seq(int);
extern void end_p(int);
extern void flushprt(void);
extern void get_print(char *);
extern void init_p(int, int);
extern void poke_p(int, int, int, int);
extern void ps_init(void);
extern void rephoriz_p(int, int, int, int, int);
extern void repvert_p(int, int, int, int, int);
extern void underln_p(int, int, int, int);
extern void upperln_p(int, int, int, int);
extern void printing_msg(int, char *);
extern void display_report(char *, int);
#else
extern void free_devs();
extern void box_p();
extern void fill_p();
extern void clear_p();
extern void emit_seq();
extern void end_p();
extern void flushprt();
extern void get_print();
extern void init_p();
extern void poke_p();
extern void ps_init();
extern void rephoriz_p();
extern void repvert_p();
extern void underln_p();
extern void upperln_p();
extern void printing_msg();
extern void display_report();
#endif
/* ints */
#ifdef ANSI
extern int get_printers(void);
extern int devavail(struct devtab *);
extern int open_p(char *, char *);
extern int bdisp_p(int, int, int, int, char *, ...);
extern int center_p(int, int, int, int, char *, ...);
extern int disp_p(int, int, int, char *, ...);
extern int fdisp_p(int, int, int, int, char *);
extern int ndisp_p(int, int, int, int, char *);
extern int xdisp_p(int, int, int, char *);
#else
extern int get_printers();
extern int devavail();
extern int open_p();
extern int bdisp_p();
extern int center_p();
extern int disp_p();
extern int fdisp_p();
extern int ndisp_p();
extern int xdisp_p();
#endif