diff options
author | antirez <antirez@gmail.com> | 2016-04-12 23:39:18 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-04-12 23:40:52 +0200 |
commit | d6e2cc71c6072b013cbca6dd6ee5cdd55620a70d (patch) | |
tree | 1b5f9a62a62d5a5b852d934e55483c4f2138e8c5 /deps/linenoise/linenoise.h | |
parent | 8a98b8d0c9e99df9cf83a08cb032657531598e18 (diff) | |
download | redis-d6e2cc71c6072b013cbca6dd6ee5cdd55620a70d.tar.gz |
Linenoise updated again (hints support).
Diffstat (limited to 'deps/linenoise/linenoise.h')
-rw-r--r-- | deps/linenoise/linenoise.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/deps/linenoise/linenoise.h b/deps/linenoise/linenoise.h index 36394eb99..3138c1f20 100644 --- a/deps/linenoise/linenoise.h +++ b/deps/linenoise/linenoise.h @@ -1,12 +1,14 @@ -/* linenoise.h -- guerrilla line editing library against the idea that a - * line editing lib needs to be 20,000 lines of C code. +/* linenoise.h -- VERSION 1.0 + * + * Guerrilla line editing library against the idea that a line editing lib + * needs to be 20,000 lines of C code. * * See linenoise.c for more information. * * ------------------------------------------------------------------------ * - * Copyright (c) 2010, Salvatore Sanfilippo <antirez at gmail dot com> - * Copyright (c) 2010, Pieter Noordhuis <pcnoordhuis at gmail dot com> + * Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com> + * Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com> * * All rights reserved. * @@ -47,10 +49,15 @@ typedef struct linenoiseCompletions { } linenoiseCompletions; typedef void(linenoiseCompletionCallback)(const char *, linenoiseCompletions *); +typedef char*(linenoiseHintsCallback)(const char *, int *color, int *bold); +typedef char*(linenoiseFreeHintsCallback)(char *); void linenoiseSetCompletionCallback(linenoiseCompletionCallback *); +void linenoiseSetHintsCallback(linenoiseHintsCallback *); +void linenoiseSetFreeHintsCallback(linenoiseFreeHintsCallback *); void linenoiseAddCompletion(linenoiseCompletions *, const char *); char *linenoise(const char *prompt); +void linenoiseFree(void *ptr); int linenoiseHistoryAdd(const char *line); int linenoiseHistorySetMaxLen(int len); int linenoiseHistorySave(const char *filename); |