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

Modified Files:
        MapiClient.mx 
Log Message:
Rendering the trace and explain should not disgard leading spaces.


Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- MapiClient.mx       16 Aug 2007 08:05:21 -0000      1.52
+++ MapiClient.mx       16 Aug 2007 08:17:38 -0000      1.53
@@ -254,7 +254,7 @@
 }
 
 static void
-SQLrow(int *len, int *numeric, char **rest, int fields)
+SQLrow(int *len, int *numeric, char **rest, int fields,int trim)
 {
        int i, more, first = 1;
        char old;
@@ -268,8 +268,8 @@
                        if (rest[i] && (int) strlen(rest[i]) > len[i]) {
                                int cnt = strlen(rest[i]) - len[i];
 
-                               /* first remove a leading spaces */
-                               for (t = rest[i]; t && *t && cnt; t++)
+                               /* first remove a leading spaces unless 
requested*/
+                               for (t = rest[i]; trim && t && *t && cnt; t++)
                                        if (*t != ' ' && *t != '\t')
                                                break;
                                        else
@@ -447,7 +447,7 @@
                                names[i] = mapi_get_name(hdl, i);
                                numeric[i] = 0;
                        }
-                       SQLrow(len, numeric, names, fields);
+                       SQLrow(len, numeric, names, fields,1);
                }
                SQLseparator(len, fields, '=');
                break;
@@ -497,7 +497,7 @@
        while ((fields[0] = mapi_fetch_line(hdl)) != NULL) {
                if (silent)
                        continue;
-               SQLrow(len, numeric, fields, 1);
+               SQLrow(len, numeric, fields, 1,0);
                if (ps && rows % ps == ps - 1 && rows != 
mapi_get_row_count(hdl) && fromConsole) {
                        char buf[BUFSIZ];
 
@@ -551,7 +551,7 @@
                s = strrchr(fields[0], ']');
                if (s)
                        *s = 0;
-               SQLrow(len, numeric, fields, 1);
+               SQLrow(len, numeric, fields, 1,0);
                if (ps && rows % ps == ps - 1 && rows != 
mapi_get_row_count(hdl) && fromConsole) {
                        char buf[BUFSIZ];
 
@@ -568,7 +568,6 @@
                rows++;
        }
        SQLseparator(len, 1, '-');
-       specials=0;
 }
 
 static void
@@ -656,7 +655,7 @@
                                rest[i] = nullstring;
                }
 
-               SQLrow(len, numeric, rest, fields);
+               SQLrow(len, numeric, rest, fields,1);
                rows++;
                if (ps && (rows % ps) == ps - 1 && rows != 
mapi_get_row_count(hdl) && fromConsole) {
                        char buf[BUFSIZ];


-------------------------------------------------------------------------
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

Reply via email to