From mboxrd@z Thu Jan 1 00:00:00 1970 From: rudolf.sykora@gmail.com (Rudolf Sykora) Date: Fri, 11 Nov 2011 17:33:00 +0100 Subject: [9fans] p9p troff/ps problem, comparison with heirloom In-Reply-To: <07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net> References: <07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net> Message-ID: Topicbox-Message-UUID: 3ed7fa64-ead7-11e9-9d60-3106f5b1d025 Dear Erik, thank you for looking at the problem. Nonetheless, I am bit puzzled. The problems I have described exist in plan9port and heirloom software. I haven't yet tried to what extent it also applies to plan9 proper. And it seems you are suggesting some changes to the latter software. Also, at least partly, I guess, some of my problems on linux are caused by non-existing lucida sans fonts (and all the mess around fonts around troff/gs and unicode coverage). So what problem should your change remove? (I am sorry it's not clear to me from your code.) Thank you Ruda On 11 November 2011 16:56, erik quanstrom wrote: > 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 >