]> pd.if.org Git - pd_readline/blobdiff - pd_readline.c
More work.
[pd_readline] / pd_readline.c
index 756e5ddd5c6f022c13f466a8ec6c946633f22b81..8649fc1c036553e33069d19e13ecfce3a86bca96 100644 (file)
 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;