From 13efe91101a11f41caf6321a8b2fbdd96ef9927a Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Tue, 27 Jul 2021 16:41:12 +0000 Subject: remove clausenr from terms, and put it into goals instead. Next up is implementing the control constructs in C, since they misbehave right now due to the new changes --- streams.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'streams.c') diff --git a/streams.c b/streams.c index 29e8746..54d5b2d 100644 --- a/streams.c +++ b/streams.c @@ -365,7 +365,7 @@ Term *streamproperties(Stream *s) /* file_name(F) */ if(s->filename){ arg = mkatom(s->filename); - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"file_name", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -377,13 +377,13 @@ Term *streamproperties(Stream *s) case WriteStream: arg = mkatom(L"write"); break; case AppendStream: arg = mkatom(L"append"); break; } - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"mode", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); /* input or output */ - data = copyterm(stream, nil); + data = copyterm(stream); if(s->mode == ReadStream) data->next = mkatom(L"input"); else @@ -395,7 +395,7 @@ Term *streamproperties(Stream *s) int i; for(i = 0; i < s->nalias; i++){ arg = mkatom(s->aliases[i]); - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"alias", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -404,7 +404,7 @@ Term *streamproperties(Stream *s) /* position(P) */ if(s->reposition){ arg = mkinteger(Boffset(s->bio)); - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"position", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -419,7 +419,7 @@ Term *streamproperties(Stream *s) Bungetrune(s->bio); arg = mkatom(L"not"); } - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"end_of_stream", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -431,7 +431,7 @@ Term *streamproperties(Stream *s) case EofActionEof: arg = mkatom(L"eof_code"); break; case EofActionReset: arg = mkatom(L"reset"); break; } - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"eof_action", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -441,7 +441,7 @@ Term *streamproperties(Stream *s) arg = mkatom(L"true"); else arg = mkatom(L"false"); - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"reposition", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); @@ -451,7 +451,7 @@ Term *streamproperties(Stream *s) arg = mkatom(L"text"); else arg = mkatom(L"binary"); - data = copyterm(stream, nil); + data = copyterm(stream); data->next = mkcompound(L"type", 1, arg); prop = mkcompound(L"prop", 2, data); props = appendterm(props, prop); -- cgit v1.2.3