summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/interact.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-07 00:27:20 +0000
committerKarl Berry <karl@freefriends.org>2016-02-07 00:27:20 +0000
commit0f5e19a268f4d86c2897f590563f21c8277c18d1 (patch)
tree7e65891f29ccde62ed60cbcc94e7fb7631429ac2 /Build/source/utils/asymptote/interact.cc
parent1b8f7f1bf982c75d77d85ac6855d48332cd41ca4 (diff)
asy 2.36 sources
git-svn-id: svn://tug.org/texlive/trunk@39610 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/interact.cc')
-rw-r--r--Build/source/utils/asymptote/interact.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/interact.cc b/Build/source/utils/asymptote/interact.cc
index cc172984ac8..70569d1505c 100644
--- a/Build/source/utils/asymptote/interact.cc
+++ b/Build/source/utils/asymptote/interact.cc
@@ -56,18 +56,20 @@ void init_completion() {
rl_completion_append_character='\0'; // Don't add a space after a match.
+ /*
// Build a string containing all characters that separate words to be
// completed. All characters that can't form part of an identifier are
// treated as break characters.
static char break_characters[128];
Int j=0;
- for (unsigned char c=9; c<128; ++c)
+ for (unsigned char c=9; c < 128; ++c)
if (!isalnum(c) && c != '_') {
break_characters[j]=c;
++j;
}
break_characters[j]='\0';
rl_completer_word_break_characters=break_characters;
+ */
}
#endif
@@ -88,9 +90,8 @@ char *readpipeline(const char *prompt)
{
#if _POSIX_VERSION >= 200809L
char *line=NULL;
- size_t n;
- getline(&line,&n,fin);
- return line;
+ size_t n=0;
+ return getline(&line,&n,fin) >= 0 ? line : NULL;
#else
const int max_size=256;
static char buf[max_size];
@@ -134,8 +135,10 @@ 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());
+ Signal(SIGINT,interruptHandler);
// Reset scroll count.
interact::lines=0;