AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

GETPENT (3) (AT&T UNIX PC only ) GETPENT (3) NAME getpent, endpent - get and clean up printer status file entries SYNOPSIS #include < lp.h > int getpent(p) struct pstat *p; int endpent() DESCRIPTION Getpent returns a structure describing a printer that is installed in the lp spooler subsystem. EOF is returned when no more printers are available. Endpent is used to clean up after the last call to getpent. FILES struct pstat /* printer status entry * / { char p_dest[DESTMAX+ll; /* destination name of printer */ int p_pid; /* if busy, process id that is * / /* printing, otherwise 0 * / char p_rdest[DESTMAX+ll;/* if busy, the destination */ /* requested by user at time or * / /* request, otherwise "- " * / int p_seqno; /* if busy, sequence # or */ /* printing request * / time_t p_date; /* date last enabled/disabled * / char pJeason[P _RSIZEI; /* if enabled, then "enabled" * / /* otherwise the reason the * / /* printer has been disabled. * / short p_flags; /* See below for flag values. * / }; /* Value interpretation for p_flags: */ #define #define #define P_ENAB 1 P_AUTO 2 P _BUSY 4 /* printer enabled * / /* disable printer automatically * / /* printer now printing a request * / These subroutines are located in the libdev library (/usr/lib/libdev). - 1 -

GETPENT (3) (AT&T UNIX PC only ) GETPENT (3)<br />

NAME<br />

getpent, endpent - get and clean up printer status file entries<br />

SYNOPSIS<br />

#include < lp.h ><br />

int getpent(p)<br />

struct pstat *p;<br />

int endpent()<br />

DESCRIPTION<br />

Getpent returns a structure describing a printer that is installed in<br />

the lp spooler subsystem. EOF is returned when no more printers<br />

are available.<br />

Endpent is used to clean up after the last call to getpent.<br />

FILES<br />

struct pstat /* printer status entry * /<br />

{<br />

char p_dest[DESTMAX+ll; /* destination name of printer */<br />

int p_pid; /* if busy, process id that is * /<br />

/* printing, otherwise 0 * /<br />

char p_rdest[DESTMAX+ll;/* if busy, the destination */<br />

/* requested by user at time or * /<br />

/* request, otherwise "- " * /<br />

int p_seqno; /* if busy, sequence # or */<br />

/* printing request * /<br />

time_t p_date; /* date last enabled/disabled * /<br />

char pJeason[P _RSIZEI; /* if enabled, then "enabled" * /<br />

/* otherwise the reason the * /<br />

/* printer has been disabled. * /<br />

short p_flags; /* See below for flag values. * /<br />

};<br />

/* Value interpretation for p_flags: */<br />

#define<br />

#define<br />

#define<br />

P_ENAB 1<br />

P_AUTO 2<br />

P _BUSY 4<br />

/* printer enabled * /<br />

/* disable printer automatically * /<br />

/* printer now printing a request * /<br />

These subroutines are located in the libdev library<br />

(/usr/lib/libdev).<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!