[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: Mahlon Smith
Subject: Re: Colors in a file generated with putwin(3c)
Date: Mon, 02 Mar 2015 12:28:11 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hello Urban,

I have done some experimentation with curses screen capture of text and color data to HTML using C++, and the only major difficulty I have found is for multi-column characters (specifically Chinese) which cause the HTML to be vertically misaligned.

My primary focus for HTML is conversion of Texinfo HTML output to something less ugly, and I have CSS style definitions which may be applicable to curses capture.

I haven't thought in Fortran for many years, but if you would like to send additional information off-list, I may be able to help with a C/C++ utility.


On 03/01/2015 11:06 AM, 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?



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’m well aware Fortran is generally considered a niche language, so I am not expecting any support in that regard.  However,

If anyone is interested in the code, it is the ncp.f90 program, which calls nc_printhtml.f90; which interfaces to ncurses(3c) thru ncurses.f90, as described at


The interface described there is all public domain; but the applications are not and are not available for transmittal.


Alternatively, does anyone know of a  routine similar to nc_printhtml.f90 that is available in C/C++ or Python?  

If not, then I suppose I can rewite nc_printhtml.f90 in some other languages; but unlike a good part of the world almost

Everything I do is Fortran; and I don’t want to re-invent the wheel if something similar already exists ( I did try a few search engines, and found no “curses-to-html” utilities. I am NOT interested in anything that converts to pixmaps as an alternative.

I am specifically interested in generating HTML).



J. S. Urban




Bug-ncurses mailing list


Software Sam - software and tools for GNU/Linux

Mahlon Smith,
The Software Samurai
On the Web: http://www.SoftwareSam.us/

reply via email to

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