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;