From 0cadb4301d18724e7513d7489cb5bebd262c82f1 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 11 Sep 2009 17:03:06 -0400 Subject: convert to 4-byte UTF-8 and 32-bit Rune http://codereview.appspot.com/116075 --- src/cmd/sed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/sed.c') diff --git a/src/cmd/sed.c b/src/cmd/sed.c index 5849c83f..a78c9c66 100644 --- a/src/cmd/sed.c +++ b/src/cmd/sed.c @@ -615,7 +615,7 @@ compsub(Rune *rhs, Rune *end) while ((r = *cp++) != '\0') { if(r == '\\') { if (rhs < end) - *rhs++ = 0xFFFF; + *rhs++ = Runemax; else return 0; r = *cp++; @@ -1050,7 +1050,7 @@ dosub(Rune *rhsbuf) sp = place(sp, loc1, loc2); continue; } - if (c == 0xFFFF && (c = *rp++) >= '1' && c < MAXSUB+'0') { + if (c == Runemax && (c = *rp++) >= '1' && c < MAXSUB+'0') { n = c-'0'; if (subexp[n].s.rsp && subexp[n].e.rep) { sp = place(sp, subexp[n].s.rsp, subexp[n].e.rep); -- cgit v1.2.3