summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-01-16 17:11:18 +0000
committerColin Watson <cjwatson@debian.org>2022-01-16 17:11:18 +0000
commit83df40649a556a9113b1633ef50ded73463a558d (patch)
treeff912dee9ea6d4f1db83c54c7a5698f403f092eb /lib
parent8161dece9d0c202668251ca8ad6d89c3bbca566f (diff)
Move appendstr out of manconfig.h
* include/manconfig.h (appendstr): Move to ... * lib/appendstr.h: ... here (new file). * lib/Makefile.am (libman_la_SOURCES): Add appendstr.h. * lib/README: Update file names. * lib/appendstr.c, libdb/db_delete.c, src/catman.c, src/check_mandirs.c, src/compression.c, src/filenames.c, src/globbing.c, src/man.c, src/manconv_client.c, src/manconv_main.c, src/manp.c, src/straycats.c, src/whatis.c, src/zsoelim.l: Include appendstr.h.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am1
-rw-r--r--lib/README2
-rw-r--r--lib/appendstr.c2
-rw-r--r--lib/appendstr.h24
4 files changed, 28 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index abed20df..72ce5ad2 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -34,6 +34,7 @@ libman_la_CPPFLAGS = \
libman_la_SOURCES = \
appendstr.c \
+ appendstr.h \
cleanup.c \
cleanup.h \
debug.c \
diff --git a/lib/README b/lib/README
index cc165bfa..1475b691 100644
--- a/lib/README
+++ b/lib/README
@@ -5,7 +5,7 @@ the terms of the GNU General Public License version 2 or later.
See the files ../docs/COPYING and ../docs/COPYING.LIB for relevant
information.
-appendstr.c author - Markus Armbruster
+appendstr.* author - Markus Armbruster
cleanup.* author - Markus Armbruster, Colin Watson
debug.* author - Colin Watson
encodings.* author - Colin Watson
diff --git a/lib/appendstr.c b/lib/appendstr.c
index ee545f4b..011522d7 100644
--- a/lib/appendstr.c
+++ b/lib/appendstr.c
@@ -25,6 +25,8 @@
#include "manconfig.h"
+#include "appendstr.h"
+
/* append strings to first argument, which is realloced to the correct size
first arg may be NULL */
char *appendstr (char *str, ...)
diff --git a/lib/appendstr.h b/lib/appendstr.h
new file mode 100644
index 00000000..30b18b81
--- /dev/null
+++ b/lib/appendstr.h
@@ -0,0 +1,24 @@
+/* appendstr.h -- interface to appending to a dynamically allocated string
+ *
+ * Copyright (C) 1994 Markus Armbruster
+ * Copyright (C) 2022 Colin Watson
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Library Public License
+ * as published by the Free Software Foundation; either version 2, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; see the file COPYING.LIB. If not, write
+ * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
+ * 02139, USA.
+ */
+
+#include "attribute.h"
+
+NODISCARD extern char *appendstr (char *, ...) ATTRIBUTE_SENTINEL ();