Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2455/src/mapiclient
Modified Files:
MapiClient.mx
Log Message:
Coalesced mclient's -o and -f options into a single -f (output format)
option.
The -o option was used to specify output formatting for XQuery,
whereas -f was used to specify output formatting for the other
languages. Now the same option is used for both (similar) functions.
This also frees up -o for a future, possible -o output file option.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- MapiClient.mx 11 Sep 2007 12:48:35 -0000 1.86
+++ MapiClient.mx 11 Sep 2007 15:51:26 -0000 1.87
@@ -1467,20 +1467,20 @@
fprintf(stderr, "\nOptions are:\n");
fprintf(stderr, " -d database | --database=database database to
connect to\n");
- fprintf(stderr, " -e | --echo echo the query\n");
- fprintf(stderr, " -f kind | --format=kind use renderer
{csv,tab,raw,sql,xml} \n");
- fprintf(stderr, " -H | --history load/save cmdline
history (default off)\n");
- fprintf(stderr, " -h hostname | --host=hostname host to connect
to\n");
- fprintf(stderr, " -i | --interactive read stdin after
command line args\n");
- fprintf(stderr, " -l language | --language=lang
{sql,xquery,mal,mil}\n");
- fprintf(stderr, " -L logfile | --log=logfile save client/server
interaction\n");
- fprintf(stderr, " -P passwd | --passwd=passwd password\n");
- fprintf(stderr, " -p portnr | --port=portnr port to connect
to\n");
- fprintf(stderr, " -s stmt | --statement=stmt run single
statement\n");
- fprintf(stderr, " -t | --time time commands\n");
- fprintf(stderr, " -X | --Xdebug trace mapi network
interaction\n");
- fprintf(stderr, " -u user | --user=user user id\n");
- fprintf(stderr, " -? | --help show this usage
message\n");
+ fprintf(stderr, " -e | --echo echo the query\n");
+ fprintf(stderr, " -f kind | --format=kind specify output
format {dm,xml} for Xquery, or {csv,tab,raw,sql,xml}\n");
+ fprintf(stderr, " -H | --history load/save cmdline
history (default off)\n");
+ fprintf(stderr, " -h hostname | --host=hostname host to connect
to\n");
+ fprintf(stderr, " -i | --interactive read stdin after
command line args\n");
+ fprintf(stderr, " -l language | --language=lang
{sql,xquery,mal,mil}\n");
+ fprintf(stderr, " -L logfile | --log=logfile save client/server
interaction\n");
+ fprintf(stderr, " -P passwd | --passwd=passwd password\n");
+ fprintf(stderr, " -p portnr | --port=portnr port to connect
to\n");
+ fprintf(stderr, " -s stmt | --statement=stmt run single
statement\n");
+ fprintf(stderr, " -t | --time time commands\n");
+ fprintf(stderr, " -X | --Xdebug trace mapi network
interaction\n");
+ fprintf(stderr, " -u user | --user=user user id\n");
+ fprintf(stderr, " -? | --help show this usage
message\n");
#ifdef HAVE_POPEN
fprintf(stderr, " -| cmd | --pager=cmd for pagination\n");
#endif
@@ -1492,7 +1492,6 @@
fprintf(stderr, "\nXQuery specific options\n");
fprintf(stderr, " -C colname | --collection=name collection name\n");
- fprintf(stderr, " -o format | --output=format output format (dm
(default) or xml)\n");
exit(-1);
}
@@ -1530,7 +1529,6 @@
{"host", 1, 0, 'h'},
{"log", 2, 0, 'L'},
{"language", 1, 0, 'l'},
- {"output", 1, 0, 'o'},
#ifdef HAVE_POPEN
{"pager", 1, 0, '|'},
#endif
@@ -1556,7 +1554,7 @@
mark = NULL;
mark2 = NULL;
- while ((c = getopt_long(argc, argv, "C:d::ef:i::h:L::l:o:"
+ while ((c = getopt_long(argc, argv, "C:d::ef:i::h:L::l:"
#ifdef HAVE_POPEN
"|:"
#endif
@@ -1576,9 +1574,6 @@
case 'e':
echoquery = 1;
break;
- case 'f':
- setFormatter(optarg);
- break;
case 'L':
{
char buf[32];
@@ -1620,6 +1615,9 @@
guest = 0;
passwd = optarg; /* can be NULL */
break;
+ case 'f':
+ output = optarg; /* output format */
+ break;
case 'i':
interactive = 1;
if (optarg)
@@ -1628,9 +1626,6 @@
case 'h':
host = optarg;
break;
- case 'o':
- output = optarg;
- break;
case 'p':
port = atoi(optarg);
break;
@@ -1718,8 +1713,13 @@
mapi_profile(mid, mark != NULL);
mapi_trace(mid, trace);
- if (output)
- mapi_output(mid, output);
+ if (output) {
+ if (mode == XQUERY)
+ mapi_output(mid, output);
+ else
+ setFormatter(output);
+ }
+
c = 0;
-------------------------------------------------------------------------
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