SLGetDefPrinterName(3)
SLGetDefPrinterName - gets the name of the default printer
As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.
NAME SLGetDefPrinterName - gets the name of the default printer SYNOPSIS #include <spool.h> int SLGetDefPrinterName(char **pnamep); DESCRIPTION SLGetDefPrinterName returns the name of the default printer registered with the default spooling system. The parameter pnamep is set by the function to point to the default name string. If there is no default printer registered with the spooling system, pnamep is set to NULL and the function returns an error indication. WARNING Since a single static internal buffer is used by libspool to store the default printer name, subsequent calls to SLGetDefPrinterName may change the contents of the location pointed to by pnamep. A printer name must be copied to a user buffer to preserve it. RETURN VALUE 0 is returned if execution was successful. -1 is returned and SLerrno is set if an execution error has occurred. It is considered an error if there is no default printer registered with the current default spooling system. EXECUTION ERROR CODES SLGetDefPrinterName will fail under the following circumstances. SL_ERR_FIND_SPOOLER An error occurred while attempting to determine the available printer spooling systems. SL_ERR_NO_SPOOLERS There are no printer spooling systems available. SL_ERR_NO_DEF_PRINTER There is no default printer registered with the printer spooling system. SEE ALSO SLGetPrinterList(3), SLPerror(3), libspool(3)