X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=pd_readline.c;h=044d6efb04e274667dba0eda24c6f1d6f61efe34;hb=d56fdb0ce92c92e27ef45a8315ff26c272a1f23d;hp=033dfc1b96b2f4f05a493ebc3871a9bee503bee0;hpb=f4117575c853c20d7312cbb8153d9a77340f8849;p=pd_readline diff --git a/pd_readline.c b/pd_readline.c index 033dfc1..044d6ef 100644 --- a/pd_readline.c +++ b/pd_readline.c @@ -23,21 +23,26 @@ /* Ctrl-C and Ctrl-V. */ -#include "pd_readline.h" +#include "pd_readline.h" 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;