summaryrefslogtreecommitdiff
path: root/appl/lib/convcs
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-01-22 21:54:45 +0000
committerCharles.Forsyth <devnull@localhost>2008-01-22 21:54:45 +0000
commit9b29ac7ea714507a9c0690620c02c8ca5ab25f90 (patch)
tree1eeb3e33858dfc27844b520036f2119869f9088b /appl/lib/convcs
parent60951762adc08955ddba7ff59f6043e7a542a0f2 (diff)
20080122-2200
Diffstat (limited to 'appl/lib/convcs')
-rw-r--r--appl/lib/convcs/convcs.b2
-rw-r--r--appl/lib/convcs/utf8_btos.b9
2 files changed, 5 insertions, 6 deletions
diff --git a/appl/lib/convcs/convcs.b b/appl/lib/convcs/convcs.b
index 23208224..8e3b31f3 100644
--- a/appl/lib/convcs/convcs.b
+++ b/appl/lib/convcs/convcs.b
@@ -142,7 +142,7 @@ aliases(cs : string) : (string, list of string)
recs := cfg->lookup(name);
if (recs == nil)
continue; # shouldn't happen!
- (val, rec) := hd recs;
+ (val, nil) := hd recs;
if (val != cs)
continue;
al = name :: al;
diff --git a/appl/lib/convcs/utf8_btos.b b/appl/lib/convcs/utf8_btos.b
index 7ed10ddd..307ef863 100644
--- a/appl/lib/convcs/utf8_btos.b
+++ b/appl/lib/convcs/utf8_btos.b
@@ -23,12 +23,11 @@ btos(nil : Convcs->State, b : array of byte, n : int) : (Convcs->State, string,
str = string b[:nbytes];
} else {
for (; nbytes < len b && len str < n;) {
- (ch, l, s) := sys->byte2char(b, nbytes);
- if (l > 0) {
- str[len str] = ch;
- nbytes += l;
- } else
+ (ch, l, nil) := sys->byte2char(b, nbytes);
+ if (l <= 0)
break;
+ str[len str] = ch;
+ nbytes += l;
}
}
return (nil, str, nbytes);