9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Page ported to plan9port
@ 2007-02-08 23:10 Kris Maglione
  2007-02-08 23:29 ` erik quanstrom
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Kris Maglione @ 2007-02-08 23:10 UTC (permalink / raw)
  To: 9fans

Hi,

I've ported page(1) to plan9port. Since the default ghostscript on most 
systems doesn't support plan9 bitmaps, I have it output windows bitmaps 
and pipe them through bmp(1) (messing with ghostscript isn't worth the 
trouble, unless Russ wants to pester them to put it into the default 
distro).

You can get it here: http://suckless.org/~jg/page.tgz

There are a few things that aren't as well as I'd like:
1. I switched to libthread, but I still have to fork/exec for gs, 
because it needs 5 file descriptors, and threadspawnl allows only 3. I 
looked at the threadspawnl code, and it forks/execs itself, and I 
haven't had any issues.

2. To get the screen size, I used an ugly hack of spawning "xdpyinfo | 
grep dimensions:" and parsing it. I'd like to know if libdraw provides 
another way to get these.

3. There are some conversion commands which specify programs in fb/, 
which exists neither on plan 9, nor in p9p. Does anyone know what/where 
they were?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-08 23:10 [9fans] Page ported to plan9port Kris Maglione
@ 2007-02-08 23:29 ` erik quanstrom
  2007-02-09  2:58 ` Russ Cox
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: erik quanstrom @ 2007-02-08 23:29 UTC (permalink / raw)
  To: 9fans

those are relics of 8½.

- erik

On Thu Feb  8 18:11:26 EST 2007, bsdaemon@comcast.net wrote:
> 3. There are some conversion commands which specify programs in fb/, 
> which exists neither on plan 9, nor in p9p. Does anyone know what/where 
> they were?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-08 23:10 [9fans] Page ported to plan9port Kris Maglione
  2007-02-08 23:29 ` erik quanstrom
@ 2007-02-09  2:58 ` Russ Cox
  2007-02-09  9:24 ` Charles Forsyth
  2007-03-26 20:57 ` Russ Cox
  3 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2007-02-09  2:58 UTC (permalink / raw)
  To: 9fans

Thanks.

> There are a few things that aren't as well as I'd like:
> 1. I switched to libthread, but I still have to fork/exec for gs,
> because it needs 5 file descriptors, and threadspawnl allows only 3. I
> looked at the threadspawnl code, and it forks/execs itself, and I
> haven't had any issues.

It would be nice to make do with three, since at some
point we'll want to run on other systems, but this is fine for now.

> 2. To get the screen size, I used an ugly hack of spawning "xdpyinfo |
> grep dimensions:" and parsing it. I'd like to know if libdraw provides
> another way to get these.

I should probably add that to the library.  xdpyinfo is fine for now.

> 3. There are some conversion commands which specify programs in fb/,
> which exists neither on plan 9, nor in p9p. Does anyone know what/where
> they were?

These are relics, but not from 8½ -- they're conversion programs
from the second edition.  Don't worry about them.

Russ


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-08 23:10 [9fans] Page ported to plan9port Kris Maglione
  2007-02-08 23:29 ` erik quanstrom
  2007-02-09  2:58 ` Russ Cox
@ 2007-02-09  9:24 ` Charles Forsyth
  2007-02-09 16:44   ` Kris Maglione
  2007-03-26 20:57 ` Russ Cox
  3 siblings, 1 reply; 10+ messages in thread
From: Charles Forsyth @ 2007-02-09  9:24 UTC (permalink / raw)
  To: 9fans

