9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Moroo Jun <moroo@nifty.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Drawterm on MacOS X; weird colormap?
Date: Sun, 23 Feb 2003 16:58:59 +0900	[thread overview]
Message-ID: <AA9313E8-4704-11D7-9DF5-0050E4504768@nifty.com> (raw)
In-Reply-To: <200302221702.h1MH2OM21041@augusta.math.psu.edu>

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]


> it, it comes back.  I do notice that, with your fix, when I try to page
> an image (say, a jpg), the RGB values are again mixed up.  When I try
> page with the older version of drawterm, page displays the jpg
> correctly.

I made new patch. Please apply this for original drawterm.
But this patch has 'sam' problem yet. Also 'page' pop up menu.

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 1302 bytes --]

*** drawtermorg/devip-unix.c	Wed May 22 14:57:07 2002
--- drawterm/devip-unix.c	Fri Feb 21 22:56:49 2003
***************
*** 4,9 ****
--- 4,10 ----
  #include <netinet/in.h>
  #include <netdb.h>
  #include <errno.h>
+ #include <netinet/tcp.h>

  #include "lib9.h"
  #include "sys.h"
*** drawtermorg/mkfile	Sat Apr 27 01:51:09 2002
--- drawterm/mkfile	Fri Feb 21 22:55:13 2003
***************
*** 1,5 ****
  #CONF=FreeBSD
! #CONF=FreeBSD-power	# MAC OSX
  #CONF=Irix
  #CONF=Linux
  #CONF=OSF1
--- 1,5 ----
  #CONF=FreeBSD
! CONF=FreeBSD-power	# MAC OSX
  #CONF=Irix
  #CONF=Linux
  #CONF=OSF1
*** drawtermorg/libmemdraw/draw.c	Tue Jul 25 10:23:47 2000
--- drawterm/libmemdraw/draw.c	Sun Feb 23 16:46:02 2003
***************
*** 1994,2000 ****
  	if(val == DNofill)
  		return;

! 	bits = _rgbatoimg(i, val);
  	switch(i->depth){
  	case 24:	/* 24-bit images suck */
  		for(y=i->r.min.y; y<i->r.max.y; y++)
--- 1994,2007 ----
  	if(val == DNofill)
  		return;

! 	if (i->depth == 32) {
! 		bits = val;
! 		bits &= 0x00FF00FF;
! 		bits |= (val << 16) & 0xFF000000;
! 		bits |= (val >> 16) & 0x0000FF00;
! 	} else {
! 		bits = _rgbatoimg(i, val);
! 	}
  	switch(i->depth){
  	case 24:	/* 24-bit images suck */
  		for(y=i->r.min.y; y<i->r.max.y; y++)

  parent reply	other threads:[~2003-02-23  7:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-22 19:44 Dan Cross
2003-01-22 19:54 ` Russ Cox
2003-02-22 14:23   ` Moroo Jun
2003-02-22 17:02     ` Dan Cross
2003-02-22 17:08       ` andrey mirtchovski
2003-02-22 19:41         ` Axel Belinfante
2003-02-23  7:58       ` Moroo Jun [this message]
2003-03-05 14:34       ` Moroo Jun
2003-01-22 22:39 ` Axel Belinfante
2003-01-23  1:02 ` geoff
2003-03-13 12:11 [9fans] refresh problems with drawterm on x (freebsd)? Kenji Arisawa
2003-03-13 13:58 ` [9fans] Drawterm on MacOS X; weird colormap? Kenji Arisawa

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=AA9313E8-4704-11D7-9DF5-0050E4504768@nifty.com \
    --to=moroo@nifty.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).