summaryrefslogtreecommitdiff
path: root/src/user/lib/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/include')
-rw-r--r--src/user/lib/include/readline.h16
-rw-r--r--src/user/lib/include/stdio.h4
-rw-r--r--src/user/lib/include/tce/syscall.h4
3 files changed, 20 insertions, 4 deletions
diff --git a/src/user/lib/include/readline.h b/src/user/lib/include/readline.h
new file mode 100644
index 0000000..53193d7
--- /dev/null
+++ b/src/user/lib/include/readline.h
@@ -0,0 +1,16 @@
+#ifndef DEF_READLINE_H
+#define DEF_READLINE_H
+
+#include <stdio.h>
+
+char* freadln(FILE f); // minimal line-reading function. user must free the returned value.
+
+typedef struct _rdln_hist {
+ int max;
+ int n;
+ char **str;
+} readline_history;
+char* readline(FILE f, readline_history *h);
+
+#endif
+
diff --git a/src/user/lib/include/stdio.h b/src/user/lib/include/stdio.h
index 6c3a974..099746e 100644
--- a/src/user/lib/include/stdio.h
+++ b/src/user/lib/include/stdio.h
@@ -2,6 +2,7 @@
#define DEF_STDIO_H
#include <stdarg.h>
+#include <tce/syscall.h>
extern FILE term;
@@ -14,8 +15,7 @@ void fprint_int(FILE f, int number);
void fprint_hex(FILE f, unsigned number);
void fprintf(FILE f, char *s, ...);
-void vsfprintf(FILE f, char *s, va_list arg);
+void vfprintf(FILE f, char *s, va_list arg);
-char* freadln(FILE f);
#endif
diff --git a/src/user/lib/include/tce/syscall.h b/src/user/lib/include/tce/syscall.h
index 1811422..c182f40 100644
--- a/src/user/lib/include/tce/syscall.h
+++ b/src/user/lib/include/tce/syscall.h
@@ -19,8 +19,8 @@ int proc_priv();
void* sbrk(size_t size);
void brk(void* ptr);
-int run(char* file, char** args);
-int waitpid(int pid);
+int run(char* file, char** args, FILE zero_fd);
+int waitpid(int pid, int block);
FILE open(char* filename, int mode);
FILE open_relative(FILE root, char* filename, int mode);