xref: /illumos-gate/usr/src/cmd/mandoc/term_tag.h (revision 4d131170)
1*4d131170SRobert Mustacchi /* $Id: term_tag.h,v 1.4 2021/03/30 17:16:55 schwarze Exp $ */
2*4d131170SRobert Mustacchi /*
3*4d131170SRobert Mustacchi  * Copyright (c) 2015, 2018, 2019, 2020 Ingo Schwarze <schwarze@openbsd.org>
4*4d131170SRobert Mustacchi  *
5*4d131170SRobert Mustacchi  * Permission to use, copy, modify, and distribute this software for any
6*4d131170SRobert Mustacchi  * purpose with or without fee is hereby granted, provided that the above
7*4d131170SRobert Mustacchi  * copyright notice and this permission notice appear in all copies.
8*4d131170SRobert Mustacchi  *
9*4d131170SRobert Mustacchi  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*4d131170SRobert Mustacchi  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*4d131170SRobert Mustacchi  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*4d131170SRobert Mustacchi  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*4d131170SRobert Mustacchi  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*4d131170SRobert Mustacchi  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*4d131170SRobert Mustacchi  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*4d131170SRobert Mustacchi  *
17*4d131170SRobert Mustacchi  * Internal interfaces to write a ctags(1) file.
18*4d131170SRobert Mustacchi  * For use by the mandoc(1) ASCII and UTF-8 formatters only.
19*4d131170SRobert Mustacchi  */
20*4d131170SRobert Mustacchi 
21*4d131170SRobert Mustacchi struct	tag_files {
22*4d131170SRobert Mustacchi 	char	 ofn[80];	/* Output file name. */
23*4d131170SRobert Mustacchi 	char	 tfn[80];	/* Tag file name. */
24*4d131170SRobert Mustacchi 	FILE	*tfs;		/* Tag file object. */
25*4d131170SRobert Mustacchi 	int	 ofd;		/* Original output file descriptor. */
26*4d131170SRobert Mustacchi 	pid_t	 tcpgid;	/* Process group controlling the terminal. */
27*4d131170SRobert Mustacchi 	pid_t	 pager_pid;	/* Process ID of the pager. */
28*4d131170SRobert Mustacchi };
29*4d131170SRobert Mustacchi 
30*4d131170SRobert Mustacchi 
31*4d131170SRobert Mustacchi struct tag_files	*term_tag_init(const char *, const char *, const char *);
32*4d131170SRobert Mustacchi void			 term_tag_write(struct roff_node *, size_t);
33*4d131170SRobert Mustacchi int			 term_tag_close(void);
34*4d131170SRobert Mustacchi void			 term_tag_unlink(void);
35