summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ed.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-04-24 20:13:18 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-04-24 20:13:18 +0200
commit667010554b30c46e35b9cad62edcfa01e37e1576 (patch)
tree418f828288c6c5c5ba0e6a18775af855966579f0 /sys/src/cmd/ed.c
parent78c7ba36a1a732c08fbb7e4f8b19d1bc825c5b7e (diff)
make all the commands agnostic about Rune width. (from sources)
Diffstat (limited to 'sys/src/cmd/ed.c')
-rw-r--r--sys/src/cmd/ed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/ed.c b/sys/src/cmd/ed.c
index 0f18fadc0..35ce3d343 100644
--- a/sys/src/cmd/ed.c
+++ b/sys/src/cmd/ed.c
@@ -15,7 +15,7 @@ enum
ESIZE = 256, /* max size of reg exp */
GBSIZE = 256, /* max size of global command */
MAXSUB = 9, /* max number of sub reg exp */
- ESCFLG = 0xFFFF, /* escape Rune - user defined code */
+ ESCFLG = Runemax, /* escape Rune - user defined code */
EOF = -1,
};
@@ -737,7 +737,7 @@ gety(void)
if(c == 0)
continue;
*p++ = c;
- if(p >= &linebuf[LBSIZE-2])
+ if(p >= &linebuf[LBSIZE-sizeof(Rune)])
error(Q);
}
}
@@ -1162,7 +1162,7 @@ join(void)
for(a1=addr1; a1<=addr2; a1++) {
lp = getline(*a1);
while(*gp = *lp++)
- if(gp++ >= &genbuf[LBSIZE-2])
+ if(gp++ >= &genbuf[LBSIZE-sizeof(Rune)])
error(Q);
}
lp = linebuf;