9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Gabriel Diaz" <gabidiaz@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] printing via local attached printer with gs driver
Date: Fri, 22 Jun 2007 09:37:03 +0200	[thread overview]
Message-ID: <82c890d00706220037n6f64ee85pb30f8aedf9ed759e@mail.gmail.com> (raw)
In-Reply-To: <20070618180031.7874F1E8C4D@holo.morphisms.net>

hello

I recompiled taking this in account, but the problem persists (the
src/gshtscr.c has a sightly different line in the distribution than in
the mkfile, so i changed it to the one of mkfile )

Also sources already have the make_other_poles function patched.

thanks

gabi


On 6/18/07, Russ Cox <rsc@swtch.com> wrote:
> Did you compile your own copy of ghostscript?
> This is a common problem if you compile directly
> from the gs sources; there are some Plan 9 specific
> changes that must be made.  See /sys/src/cmd/gs/mkfile:
>
> # If you get weird floating point errors, the culprit is usually the
> # halftone code, which converts double to uint, something 8c handles
> # incorrectly (treats as double to int).  Look in src/gshtscr.c for a line like
> #
> #       sample = (ht_sample_t)((value+1) * max_ht_sample);
> #
> # and change it to one of:
> #
> #       sample = (int)(vlong)((value+1) * max_ht_sample);
> #       sample = (ht_sample_t)(value * max_ht_sample) + max_ht_sample;
> #
> # depending on your preference.
> #
> # Also, recent versions of src/gxshade1.c cause the compiler to run out
> # of registers.  Brucee is looking into this.  In the meantime, use this
> # replacement:
> #
> #       private inline void
> #       make_other_poles(patch_curve_t curve[4])
> #       {
> #           int i, j;
> #
> #           for (i = 0; i < 4; i++) {
> #               j = (i + 1) % 4;
> #               curve[i].control[0].x = (curve[i].vertex.p.x * 2 + curve[j].vertex.p.x);
> #               curve[i].control[0].x /= 3;
> #               curve[i].control[0].y = (curve[i].vertex.p.y * 2 + curve[j].vertex.p.y);
> #               curve[i].control[0].y /= 3;
> #               curve[i].control[1].x = (curve[i].vertex.p.x + curve[j].vertex.p.x * 2);
> #               curve[i].control[1].y /= 3;
> #               curve[i].control[1].y = (curve[i].vertex.p.y + curve[j].vertex.p.y * 2);
> #               curve[i].control[1].y /= 3;
> #               curve[i].straight = true;
> #           }
> #       }
> #
> # (the original includes the /3 in the big expressions).
>
> The source in the distribution should be patched already.
> Also I thought I fixed 8c to do the right float -> uint
> conversion, but it would have been quite a while ago
> and I don't remember.
>
> Russ
>
>


      parent reply	other threads:[~2007-06-22  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18 17:54 Gabriel Diaz
2007-06-18 18:00 ` Russ Cox
2007-06-18 18:07   ` Gabriel Diaz
2007-06-22  7:37   ` Gabriel Diaz [this message]

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=82c890d00706220037n6f64ee85pb30f8aedf9ed759e@mail.gmail.com \
    --to=gabidiaz@gmail.com \
    --cc=9fans@cse.psu.edu \
    /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).