home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
UDEL.ZIP
/
SFPRT.H
< prev
next >
Wrap
Text File
|
1988-08-30
|
8KB
|
134 lines
/****************************************************************************
* sfdprt.h - standart prt routines. *
* T. Sandberg *
* 06/04/88 *
* *
****************************************************************************/
#define CPI_10 1
#define CPI_12 2
#define CPI_17 3
#define LPI_6 4
#define LPI_8 5
#define BOLDON 6
#define BOLDOFF 7
#define UNDERLINEON 8
#define UNDERLINEOFF 9
#define DBWON 10
#define DBWOFF 11
#define DRAFT 12
#define DATA 13
#define NLQ 14
#define RESETPRINTER 15
#define NEWPAGE 16
typedef struct _SFPRTVALUES
{
int cpi; /* printer default char per inch */
int lpi; /* printer defautl line per inch */
int lpp; /* line per page */
int ff; /* 0 = no form feed cr used; 1 use ff */
char cpi10[11]; /* control string to put printer 10 cpi */
char cpi12[11]; /* control string to put printer 12 cpi */
char cpi17[11]; /* control string to put printer 17 cpi */
char lpi6[11]; /* control string to put printer 6 lpi */
char lpi8[11]; /* control string to put printer 8 lpi */
char bold_on[11]; /* bold on */
char bold_off[11]; /* bold off */
char ul_on[11]; /* under line on */
char ul_off[11]; /* under line off */
char dbw_on[11]; /* double wide on */
char dbw_off[11]; /* dobule wide off */
char draft_mode[11];
char data_mode[11];
char nlq_mode[11];
char lppset[12]; /* string to set page length */
char reset[11]; /* contorl string to reset printer */
int curentline; /* current line printed */
}
SFPRTVALUES;
typedef struct _SFAPPVALUES
{
int cpi; /* printer default char per inch */
int lpi; /* printer defautl line per inch */
int lpp; /* line per page */
int ff; /* 0 = no form feed cr used; 1 use ff */
char lppset[12]; /* string to set page length */
}
SFAPPVALUES;
void sfdos_prt_value(char *env,char *appctl,SFPRTVALUES *pv);
/****************************************************************************
* sfprt_value Set printer with application default if found or uses *
* general print defaults. *
* *
* parms are *
* p_env = print enviroment variable, will use this to get *
* enviroment value. *
* a_env = application enviroment variable. *
* appctl = application control file name will use env variable *
* to find directory (use file name only unless env is *
* null. *
* pv = printer values used will return the values found and *
* set. *
* *
* NOTE: This function does everting sfprt_values plus initilize the *
* print file. *
****************************************************************************/
void sfprt_init(FILE *prtfile,char *p_env,char *a_env,
char *appctl,SFPRTVALUES *pv);
/****************************************************************************
* sfprt_init Set printer with application default if found or uses *
* general print defaults. *
* *
* parms are *
* prtfile = file to be initilized (must be open) *
* p_env = print enviroment variable, will use this to get *
* enviroment value. *
* a_env = application enviroment variable. *
* appctl = application control file name will use env variable *
* to find directory (use file name only unless env is *
* null. *
* pv = printer values used will return the values found and *
* set. *
* *
* NOTE: This function does everting sfprt_values plus initilize the *
* print file. *
****************************************************************************/
void sfprt_function(FILE *prtfile,SFPRTVALUES *pv,int function);
/*****************************************************************************
* sfprt_function = send special function to printer file. *
* *
* parms are *
* prtfile = print file to send special function to. (must be open)*
* pv = print contorl values. *
* must of called "sfprt_init" or "sfprt_value" first *
* control = fuction to be performed accepted values are *
* 10CPI change printer to 10 char per inch *
* 12CPI change printer to 12 char per inch *
* 17CPI change printer to 17 char per inch *
* 6LPI change printer to 6 lines per inch *
* 8LPI change printer to 8 lines per inch *
* BOLDON set printer to print bold characters *
* BOLDOFF set printer bold off *
* UNDERLINEON under line on *
* UNDERLINEOFF under line off *
* DBWON double wide on *
* DBWOFF double wide off *
* DRAFT set printer to draft mode *
* DATA set printer to data processing mode *
* NLQ set printer to NLQ mode *
* *
*****************************************************************************/