Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28245/src/modules/atoms
Modified Files:
str.mx
Log Message:
propagated changes of Monday Dec 03 2007 - Tuesday Dec 18 2007
from the MonetDB_5-2 branch to the development trunk
Index: str.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/str.mx,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- str.mx 9 Dec 2007 16:21:09 -0000 1.70
+++ str.mx 18 Dec 2007 10:48:00 -0000 1.71
@@ -1655,24 +1655,24 @@
int
strSubString(str *res, str s, int *offset, int *length)
{
- int len, off = *offset;
+ int len, off = *offset, l = *length;
- RETURN_NIL_IF(strNil(s) || off == int_nil || *length == int_nil,
TYPE_str);
+ RETURN_NIL_IF(strNil(s) || off == int_nil || l == int_nil, TYPE_str);
if (off < 0) {
len = UTF8_strlen(s);
RETURN_NIL_IF(len == int_nil, TYPE_str);
off = len + off;
if (off < 0) {
- *length += off;
+ l += off;
off = 0;
}
}
- if (*length < 0) {
+ if (l < 0) {
*res = GDKstrdup("");
return GDK_SUCCEED;
}
s = UTF8_strtail(s, MAX(0, off));
- len = UTF8_strtail(s, *length) - s;
+ len = UTF8_strtail(s, l) - s;
if (off < 0) {
len += off;
off = 0;
@@ -1700,9 +1700,9 @@
/* 64bit: should have wrd arg */
unsigned char *s = (unsigned char *) val;
- RETURN_NIL_IF(strNil(val) || *at == int_nil || *at < 0, TYPE_chr);
+ RETURN_NIL_IF(strNil(val) || *at == int_nil || *at < 0, TYPE_int);
s = (unsigned char *) UTF8_strtail((str) s, *at);
- RETURN_NIL_IF(*s == 0, TYPE_chr);
+ RETURN_NIL_IF(*s == 0, TYPE_int);
@:UTF8_GETCHAR(*res,s)@
return GDK_SUCCEED;
}
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins