On Sat, Nov 29, 2008 at 09:07:57AM +0100, Alexander Burger wrote:
> the history seems not available, and perhaps other things, too.

At least the history is easy: Just add a line

   add_history(p);

################################################################
# 05dec08abu
# (c) Software Lab. Alexander Burger

(load "lib/gcc.l")

(gcc "readline" '("-lreadline") '_led)

#include <readline/readline.h>
#include <readline/history.h>

any _led(any ex __attribute__((unused))) {
   char *p = readline("");
   any x = mkStr(p);

   add_history(p);
   free(p);
   return x;
}

/**/

# Enable line editing
(de *Led (_led))

# vi:et:ts=3:sw=3
################################################################


What remains is the nasty feature that readline() does not obey the
line's starting column. It should start at column 2 (because PicoLisp
issues its own prompt ": "). As soon as a line is overwritten while it
is being edited, the prompt will be gone.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to