summaryrefslogtreecommitdiff
path: root/src/runtime/fstr.r
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
commitf627f77f23d1497c9e1f4269b5c8812d12b42f18 (patch)
tree708772d83a8355e25155cf233d5a9e38f8ad4d96 /src/runtime/fstr.r
parent6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (diff)
downloadicon-upstream.tar.gz
Imported Upstream version 9.5.0upstream/9.5.0upstream
Diffstat (limited to 'src/runtime/fstr.r')
-rw-r--r--src/runtime/fstr.r25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/runtime/fstr.r b/src/runtime/fstr.r
index 08d9f10..974aa56 100644
--- a/src/runtime/fstr.r
+++ b/src/runtime/fstr.r
@@ -214,10 +214,6 @@ function{1} detab(s,i[n])
return result;
else {
long n = DiffPtrs(StrLoc(result),strfree); /* note deallocation */
- if (n < 0)
- EVVal(-n, E_StrDeAlc);
- else
- EVVal(n, E_String);
strtotal += DiffPtrs(StrLoc(result),strfree);
strfree = StrLoc(result); /* reset the free pointer */
return s; /* return original string */
@@ -337,20 +333,12 @@ function{1} entab(s,i[n])
long n;
StrLen(result) = DiffPtrs(out,StrLoc(result));
n = DiffPtrs(out,strfree); /* note the deallocation */
- if (n < 0)
- EVVal(-n, E_StrDeAlc);
- else
- EVVal(n, E_String);
strtotal += DiffPtrs(out,strfree);
strfree = out; /* give back unused space */
return result; /* return new string */
}
else {
long n = DiffPtrs(StrLoc(result),strfree); /* note the deallocation */
- if (n < 0)
- EVVal(-n, E_StrDeAlc);
- else
- EVVal(n, E_String);
strtotal += DiffPtrs(StrLoc(result),strfree);
strfree = StrLoc(result); /* reset free pointer */
return s; /* return original string */
@@ -445,12 +433,6 @@ function{1} map(s1,s2,s3)
*/
if !cnv:string(s1) then
runerr(103,s1)
-#if COMPILER
- if !def:string(s2, ucase) then
- runerr(103,s2)
- if !def:string(s3, lcase) then
- runerr(103,s3)
-#endif /* COMPILER */
abstract {
return string
@@ -461,12 +443,11 @@ function{1} map(s1,s2,s3)
register char *str1, *str2, *str3;
static char maptab[256];
-#if !COMPILER
if (is:null(s2))
s2 = ucase;
if (is:null(s3))
s3 = lcase;
-#endif /* !COMPILER */
+
/*
* If s2 and s3 are the same as for the last call of map,
* the current values in maptab can be used. Otherwise, the
@@ -475,13 +456,11 @@ function{1} map(s1,s2,s3)
if (!EqlDesc(maps2,s2) || !EqlDesc(maps3,s3)) {
maps2 = s2;
maps3 = s3;
-
-#if !COMPILER
if (!cnv:string(s2,s2))
runerr(103,s2);
if (!cnv:string(s3,s3))
runerr(103,s3);
-#endif /* !COMPILER */
+
/*
* s2 and s3 must be of the same length
*/