diff options
-rw-r--r-- | pd_client.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pd_client.pl b/pd_client.pl index 8aaf93b..7b32e3a 100644 --- a/pd_client.pl +++ b/pd_client.pl @@ -13,10 +13,6 @@ launch(Module, StreamIn, StreamOut) :- atom_concat('rules/', Module, Path), consult(Path), do(StreamIn, StreamOut, Module, [], []). -% -1 = EOF -byte_to_atom(-1, e):-!. -byte_to_atom(A, B):-name(B, [A]). - do(_, _, _, _, [e|_]) :- !. do(StreamIn, StreamOut, Module, ModuleState, Hist) :- call(Module, Hist, ModuleDecision, ModuleState, NewModuleState), @@ -27,3 +23,7 @@ loop(StreamIn, StreamOut, Module, ModuleState, Hist) :- get_code(StreamIn, ChoiceCode), byte_to_atom(ChoiceCode, Choice), write(Choice), do(StreamIn, StreamOut, Module, ModuleState, [Choice|Hist]). + +% -1 = EOF +byte_to_atom(-1, e):-!. +byte_to_atom(Byte, Atom):-name(Atom, [Byte]). |