X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=pd_readline.c;h=8649fc1c036553e33069d19e13ecfce3a86bca96;hb=851ac869ee55686234ae246ab9b5d938aec0f225;hp=756e5ddd5c6f022c13f466a8ec6c946633f22b81;hpb=3345932d0ab453d9ca85814fde1fe618bb36570f;p=pd_readline diff --git a/pd_readline.c b/pd_readline.c index 756e5dd..8649fc1 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. */ + buf histbuf = readhistory("test.txt"); + while(1) { - keyhandler(); - + keyhandler(mybuf); + } return 0;