[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/14: [libgroff]: Drop unused function parameter.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/14: [libgroff]: Drop unused function parameter. |
Date: |
Fri, 8 Dec 2023 18:15:29 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 6bdf6abde348672305c40b93f376ae15e0f4ccfe
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 2 15:40:37 2023 -0600
[libgroff]: Drop unused function parameter.
* src/include/lib.h: Drop `want_unlink` parameter from `xtmpfile`
declaration.
* src/libs/libgroff/tmpfile.cpp (xtmpfile): Drop same from definition,
along with useless (always true) conditional test.
---
ChangeLog | 9 +++++++++
src/include/lib.h | 3 +--
src/libs/libgroff/tmpfile.cpp | 6 ++----
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b434ea63d..5093883d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-12-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [libgroff]: Drop unused function parameter.
+
+ * src/include/lib.h: Drop `want_unlink` parameter from
+ `xtmpfile` declaration.
+ * src/libs/libgroff/tmpfile.cpp (xtmpfile): Drop same from
+ definition, along with useless (always true) conditional test.
+
2023-12-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/node.cpp (select_underline_font)
diff --git a/src/include/lib.h b/src/include/lib.h
index 7c83c45e5..0f4ed458e 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -87,8 +87,7 @@ int mksdir(char *tmpl);
#ifdef __cplusplus
FILE *xtmpfile(char **namep = 0 /* nullptr */,
const char *postfix_long = 0 /* nullptr */,
- const char *postfix_short = 0 /* nullptr */,
- bool want_unlink = true);
+ const char *postfix_short = 0 /* nullptr */);
char *xtmptemplate(const char *postfix_long,
const char *postfix_short);
#endif
diff --git a/src/libs/libgroff/tmpfile.cpp b/src/libs/libgroff/tmpfile.cpp
index 31bc55b8e..fb43cf00f 100644
--- a/src/libs/libgroff/tmpfile.cpp
+++ b/src/libs/libgroff/tmpfile.cpp
@@ -165,8 +165,7 @@ static void add_tmp_file(const char *name)
// Open a temporary file; any failure is fatal.
FILE *xtmpfile(char **namep,
- const char *postfix_long, const char *postfix_short,
- bool want_unlink)
+ const char *postfix_long, const char *postfix_short)
{
// `xtmptemplate()` allocates storage for `templ` with `new`.
char *templ = xtmptemplate(postfix_long, postfix_short);
@@ -179,8 +178,7 @@ FILE *xtmpfile(char **namep,
FILE *fp = fdopen(fd, FOPEN_RWB);
if (!fp)
fatal("cannot open temporary file: %1", strerror(errno));
- if (want_unlink)
- add_tmp_file(templ);
+ add_tmp_file(templ);
if (namep != 0 /* nullptr */)
*namep = templ;
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/14: [libgroff]: Drop unused function parameter.,
G. Branden Robinson <=