9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Gorka Guardiola Múzquiz <paurea@lsub.org>
To: 9fans@cse.psu.edu
Subject: [9fans] links bug
Date: Thu, 22 Jul 2004 10:09:25 +0200	[thread overview]
Message-ID: <98eba27c67917eb14a8d23b7378b3f0b@plan9.escet.urjc.es> (raw)

I have been playing a little bit with links and got it working for us with
varfont. The problems seems to be with (old code is commented).

/sys/src/cmd/links/dip.c:1960

struct style *g_invert_style(struct style *old)
{
	int length;

	struct style *st;
	st = mem_alloc(sizeof(struct style));
	st->refcount=1;
	st->r0=old->r1;
	st->g0=old->g1;
	st->b0=old->b1;
	st->r1=old->r0;
	st->g1=old->g0;
	st->b1=old->b0;
	st->height=old->height;
	st->flags=old->flags;
	if (st->flags)
	{
		/* We have to get a foreground color for underlining */
		st->underline_color=dip_get_color_sRGB(
			(st->r1<<16)|(st->g1<<8)|(st->b1));
	}
	//length=sizeof(*(st->table))*(n_fonts-1);
	st->table=NULL;	//mem_alloc(length);
	//mem_cpy(st->table,old->table,length);
	st->mono_space=old->mono_space;
	st->mono_height=old->mono_height;
	return st;
}


Trying to copy a table of fonts which is not reserved nor used anywhere else
as far as I have seen. I put it to NULL and everything seems to work for me.
Probably the table field isn't used at all and should disappear, but as
I am not really sure... Links with varfont works for us now.


							G.



             reply	other threads:[~2004-07-22  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-22  8:09 Gorka Guardiola Múzquiz [this message]
2004-07-23  9:47 ` Kenji Okamoto
2004-07-23 10:11   ` Kenji Okamoto
2004-07-23 11:12     ` Gorka Guardiola Múzquiz
2004-07-26  2:19       ` Kenji Okamoto
2004-07-23 14:46   ` andrey mirtchovski

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=98eba27c67917eb14a8d23b7378b3f0b@plan9.escet.urjc.es \
    --to=paurea@lsub.org \
    --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).