diff options
author | Colin Watson <cjwatson@debian.org> | 2022-01-16 16:51:45 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-01-16 16:51:45 +0000 |
commit | 8f65ff6da2c80a881c81a2eba95ae1025ef501d3 (patch) | |
tree | 323bf648797475684b6bee70d2a8fd803c8c9a86 /lib | |
parent | 4e3a383c3a7a47533b047c8fde509d990058bbdd (diff) |
Move create_tempdir out of manconfig.h
* include/manconfig.h (create_tempdir): Move to ...
* lib/tempfile.h: ... here (new file).
* lib/Makefile.am (libman_la_SOURCES): Add tempfile.h.
* lib/tempfile.c, src/man.c: Include tempfile.h.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 1 | ||||
-rw-r--r-- | lib/tempfile.c | 2 | ||||
-rw-r--r-- | lib/tempfile.h | 24 |
3 files changed, 27 insertions, 0 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 2f134f04..9cf68905 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -53,6 +53,7 @@ libman_la_SOURCES = \ security.c \ security.h \ tempfile.c \ + tempfile.h \ util.c \ util.h \ wordfnmatch.c \ diff --git a/lib/tempfile.c b/lib/tempfile.c index f1dfb688..f4a291c1 100644 --- a/lib/tempfile.c +++ b/lib/tempfile.c @@ -33,6 +33,8 @@ #include "manconfig.h" +#include "tempfile.h" + static const char *path_search (void) { const char *dir = NULL; diff --git a/lib/tempfile.h b/lib/tempfile.h new file mode 100644 index 00000000..1a4a64ce --- /dev/null +++ b/lib/tempfile.h @@ -0,0 +1,24 @@ +/* tempfile.h: interface to temporary directory creation + * + * Copyright (C) 2001-2022 Colin Watson. + * + * This file is part of man-db. + * + * man-db is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * man-db is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with man-db; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "attribute.h" + +NODISCARD extern char *create_tempdir (const char *template); |