diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-02 16:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-02 16:31:31 +0000 |
commit | 6457cd3f6e21e23e21db6dafff021d17f5457567 (patch) | |
tree | 08f169333e47c5fc1c50e828cf3a0f50bdf9b508 /Build/source/utils/asymptote/interact.cc | |
parent | dc2504a4c02af0ec2fff00e6b833c6143a06b4cd (diff) |
asy 2.68 sources
git-svn-id: svn://tug.org/texlive/trunk@57291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/interact.cc')
-rw-r--r-- | Build/source/utils/asymptote/interact.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Build/source/utils/asymptote/interact.cc b/Build/source/utils/asymptote/interact.cc index e7551fd72f6..ad472942d5a 100644 --- a/Build/source/utils/asymptote/interact.cc +++ b/Build/source/utils/asymptote/interact.cc @@ -50,10 +50,10 @@ namespace interact { bool interactive=false; bool uptodate=true; -int lines=0; +int lines=0; bool query=false; -bool tty=isatty(STDIN_FILENO); +bool tty=isatty(STDIN_FILENO); completer *currentCompleter=0; void setCompleter(completer *c) { @@ -77,15 +77,15 @@ void init_completion() { static char break_characters[128]; Int j=0; for (unsigned char c=9; c < 128; ++c) - if (!isalnum(c) && c != '_') { - break_characters[j]=c; - ++j; - } + if (!isalnum(c) && c != '_') { + break_characters[j]=c; + ++j; + } break_characters[j]='\0'; rl_completer_word_break_characters=break_characters; */ } -#endif +#endif char *(*Readline)(const char *prompt); @@ -97,7 +97,7 @@ char *readverbatimline(const char *prompt) getline(cin,s); return StrdupMalloc(s); } - + FILE *fin=NULL; char *readpipeline(const char *prompt) @@ -117,7 +117,7 @@ char *readpipeline(const char *prompt) return StrdupMalloc(s.str()); #endif } - + void pre_readline() { int fd=intcast(settings::getSetting<Int>("inpipe")); @@ -152,11 +152,11 @@ void init_interactive() } #endif } - + string simpleline(string prompt) { // Rebind tab key, as the setting tabcompletion may be changed at runtime. pre_readline(); - + Signal(SIGINT,SIG_IGN); // Get a line from the user. char *line=Readline(prompt.c_str()); @@ -165,7 +165,7 @@ string simpleline(string prompt) { // Reset scroll count. interact::lines=0; interact::query=tty; - + // Ignore keyboard interrupts while taking input. errorstream::interrupt=false; @@ -187,7 +187,7 @@ void addToHistory(string line) { if(tty && line.find_first_not_of('\n') != string::npos) { add_history(line.c_str()); } -#endif +#endif } string getLastHistoryLine() { @@ -198,7 +198,7 @@ string getLastHistoryLine() { em.compiler(); em << "cannot access last history line"; return ""; - } else + } else return entry->line; } else #endif |