From mboxrd@z Thu Jan 1 00:00:00 1970 From: quanstro@quanstro.net (erik quanstrom) Date: Fri, 11 Nov 2011 10:56:36 -0500 Subject: [9fans] p9p troff/ps problem, comparison with heirloom In-Reply-To: References: Message-ID: <07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net> Topicbox-Message-UUID: 3ec1147a-ead7-11e9-9d60-3106f5b1d025 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 + #include #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