MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / rl_complete

Function rl_complete

extern/editline/src/readline.c:1801–1837  ·  view source on GitHub ↗

* complete word at current point */ ARGSUSED */

Source from the content-addressed store, hash-verified

1799 */
1800/* ARGSUSED */
1801int
1802rl_complete(int ignore __attribute__((__unused__)), int invoking_key)
1803{
1804#ifdef WIDECHAR
1805 static ct_buffer_t wbreak_conv, sprefix_conv;
1806#endif
1807 char *breakchars;
1808
1809 if (h == NULL || e == NULL)
1810 rl_initialize();
1811
1812 if (rl_inhibit_completion) {
1813 char arr[2];
1814 arr[0] = (char)invoking_key;
1815 arr[1] = '\0';
1816 el_insertstr(e, arr);
1817 return CC_REFRESH;
1818 }
1819
1820 if (rl_completion_word_break_hook != NULL)
1821 breakchars = (*rl_completion_word_break_hook)();
1822 else
1823 breakchars = rl_basic_word_break_characters;
1824
1825 /* Just look at how many global variables modify this operation! */
1826 return fn_complete(e,
1827 (CPFunction *)rl_completion_entry_function,
1828 rl_attempted_completion_function,
1829 ct_decode_string(rl_basic_word_break_characters, &wbreak_conv),
1830 ct_decode_string(breakchars, &sprefix_conv),
1831 _rl_completion_append_character_function,
1832 (size_t)rl_completion_query_items,
1833 &rl_completion_type, &rl_attempted_completion_over,
1834 &rl_point, &rl_end);
1835
1836
1837}
1838
1839
1840/* ARGSUSED */

Callers 1

_el_rl_completeFunction · 0.85

Calls 4

rl_initializeFunction · 0.85
el_insertstrFunction · 0.85
fn_completeFunction · 0.85
ct_decode_stringFunction · 0.85

Tested by

no test coverage detected