9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: quanstro@quanstro.net (erik quanstrom)
Subject: [9fans] p9p troff/ps problem, comparison with heirloom
Date: Fri, 11 Nov 2011 10:56:36 -0500	[thread overview]
Message-ID: <07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net> (raw)
In-Reply-To: <CAOEdRO1pfX6XwACtt7NXw1UMcnNuzJ3egzD899c_qZDi6+mBBA@mail.gmail.c>

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 15:56 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 [this message]
2011-11-11 16:33   ` Rudolf Sykora
     [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=07c435b2cdbf521f0f885f79f0dc8de9@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    /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).