X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=linenoise.h;h=ba1b041eae45484911e16aa7e53084ad72cf5fef;hb=27b9eb00def167339ae68fae6d49515fedcf9be1;hp=c9b9f6652cc49b40a4b1aa6aa966d522a032d23d;hpb=0f2343d2bc763b735b6242b5831be611703965a1;p=linenoise.git diff --git a/linenoise.h b/linenoise.h index c9b9f66..ba1b041 100644 --- a/linenoise.h +++ b/linenoise.h @@ -46,19 +46,19 @@ typedef struct linenoiseCompletions { /* * The callback type for tab completion handlers. */ -typedef void(linenoiseCompletionCallback)(const char *, linenoiseCompletions *); +typedef void(linenoiseCompletionCallback)(const char *prefix, linenoiseCompletions *comp, void *userdata); /* * Sets the current tab completion handler and returns the previous one, or NULL * if no prior one has been set. */ -linenoiseCompletionCallback * linenoiseSetCompletionCallback(linenoiseCompletionCallback *); +linenoiseCompletionCallback * linenoiseSetCompletionCallback(linenoiseCompletionCallback *comp, void *userdata); /* * Adds a copy of the given string to the given completion list. The copy is owned * by the linenoiseCompletions object. */ -void linenoiseAddCompletion(linenoiseCompletions *, const char *); +void linenoiseAddCompletion(linenoiseCompletions *comp, const char *str); #endif /* @@ -70,6 +70,11 @@ void linenoiseAddCompletion(linenoiseCompletions *, const char *); */ char *linenoise(const char *prompt); +/** + * Clear the screen. + */ +void linenoiseClearScreen(void); + /* * Adds a copy of the given line of the command history. */