summaryrefslogtreecommitdiffstats
path: root/linenoise/linenoise.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-17 06:31:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-17 06:31:26 -0700
commita5ce85ec38c7cb6e4e11e599fb9ed37c871947c1 (patch)
tree785a66a6e1c0b317c494a4f8dee0367b8a78abb4 /linenoise/linenoise.c
parent4e9ce389c2ccb3677957c7903bb633ebb503f394 (diff)
downloadtxr-a5ce85ec38c7cb6e4e11e599fb9ed37c871947c1.tar.gz
txr-a5ce85ec38c7cb6e4e11e599fb9ed37c871947c1.tar.bz2
txr-a5ce85ec38c7cb6e4e11e599fb9ed37c871947c1.zip
Listener configuration variables.
* linenoise/linenoise.c (lino_get_multiline): New function. * linenoise/linenoise.h (lino_get_multiline): Declared. * parser.c (listener_hist_len, listener_multi_line_p_s): New symbol global variables. (repl): Set linenoise history length and multi-line mode from the *listener-hist-len* and *listener-multi-line-p* variables on each call. Set the *listener-multi-line* variable from the lino_t object's current state after each linenoise call. (parse_init): Initialize new global variables and register them as special variables. * txr.1: Update sentence which says that history is fixed at 100 lines. Document listener configuration variables.
Diffstat (limited to 'linenoise/linenoise.c')
-rw-r--r--linenoise/linenoise.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c
index a8ed8ba1..cc291d38 100644
--- a/linenoise/linenoise.c
+++ b/linenoise/linenoise.c
@@ -128,6 +128,10 @@ void lino_set_multiline(lino_t *ls, int ml) {
ls->mlmode = ml;
}
+int lino_get_multiline(lino_t *ls) {
+ return ls->mlmode;
+}
+
static void atexit_handler(void);
/* Raw mode: 1960 magic shit. */