X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=pd_readline.c;h=044d6efb04e274667dba0eda24c6f1d6f61efe34;hb=d56fdb0ce92c92e27ef45a8315ff26c272a1f23d;hp=756e5ddd5c6f022c13f466a8ec6c946633f22b81;hpb=3345932d0ab453d9ca85814fde1fe618bb36570f;p=pd_readline diff --git a/pd_readline.c b/pd_readline.c index 756e5dd..044d6ef 100644 --- a/pd_readline.c +++ b/pd_readline.c @@ -29,15 +29,20 @@ int main(void) { - /* Read in the command history file. */ - readhistory("test.txt"); + /* Create a buffer for entered text. */ + buf mybuf; + mybuf.index = 0; + + /* Read in the command history file. */ + hist myhist = readhistory("test.txt"); + while(1) { - keyhandler(); - + keyhandler(mybuf, myhist); + } return 0;