9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rudolf.sykora@gmail.com (Rudolf Sykora)
Subject: [9fans] p9p troff/ps problem, comparison with heirloom
Date: Fri, 11 Nov 2011 17:33:00 +0100	[thread overview]
Message-ID: <CAOEdRO3Gg7=rap_kUXPdO0jMjfSFebBpNGyCYz+9S5Tki2vnjA@mail.gmail.com> (raw)
In-Reply-To: <07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net>

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 <quanstro at quanstro.net> 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 <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
>



  reply	other threads:[~2011-11-11 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOEdRO1pfX6XwACtt7NXw1UMcnNuzJ3egzD899c_qZDi6+mBBA@mail.gmail.c>
2011-11-11 15:56 ` erik quanstrom
2011-11-11 16:33   ` Rudolf Sykora [this message]
     [not found]     ` <CAOEdRO2GLwvQqYMk4OQ+nqJ2pLM51DqaGaBNJf=9n+Qn7r3aLQ@mail.gmail.com>
2011-11-11 18:38       ` Rudolf Sykora
2011-11-11 19:06         ` Rudolf Sykora
2011-11-11 20:02           ` Gorka Guardiola
2011-11-12 20:11             ` Rudolf Sykora
2011-11-19 16:50           ` Rudolf Sykora
     [not found]   ` <CAOEdRO3Gg7=rap_kUXPdO0jMjfSFebBpNGyCYz+9S5Tki2vnjA@mail.gmail.c>
2011-11-11 17:30     ` erik quanstrom
2011-11-11 10:11 Rudolf Sykora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOEdRO3Gg7=rap_kUXPdO0jMjfSFebBpNGyCYz+9S5Tki2vnjA@mail.gmail.com' \
    --to=rudolf.sykora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).