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

version» Context lines:

pike.git/lib/modules/Stdio.pmod/Readline.pike:412:    outfd->write(term->put("cd")||"");    }       //!    void beep()    {    outfd->write(term->put("bl")||"");    }       //! -  void create(.File|void _outfd, +  protected void create(.File|void _outfd,    .Terminfo.Termcap|string|void _term)    {    outfd = _outfd || Stdio.FILE( "stdout", "w" );    if( outfd->set_charset )    outfd->set_charset( 0 ); // autodetect       term = objectp(_term)? _term : .Terminfo.getTerm(_term);    catch { oldattrs = outfd->tcgetattr(); };    check_columns();    }
pike.git/lib/modules/Stdio.pmod/Readline.pike:773:    mapping(string:function) getbindings()    {    mapping(int:function) bb = bindings-Array.filter(bindings, mappingp);    return `|(mkmapping(Array.map(indices(bb), lambda(int n) {    return sprintf("%c", n);    }), values(bb)),    @Array.filter(values(bindings), mappingp));    }       //! -  void create(object|void _infd, object|string|void _term) +  protected void create(object|void _infd, object|string|void _term)    {    infd = _infd;    if( !_infd )    {    infd = Stdio.FILE( "stdin", "r" );    if( infd->set_charset )    infd->set_charset( 0 ); // autodetect    }    term = objectp(_term)? _term : .Terminfo.getTerm(_term);    disable();
pike.git/lib/modules/Stdio.pmod/Readline.pike:1148:    if(ic->dumb) {    ic->bind("^J", newline);    return;    }       foreach(default_bindings, array(string|function) b)    ic->bind(@b);    }       //! -  void create(object readline) +  protected void create(object readline)    {    _readline = readline;    set_default_bindings();    }      }      //!   class History   {
pike.git/lib/modules/Stdio.pmod/Readline.pike:1235:    //! Returns 1 if a string was removed, 0 if not.    int(0..1) pop(string|void text)    {    if (sizeof(historylist) < 2) return 0; //Not enough to pop    if (text && historylist[-2] != text) return 0; //Wrong string    historylist = historylist[..<2] + ({historylist[-1]});    return 1;    }       //! -  void create(int maxhist, void|array(string) hist) +  protected void create(int maxhist, void|array(string) hist)    {    historylist = hist || ({ "" });    minhistory = historynum = 0;    maxhistory = maxhist;    }   }         private OutputController output_controller;   private InputController input_controller;
pike.git/lib/modules/Stdio.pmod/Readline.pike:1719:   //!   //! @param interm   //! Defaults to @[Stdio.Terminfo.getTerm()].   //!   //! @param outfd   //! Defaults to @[infd], unless @[infd] is 0, in which case   //! @[outfd] defaults to @[Stdio.stdout].   //!   //! @param outterm   //! Defaults to @[interm]. - void create(object|void infd, object|string|void interm, + protected void create(object|void infd, object|string|void interm,    object|void outfd, object|string|void outterm)   {    atexit(_destruct);    output_controller = OutputController(outfd || infd, outterm || interm);    input_controller = InputController(infd, interm);    DefaultEditKeys(this);   }