bshell: add line-editor and file-based input support
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user