Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10235
Modified Files:
MapiClient.mx
Log Message:
Move the mode change into one place. Set the default rendering of MAL to
align with the console. Best option still is to make mclient part of
the server too.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- MapiClient.mx 28 Aug 2007 07:43:07 -0000 1.73
+++ MapiClient.mx 28 Aug 2007 08:03:57 -0000 1.74
@@ -243,6 +243,15 @@
}
static void
+modeChange(char *reply){
+ if (strstr(reply, "mdb>#EOD")){
+ setPrompt();
+ } else
+ if(strncmp(reply,"mdb>",4)==0)
+ sprintf(promptbuf,"mdb>");
+}
+
+static void
SQLsetSpecial(const char *command)
{
if (mode == SQL && command) {
@@ -371,6 +380,7 @@
do {
if ((reply = fetch_line(hdl)) == NULL)
return 0;
+ modeChange(reply);
} while (*reply != '[' && *reply != '=');
return mapi_split_line(hdl);
}
@@ -412,7 +422,8 @@
{
char *line;
- while ((line = fetch_line(hdl)) != 0) {
+ while ((line = mapi_fetch_line(hdl)) != 0) {
+ modeChange(line);
if (*line == '=')
line++;
fprintf(toConsole, "%s\n", line);
@@ -1310,7 +1321,7 @@
continue;
}
case '?':
- if (!isspace((int) line[2]) && mode ==
MAL) {
+ if (mode==MAL ||debugMode() ){
strcpy(line, line + 1);
break;
}
@@ -1756,7 +1767,8 @@
/* default formatter depends on whether we're interactive */
if (formatter == NOformatter)
- formatter = interactive && interactive_stdin && mode != XQUERY
? TABLEformatter : RAWformatter;
+ formatter = interactive && interactive_stdin && mode != XQUERY ?
+ (mode==MAL?RAWformatter: TABLEformatter) : RAWformatter;
if (command) {
/* execute from command-line */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins