diff options
author | QC <qball@gmpclient.org> | 2014-07-20 12:29:27 +0200 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2014-07-20 12:29:27 +0200 |
commit | 0f279b299598171efa3c330191a2fa46c675c372 (patch) | |
tree | 8cbb5c988d0f81e503407e9c517e5d0b221fcce1 /include/rofi.h | |
parent | 842d19231af2a976b30e372185168be40546a0cd (diff) |
Restructure some code, fix a small bug in dmenu mode.
* dmenu crashed on no input lines (wrong free)
* Pass length of lines to menu function.
Diffstat (limited to 'include/rofi.h')
-rw-r--r-- | include/rofi.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/rofi.h b/include/rofi.h index bc962219..8fd61b13 100644 --- a/include/rofi.h +++ b/include/rofi.h @@ -66,6 +66,7 @@ typedef int ( *menu_match_cb )( char **tokens, const char *input, int index, voi /** * @param lines An array of strings to display. + * @param num_lines Length of the array with strings to display. * @param input A pointer to a string where the inputted data is placed. * @param prompt The prompt to show. * @param time The current time (used for window interaction.) @@ -78,10 +79,10 @@ typedef int ( *menu_match_cb )( char **tokens, const char *input, int index, voi * * @returns The command issued (see MenuReturn) */ -MenuReturn menu ( char **lines, char **input, char *prompt, +MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prompt, Time *time, int *shift, menu_match_cb mmc, void *mmc_data, - int *selected_line ) __attribute__ ( ( nonnull ( 1, 2, 3, 8 ) ) ); + int *selected_line ) __attribute__ ( ( nonnull ( 1, 3, 4, 9 ) ) ); void catch_exit ( __attribute__( ( unused ) ) int sig ); |