aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tag.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-27 13:40:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-27 13:40:57 +0000
commiteb130f1134eb37ef6e36ed68ec863a12c344a09c (patch)
treee79bdab7d295310685503e9086f1dde2d8b8db71 /tag.c
parentcab50ab0e63f516d72b81c36b5bfd1af3d5c0787 (diff)
downloadmandoc-eb130f1134eb37ef6e36ed68ec863a12c344a09c.tar.gz
mandoc-eb130f1134eb37ef6e36ed68ec863a12c344a09c.tar.zst
mandoc-eb130f1134eb37ef6e36ed68ec863a12c344a09c.zip
Move two more output state variables into the new struct outstate.
Also, move setting of tag_files.tagname into tag_init(). No functional change.
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tag.c b/tag.c
index d5e7f89c..c311cec2 100644
--- a/tag.c
+++ b/tag.c
@@ -1,4 +1,4 @@
-/* $Id: tag.c,v 1.24 2019/07/22 03:21:50 schwarze Exp $ */
+/* $Id: tag.c,v 1.25 2019/07/27 13:40:57 schwarze Exp $ */
/*
* Copyright (c) 2015, 2016, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -53,7 +53,7 @@ static struct tag_files tag_files;
* but for simplicity, create it anyway.
*/
struct tag_files *
-tag_init(void)
+tag_init(char *tagname)
{
struct sigaction sa;
int ofd;
@@ -61,6 +61,7 @@ tag_init(void)
ofd = -1;
tag_files.tfd = -1;
tag_files.tcpgid = -1;
+ tag_files.tagname = tagname;
/* Clean up when dying from a signal. */
@@ -129,6 +130,7 @@ fail:
*tag_files.tfn = '\0';
tag_files.ofd = -1;
tag_files.tfd = -1;
+ tag_files.tagname = NULL;
return NULL;
}