Branch: Tag:

1999-03-23

1999-03-23 18:30:06 by Marcus Comstedt <marcus@mc.pp.se>

EOF fix.

Rev: lib/modules/Stdio.pmod/Readline.pike:1.7

1: - // $Id: Readline.pike,v 1.6 1999/03/23 18:01:48 marcus Exp $ + // $Id: Readline.pike,v 1.7 1999/03/23 18:30:06 marcus Exp $      class OutputController   {
333:    return set_enabled(0);    }    -  void run_blocking() +  int run_blocking()    {    disable();    string data = prefix;
343:    {    prefix = process_input(data);    if (!enabled) -  return; +  return 0;    data = prefix+infd->read(1024, 1);    prefix = "";    if(!data || !sizeof(data)) {    disable(); -  return; +  return -1;    }    }    }
956:    newline_func = read_newline;    readtext = "";    output_controller->enable(); -  input_controller->run_blocking(); +  int res = input_controller->run_blocking();    set_nonblocking(oldnl); -  return readtext; +  return (res>=0 || sizeof(readtext)) && readtext;   }      void enable_history(object(History)|int hist)