this does work on my system. here's the diff:
- erik
-----
/n/sources/plan9//sys/src/cmd/eqn/text.c:1,6 - text.c:1,7
#include "e.h"
#include "y.tab.h"
#include <ctype.h>
+ #include <utf.h>
#define CSSIZE 1000
char cs[CSSIZE+20]; /* text string converted into this */
/n/sources/plan9//sys/src/cmd/eqn/text.c:42,48 - text.c:43,49
wchar_t r;
int w;
- w = mbtowc(&r, psp, 3);
+ w = mbtowc(&r, psp, UTFmax);
if(w == 0){
psp++;
return 0;
/n/sources/plan9//sys/src/cmd/eqn/text.c:49,55 - text.c:50,56
}
if(w < 0){
psp += 1;
- return 0x80; /* Plan 9-ism */
+ return Runeerror; /* Plan 9-ism */
}
psp += w;
return r;
/n/sources/plan9//sys/src/cmd/eqn/text.c:112,128 - text.c:113,125
printf(".ds %d \"%s\n", yyval, p);
}
- int isalpharune(int c)
- {
- return ('a'<=c && c<='z') || ('A'<=c && c<='Z');
- }
-
int isdigitrune(int c)
{
return ('0'<=c && c<='9');
}
- trans(int c, char *p1)
+ int
+ trans(int c, char *)
{
int f;
/n/sources/plan9//sys/src/cmd/eqn/tuning.c:146,151 - tuning.c:146,155
target = &Subbase;
else if (eq(s, "Supshift"))
target = &Supshift;
+ else{
+ ERROR "unknown ftune" FATAL;
+ return;
+ }
if (t[0] == '+' || t[0] == '-')
*target += f;
else