pike.git / lib / modules / Stdio.pmod / Readline.pike

version» Context lines:

pike.git/lib/modules/Stdio.pmod/Readline.pike:1: - // $Id: Readline.pike,v 1.61 2008/07/24 03:16:45 mbaehr Exp $ + // $Id: Readline.pike,v 1.62 2008/12/08 19:33:13 grubba Exp $   #pike __REAL_VERSION__      //!   //! @fixme   //! Ought to have support for charset conversion.   class OutputController   {    protected private .File outfd;    protected private .Terminfo.Termcap term;    protected private int xpos = 0, columns = 0;
pike.git/lib/modules/Stdio.pmod/Readline.pike:203:    protected int width(string s)    {    return sizeof(s);    }       protected int escapified_width(string s)    {    return width(escapify(s));    }    +  // FIXME: Ought to buffer output. +  // FIXME: Ought to support nonblocking output. +     //!    void low_write(string s, void|int word_break)    {    int n = width(s);    if(!n)    return;       if(needed_attributes)    low_enable_attributes();   
pike.git/lib/modules/Stdio.pmod/Readline.pike:510:    protected private int set_enabled(int e)    {    if (e != enabled)    {    enabled = e;    if (enabled)    {    string oldprefix = prefix;    prefix = "";    prefix = process_input(oldprefix); -  if ((!infd->set_read_callback || !infd->set_close_callback) && infd->set_nonblocking) +  if ((!infd->set_read_callback || !infd->set_close_callback) && +  infd->set_nonblocking)    infd->set_nonblocking( read_cb, 0, close_cb );    else { -  +  // Avoid messing with the write callback if possible.    infd->set_read_callback( read_cb );    infd->set_close_callback( close_cb );    }    } -  else +  else if ((!infd->set_read_callback || !infd->set_close_callback) && +  infd->set_blocking)    infd->set_blocking(); -  +  else { +  // Avoid messing with the write callback if possible. +  infd->set_read_callback(0); +  infd->set_close_callback(0); +  }    return !enabled;    }    else    return enabled;    }       //!    int isenabled()    {    return enabled;