Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21786/src/modules/mal

Modified Files:
        language.mx 
Log Message:
propagated changes of Friday Aug 17 2007 - Tuesday Aug 21 2007
from the MonetDB_5-0 branch to the development trunk


Index: language.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/language.mx,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- language.mx 12 Jun 2007 17:21:26 -0000      1.61
+++ language.mx 21 Aug 2007 12:35:42 -0000      1.62
@@ -295,23 +295,24 @@
 {
        str s = *fnme;
        Client c = MCgetClient();
-       char buffer[1024];
+       char *msg = NULL;
 
        (void) ret;             /* fool compiler */
-       if (s == 0) {
+       if (s == 0) 
                throw(MAL, "mal.setCwd", "File name missing\n");
-       }
-       if (strlen(s) + strlen(c->cwd) + 2 >= 1024) {
-               throw(MAL, "mal.setCwd", "Evaluation buffer too small\n");
-       }
-       buffer[0] = 0;
 
        if (*s != '/') {
-               strcpy(buffer, c->cwd);
-               strcat(buffer, "/");
+               char *buf = GDKmalloc(strlen(c->cwd) + strlen(s) + 2);
+
+               strcpy(buf, c->cwd);
+               strcat(buf, "/");
+               strcat(buf, s);
+               msg = evalFile(c, buf, 0);
+               GDKfree(buf);
+       } else {
+               msg = evalFile(c, s, 0);
        }
-       strcat(buffer, s);
-       return evalFile(c, buffer, 0);
+       return msg;
 }
 @-
 Calling a BAT is simply translated into a concatenation of


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