Commit graph

214 commits

Author SHA1 Message Date
82c47c778c process.pidof(3lua): add note regarding pgrep(1) usage 2024-04-06 19:59:48 +13:00
1a5a54d808 process: remove documentation comments 2024-04-06 19:59:09 +13:00
37d208a5d2 process(3lua): init man pages
Initialise man pages for the process module.
2024-04-06 19:58:41 +13:00
69f8fff3bd fs: remove documentation comments
Transitioning to man pages.
2024-04-06 11:47:15 +13:00
5cd636d6a7 fs(3lua): init man pages
Initialise man pages for the fs module.
2024-04-06 10:50:59 +13:00
2c6ad19111 csto(1): state the maintainer of csto 2024-04-03 09:45:27 +13:00
b7240e6d61 csto(1): use .Fn macros rather than boldface 2024-04-03 09:45:06 +13:00
33d4d32a56 csto(1): add missing information to introduction 2024-04-03 09:44:08 +13:00
03d321f4f1 csto(1): use semantic newlines
See the "Use semantic newlines" section of man-pages(7)
on a Linux system for reasoning behind this.
2024-04-02 20:20:22 +13:00
50b6fa6cec csto(1): rephrase introduction 2024-04-02 20:15:59 +13:00
fbcae8c3cb fs: remove use of strdup 2024-04-01 17:50:10 +13:00
820f21d306 csto(1): clarify
o  State that I maintain Callisto
 o  Enclose the ticket tracker email address in angle brackets
2024-04-01 16:34:19 +13:00
f850c67a6b csto(1): remove indented http links 2024-04-01 16:31:52 +13:00
220770e5d3 csto(1): move to man1/ 2024-04-01 16:31:06 +13:00
6034b6ee60 fs: use unlink(2) for removing files
remove(3) just calls unlink(2) when the path points to a file
2024-03-29 20:08:36 +13:00
6d47426ea6 fs: remove unnecessary comments 2024-03-28 09:46:21 +13:00
c8413899e3 tests: add test for passing an invalid signal
Bug fixed in commit 16c615056e914ed4342e6a307b40db80485acde2;
add a test to prevent it from happening again.

Fixes: https://todo.sr.ht/~jeremy/callisto/2
2024-03-26 16:40:29 +13:00
41829c3170 process: fix segmentation fault in strtosig
Refactor some of the magic behind strtosig;
store the signal count in a static variable,
avoiding the complexity of accessing the Lua registry.
2024-03-26 16:30:38 +13:00
be1d3a1352 tests: add test for printfmt 2024-03-26 16:28:49 +13:00
75096fdf99 tests: improve 2024-08-11 18:22:08 +12:00
0e4c48fda3 tests: use fs.mkpath 2024-03-26 14:54:14 +13:00
821b717583 configure: drop dynamically linked liblua comment
Callisto uses modified versions of the Lua standard libraries,
therefore using a dynamically linked liblua is impossible.
2024-03-25 09:46:25 +13:00
b7ea19b167 gitignore: remove unnecessary entries
Remove lua, luac, and *.so. The Lua executables aren't built anymore
so we don't need these in the gitignore any longer, and therefore we
won't need the external gitignore either.
2024-03-25 09:40:08 +13:00
0aa68af3d7 extra: init function "printfmt"
Roughly equivalent to:

    io.stdout:write(string.format(fstring, ...), '\n')

Only possible because of the newly bundled string.format replacement.
2024-03-24 20:22:06 +13:00
3fa54b0cfc cl: use lstrfmt over string.format 2024-03-24 18:41:37 +13:00
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
a87c36d61e fs: init function "issymlink" 2024-03-24 15:32:03 +13:00
1c408c914e fs: use fs.type backend for isdirectory and isfile 2024-03-24 15:31:27 +13:00
1c156e6f74 fs: init function "type"
Returns a string describing the given file's type.
2024-03-24 15:30:23 +13:00
5071aed152 fs: fix isfile documentation 2024-03-24 14:45:56 +13:00
2799d481d5 fs: remove unnecessary break 2024-04-12 09:10:18 +12:00
c620c39f0a fs: use lstat over stat 2024-03-24 14:21:49 +13:00
a27ebcd8c3 fs: fix dirname documentation 2024-03-24 14:10:04 +13:00
a1c2f49232 fs: fix security issues in mkdir and mkpath
777 is writable to anyone, 755 is only writable to the owner/group
2024-03-24 14:06:56 +13:00
dac9418d8e fs: split mkdir's recursive functionality into "mkpath" 2024-03-24 14:05:24 +13:00
78b55f2205 fs: fix memory leak in mkdir 2024-03-24 13:45:40 +13:00
5bd98fd137 fs: init function "entries" 2024-03-24 13:34:11 +13:00
3dfbb9a386 external/lua: cease building lua/luac executables 2024-08-11 18:17:46 +12:00
d8519cc39f fs: init function "status"
fs.status returns a table containing information concerning the status
of a file. Currently, the table includes the following information:

  string  path       -- the given path to the file; the first argument
  integer mode       -- bitmask of file modes; see chmod(2)
  integer uid        -- owner of the file in UID form
  integer gid        -- owner group of the file in GID form
  integer accessdate -- date the file was last accessed
  integer modifydate -- date the file was last modified
  integer chdate     -- date the file's status last changed

Dates are given in the form of an integer number representing the
number of seconds since Jan 1, 1970 (unixtime).

For more information consult the definition of sys/stat.h
according to POSIX:
  https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
2024-03-20 16:00:46 +13:00
cfca6cf880 fs: include mode constants in the library table 2024-03-20 15:57:54 +13:00
4fd5dcf29a tests: remove json tests
There's no point in testing it.
2024-03-20 13:59:28 +13:00
0053bec0b1 builds: make -Ccallisto -> make -C callisto 2024-08-09 11:26:06 +12:00
a294d76b1b builds/debian.yml: drop 2024-08-09 11:25:58 +12:00
cdae936548 external/lua: update to Lua 5.4.7
Update the version of Lua included with Callisto to Lua 5.4.7.
Re-generate patches to apply cleanly on top of Lua 5.4.7 sources.

Fixes: https://todo.sr.ht/~jeremy/callisto/8
2024-07-01 08:51:36 +12:00
045cb437ba configure: create config.mk before calling Lua's makefile
https://builds.sr.ht/~jeremy/job/1249641
2024-06-13 11:17:57 +12:00
1a0a492215 makefile: link Lua objects into libcallisto
Fixes: https://todo.sr.ht/~jeremy/callisto/13
2024-06-13 11:13:07 +12:00
b6cd36ec38 external/lua: don't build liblua.a 2024-06-13 10:51:20 +12:00
90af5483fa scripts/install-lua.sh: init script
Add a script that installs a Lua source archive into the Callisto
source tree. This will ease the pain of transitioning to Lua 5.4.7.

References: https://todo.sr.ht/~jeremy/callisto/8
2024-06-13 10:50:38 +12:00
00ea15b0b4 flake.lock: update to 24.05 2024-06-12 15:27:32 +12:00
e9c473e671 flake: add devshell 2024-06-12 15:23:23 +12:00