ref: 32e23bdb5939c879f947cd6c0ae423165646180c
parent: 7468752ea24a9b9a4c2930270a457ec790dced15
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon May 16 18:02:17 EDT 2016
cc: use UTFmax not 4 (djc)
--- a/sys/src/cmd/cc/macbody
+++ b/sys/src/cmd/cc/macbody
@@ -27,7 +27,7 @@
for(cp = symb;;) {
if(c >= Runeself) {
for(c1=0;;) {
- if(cp <= symb+NSYMB-4)
+ if(cp <= symb+NSYMB-UTFmax)
cp[c1++] = c;
if(fullrune(cp, c1))
break;
@@ -35,7 +35,7 @@
}
cp += c1;
}else
- if(cp <= symb+NSYMB-4)
+ if(cp <= symb+NSYMB-UTFmax)
*cp++ = c;
c = getc();
if(c >= Runeself || isalnum(c) || c == '_')
@@ -44,7 +44,7 @@
break;
}
*cp = 0;
- if(cp > symb+NSYMB-4)
+ if(cp > symb+NSYMB-UTFmax)
yyerror("symbol too large: %s", symb);
}
@@ -402,7 +402,7 @@
unget(c);
l = 0;
cp = buf;
- ecp = cp + sizeof(buf)-4;
+ ecp = cp + sizeof(buf)-UTFmax;
arg[n++] = cp;
for(;;) {
if(cp >= ecp)