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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user