a89b8aee0a
callisto: move luaopen_ prototypes outside of the header
...
Previously they would have been public to any program that wanted to
use them.
2024-03-12 09:44:00 +13:00
35773d12f7
man/csto(1): init man page
...
Heavily modeled after the lua(1) man page.
2024-03-12 08:18:59 +13:00
60c4b03493
makefile: add trailing slash to directories in install target
2024-03-12 08:18:21 +13:00
e63e7a77a2
tree: specify the lua/ directory for includes
2024-03-11 12:37:50 +13:00
bbf9b88c66
tree: clean up whitespace and includes
2024-03-11 12:28:50 +13:00
21feabdded
callisto: remove standard lualibs from loadedlibs[]
2024-03-11 12:13:44 +13:00
949811a6b2
cl: refactor fmesg to take file descriptors rather than FILE pointers
...
Might as well do it since we're on POSIX. Plus, I like the file
descriptor API much more than the ISO file handling API.
2024-03-08 09:04:11 +13:00
8f5818b925
makefile: fix build on posix shells
...
Remove use of the `dir/{file,file}' syntax.
2024-02-29 17:35:44 +13:00
7c7f7e588a
fs: fix build on musl libc
...
Remove leftover fts.h include from back when this file used
it. dirent.h is used as a replacement and, as part of the POSIX
standard, it should be used instead of the nonstandard fts.h.
2024-02-29 17:22:17 +13:00
3e4e590776
readme: add builds.sr.ht badge
2024-02-29 17:05:28 +13:00
1d6a713d5a
builds: initialise
...
Initialise builds.sr.ht CI to build for Alpine Linux, Arch Linux and
OpenBSD. Building for Arch will also test the Nix flake builds.
2024-02-29 16:56:48 +13:00
b617bf3087
readme: move to sourcehut
2024-02-29 16:48:42 +13:00
ef3da25fb5
configure: use gcc over cc
...
We don't know what the system cc supports in terms of command line
flags, it could be tcc for all we know. Aiming for gcc over cc allows
the build to succeed when cc is not gcc or clang, but the user can
always override it themselves with the -c configure switch.
2024-02-27 18:44:43 +13:00
90701bf0ef
readme: revise
2024-02-27 18:43:59 +13:00
e51e7fb95e
style.md: revise
2024-02-27 18:29:26 +13:00
d21cceb014
configure: separate callisto's cppflags from other libraries' cppflags
2024-02-27 18:05:21 +13:00
e86912a601
configure: add -w and -W flags for selecting libraries to support
...
-wreadline will build in support for libreadline, for example
2024-02-27 18:04:18 +13:00
b41bec792a
configure: strip compiler and linker flags of whitespace
...
Also include cppflags in the script's output
2024-02-27 18:02:33 +13:00
5313601c79
configure: add basic list utilities
...
inlist determines whether an item is in a list
removefrom returns a list with an element removed
trim strips whitespace from a string, using xargs
2024-02-27 17:59:19 +13:00
42f95378ec
configure: use neat comment style to denote different sections
2024-02-27 17:50:48 +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
280f516a21
csto: remove non-posix ifdefs
2024-02-19 10:12:20 +13:00
71b288efde
callisto.h: remove LUA_USE_POSIX definition
...
It does almost nothing being in this header and is specified in
config.mk anyway.
2024-02-19 10:04:18 +13:00
7bbf39c8c6
external/lua: revise makefile to be more generic
...
part of this is making Lua's makefile use Callisto's config.mk by default.
2024-02-18 19:35:06 +13:00
bbd25fe4a2
configure: include -lm and -DLUA_USE_POSIX in config.mk
2024-02-18 18:14:34 +13:00
331c6acbd2
configure: fix when called from other directory
2024-02-18 18:13:39 +13:00
a0607346e7
external/lua: fix warning in os.hostname
2024-02-18 18:02:54 +13:00
c3a9b5d6d5
makefile: refine
...
o remove libcallisto from LIBS
o use LIBS rather than liblua.a in csto target
o delete csto.o in clean target
o remove clean-all from phonies
o store the path to the Lua source code in LUADIR rather than using
the full path everywhere
o remove warning flags and preprocessor definitions from cjson's
compiler command line; it is just not needed.
2024-02-18 17:23:26 +13:00
d4ec5248fe
configure: include -std=c99 in config.mk
...
So other makefiles can use it, e.g. the one in external/lua
2024-02-18 17:19:15 +13:00
8568ca2fb3
configure: rename error() to throw()
2024-02-18 16:54:34 +13:00
1d15eec7f8
add contributing section to readme
2024-02-12 16:25:09 +13:00
0fbf28a15f
shell.nix: delete
...
Using the flake you can get the same result by running the command:
nix develop
2024-02-12 16:17:16 +13:00
f1d0153bf6
flake: update lockfile
2024-02-12 16:01:02 +13:00
cee6d32b50
flake: improve readability
2024-02-12 16:00:51 +13:00
9d828cce36
flake: fix build with configure script
2024-02-12 15:48:59 +13:00
ba8effbead
flake: fix style
2024-02-12 15:34:26 +13:00
72938f9c77
add result to gitignore
...
Nix names the output of the build 'result'.
2024-02-12 13:53:30 +13:00
33af0317a8
add style document
2024-02-12 13:53:04 +13:00
751fca09e1
switch to modular configure-based buildsystem
2024-01-25 21:12:12 +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
bee1a5f180
fix readme
2024-01-25 19:39:46 +13:00
436e6a5184
fix build on compilers without -Oz
2024-01-17 20:40:10 +13:00
adb4091293
workaround esoteric gcc behaviour on Linux
...
ld would fail to find Lua symbols in liblua.a, the solution is
to put all object files before static libraries on the command line.
2024-01-17 20:29:42 +13:00
a6809fe480
integrate lua-cjson's buildsystem and static library with callisto's
...
and make some more makefile improvements
2023-12-28 13:20:05 +13:00
55b40a17cd
add Lua 5.4.6 patches
2023-12-27 23:16:49 +00:00
787820e82f
revert Lua patches
2023-12-27 23:17:00 +00:00
7fd3b3282f
add config.ld excludes
2023-12-27 23:16:49 +00:00
f187530e0c
add external gitignores
2023-12-27 23:16:49 +00:00
9db822c84f
rename external/luasrc => external/lua
2023-12-27 23:16:49 +00:00
88863a2a3d
add tests
2023-12-27 19:46:54 +13:00