>Since the default ghostscript on most 
>systems doesn't support plan9 bitmaps, I have it output windows bitmaps 
>and pipe them through bmp(1) (messing with ghostscript isn't worth the 

it supports an "inferno" driver out of the box on ubuntu.
it looks as though it is rgbv.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-09  9:24 ` Charles Forsyth
@ 2007-02-09 16:44   ` Kris Maglione
  2007-02-09 17:21     ` Russ Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Kris Maglione @ 2007-02-09 16:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Feb 09, 2007 at 09:24:55AM +0000, Charles Forsyth wrote:
>>Since the default ghostscript on most 
>>systems doesn't support plan9 bitmaps, I have it output windows bitmaps 
>>and pipe them through bmp(1) (messing with ghostscript isn't worth the 
>
>it supports an "inferno" driver out of the box on ubuntu.
>it looks as though it is rgbv.

Yes, but when I've used the inferno driver, the results have always been 
grainy, for some reason.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-09 16:44   ` Kris Maglione
@ 2007-02-09 17:21     ` Russ Cox
  2007-02-09 17:32       ` Kris Maglione
  0 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2007-02-09 17:21 UTC (permalink / raw)
  To: 9fans

> >it supports an "inferno" driver out of the box on ubuntu.
> >it looks as though it is rgbv.
>
> Yes, but when I've used the inferno driver, the results have always been
> grainy, for some reason.

The plan9 driver (in the Plan 9 sources) was tweaked to accomodate
the new full-color model, and in the process I made alpha-blended
output work a bit better.  I suspect that if you added these two
lines from gdevplan9.c to gdevifno.c, then the inferno driver would
look as good for black-and-white text.

	if(pdev->color_info.anti_alias.graphics_bits ||
pdev->color_info.anti_alias.text_bits)
		if(ldepth < 2)
			ldepth = 2;

All that said, using some more standard format is probably the
right answer for page -- I would have chosen png, but bmp is okay.

Russ


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-09 17:21     ` Russ Cox
@ 2007-02-09 17:32       ` Kris Maglione
  2007-02-09 17:52         ` Russ Cox
  0 siblings, 1 reply; 10+ messages in thread
From: Kris Maglione @ 2007-02-09 17:32 UTC (permalink / raw)
  To: 9fans

On Fri, Feb 09, 2007 at 12:21:10PM -0500, Russ Cox wrote:
>All that said, using some more standard format is probably the
>right answer for page -- I would have chosen png, but bmp is okay.

I initially chose png, but it turned out that bmp was orders of 
magnitude faster, so I decided to use that instead.

Uriel asks that I suggest that you bug the ghostscript maintainers to 
include gdevplan9.c in their main distros. He'd do it himself, but he's 
still banned.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-09 17:32       ` Kris Maglione
@ 2007-02-09 17:52         ` Russ Cox
  2007-02-09 18:09           ` Kris Maglione
  0 siblings, 1 reply; 10+ messages in thread
From: Russ Cox @ 2007-02-09 17:52 UTC (permalink / raw)
  To: 9fans

> Uriel asks that I suggest that you bug the ghostscript maintainers to
> include gdevplan9.c in their main distros. He'd do it himself, but he's
> still banned.

I'd be happy to send it to them for inclusion if
someone else would confirm that it compiles
against the latest gs sources.

Russ


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-09 17:52         ` Russ Cox
@ 2007-02-09 18:09           ` Kris Maglione
  0 siblings, 0 replies; 10+ messages in thread
From: Kris Maglione @ 2007-02-09 18:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Feb 09, 2007 at 12:52:14PM -0500, Russ Cox wrote:
>I'd be happy to send it to them for inclusion if
>someone else would confirm that it compiles
>against the latest gs sources.

Yes, it does, against AFPL, at least. Uriel tried it with GNU and I seem 
to recall that it compiled, but he got fed up with the build system.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Page ported to plan9port
  2007-02-08 23:10 [9fans] Page ported to plan9port Kris Maglione
                   ` (2 preceding siblings ...)
  2007-02-09  9:24 ` Charles Forsyth
@ 2007-03-26 20:57 ` Russ Cox
  3 siblings, 0 replies; 10+ messages in thread
From: Russ Cox @ 2007-03-26 20:57 UTC (permalink / raw)
  To: 9fans

On 2/8/07, Kris Maglione <bsdaemon@comcast.net> wrote:
> I've ported page(1) to plan9port.

I've added this to p9p.

Russ


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-03-26 20:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 23:10 [9fans] Page ported to plan9port Kris Maglione
2007-02-08 23:29 ` erik quanstrom
2007-02-09  2:58 ` Russ Cox
2007-02-09  9:24 ` Charles Forsyth
2007-02-09 16:44   ` Kris Maglione
2007-02-09 17:21     ` Russ Cox
2007-02-09 17:32       ` Kris Maglione
2007-02-09 17:52         ` Russ Cox
2007-02-09 18:09           ` Kris Maglione
2007-03-26 20:57 ` Russ Cox

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).