Changeset: fd1a4b7647b8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fd1a4b7647b8
Modified Files:
clients/mapiclient/ReadlineTools.c
Branch: Jan2014
Log Message:
Removed MIL completion code. MIL is not supported in mclient.
diffs (63 lines):
diff --git a/clients/mapiclient/ReadlineTools.c
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -160,50 +160,6 @@ sql_completion(const char *text, int sta
return (matches);
}
-static char *
-mil_batname_generator(const char *text, int state)
-{
-
- static int seekpos, len, rowcount;
- static MapiHdl table_hdl;
- char *name;
-
- if (!state) {
- seekpos = 0;
- len = strlen(text);
- if ((table_hdl = mapi_query(_mid, "ls();")) == NULL ||
mapi_error(_mid)) {
- if (table_hdl) {
- mapi_explain_query(table_hdl, stderr);
- mapi_close_handle(table_hdl);
- } else
- mapi_explain(_mid, stderr);
- return NULL;
- }
- mapi_fetch_all_rows(table_hdl);
- rowcount = mapi_get_row_count(table_hdl);
- }
-
- while (seekpos < rowcount) {
- mapi_seek_row(table_hdl, seekpos++, MAPI_SEEK_SET);
- mapi_fetch_row(table_hdl);
- name = mapi_fetch_field(table_hdl, 0);
- if (strncmp(name, text, len) == 0)
- return strdup(name);
- }
-
- return NULL;
-}
-
-static char **
-mil_completion(const char *text, int start, int end)
-{
- (void) start;
- (void) end;
-
- /* FIXME: Nice, context-sensitive completion strategy should go here */
- return rl_completion_matches(text, mil_batname_generator);
-}
-
/* The MAL completion help */
static char *mal_commands[] = {
@@ -370,8 +326,6 @@ init_readline(Mapi mid, char *lang, int
* before std completion (filename) kicks in. */
if (strcmp(language, "sql") == 0) {
rl_attempted_completion_function = sql_completion;
- } else if (strcmp(language, "mil") == 0) {
- rl_attempted_completion_function = mil_completion;
} else if (strcmp(language, "mal") == 0) {
/* recognize the help function, should react to <FCN2> */
#ifdef illegal_ESC_binding
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list