bshell: re-organise build into three separate components

bshell: the front-end binary
bshell.runtime: contains the parser, compiler, and classes needed to run bshell scripts
bshell.core: contains the builtin commandlets and aliases
This commit is contained in:
2026-05-25 10:33:29 +01:00
parent 58c76a1f57
commit edfb3e24a3
165 changed files with 5173 additions and 4995 deletions
+39
View File
@@ -0,0 +1,39 @@
#include <bshell/line-source.h>
enum bshell_status bshell_line_source_get_name(
struct bshell_line_source *src,
char *buf,
size_t count,
size_t *nr_read)
{
if (src->s_get_name) {
return src->s_get_name(src, buf, count, nr_read);
}
return BSHELL_ERR_NOT_SUPPORTED;
}
enum bshell_status bshell_line_source_readline(
struct bshell_line_source *src,
fx_stringstream *out)
{
if (src->s_readline) {
return src->s_readline(src, out);
}
return BSHELL_ERR_NOT_SUPPORTED;
}
enum bshell_status bshell_line_source_get_row(
struct bshell_line_source *src,
size_t row,
char *buf,
size_t count,
size_t *nr_read)
{
if (src->s_get_row) {
return src->s_get_row(src, row, buf, count, nr_read);
}
return BSHELL_ERR_NOT_SUPPORTED;
}