Ignore:
Timestamp:
Apr 9, 2011, 2:05:49 PM (10 years ago)
Author:
tbretz
Message:
Added Stop member function to interrupt readline.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Readline.cc

    r10308 r10331  
    10411041{
    10421042    char *buf = readline(prompt.c_str());
     1043
    10431044    Shutdown(buf ? buf : "");
    10441045
    1045     const string str = buf ? TrimSpaces(buf) : ".q";
     1046    const string str = !buf || (rl_done && rl_pending_input) ? ".q" : TrimSpaces(buf);
    10461047
    10471048    free(buf);
     
    10951096    }
    10961097}
     1098
     1099void Readline::Stop()
     1100{
     1101    rl_done          = 1;
     1102    rl_pending_input = 1;
     1103}
Note: See TracChangeset for help on using the changeset viewer.