static char *logfilter;
static int timeout = 0;
static int connect_timeout = 0;
-#ifndef WIN32
+#ifdef HAVE_EDITLINE
static EditLine *el;
static History *myhistory;
static HistEvent ev;
static int process_command(esl_handle_t *handle, const char *cmd);
+#if defined(HAVE_EDITLINE) || defined(WIN32)
static void clear_cli(void) {
if (global_profile->batch_mode) return;
putchar('\r');
printf("\033[K");
fflush(stdout);
}
+#endif
static void screen_size(int *x, int *y)
{
}
+#if defined(HAVE_EDITLINE) || defined(WIN32)
/* If a fnkey is configured then process the command */
static unsigned char console_fnkey_pressed(int i)
{
}
return CC_REDISPLAY;
}
+#endif
#ifdef HAVE_EDITLINE
static char *prompt(EditLine *e) { return prompt_str; }
static void redisplay(void)
{
-#ifndef WIN32
+#ifdef HAVE_EDITLINE
const LineInfo *lf = el_line(el);
const char *c = lf->buffer;
if (global_profile->batch_mode) return;
profile->console_fnkeys[11] = "version";
}
+#if defined(HAVE_EDITLINE) || defined(WIN32)
static char* end_of_str(char *s) { return (*s == '\0' ? s : s + strlen(s) - 1); }
static char* _strndup(const char *s, int n)
esl_safe_free(dup);
return ret;
}
+#endif
#ifdef HAVE_EDITLINE
static unsigned char complete(EditLine *el, int ch)