[Tinymux] Re: Slightly(?) insane requests...
Stephen Dennis
brazilofmux at gmail.com
Thu Mar 24 23:45:17 EST 2005
Currently, the ANSI escape sequences are generated inside the server
and run everywhere that regular text does.
The hope is that these escape sequences would only be generated at the
network. The ESC character itself would be deprecated internally, and
there would be no risk of accidently generating one with softcode.
One possible implementation is two arrays: char text[LBUF_SIZE] and
COLOR color[LBUF_SIZE]. Each text character has a corresponding color.
To search or parse the normal is as simple as ignoring the color,
however, any changes to the text requires a corresponding change to
the color.
A downside of this particular implementation is that it takes up 3
times the memory. An upside is that your text could have arbitrarily
complex color without being cut short.
How the ANSI string is encoded in the database is still an open
question. Perhaps, it will be encoded using ANSI escapes, or perhaps
some other scheme is more appropriate.
But, I would imagine that once this work is done, it would be rather
easy to replace the conversion to ANSI escapes at the network layer to
something that used HTML-style tags instead.
Brazil
More information about the Tinymux
mailing list