summaryrefslogtreecommitdiff
path: root/graphics/asymptote/interact.cc
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/interact.cc')
-rw-r--r--graphics/asymptote/interact.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/graphics/asymptote/interact.cc b/graphics/asymptote/interact.cc
index e7551fd72f..ad472942d5 100644
--- a/graphics/asymptote/interact.cc
+++ b/graphics/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