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

version» Context lines:

pike.git/lib/modules/Stdio.pmod/Readline.pike:117:    //!    void enable()    {    if(term->put("cr") && term->put("do"))    catch { outfd->tcsetattr((["OPOST":0])); };    else    catch { outfd->tcsetattr((["OPOST":1,"ONLCR":1,"OCRNL":0,"OLCUC":0,    "OFILL":1,"OFDEL":0,"ONLRET":0,"ONOCR":0]));};    }    -  protected void destroy() +  protected void _destruct()    {    disable();    }       //! Check and return the terminal width.    //!    //! @note    //! In Pike 7.4 and earlier this function returned @expr{void@}.    //!    //! @seealso
pike.git/lib/modules/Stdio.pmod/Readline.pike:440:    private object infd, term;    private int enabled = -1;    private function(:int) close_callback = 0;    private string prefix="";    private mapping(int:function|mapping(string:function)) bindings=([]);    private function grab_binding = 0;    private mapping oldattrs = 0;       int dumb=0;    -  protected void destroy() +  protected void _destruct()    {    catch{ infd->set_blocking(); };    if(dumb)    return;    catch{ infd->tcsetattr((["ECHO":1,"ICANON":1])); };    catch{ if(oldattrs) infd->tcsetattr((["ECHO":0,"ICANON":0,"VEOF":0,    "VEOL":0,"VLNEXT":0])&oldattrs); };    }       private string process_input(string s)
pike.git/lib/modules/Stdio.pmod/Readline.pike:1685:    historyobj = History(hist);   }      //! @fixme   //! Document this function   History get_history()   {    return historyobj;   }    - protected void destroy() + protected void _destruct()   {    if(input_controller)    destruct(input_controller);    if(output_controller)    destruct(output_controller);   }      //! Creates a Readline object, that takes input from @[infd] and has output   //! on @[outfd].   //!
pike.git/lib/modules/Stdio.pmod/Readline.pike:1711:   //!   //! @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,    object|void outfd, object|string|void outterm)   { -  atexit(destroy); +  atexit(_destruct);    output_controller = OutputController(outfd || infd, outterm || interm);    input_controller = InputController(infd, interm);    DefaultEditKeys(this);   }