Alo Sarv
lead developer

Donate via
MoneyBookers

Latest Builds

version 0.3
tar.gz tar.bz2
Boost 1.33.1 Headers
MLDonkey Downloads Import Module Development
Payment completed
Development in progress.
Developer's Diary
irc.hydranode.com/#hydranode

Monday, January 30, 2006

Support for colors on Windows

Windows console has somewhat different handling of colors than POSIX terminals. POSIX terminals understand a wide range of escape sequences which they interpret as colors and other things; win32 console however uses win32 API functions to achieve the same effect, which hinders one's ability to write portable code in this regard. Until now, I had decided not to support colors on win32 at all, simply since I deemed it unnecessery waste of development resources, considering that majority of the win32 userbase would be using GUI anyway. However, as I hear from several sources already, there are people who want to use console-mode applications even under windows - what the reason might be I do not know, but as they say - "The client is the king" - I introduced coloring support for windows. This covers both the command-line window in which Hydranode runs, as well as hnshell output in telnet.

Notice users of Windows 2000 and earlier: the telnet application that ships with those versions of the OS doesn't support colors to my knowledge, so you'r encouraged to use alternative telnet clients, such as PuTTYtel.

For anyone interested in how to create colored output on win32 console, here's the function that transforms POSIX escape sequences to win32 API calls.

And a screenshot for the disbelievers :)

Madcat.



Comments:
I'm always amazed of what u do ;)
 
Your developement activity is still huge!!
I have feared about a dramatic change in project activity, I hope you'll find a righeous tradeoff between developemnt and jobs.
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?