Deleted Added
full compact
lp.h (95293) lp.h (98152)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)lp.h 8.2 (Berkeley) 4/28/95
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)lp.h 8.2 (Berkeley) 4/28/95
34 * $FreeBSD: head/usr.sbin/lpr/common_source/lp.h 95293 2002-04-23 00:06:10Z gad $
34 * $FreeBSD: head/usr.sbin/lpr/common_source/lp.h 98152 2002-06-13 01:55:48Z gad $
35 */
36
37#include <sys/queue.h>
38#include <time.h>
39#include <netdb.h>
40
41/*
42 * All this information used to be in global static variables shared

--- 175 unchanged lines hidden (view full) ---

218#define LFM_QUEUE_DIS (S_IXGRP)
219#define LFM_RESET_QUE (S_IXOTH)
220
221#define STAT_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
222#define LOG_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
223#define TEMP_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
224
225/*
35 */
36
37#include <sys/queue.h>
38#include <time.h>
39#include <netdb.h>
40
41/*
42 * All this information used to be in global static variables shared

--- 175 unchanged lines hidden (view full) ---

218#define LFM_QUEUE_DIS (S_IXGRP)
219#define LFM_RESET_QUE (S_IXOTH)
220
221#define STAT_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
222#define LOG_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
223#define TEMP_FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
224
225/*
226 * Bit-flags for set_qstate() actions, followed by the return values.
227 */
228#define SQS_DISABLEQ 0x01 /* Disable the queuing of new jobs */
229#define SQS_STOPP 0x02 /* Stop the printing of jobs */
230#define SQS_ENABLEQ 0x10 /* Enable the queuing of new jobs */
231#define SQS_STARTP 0x20 /* Start the printing of jobs */
232
233#define SQS_PARMERR -9 /* Invalid parameters from caller */
234#define SQS_CREFAIL -3 /* File did not exist, and create failed */
235#define SQS_CHGFAIL -2 /* File exists, but unable to change state */
236#define SQS_STATFAIL -1 /* Unable to stat() the lock file */
237#define SQS_CHGOK 1 /* File existed, and the state was changed */
238#define SQS_CREOK 2 /* File did not exist, but was created OK */
239#define SQS_SKIPCREOK 3 /* File did not exist, and there was */
240 /* no need to create it */
241
242/*
226 * Command codes used in the protocol.
227 */
228#define CMD_CHECK_QUE '\1'
229#define CMD_TAKE_THIS '\2'
230#define CMD_SHOWQ_SHORT '\3'
231#define CMD_SHOWQ_LONG '\4'
232#define CMD_RMJOB '\5'
233

--- 33 unchanged lines hidden (view full) ---

267int nextprinter(struct printer *_pp, int *_error);
268const
269char *pcaperr(int _error);
270void prank(int _n);
271void process(const struct printer *_pp, char *_file);
272void rmjob(const char *_printer);
273void rmremote(const struct printer *_pp);
274void setprintcap(char *_newfile);
243 * Command codes used in the protocol.
244 */
245#define CMD_CHECK_QUE '\1'
246#define CMD_TAKE_THIS '\2'
247#define CMD_SHOWQ_SHORT '\3'
248#define CMD_SHOWQ_LONG '\4'
249#define CMD_RMJOB '\5'
250

--- 33 unchanged lines hidden (view full) ---

284int nextprinter(struct printer *_pp, int *_error);
285const
286char *pcaperr(int _error);
287void prank(int _n);
288void process(const struct printer *_pp, char *_file);
289void rmjob(const char *_printer);
290void rmremote(const struct printer *_pp);
291void setprintcap(char *_newfile);
292int set_qstate(int _action, const char *_lfname);
275void show(const char *_nfile, const char *_datafile, int _copies);
276int startdaemon(const struct printer *_pp);
277char *status_file_name(const struct printer *_pp, char *_buf,
278 size_t _len);
279void trstat_init(struct printer *_pp, const char *_fname, int _filenum);
280void trstat_write(struct printer *_pp, tr_sendrecv _sendrecv,
281 size_t _bytecnt, const char *_userid, const char *_otherhost,
282 const char *_orighost);
283ssize_t writel(int _strm, ...);
284__END_DECLS
293void show(const char *_nfile, const char *_datafile, int _copies);
294int startdaemon(const struct printer *_pp);
295char *status_file_name(const struct printer *_pp, char *_buf,
296 size_t _len);
297void trstat_init(struct printer *_pp, const char *_fname, int _filenum);
298void trstat_write(struct printer *_pp, tr_sendrecv _sendrecv,
299 size_t _bytecnt, const char *_userid, const char *_otherhost,
300 const char *_orighost);
301ssize_t writel(int _strm, ...);
302__END_DECLS