bshell: add line-editor and file-based input support

This commit is contained in:
2026-05-07 10:52:00 +01:00
parent 3c15bb1609
commit 8b0295faf2
27 changed files with 1636 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#ifndef FILE_H_
#define FILE_H_
#include "line-source.h"
#include <fx/collections/array.h>
#include <stdio.h>
struct file {
struct line_source f_base;
fx_array *f_lines;
char *f_path;
fx_stream *f_strp;
FILE *f_fp;
};
extern enum bshell_status file_open(const char *path, struct file **out);
extern void file_close(struct file *file);
#endif