aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rw-r--r--src/builtins.c3
-rw-r--r--src/main.c2
3 files changed, 13 insertions, 2 deletions
diff --git a/README.md b/README.md
index b483ac4..2799901 100644
--- a/README.md
+++ b/README.md
@@ -27,3 +27,13 @@ repository.
# Documentation
See the [Doxygen generated documentation](https://stemdoc.nullring.xyz) for the C API documentation and
[my blog post](https://ret2pop.nullring.xyz/blog/stem.html).
+
+# Task List
+- [ ] Write a library for stem to test the FLI
+- [ ] Write a line editor with said library
+- [ ] ed clone with stem configuration
+- [ ] Stem to C transpiler
+- [ ] Stem compiler for other lower level backends
+
+and of course, the ever-present:
+- [ ] fix all bugs
diff --git a/src/builtins.c b/src/builtins.c
index 4446cb8..caf18c2 100644
--- a/src/builtins.c
+++ b/src/builtins.c
@@ -40,6 +40,8 @@ char *get_line(FILE *f) {
if ((e = strrchr(ret, '\n')))
break;
}
+ /* stackoverflow code patch: clearerr */
+ clearerr(f);
if (e)
*e = '\0';
return ret;
@@ -558,7 +560,6 @@ void stemfread(value_t *v) {
void stemread(value_t *v) {
value_t *retval = init_value(VSTR);
char *a = get_line(stdin);
- clearerr(stdin);
retval->str_word = init_string(a);
array_append(STACK, retval);
free(a);
diff --git a/src/main.c b/src/main.c
index 3107c52..de0abe7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,7 +23,7 @@ void usage() {
/*! prints version and exits */
void version() {
printf("Author: Preston Pan, MIT License 2024\n");
- printf("stem, version 1.3 alpha\n");
+ printf("stem, version 1.4 alpha\n");
exit(0);
}