[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 24/80: [libgroff]: Be more scrupulous with `#include`s.
From: |
G. Branden Robinson |
Subject: |
[groff] 24/80: [libgroff]: Be more scrupulous with `#include`s. |
Date: |
Sat, 30 Nov 2024 04:02:16 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 8bfcb6f7ace88050069f86cd61c1e1e4433bcb96
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 15:48:47 2024 -0600
[libgroff]: Be more scrupulous with `#include`s.
* src/include/ptable.h: Include "<stdlib.h>" header, since the macros
this file defines use `malloc()` and `free()`.
---
ChangeLog | 5 +++++
src/include/ptable.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 58a681650..bc7090c6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/include/ptable.h: Include "<stdlib.h>" header, since the
+ macros this file defines use `malloc()` and `free()`.
+
2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/utils/addftinfo/addftinfo.cpp: Align with modern groff
diff --git a/src/include/ptable.h b/src/include/ptable.h
index b5a5d42e7..9cd951c9a 100644
--- a/src/include/ptable.h
+++ b/src/include/ptable.h
@@ -21,7 +21,8 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#endif
#include <assert.h>
-#include <string.h>
+#include <stdlib.h> // free(), malloc()
+#include <string.h> // strcmp(), strcpy(), strlen()
// This groffism can be replaced with
// std::unordered_map<const char *, T> if/when we migrate to C++11.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 24/80: [libgroff]: Be more scrupulous with `#include`s.,
G. Branden Robinson <=