From 7c63f85777e1a1effbe7b3e6a826ae21fff3033f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 8 Nov 2012 21:23:02 +0100 Subject: pd_client: Use descriptive paramter names for byte_to_atom And move byte_to_atom around. --- pd_client.pl | 8 ++++---- 1 file 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]). -- cgit