gbranden pushed a commit to branch master in repository groff. commit 1679a4a46c1bda32196299c53ccac3b4401aaf68 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Mar 13 22:38:52 2025 -0500
[libgroff]: Rationalize header file inclusions. * src/libs/libgroff/string.cpp: Include assert.h and string.h. Annotate why. Also stop cramming casts of return values up against the adjacent expression. --- ChangeLog | 7 +++++++ src/libs/libgroff/symbol.cpp | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c8fabbf95..516628973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-03-10 G. Branden Robinson <g.branden.robin...@gmail.com> + + Further rationalize header file inclusions. + + * src/libs/libgroff/string.cpp: Include assert.h and string.h. + Annotate why. + 2025-03-15 G. Branden Robinson <g.branden.robin...@gmail.com> [troff]: Slightly refactor. diff --git a/src/libs/libgroff/symbol.cpp b/src/libs/libgroff/symbol.cpp index a550d8158..7bc8a8f4c 100644 --- a/src/libs/libgroff/symbol.cpp +++ b/src/libs/libgroff/symbol.cpp @@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #endif +#include <assert.h> +#include <string.h> // strcat(), strcmp(), strcpy(), strlen() + #include "lib.h" #include "errarg.h" @@ -140,7 +143,7 @@ symbol::symbol(const char *p, int how) block_size = len > BLOCK_SIZE ? len : BLOCK_SIZE; block = new char [block_size]; } - (void)strcpy(block, p); + (void) strcpy(block, p); s = *pp = block; block += len; block_size -= len; _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit