NetBSD Problem Report #48380

From www@NetBSD.org  Sat Nov 16 11:17:59 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 71A16A6159
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 16 Nov 2013 11:17:59 +0000 (UTC)
Message-Id: <20131116111758.38BC4A61B3@mollari.NetBSD.org>
Date: Sat, 16 Nov 2013 11:17:58 +0000 (UTC)
From: aniou@smutek.pl
Reply-To: aniou@smutek.pl
To: gnats-bugs@NetBSD.org
Subject: xterm doesn't support 256 colors
X-Send-Pr-Version: www-1.0

>Number:         48380
>Category:       xsrc
>Synopsis:       xterm doesn't support 256 colors
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    xsrc-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 16 11:20:00 +0000 2013
>Closed-Date:    Tue Nov 19 11:56:52 +0000 2013
>Last-Modified:  Tue Nov 19 12:00:00 +0000 2013
>Originator:     Piotr Meyer
>Release:        6.1.2_PATCH
>Organization:
>Environment:
NetBSD turkan.smutek.pl 6.1.2_PATCH NetBSD 6.1.2_PATCH (GENERIC) amd64
>Description:
Recently I discovered that xterm in NetBSD 6.1.2 and 6.99.x is built without support for 256 colors. Using extra colors is rather widespread in modern configurations, thus lack of them in default install is annoying.
>How-To-Repeat:
Run - for example - script https://github.com/jpalardy/dotfiles/blob/master/bin/xterm-colortest.pl and see nothing special (we want fancy, rainbow colors).

You can also dig into binary, for example in NetBSD this test shows, what color identifies xterm know:

strings /usr/X11R7/bin/xterm | grep -E '^color[0-9]'|wc -l 
      16

...and in Ubuntu:

strings /usr/bin/xterm | grep -E '^color[0-9]'|wc -l 
256


>Fix:
Define in proper place (maybe in http://cvsweb.netbsd.org/bsdweb.cgi/xsrc/external/mit/xterm/include/xtermcfg.h ?) flag: OPT_256_COLORS, at this moment this flag is undefined:

/* #undef OPT_256_COLORS */		/* CF_ARG_ENABLE(256-color) */

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 19 Nov 2013 11:56:52 +0000
State-Changed-Why:
Changed as suggested, thanks for the PR!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48380 CVS commit: xsrc/external/mit/xterm/include
Date: Tue, 19 Nov 2013 11:56:13 +0000

 Module Name:	xsrc
 Committed By:	wiz
 Date:		Tue Nov 19 11:56:13 UTC 2013

 Modified Files:
 	xsrc/external/mit/xterm/include: xtermcfg.h

 Log Message:
 Enable 256 colors.

 From Piotr Meyer in PR 48380.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xterm/include/xtermcfg.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.