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.62 2008/12/08 19:33:13 grubba Exp $ + // $Id: Readline.pike,v 1.63 2009/02/10 01:53:31 mast 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:228:    if(word_break)    {    while(xpos+n>=columns)    {    int l = columns-xpos;    string line=s[..l-1];    int spos=search(reverse(line)," ");    if(spos==-1)    {    outfd->write(line); +  xpos+=l;    }else{    l=sizeof(line)-spos;    outfd->write(line[..l-2]); -  +  xpos+=l-1;    }    s=s[l..];    n-=l; -  xpos+=l; +     if(xpos<columns || !term->tgetflag("am"))    outfd->write((term->put("cr")||"")+(term->put("do")||"\n"));    xpos = 0;    }    }else{    while(xpos+n>=columns)    {    int l = columns-xpos;    outfd->write(s[..l-1]);    s=s[l..];