summaryrefslogtreecommitdiffstats
path: root/linenoise/linenoise.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-18 06:45:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-18 06:45:50 -0700
commit1c11d63f020a1a6f2e20064027246cb55800f89f (patch)
treeaf2f753d71cf6e47d6c4b599fd658ee23d6e7abc /linenoise/linenoise.h
parentd76d11198035408667b20e3c0972e059551cde69 (diff)
downloadtxr-1c11d63f020a1a6f2e20064027246cb55800f89f.tar.gz
txr-1c11d63f020a1a6f2e20064027246cb55800f89f.tar.bz2
txr-1c11d63f020a1a6f2e20064027246cb55800f89f.zip
linenoise: support suffix on temp file name.
This is so that when a command line is edited in an external editor, editors can choose appropriate syntax highlighting mode based on the suffix. * linenoise/linenoise.c (struct lino_state): New member, suffix. (edit_in_editor): If we have the mkstemps function, then use it to create a suffixed name. (lino_set_tempfile_suffix): New function. * linenoise/linenoise.h (lino_set_tempfile_suffix): Declared.
Diffstat (limited to 'linenoise/linenoise.h')
-rw-r--r--linenoise/linenoise.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/linenoise/linenoise.h b/linenoise/linenoise.h
index 688ed64c..6471993f 100644
--- a/linenoise/linenoise.h
+++ b/linenoise/linenoise.h
@@ -61,6 +61,7 @@ lino_t *lino_copy(lino_t *);
void lino_free(lino_t *);
char *linenoise(lino_t *, const char *prompt);
+void lino_set_tempfile_suffix(lino_t *, const char *);
lino_error_t lino_get_error(lino_t *);
lino_error_t lino_set_error(lino_t *, lino_error_t); /* returns old */
int lino_hist_add(lino_t *, const char *line);