php-src/ext/readline
Wez Furlong bbd6dec20c Add support for the readline callback interface, allowing you to interleave
IO and user input.  Sample script:

<?php
dl("readline.so");

function handle_user_input($line)
{
   echo "You typed: '$line'\n";
   if ($line == 'exit')
      exit;
}

readline_callback_handler_install('type! > ', 'handle_user_input');

while (true) {
   $n = stream_select($r = array(STDIN), $w = null, $e = null, null);

   if ($n && in_array(STDIN, $r)) {
      readline_callback_read_char();
   }
}
2004-08-24 12:52:07 +00:00
..
config.m4 Add support for the readline callback interface, allowing you to interleave 2004-08-24 12:52:07 +00:00
CREDITS
php_readline.h - Happy new year and PHP 5 for rest of the files too.. 2004-01-08 17:33:29 +00:00
readline.c Add support for the readline callback interface, allowing you to interleave 2004-08-24 12:52:07 +00:00
README.libedit

This library can be built with libedit - non-GPL drop-in readline replacement.
Libedit can be obtained from http://sourceforge.net/projects/libedit/
It is taken from NetBSD (http://www.netbsd.org/) CVS repository and modified
to work as stand-alone library.