User`s guide

4-34
Guide to Printers and Printing
get_was_idle() Returns TRUE if the printer was idle at job beginning (useful for
paper feed: feed/no feed).
Returns the charge for printing the current job.
log_charge(charge) int charge;
Returns the charge for printing the current job.
log_init Initializes certain data common to the library routines.
log_pages(pages) Updates the status file with the number of pages printed.
log_percent(percent) Updates the status file with the percent of job completed.
log_progress(log_pages (int),log_percent(char))
Updates the status file with the number of pages printed and
percent of job completed. This function uses log_pages and
log_percent.
log_status(status) Changes the status of the job from RUNNING to WAITING and
back again. The parameter is the new status.
put_header(fnaddr,width)
int (*fnaddr);
int *width; Prints a header page with no following form–feed and returns the
number of lines printed. The fnaddr and width parameters are optional.
The fnaddr parameter defines the format subroutine used to display
characters on the header page. The default is the putchar subroutine.
The width parameter defines the width of the form. The default value for
the width parameter is 80.
put_trailer(user,fnaddr,width)
char *user;
int (*fnaddr);
int *width Prints a trailer page for user with no following form–feed and returns
the number of lines printed. The fnaddr and width parameters are
optional. These parameters are identical to and take the same values
as the fnaddr and width parameters for the put_header subroutine.
sysnot(user,host,message,pref)
char *user;
char *host;
char *message;
unsigned int *pref;
Sends a message to the user if the backend cannot run a job. The val-
ue of the pref parameter indicates whether to mail the message to the
user or to write the message on the users terminal. The valid values
defined in /usr/include/IN/backend.h file are:
DOMAIL Mails the error message to the user.
DOWRITE Writes the message to the user’s terminal if the user is
logged on. If the user is not logged on, the message is
mailed to the user.