Edinburgh stuff.

This commit is contained in:
ubu32 2011-02-14 12:25:57 -08:00
parent 38fa886e18
commit eff5dd3166
2 changed files with 19 additions and 44 deletions

View File

@ -1510,3 +1510,22 @@ nl :-
swi_nl.
nl(Stream) :-
swi_nl(Stream).
tab(C) :-
swi_tab(C).
tab(Stream, C) :-
swi_tab(Stream, C).
append(File) :-
swi_append(File).
see(File) :-
swi_see(File).
seeing(File) :-
swi_seeing(File).
seen :-
swi_seen.
tell(File) :-
swi_tell(File).
telling(File) :-
swi_telling(File).
told :-
swi_told.

View File

@ -139,41 +139,6 @@ nofileerrors :- set_value(fileerrors,0).
exists(F) :- access_file(F,exist).
see(user) :- !, set_input(user_input).
see(F) :- var(F), !,
'$do_error'(instantiation_error,see(F)).
see(F) :- current_input(Stream),
'$user_file_name'(Stream,F).
see(F) :- current_stream(_,read,Stream), '$user_file_name'(Stream,F), !,
set_input(Stream).
see(Stream) :- '$stream'(Stream), current_stream(_,read,Stream), !,
set_input(Stream).
see(F) :- open(F,read,Stream), set_input(Stream).
seeing(File) :- current_input(Stream),
'$user_file_name'(Stream,NFile),
( '$user_file_name'(user_input,NFile) -> File = user ; NFile = File).
seen :- current_input(Stream), close(Stream), set_input(user).
tell(user) :- !, set_output(user_output).
tell(F) :- var(F), !,
'$do_error'(instantiation_error,tell(F)).
tell(F) :- current_output(Stream),
'$user_file_name'(Stream,F), !.
tell(F) :- current_stream(_,write,Stream), '$user_file_name'(Stream, F), !,
set_output(Stream).
tell(Stream) :- '$stream'(Stream), current_stream(_,write,Stream), !,
set_output(Stream).
tell(F) :- open(F,write,Stream), set_output(Stream).
telling(File) :- current_output(Stream),
'$user_file_name'(Stream,NFile),
( '$user_file_name'(user_output,NFile) -> File = user ; File = NFile ).
told :- current_output(Stream), close(Stream), set_output(user).
/* Term IO */
read(T) :-
@ -413,15 +378,6 @@ skip(Stream,N) :- N1 is N, '$skip'(Stream,N1).
'$tab'(N) :- put(32), N1 is N-1, '$tab'(N1).
tab(N) :- '$tab'(N), fail.
tab(_).
'$tab'(_,N) :- N<1, !.
'$tab'(Stream,N) :- put(Stream,32), N1 is N-1, '$tab'(Stream,N1).
tab(Stream,N) :- '$tab'(Stream,N), fail.
tab(_,_).
ttyget(N) :- get(user_input,N).
ttyget0(N) :- get0(user_input,N).