[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colors in a file generated with putwin(3c)

From: Thomas Dickey
Subject: Re: Colors in a file generated with putwin(3c)
Date: Mon, 2 Mar 2015 05:21:33 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Feb 28, 2015 at 10:06:00PM -0500, John S. Urban wrote:
> Files generated with putwin(3c) do not appear to contain information to
> reproduce the color pairs that were in use when the putwin(3c) call was
> made. Is that correct? 

That seems to be the case: as I read the code, it is writing only the text.
> I made a routine to print pads or windows as pre-formatted HTML. It works
> quite well for my purposes when called directly from an ncurses(3c)
> application.  Well enough that others are interested in using it with their
> applications. To make a long story short (my programs are in Fortran, theirs
> are in C and
> Python for starters) I thought I would make a small application that read a
> putwin(3c) file  (thus having a way to generate screen-shots that was
> language-independent and already part of the ncurses(3c) library) and
> convert that to HTML.  It works well enough for everything but color for
> those currently interested in it.  Am I doing something wrong or is there no
> Color pair information in the dump files?   If not, is that a feature or a
> bug? 

I think it is a bug.  (I am puzzled why it was overlooked, aside from
noting that putwin is not often used...).

On the other hand, I do not like the implementation (but have had no
compelling reason to revise it), because it relies upon the binary
layout of the window structs.  For instance, you could not transfer
between normal/wide libraries.  (I'm not keen on starting a new development
task at this moment because I was trying to wrap up things for a release,
but I'll see what I can do).

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]