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.58 2004/11/02 20:43:46 mast Exp $ + // $Id: Readline.pike,v 1.59 2006/11/04 19:06:50 nilsson Exp $   #pike __REAL_VERSION__      //!   //! @fixme   //! Ought to have support for charset conversion.   class OutputController   {    static private .File outfd;    static private .Terminfo.Termcap term;    static private int xpos = 0, columns = 0;
pike.git/lib/modules/Stdio.pmod/Readline.pike:1198:    }       //!    void finishline(string text)    {    foreach(indices(historykeep), int n)    historylist[n-minhistory]=historykeep[n];    historykeep = ([]);    historylist[-1] = text;    if(sizeof(historylist)>1 && historylist[-2]==historylist[-1]) -  historylist = historylist[..sizeof(historylist)-2]; +  historylist = historylist[..<1];    }       //!    void set_max_history(int maxhist)    {    maxhistory = maxhist;    }       //!    void create(int maxhist, void|array(string) hist)
pike.git/lib/modules/Stdio.pmod/Readline.pike:1543:   //! Document this function   void write(string msg,void|int word_wrap)   {    int p = cursorpos;    setcursorpos(0);    if(!input_controller->dumb) {    output_controller->bol();    output_controller->clear(1);    }    array(string) tmp=msg/"\n"; -  foreach(tmp[..sizeof(tmp)-2],string l) +  foreach(tmp[..<1],string l)    {    output_controller->write(l,word_wrap);    output_controller->newline();    }    output_controller->write(tmp[-1],word_wrap);       cursorpos=sizeof(text);    redisplay(0, 1);    setcursorpos(p);   }