summaryrefslogtreecommitdiff
path: root/quadnames.c
diff options
context:
space:
mode:
Diffstat (limited to 'quadnames.c')
-rw-r--r--quadnames.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/quadnames.c b/quadnames.c
index fa1b247..be543ff 100644
--- a/quadnames.c
+++ b/quadnames.c
@@ -58,8 +58,8 @@ quadnamedatum(QuadnameDef q)
Datum *
getquad(void)
{
- Rune *input = prompt(L"⎕:\n\t");
- Datum *result = evalline(input, 1);
+ print("⎕:\n\t");
+ Datum *result = evalline(nil, nil, 1);
/* TODO check that the expression doesn't fail */
return result;
}
@@ -141,11 +141,14 @@ runfile(Array *a)
if(bio == nil)
return mkscalarint(0);
- char *charcode = Brdstr(bio, Beof, 1);
- Rune *code = runesmprint("%s", charcode);
- evalline(code, 1);
- free(charcode);
- free(code);
+ while(1){
+ Rune r = Bgetrune(bio);
+ Bungetrune(bio);
+ if(r == Beof)
+ break;
+ else
+ evalline(nil, bio, 1);
+ }
Bterm(bio);
return mkscalarint(1);
}