[9fans] Page ported to plan9port - Plan9

This is a discussion on [9fans] Page ported to plan9port - Plan9 ; 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 ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: [9fans] Page ported to plan9port

  1. [9fans] Page ported to plan9port

    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?

  2. Re: [9fans] Page ported to plan9port

    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?


  3. Re: [9fans] Page ported to plan9port

    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

  4. Re: [9fans] Page ported 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


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

  5. Re: [9fans] Page ported to plan9port

    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.

  6. Re: [9fans] Page ported to plan9port

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

  7. Re: [9fans] Page ported to plan9port

    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.

  8. Re: [9fans] Page ported to plan9port

    > 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

  9. Re: [9fans] Page ported to plan9port

    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.

  10. Re: Page ported to plan9port

    Thank you, it's nice.

  11. Re: [9fans] Page ported to plan9port

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


    I've added this to p9p.

    Russ

+ Reply to Thread