9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] links bug
@ 2004-07-22  8:09 Gorka Guardiola Múzquiz
  2004-07-23  9:47 ` Kenji Okamoto
  0 siblings, 1 reply; 6+ messages in thread
From: Gorka Guardiola Múzquiz @ 2004-07-22  8:09 UTC (permalink / raw)
  To: 9fans

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.



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

end of thread, other threads:[~2004-07-26  2:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-22  8:09 [9fans] links bug Gorka Guardiola Múzquiz
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

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