Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26440
Modified Files:
MapiClient.mx
Log Message:
Blockmode is an interaction feature for MAL. It allows you to enter multiple
lines before it is being set for execution. Sending is triggered by an empty
line.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- MapiClient.mx 15 Aug 2007 06:35:19 -0000 1.40
+++ MapiClient.mx 15 Aug 2007 08:23:18 -0000 1.41
@@ -948,7 +948,8 @@
fprintf(toConsole, "\\l - line is sent immediately\n");
}
fprintf(toConsole, "\\L file - save client/server
interaction\n");
- fprintf(toConsole, "\\t - toggle interaction trace\n");
+ fprintf(toConsole, "\\b - toggle block mode, sent upon
empty line\n");
+ fprintf(toConsole, "\\t - toggle MapiClient debugging\n");
}
static int
@@ -1025,6 +1026,8 @@
processed, use break to send to server */
switch (*line) {
case '\0':
+ if (!linemode && length==0)
+ break;
if(strncmp(promptbuf, "mdb", 3) )
continue;
break;
@@ -1053,7 +1056,7 @@
case 'b':
if (mode == XQUERY)
break;
- linemode = 0;
+ linemode = linemode? 0:1;
continue;
case 'A':
if (mode == XQUERY)
@@ -1263,6 +1266,7 @@
CHECK_RESULT(mid, hdl, buf, continue);
}
if (length > 0 ||
+ (!linemode && length==0) ||
strncmp(promptbuf, "mdb", 3) == 0) {
assert(hdl != NULL);
sent = 1;
@@ -1272,6 +1276,7 @@
CHECK_RESULT(mid, hdl, buf, continue);
}
if (linemode ||
+ (!linemode && length==0) ||
(specials && strncmp(promptbuf, "mdb", 3) == 0) ||
(mode==SQL && line[length-2]==';' &&
line[length-1]=='\n')) {
assert(hdl != NULL);
@@ -1410,7 +1415,6 @@
{
fprintf(stderr, "Usage: %s --language=(sql|xquery|mal|mil) [ options
]\n", prog);
fprintf(stderr, "\nOptions are:\n");
- fprintf(stderr, " -b t/f | --blocked=true/false blocked mode\n");
fprintf(stderr, " -c config | --config=file config filename\n");
fprintf(stderr, " -d database | --database=database database to
connect to\n");
@@ -1471,7 +1475,6 @@
int option_index=0;
struct stat statb;
static struct option long_options[] = {
- {"blocked", 1, 0, 'b'},
{"config", 1, 0, 'c'},
{"collection", 1, 0, 'C'},
{"error", 0, 0, 'e'},
@@ -1535,14 +1538,6 @@
pagewidth = atol(optarg);
}
break;
- case 'b':
- if (*optarg == 't' || *optarg == 'T' || *optarg == '1')
- linemode = 0;
- else if (*optarg == 'f' || *optarg == 'F' || *optarg ==
'0')
- linemode = 1;
- else
- usage(argv[0]);
- break;
case 'c':
setlen = mo_add_option(&set, setlen, opt_cmdline,
"config", optarg);
break;
-------------------------------------------------------------------------
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