|
From: | Thomas Dickey |
Subject: | Re: screen-256color on MacOS 10.5.5 |
Date: | Mon, 1 Dec 2008 15:19:03 -0500 (EST) |
On Mon, 1 Dec 2008, Sentinel wrote:
I have ncurses working from installing via "sudo port install" which does not give me the test programs.I also have a download of ncurses. Strangely, after compiling when i execute the test programs they all say "error terminal" - no matter which terminal i set.
odd (doesn't seem to be an error message from ncurses...)
anyway, i will check the ncurses program and figure out. thanks a lot.
no problem
ruby 1.8.7 | os x 10.5.5 | vim 7.2 On Mon, 1 Dec 2008, Thomas Dickey wrote:On Mon, 1 Dec 2008, Sentinel wrote:I forgot to mention that I _am_ using screen-256color and xterm-256color terminals. So ncurses is to be compiled with ext.But i am not clear on how to refer to the additional colors in a C program. Currently i use constants such as COLOR_RED.they're just numbers.Remember that COLOR_RED is just a number from the 0-7 ANSI color range. A curses program can "just" refer to COLORS and COLOR_PAIRS to see what numbers are legal. (256 colors gives 32767 pairs, which is "less" than expected since numbers are stored in terminfo in a signed short).In the ncurses test program (test/ncurses.c), I put together a demo in the 'C' screen, which lets you scroll through several pages of colors.Thanks. ruby 1.8.7 | os x 10.5.5 | vim 7.2 On Mon, 1 Dec 2008, Thomas Dickey wrote:On Mon, 1 Dec 2008, Sentinel wrote:I've been seeing a lot of mails on 256 colors. My shell can show 256 using various shell scripts which use escape sequences.btw, when i print Ncurses.COLORS in my program, i get 256. But how can i refer to 256 colors in Ncurses ?It has to be built with the ext-colors configure option (to provide enough bits in cchar_t to store the color information).xterm can be built to display 256 colors (again, an option). rxvt also can be built to do this. konsole and gnome-terminal provide a hardcoded palette for this (though iirc, one is hardcoded to use the 88-color palette, and the other for 256). Ditto for PuTTY. Probably some others do this, but I haven't seen any reliable comments.The corresponding $TERM's are the "-256color" entries that ncurses provides.-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
[Prev in Thread] | Current Thread | [Next in Thread] |