Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22752
Modified Files:
MapiClient.mx
Log Message:
If you love enums then we could use it all over the place.
The command line formatter with input redirect functionality was lost.
shell> mclient -lsql --format=sql <x
+--------+
| count_ |
+========+
| 27 |
+--------+
shell> mclient -lsql --format=csv <x
27
shell> mclient -lsql x
% sys. # table_name
% count_ # name
% int # type
% 2 # length
[ 27 ]
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- MapiClient.mx 24 Aug 2007 15:42:56 -0000 1.67
+++ MapiClient.mx 24 Aug 2007 19:42:25 -0000 1.68
@@ -118,12 +118,14 @@
#define getlogin() "win32"
#endif
-#define MAL 1
-#define SQL 2
-#define XQUERY 4
-#define MIL 8
+enum modes{
+ MAL,
+ SQL,
+ XQUERY,
+ MIL
+};
-static int mode;
+static enum modes mode;
static FILE *toConsole;
static FILE *fromConsole;
static char *language = NULL;
@@ -1017,6 +1019,7 @@
fprintf(toConsole, "\\d table- describe the table, or the
complete database if none given.\n");
fprintf(toConsole, "\\A - enable auto commit\n");
fprintf(toConsole, "\\a - disable auto commit\n");
+ default: ;
}
fprintf(toConsole, "\\L file - save client/server interaction\n");
fprintf(toConsole, "\\X - trace mclient code\n");
@@ -1815,13 +1818,11 @@
#endif
/* reading from terminal, prepare prompt */
setPrompt();
-
- /* use default rendering if not overruled at
commandline */
- setWidth();
-
prompt = promptbuf;
fromConsole = stdin;
}
+ /* use default rendering if not overruled at commandline */
+ setWidth();
/* stream xml document into the server */
if (input && mode == XQUERY) {
mapi_stream_into(mid, input, colname);
-------------------------------------------------------------------------
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