xref: /freebsd/usr.sbin/lpr/lpc/extern.h (revision 8a7b61203704d362cfbc66c00619f51b24106b55)
1*8a16b7a1SPedro F. Giffuni /*-
2*8a16b7a1SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*8a16b7a1SPedro F. Giffuni  *
4dea673e9SRodney W. Grimes  * Copyright (c) 1989, 1993
5dea673e9SRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
6dea673e9SRodney W. Grimes  *
7dea673e9SRodney W. Grimes  *
8dea673e9SRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
9dea673e9SRodney W. Grimes  * modification, are permitted provided that the following conditions
10dea673e9SRodney W. Grimes  * are met:
11dea673e9SRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
12dea673e9SRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
13dea673e9SRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
14dea673e9SRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
15dea673e9SRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
16fbbd9655SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
17dea673e9SRodney W. Grimes  *    may be used to endorse or promote products derived from this software
18dea673e9SRodney W. Grimes  *    without specific prior written permission.
19dea673e9SRodney W. Grimes  *
20dea673e9SRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21dea673e9SRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22dea673e9SRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23dea673e9SRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24dea673e9SRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25dea673e9SRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26dea673e9SRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27dea673e9SRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28dea673e9SRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29dea673e9SRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30dea673e9SRodney W. Grimes  * SUCH DAMAGE.
31dea673e9SRodney W. Grimes  */
32dea673e9SRodney W. Grimes 
33dea673e9SRodney W. Grimes 
3490cf373dSGarrett Wollman #include <sys/types.h>
35c44a6dceSGarance A Drosehn #include "lp.cdefs.h"		/* A cross-platform version of <sys/cdefs.h> */
36dea673e9SRodney W. Grimes 
37dd8faa9fSGarance A Drosehn /*
38dd8faa9fSGarance A Drosehn  * Options for setup_myprinter().
39dd8faa9fSGarance A Drosehn  */
40dd8faa9fSGarance A Drosehn #define SUMP_NOHEADER	0x0001		/* Do not print a header line */
41dd8faa9fSGarance A Drosehn #define SUMP_CHDIR_SD	0x0002		/* chdir into the spool directory */
42dea673e9SRodney W. Grimes 
43dea673e9SRodney W. Grimes __BEGIN_DECLS
44e8e715faSGarance A Drosehn void	 abort_q(struct printer *_pp);
45dd8faa9fSGarance A Drosehn void	 bottomq_cmd(int _argc, char *_argv[]);
46c9cb13a0SGarance A Drosehn void	 clean_gi(int _argc, char *_argv[]);
47004c9c5dSGarance A Drosehn void	 clean_q(struct printer *_pp);
48e8e715faSGarance A Drosehn void	 disable_q(struct printer *_pp);
495b1c34fbSGarance A Drosehn void	 down_gi(int _argc, char *_argv[]);
505b1c34fbSGarance A Drosehn void	 down_q(struct printer *_pp);
51e8e715faSGarance A Drosehn void	 enable_q(struct printer *_pp);
5254032d11SGarance A Drosehn void	 generic(void (*_specificrtn)(struct printer *_pp), int _cmdopts,
53004c9c5dSGarance A Drosehn 	    void (*_initcmd)(int _argc, char *_argv[]),
54004c9c5dSGarance A Drosehn 	    int _argc, char *_argv[]);
55ba7a1ad7SGarance A Drosehn void	 help(int _argc, char *_argv[]);
56ba7a1ad7SGarance A Drosehn void	 quit(int _argc, char *_argv[]);
57e8e715faSGarance A Drosehn void	 restart_q(struct printer *_pp);
5854032d11SGarance A Drosehn void	 setstatus_gi(int _argc, char *_argv[]);
5954032d11SGarance A Drosehn void	 setstatus_q(struct printer *_pp);
60e8e715faSGarance A Drosehn void	 start_q(struct printer *_pp);
61ba7a1ad7SGarance A Drosehn void	 status(struct printer *_pp);
62e8e715faSGarance A Drosehn void	 stop_q(struct printer *_pp);
63c9cb13a0SGarance A Drosehn void	 tclean_gi(int _argc, char *_argv[]);
64dd8faa9fSGarance A Drosehn void	 topq_cmd(int _argc, char *_argv[]);
65e8e715faSGarance A Drosehn void	 up_q(struct printer *_pp);
66dd8faa9fSGarance A Drosehn void	 topq(int _argc, char *_argv[]);	/* X-version */
67dd8faa9fSGarance A Drosehn 
68dd8faa9fSGarance A Drosehn /* from lpc.c: */
69dd8faa9fSGarance A Drosehn struct printer	*setup_myprinter(char *_pwanted, struct printer *_pp,
70dd8faa9fSGarance A Drosehn 		    int _sump_opts);
71dea673e9SRodney W. Grimes __END_DECLS
72dea673e9SRodney W. Grimes 
73dea673e9SRodney W. Grimes extern int NCMDS;
74dea673e9SRodney W. Grimes extern struct cmd cmdtab[];
7590cf373dSGarrett Wollman extern uid_t	uid, euid;
76