       int len, done = 0;
     
       line[0] = 0;
     
       using_history ();
       while (!done)
         {
           printf ("history$ ");
           fflush (stdout);
           t = fgets (line, sizeof (line) - 1, stdin);
           if (t &amp;&amp; *t)
             {
               len = strlen (t);
               if (t[len - 1] == '\n')
                 t[len - 1] = '\0';
             }
     
           if (!t)
             strcpy (line, "quit");
     
           if (line[0])
             {
     