]> pd.if.org Git - pd_readline/blobdiff - pd_readline.c
More work.
[pd_readline] / pd_readline.c
index c92870a1e5e60ce6dde18a642e3cee88aa0dc159..8649fc1c036553e33069d19e13ecfce3a86bca96 100644 (file)
 int main(void) 
 { 
   
-  /* Create a buffer for the text.  */ 
+  /* Create a buffer for entered text.  */ 
   buf mybuf;  
-  
+  mybuf.index = 0;
+   
   
   /* Read in the command history file. */ 
-  readhistory("test.txt");  
-  
+  buf histbuf = readhistory("test.txt");  
+    
   
   while(1) 
   {  
        
-    keyhandler(mybuf);   
-        
+    keyhandler(mybuf);  
+         
   }         
                                       
   return 0;