Commit graph

11 commits

Author SHA1 Message Date
89e584c5f5 util: bundle string.format replacement
Needed for functions like cl.mesg which need to print a formatted
message. Previously these functions had to call string.format, and
would have to throw an error if it was not available.
2024-03-24 18:39:40 +13:00
30a1097bb0 tree: reformat
Done automatically by clang-format
2024-03-12 12:21:39 +13:00
e63e7a77a2 tree: specify the lua/ directory for includes 2024-03-11 12:37:50 +13:00
8c5777fb98 tree: add standard copyright phrasing
Callisto - standalone scripting platform for Lua 5.4
Copyright (c) 2023-2024 Jeremy Baxter.
2024-02-19 10:16:45 +13:00
b5d61a25cb rename the statically linked strlcpy to strbcpy
stands for "string bounds copy". Some systems like macOS include their
very own version of strlcpy and testing for that would require some
bloat like gnu automake so I'm just gonna rename it to prevent any
future conflicts. I only test on Linux and OpenBSD anyway. ;)
2024-01-25 19:47:57 +13:00
cae9985747 change BSD ifndefs to __OpenBSD__ and remove unnecessary ifdefs
I'm not sure if any operating system other than OpenBSD
has strlcpy/strlcat. May need to use a configure script
for this later on.
2023-12-23 16:33:38 +13:00
03b3631fa9 use strerror_r over strerror when lfail is called 2023-12-23 16:22:15 +13:00
290289cbf5 Refactor and fix up a lot of code
Don't tell the boss I forgot a couple of free()s...
2023-11-26 17:13:41 +13:00
bcdb57b4dd Add credit to OpenBSD for strlcat and strlcpy 2023-07-01 09:53:08 +12:00
6aa4b6de39 Remove libbsd support 2023-06-27 12:33:51 +12:00
b124d99c36 Initial import 2023-06-25 16:47:09 +12:00