Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24183

Modified Files:
        ReadlineTools.mx 
Log Message:
Add MAL syntax awareness


Index: ReadlineTools.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/ReadlineTools.mx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ReadlineTools.mx    20 Feb 2007 10:48:06 -0000      1.3
+++ ReadlineTools.mx    15 Sep 2007 08:13:13 -0000      1.4
@@ -288,9 +288,19 @@
        }
        /* try the server to answer */
        if (!state) {
+               char cmd[BUFSIZ], *c;
+               c= strstr(text,":=");
+               if(c) text= c+2;
+               while(isspace((int)*text) )
+                       text++;
+               c= strchr(text,'.');
+               if( c == NULL)
+                       snprintf(cmd,BUFSIZ,"%s.*(",text);
+               else
+                       snprintf(cmd,BUFSIZ,"%s(",text);
                seekpos = 0;
-               len = strlen(text);
-               snprintf(buf,BUFSIZ, "manual.completion(\"%s\");", text);
+               len = strlen(cmd);
+               snprintf(buf,BUFSIZ, "manual.completion(\"%s\");", cmd);
                if ((table_hdl = mapi_query(_mid, buf)) == NULL || 
mapi_error(_mid)) {
                        if (table_hdl) {
                                mapi_explain_query(table_hdl, stderr);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to